Skip to content

Commit 6405b72

Browse files
committed
x86/srso: Correct the mitigation status when SMT is disabled
Specify how is SRSO mitigated when SMT is disabled. Also, correct the SMT check for that. Fixes: e9fbc47 ("x86/srso: Disable the mitigation on unaffected configurations") Suggested-by: Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Acked-by: Josh Poimboeuf <jpoimboe@kernel.org> Link: https://lore.kernel.org/r/20230814200813.p5czl47zssuej7nv@treble
1 parent 5409730 commit 6405b72

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

arch/x86/kernel/cpu/bugs.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2428,8 +2428,7 @@ static void __init srso_select_mitigation(void)
24282428
* Zen1/2 with SMT off aren't vulnerable after the right
24292429
* IBPB microcode has been applied.
24302430
*/
2431-
if ((boot_cpu_data.x86 < 0x19) &&
2432-
(!cpu_smt_possible() || (cpu_smt_control == CPU_SMT_DISABLED))) {
2431+
if (boot_cpu_data.x86 < 0x19 && !cpu_smt_possible()) {
24332432
setup_force_cpu_cap(X86_FEATURE_SRSO_NO);
24342433
return;
24352434
}
@@ -2714,7 +2713,7 @@ static ssize_t retbleed_show_state(char *buf)
27142713
static ssize_t srso_show_state(char *buf)
27152714
{
27162715
if (boot_cpu_has(X86_FEATURE_SRSO_NO))
2717-
return sysfs_emit(buf, "Not affected\n");
2716+
return sysfs_emit(buf, "Mitigation: SMT disabled\n");
27182717

27192718
return sysfs_emit(buf, "%s%s\n",
27202719
srso_strings[srso_mitigation],

0 commit comments

Comments
 (0)