]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/bugs: Fix reporting of LFENCE retpoline
authorDavid Kaplan <david.kaplan@amd.com>
Mon, 15 Sep 2025 13:47:05 +0000 (08:47 -0500)
committerBorislav Petkov (AMD) <bp@alien8.de>
Tue, 16 Sep 2025 11:21:21 +0000 (13:21 +0200)
commitd1cc1baef67ac6c09b74629ca053bf3fb812f7dc
tree278f9864be005391ff2c124e5f2f4a352875fd2e
parent30ef245c6f5a6842d60308590cf26d0ae836fbf0
x86/bugs: Fix reporting of LFENCE retpoline

The LFENCE retpoline mitigation is not secure but the kernel prints
inconsistent messages about this fact.  The dmesg log says 'Mitigation:
LFENCE', implying the system is mitigated.  But sysfs reports 'Vulnerable:
LFENCE' implying the system (correctly) is not mitigated.

Fix this by printing a consistent 'Vulnerable: LFENCE' string everywhere
when this mitigation is selected.

Signed-off-by: David Kaplan <david.kaplan@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/20250915134706.3201818-1-david.kaplan@amd.com
arch/x86/kernel/cpu/bugs.c