Skip to content

Commit 891d3b8

Browse files
committed
x86/bugs: Fix SRSO reporting on Zen1/2 with SMT disabled
1f4bb06 ("x86/bugs: Restructure SRSO mitigation") does this: if (boot_cpu_data.x86 < 0x19 && !cpu_smt_possible()) { setup_force_cpu_cap(X86_FEATURE_SRSO_NO); srso_mitigation = SRSO_MITIGATION_NONE; return; } and, in particular, sets srso_mitigation to NONE. This leads to reporting Speculative Return Stack Overflow: Vulnerable on Zen2 machines. There's a far bigger confusion with what SRSO_NO means and how it is used in the code but this will be a matter of future fixes and restructuring to how the SRSO mitigation gets determined. Fix the reporting issue for now. Signed-off-by: Borislav Petkov (AMD) <[email protected]> Reviewed-by: David Kaplan <[email protected]> Link: https://lore.kernel.org/[email protected]
1 parent c4070e1 commit 891d3b8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

arch/x86/kernel/cpu/bugs.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2942,7 +2942,9 @@ static void __init srso_update_mitigation(void)
29422942
boot_cpu_has(X86_FEATURE_IBPB_BRTYPE))
29432943
srso_mitigation = SRSO_MITIGATION_IBPB;
29442944

2945-
if (boot_cpu_has_bug(X86_BUG_SRSO) && !cpu_mitigations_off())
2945+
if (boot_cpu_has_bug(X86_BUG_SRSO) &&
2946+
!cpu_mitigations_off() &&
2947+
!boot_cpu_has(X86_FEATURE_SRSO_NO))
29462948
pr_info("%s\n", srso_strings[srso_mitigation]);
29472949
}
29482950

0 commit comments

Comments
 (0)