Skip to content

Commit 204ced4

Browse files
dkaplan2bp3tk0v
authored andcommitted
x86/bugs: Qualify RETBLEED_INTEL_MSG
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: e3b78a7 ("x86/bugs: Restructure retbleed mitigation") Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220624 Signed-off-by: David Kaplan <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent 876f0d4 commit 204ced4

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
@@ -1463,7 +1463,9 @@ static void __init retbleed_update_mitigation(void)
14631463
break;
14641464
default:
14651465
if (retbleed_mitigation != RETBLEED_MITIGATION_STUFF) {
1466-
pr_err(RETBLEED_INTEL_MSG);
1466+
if (retbleed_mitigation != RETBLEED_MITIGATION_NONE)
1467+
pr_err(RETBLEED_INTEL_MSG);
1468+
14671469
retbleed_mitigation = RETBLEED_MITIGATION_NONE;
14681470
}
14691471
}

0 commit comments

Comments
 (0)