mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/bugs: Qualify RETBLEED_INTEL_MSG
@ 2025-10-03 17:19 David Kaplan
  2025-10-06 13:11 ` Borislav Petkov
  2025-10-21 10:35 ` [tip: x86/urgent] " tip-bot2 for David Kaplan
  0 siblings, 2 replies; 28+ messages in thread
From: David Kaplan @ 2025-10-03 17:19 UTC (permalink / raw)
  To: Thomas Gleixner, Borislav Petkov, Peter Zijlstra, Josh Poimboeuf,
	Pawan Gupta, Ingo Molnar, Dave Hansen, x86, H . Peter Anvin,
	Klaus Kusche
  Cc: linux-kernel

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.

Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220624
Signed-off-by: David Kaplan <david.kaplan@amd.com>
---
 arch/x86/kernel/cpu/bugs.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index 6a526ae1fe99..e08de5b0d20b 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -1463,7 +1463,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;
 			}
 		}

base-commit: d501f68c45ee1505c4a94c68051387ffa32c9a21
-- 
2.34.1


^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2025-11-02 20:11 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-03 17:19 [PATCH] x86/bugs: Qualify RETBLEED_INTEL_MSG David Kaplan
2025-10-06 13:11 ` Borislav Petkov
2025-10-06 13:58   ` Kaplan, David
2025-10-06 14:04     ` Borislav Petkov
2025-10-07 18:22       ` Pawan Gupta
2025-10-07 22:12         ` Borislav Petkov
2025-10-07 23:08           ` Pawan Gupta
2025-10-08  0:14             ` Josh Poimboeuf
2025-10-08 10:21               ` Borislav Petkov
2025-10-09  1:07                 ` Josh Poimboeuf
2025-10-09 10:19                   ` Borislav Petkov
2025-10-09  6:04                 ` Pawan Gupta
2025-10-09 10:15                   ` Borislav Petkov
2025-10-09 17:13                     ` Pawan Gupta
2025-10-09 18:13                       ` Kaplan, David
2025-10-09 23:14                         ` Borislav Petkov
2025-10-14 10:50                           ` David Laight
2025-11-02 20:11                           ` Borislav Petkov
2025-10-09  5:33               ` Pawan Gupta
2025-10-10  1:10                 ` Josh Poimboeuf
2025-10-10 18:47                   ` Pawan Gupta
2025-10-10 19:19                     ` Josh Poimboeuf
2025-10-10 19:24                       ` Pawan Gupta
2025-10-10 19:27                       ` Kaplan, David
2025-10-10 20:47                         ` Josh Poimboeuf
2025-10-10 21:13                           ` Kaplan, David
2025-10-11  1:20                             ` Josh Poimboeuf
2025-10-21 10:35 ` [tip: x86/urgent] " tip-bot2 for David Kaplan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®