[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251101-tainted-msr-v1-1-e00658ba04d4@linux.intel.com>
Date: Sat, 01 Nov 2025 03:10:24 +0000
From: Marc Herbert <marc.herbert@...ux.intel.com>
To: "H. Peter Anvin" <hpa@...or.com>, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org
Cc: linux-kernel@...r.kernel.org,
Marc Herbert <marc.herbert@...ux.intel.com>
Subject: [PATCH] x86/msr: add CPU_OUT_OF_SPEC taint name to "unrecognized"
pr_warn(msg)
While restricting access, commit a7e1f67ed29f ("x86/msr: Filter MSR
writes") also added warning and tainting. But the warning message never
mentioned tainting. Moreover, this uses the "CPU_OUT_OF_SPEC" flag which
is not clearly related to MSRs: that flag is overloaded by several,
fairly different situations, including some much scarier ones. So,
without an expert around (thank you Dave Hansen), it would have been
practically impossible to root cause the tainting from just the log file
at hand. Fix this by simply appending the CPU_OUT_OF_SPEC flag to the
warning message.
This readability issue happened when staring at logs involving the
Intel Memory Latency Checker (among many other things going on in that
log). The MLC disables hardware prefetch.
Signed-off-by: Marc Herbert <marc.herbert@...ux.intel.com>
---
arch/x86/kernel/msr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c
index e17c16c54a37..21355130cc78 100644
--- a/arch/x86/kernel/msr.c
+++ b/arch/x86/kernel/msr.c
@@ -98,8 +98,8 @@ static int filter_write(u32 reg)
if (!__ratelimit(&fw_rs))
return 0;
- pr_warn("Write to unrecognized MSR 0x%x by %s (pid: %d).\n",
- reg, current->comm, current->pid);
+ pr_warn("Write to unrecognized MSR 0x%x by %s (pid: %d), tainting %s\n",
+ reg, current->comm, current->pid, taint_flags[TAINT_CPU_OUT_OF_SPEC].desc);
pr_warn("See https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/about for details.\n");
return 0;
---
base-commit: dcb6fa37fd7bc9c3d2b066329b0d27dedf8becaa
change-id: 20251030-tainted-msr-4f4ec8acd95c
Best regards,
--
Marc Herbert <marc.herbert@...ux.intel.com>
Powered by blists - more mailing lists