summaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/pti.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2019-04-17 21:38:16 +0200
committerThomas Gleixner <tglx@linutronix.de>2019-04-17 21:55:31 +0200
commite9fee6fe08eef51cd9a7455d18b9011f1e463f22 (patch)
tree12df824e278d3bf25644cbb1f680e69044b02d07 /arch/x86/mm/pti.c
parente2c3c94788b08891dcf3dbe608f9880523ecd71b (diff)
parent0336e04a6520bdaefdb0769d2a70084fa52e81ed (diff)
downloadlinux-e9fee6fe08eef51cd9a7455d18b9011f1e463f22.tar.bz2
Merge branch 'core/speculation' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
Pull in the command line updates from the tip tree so the MDS parts can be added.
Diffstat (limited to 'arch/x86/mm/pti.c')
-rw-r--r--arch/x86/mm/pti.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/mm/pti.c b/arch/x86/mm/pti.c
index 4fee5c3003ed..5890f09bfc19 100644
--- a/arch/x86/mm/pti.c
+++ b/arch/x86/mm/pti.c
@@ -35,6 +35,7 @@
#include <linux/spinlock.h>
#include <linux/mm.h>
#include <linux/uaccess.h>
+#include <linux/cpu.h>
#include <asm/cpufeature.h>
#include <asm/hypervisor.h>
@@ -115,7 +116,8 @@ void __init pti_check_boottime_disable(void)
}
}
- if (cmdline_find_option_bool(boot_command_line, "nopti")) {
+ if (cmdline_find_option_bool(boot_command_line, "nopti") ||
+ cpu_mitigations_off()) {
pti_mode = PTI_FORCE_OFF;
pti_print_if_insecure("disabled on command line.");
return;