diff options
author | Linus Torvalds | 2019-05-06 22:01:16 +0200 |
---|---|---|
committer | Linus Torvalds | 2019-05-06 22:01:16 +0200 |
commit | 0a499fc5c37e6db096969a83534fd98a2bf2b36c (patch) | |
tree | 682875f57706b1e28bfe579372a465bd778ce3dc /arch/s390/kernel/nospec-branch.c | |
parent | Merge branch 'core-rseq-for-linus' of git://git.kernel.org/pub/scm/linux/kern... (diff) | |
parent | s390/speculation: Support 'mitigations=' cmdline option (diff) | |
download | kernel-qcow2-linux-0a499fc5c37e6db096969a83534fd98a2bf2b36c.tar.gz kernel-qcow2-linux-0a499fc5c37e6db096969a83534fd98a2bf2b36c.tar.xz kernel-qcow2-linux-0a499fc5c37e6db096969a83534fd98a2bf2b36c.zip |
Merge branch 'core-speculation-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull speculation mitigation update from Ingo Molnar:
"This adds the "mitigations=" bootline option, which offers a
cross-arch set of options that will work on x86, PowerPC and s390 that
will map to the arch specific option internally"
* 'core-speculation-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
s390/speculation: Support 'mitigations=' cmdline option
powerpc/speculation: Support 'mitigations=' cmdline option
x86/speculation: Support 'mitigations=' cmdline option
cpu/speculation: Add 'mitigations=' cmdline option
Diffstat (limited to 'arch/s390/kernel/nospec-branch.c')
-rw-r--r-- | arch/s390/kernel/nospec-branch.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/s390/kernel/nospec-branch.c b/arch/s390/kernel/nospec-branch.c index bdddaae96559..649135cbedd5 100644 --- a/arch/s390/kernel/nospec-branch.c +++ b/arch/s390/kernel/nospec-branch.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include <linux/module.h> #include <linux/device.h> +#include <linux/cpu.h> #include <asm/nospec-branch.h> static int __init nobp_setup_early(char *str) @@ -58,7 +59,7 @@ early_param("nospectre_v2", nospectre_v2_setup_early); void __init nospec_auto_detect(void) { - if (test_facility(156)) { + if (test_facility(156) || cpu_mitigations_off()) { /* * The machine supports etokens. * Disable expolines and disable nobp. |