projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5872080
)
x86/srso: Fix SBPB enablement for (possible) future fixed HW
author
Josh Poimboeuf
<jpoimboe@kernel.org>
Tue, 5 Sep 2023 05:04:49 +0000
(22:04 -0700)
committer
Borislav Petkov (AMD)
<bp@alien8.de>
Fri, 20 Oct 2023 09:34:51 +0000
(11:34 +0200)
Make the SBPB check more robust against the (possible) case where future
HW has SRSO fixed but doesn't have the SRSO_NO bit set.
Fixes: 1b5277c0ea0b ("x86/srso: Add SRSO_NO support")
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Borislav Petkov (AMD) <bp@alien8.de>
Link:
https://lore.kernel.org/r/cee5050db750b391c9f35f5334f8ff40e66c01b9.1693889988.git.jpoimboe@kernel.org
arch/x86/kernel/cpu/bugs.c
patch
|
blob
|
history
diff --git
a/arch/x86/kernel/cpu/bugs.c
b/arch/x86/kernel/cpu/bugs.c
index 10499bcd4e39624827e9641df81eda074bc3cfdc..2859a54660a282dbc223636d4ac12a8d21f90f84 100644
(file)
--- a/
arch/x86/kernel/cpu/bugs.c
+++ b/
arch/x86/kernel/cpu/bugs.c
@@
-2496,7
+2496,7
@@
static void __init srso_select_mitigation(void)
pr_info("%s%s\n", srso_strings[srso_mitigation], (has_microcode ? "" : ", no microcode"));
pred_cmd:
- if ((
boot_cpu_has(X86_FEATURE_SRSO_N
O) || srso_cmd == SRSO_CMD_OFF) &&
+ if ((
!boot_cpu_has_bug(X86_BUG_SRS
O) || srso_cmd == SRSO_CMD_OFF) &&
boot_cpu_has(X86_FEATURE_SBPB))
x86_pred_cmd = PRED_CMD_SBPB;
}