Home Home > GIT Browse > SLE11-SP4
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2018-06-08 11:09:29 +0200
committerJiri Kosina <jkosina@suse.cz>2018-06-08 11:09:29 +0200
commitb04aa43840a2ae8f927a6b01124bd671442d1879 (patch)
treec09493b1bdbd797e6f6475061c1114ddbcd18457
parentbdf9d489f6bf4cefd8cb820907d18aea7d5f819a (diff)
x86/bugs: spec_ctrl must be cleared from cpu_caps_set when
being disabled (bsc#1096140). suse-commit: adb7c6011a910b9a70f7bc7c01ec8a51553d3b5d
-rw-r--r--arch/x86/kernel/cpu/spec_ctrl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/spec_ctrl.c b/arch/x86/kernel/cpu/spec_ctrl.c
index 0251920fd4d1..1fa86a4b8757 100644
--- a/arch/x86/kernel/cpu/spec_ctrl.c
+++ b/arch/x86/kernel/cpu/spec_ctrl.c
@@ -95,7 +95,13 @@ EXPORT_SYMBOL_GPL(x86_spec_check);
int __init nospec(char *str)
{
+ /*
+ * Due to way how apply_forced_caps() works, we have to
+ * explicitly clear the flag here from cas_set, otherwise it'll be
+ * kept being put into the global mask.
+ */
setup_clear_cpu_cap(X86_FEATURE_SPEC_CTRL);
+ clear_bit(X86_FEATURE_SPEC_CTRL, (unsigned long *)cpu_caps_set);
ibrs_state = 0;
ibpb_state = 0;