Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

x86/bugs: Fix SRSO reporting on Zen1/2 with SMT disabled

1f4bb068b498 ("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) <bp@alien8.de>
Reviewed-by: David Kaplan <david.kaplan@amd.com>
Link: https://lore.kernel.org/20250513110405.15872-1-bp@kernel.org

+3 -1
+3 -1
arch/x86/kernel/cpu/bugs.c
··· 2942 2942 boot_cpu_has(X86_FEATURE_IBPB_BRTYPE)) 2943 2943 srso_mitigation = SRSO_MITIGATION_IBPB; 2944 2944 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)) 2946 2948 pr_info("%s\n", srso_strings[srso_mitigation]); 2947 2949 } 2948 2950