All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Russell King <rmk+kernel@armlinux.org.uk>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Tony Lindgren <tony@atomide.com>,
	Marc Zyngier <marc.zyngier@arm.com>,
	"David A. Long" <dave.long@linaro.org>
Subject: [PATCH 4.9 38/59] ARM: bugs: hook processor bug checking into SMP and suspend paths
Date: Wed, 21 Nov 2018 20:06:53 +0100	[thread overview]
Message-ID: <20181121183509.746658152@linuxfoundation.org> (raw)
In-Reply-To: <20181121183508.262873520@linuxfoundation.org>

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Russell King <rmk+kernel@armlinux.org.uk>

Commit 26602161b5ba795928a5a719fe1d5d9f2ab5c3ef upstream.

Check for CPU bugs when secondary processors are being brought online,
and also when CPUs are resuming from a low power mode.  This gives an
opportunity to check that processor specific bug workarounds are
correctly enabled for all paths that a CPU re-enters the kernel.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Boot-tested-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: David A. Long <dave.long@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/arm/include/asm/bugs.h |    2 ++
 arch/arm/kernel/bugs.c      |    5 +++++
 arch/arm/kernel/smp.c       |    4 ++++
 arch/arm/kernel/suspend.c   |    2 ++
 4 files changed, 13 insertions(+)

--- a/arch/arm/include/asm/bugs.h
+++ b/arch/arm/include/asm/bugs.h
@@ -14,8 +14,10 @@ extern void check_writebuffer_bugs(void)
 
 #ifdef CONFIG_MMU
 extern void check_bugs(void);
+extern void check_other_bugs(void);
 #else
 #define check_bugs() do { } while (0)
+#define check_other_bugs() do { } while (0)
 #endif
 
 #endif
--- a/arch/arm/kernel/bugs.c
+++ b/arch/arm/kernel/bugs.c
@@ -3,7 +3,12 @@
 #include <asm/bugs.h>
 #include <asm/proc-fns.h>
 
+void check_other_bugs(void)
+{
+}
+
 void __init check_bugs(void)
 {
 	check_writebuffer_bugs();
+	check_other_bugs();
 }
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -29,6 +29,7 @@
 #include <linux/irq_work.h>
 
 #include <linux/atomic.h>
+#include <asm/bugs.h>
 #include <asm/smp.h>
 #include <asm/cacheflush.h>
 #include <asm/cpu.h>
@@ -400,6 +401,9 @@ asmlinkage void secondary_start_kernel(v
 	 * before we continue - which happens after __cpu_up returns.
 	 */
 	set_cpu_online(cpu, true);
+
+	check_other_bugs();
+
 	complete(&cpu_running);
 
 	local_irq_enable();
--- a/arch/arm/kernel/suspend.c
+++ b/arch/arm/kernel/suspend.c
@@ -1,6 +1,7 @@
 #include <linux/init.h>
 #include <linux/slab.h>
 
+#include <asm/bugs.h>
 #include <asm/cacheflush.h>
 #include <asm/idmap.h>
 #include <asm/pgalloc.h>
@@ -34,6 +35,7 @@ int cpu_suspend(unsigned long arg, int (
 		cpu_switch_mm(mm->pgd, mm);
 		local_flush_bp_all();
 		local_flush_tlb_all();
+		check_other_bugs();
 	}
 
 	return ret;



  parent reply	other threads:[~2018-11-21 19:10 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-21 19:06 [PATCH 4.9 00/59] 4.9.139-stable review Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 01/59] flow_dissector: do not dissect l4 ports for fragments Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 02/59] ibmvnic: fix accelerated VLAN handling Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 03/59] ip_tunnel: dont force DF when MTU is locked Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 04/59] net-gro: reset skb->pkt_type in napi_reuse_skb() Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 05/59] sctp: not allow to set asoc prsctp_enable by sockopt Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 06/59] tg3: Add PHY reset for 5717/5719/5720 in change ring and flow control paths Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 07/59] usbnet: smsc95xx: disable carrier check while suspending Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 08/59] inet: frags: better deal with smp races Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 09/59] ipv6: Fix PMTU updates for UDP/raw sockets in presence of VRF Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 10/59] kbuild: Add better clang cross build support Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 11/59] kbuild: clang: add -no-integrated-as to KBUILD_[AC]FLAGS Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 12/59] kbuild: Consolidate header generation from ASM offset information Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 13/59] kbuild: consolidate redundant sed script ASM offset generation Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 14/59] kbuild: fix asm-offset generation to work with clang Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 15/59] kbuild: drop -Wno-unknown-warning-option from clang options Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 16/59] kbuild, LLVMLinux: Add -Werror to cc-option to support clang Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 17/59] kbuild: use -Oz instead of -Os when using clang Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 18/59] kbuild: Add support to generate LLVM assembly files Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 19/59] modules: mark __inittest/__exittest as __maybe_unused Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 20/59] x86/kbuild: Use cc-option to enable -falign-{jumps/loops} Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 21/59] crypto, x86: aesni - fix token pasting for clang Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 22/59] kbuild: Add __cc-option macro Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 23/59] x86/build: Use __cc-option for boot code compiler options Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 24/59] x86/build: Specify stack alignment for clang Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 25/59] kbuild: clang: Disable address-of-packed-member warning Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 26/59] crypto: arm64/sha - avoid non-standard inline asm tricks Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 27/59] x86/boot: #undef memcpy() et al in string.c Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 28/59] efi/libstub/arm64: Use hidden attribute for struct screen_info reference Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 29/59] efi/libstub/arm64: Force hidden visibility for section markers Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 30/59] efi/libstub: Preserve .debug sections after absolute relocation check Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 31/59] efi/libstub/arm64: Set -fpie when building the EFI stub Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 32/59] x86/build: Fix stack alignment for CLang Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 33/59] x86/build: Use cc-option to validate stack alignment parameter Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 34/59] Kbuild: use -fshort-wchar globally Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 35/59] arm64: uaccess: suppress spurious clang warning Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 36/59] ARM: add more CPU part numbers for Cortex and Brahma B15 CPUs Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 37/59] ARM: bugs: prepare processor bug infrastructure Greg Kroah-Hartman
2018-11-21 19:06 ` Greg Kroah-Hartman [this message]
2018-11-21 19:06 ` [PATCH 4.9 39/59] ARM: bugs: add support for per-processor bug checking Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 40/59] ARM: spectre: add Kconfig symbol for CPUs vulnerable to Spectre Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 41/59] ARM: spectre-v2: harden branch predictor on context switches Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 42/59] ARM: spectre-v2: add Cortex A8 and A15 validation of the IBE bit Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 43/59] ARM: spectre-v2: harden user aborts in kernel space Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.9 44/59] ARM: spectre-v2: add firmware based hardening Greg Kroah-Hartman
2018-11-21 19:07 ` [PATCH 4.9 45/59] ARM: spectre-v2: warn about incorrect context switching functions Greg Kroah-Hartman
2018-11-21 19:07 ` [PATCH 4.9 46/59] ARM: KVM: invalidate BTB on guest exit for Cortex-A12/A17 Greg Kroah-Hartman
2018-11-21 19:07 ` [PATCH 4.9 47/59] ARM: KVM: invalidate icache on guest exit for Cortex-A15 Greg Kroah-Hartman
2018-11-21 19:07 ` [PATCH 4.9 48/59] ARM: spectre-v2: KVM: invalidate icache on guest exit for Brahma B15 Greg Kroah-Hartman
2018-11-21 19:07 ` [PATCH 4.9 49/59] ARM: KVM: Add SMCCC_ARCH_WORKAROUND_1 fast handling Greg Kroah-Hartman
2018-11-21 19:07 ` [PATCH 4.9 50/59] ARM: KVM: report support for SMCCC_ARCH_WORKAROUND_1 Greg Kroah-Hartman
2018-11-21 19:07 ` [PATCH 4.9 51/59] ARM: spectre-v1: add speculation barrier (csdb) macros Greg Kroah-Hartman
2018-11-21 19:07 ` [PATCH 4.9 52/59] ARM: spectre-v1: add array_index_mask_nospec() implementation Greg Kroah-Hartman
2018-11-21 19:07 ` [PATCH 4.9 53/59] ARM: spectre-v1: fix syscall entry Greg Kroah-Hartman
2018-11-21 19:07 ` [PATCH 4.9 54/59] ARM: signal: copy registers using __copy_from_user() Greg Kroah-Hartman
2018-11-21 19:07 ` [PATCH 4.9 55/59] ARM: vfp: use __copy_from_user() when restoring VFP state Greg Kroah-Hartman
2018-11-21 19:07 ` [PATCH 4.9 56/59] ARM: oabi-compat: copy semops using __copy_from_user() Greg Kroah-Hartman
2018-11-21 19:07 ` [PATCH 4.9 57/59] ARM: use __inttype() in get_user() Greg Kroah-Hartman
2018-11-21 19:07 ` [PATCH 4.9 58/59] ARM: spectre-v1: use get_user() for __get_user() Greg Kroah-Hartman
2018-11-21 19:07 ` [PATCH 4.9 59/59] ARM: spectre-v1: mitigate user accesses Greg Kroah-Hartman
2018-11-22  4:58 ` [PATCH 4.9 00/59] 4.9.139-stable review kernelci.org bot
2018-11-22 16:33 ` Guenter Roeck
2018-11-22 18:07   ` Murilo Fossa Vicentini
2018-11-22 19:49     ` Guenter Roeck
2018-11-22 20:16       ` Murilo Fossa Vicentini
2018-11-23  7:15       ` Greg Kroah-Hartman
2018-11-23  7:16 ` Naresh Kamboju
2018-11-23  7:28   ` Greg Kroah-Hartman
2018-11-23  9:57 ` Jon Hunter
2018-11-23  9:57   ` Jon Hunter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181121183509.746658152@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=dave.long@linaro.org \
    --cc=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=stable@vger.kernel.org \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.