mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
To: x86@kernel.org
Cc: linux-kernel@vger.kernel.org, Borislav Petkov <bp@alien8.de>,
	Josh Poimboeuf <jpoimboe@kernel.org>
Subject: [PATCH] x86/its: Warn when microcode is old
Date: Wed, 11 Jun 2025 17:08:27 -0700	[thread overview]
Message-ID: <20250611-its-warn-v1-1-02eb9a75ce9c@linux.intel.com> (raw)

A microcode update is required for IBPB to be effective against ITS. On
Intel, X86_BUG_OLD_MICROCODE is set already when old microcode is detected.
In such a case system is tainted and a warning is issued.

Also warn that userspace could be vulnerable to ITS.

Suggested-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
---
 arch/x86/kernel/cpu/bugs.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index 7f94e6a5497d9a2d312a76095e48d6b364565777..7aa3ae00e6b4daa5e42217b66c50cd46d6bcc115 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -1427,6 +1427,10 @@ static void __init its_select_mitigation(void)
 		return;
 	}
 
+	/* For IBPB to be effective against ITS */
+	if (boot_cpu_has_bug(X86_BUG_OLD_MICROCODE))
+		pr_warn("Old microcode, userspace may be vulnerable to ITS\n");
+
 	if (its_mitigation == ITS_MITIGATION_RETPOLINE_STUFF &&
 	    !IS_ENABLED(CONFIG_MITIGATION_CALL_DEPTH_TRACKING)) {
 		pr_err("RSB stuff mitigation not supported, using default\n");

---
base-commit: 19272b37aa4f83ca52bdf9c16d5d81bdd1354494
change-id: 20250611-its-warn-b292b10896e3

             reply	other threads:[~2025-06-12  0:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-12  0:08 Pawan Gupta [this message]
2025-06-12  6:34 ` Sohil Mehta
2025-06-12 13:19   ` Pawan Gupta
2025-06-12 13:31     ` Dave Hansen
2025-06-12  6:58 ` Nikolay Borisov
2025-06-12 13:22   ` Pawan Gupta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250611-its-warn-v1-1-02eb9a75ce9c@linux.intel.com \
    --to=pawan.kumar.gupta@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®