summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kaplan <david.kaplan@amd.com>2025-10-03 12:19:36 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-11-02 22:18:03 +0900
commit53aa2e9ef30c956930ba75d7bfa32e0573eef38f (patch)
treee4d8161a5aa8ea81425792699c322fe6088f5f30
parent50021894336f7d80f28084b922898b076b02dcca (diff)
downloadlinux-53aa2e9ef30c956930ba75d7bfa32e0573eef38f.tar.gz
linux-53aa2e9ef30c956930ba75d7bfa32e0573eef38f.tar.bz2
linux-53aa2e9ef30c956930ba75d7bfa32e0573eef38f.zip
x86/bugs: Qualify RETBLEED_INTEL_MSG
[ Upstream commit 204ced4108f5d38f6804968fd9543cc69c3f8da6 ] When retbleed mitigation is disabled, the kernel already prints an info message that the system is vulnerable. Recent code restructuring also inadvertently led to RETBLEED_INTEL_MSG being printed as an error, which is unnecessary as retbleed mitigation was already explicitly disabled (by config option, cmdline, etc.). Qualify this print statement so the warning is not printed unless an actual retbleed mitigation was selected and is being disabled due to incompatibility with spectre_v2. Fixes: e3b78a7ad5ea ("x86/bugs: Restructure retbleed mitigation") Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220624 Signed-off-by: David Kaplan <david.kaplan@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://patch.msgid.link/20251003171936.155391-1-david.kaplan@amd.com Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--arch/x86/kernel/cpu/bugs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index bf79ff6a1f66..9750ce448e62 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -1461,7 +1461,9 @@ static void __init retbleed_update_mitigation(void)
break;
default:
if (retbleed_mitigation != RETBLEED_MITIGATION_STUFF) {
- pr_err(RETBLEED_INTEL_MSG);
+ if (retbleed_mitigation != RETBLEED_MITIGATION_NONE)
+ pr_err(RETBLEED_INTEL_MSG);
+
retbleed_mitigation = RETBLEED_MITIGATION_NONE;
}
}