[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251018024010.4112396-1-gourry@gourry.net>
Date: Fri, 17 Oct 2025 22:40:10 -0400
From: Gregory Price <gourry@...rry.net>
To: x86@...nel.org
Cc: linux-kernel@...r.kernel.org,
tglx@...utronix.de,
mingo@...hat.com,
bp@...en8.de,
dave.hansen@...ux.intel.com,
hpa@...or.com,
peterz@...radead.org,
mario.limonciello@....com,
riel@...riel.com,
yazen.ghannam@....com,
me@...aill.net,
kai.huang@...el.com,
sandipan.das@....com,
darwi@...utronix.de,
stable@...r.kernel.org
Subject: [PATCH v2] x86/amd: Disable RDSEED on AMD Zen5 because of an error.
Under unknown conditions, Zen5 chips running rdseed can produce
(val=0,CF=1) over 10% of the time (when rdseed is successful).
CF=1 indicates success, while val=0 is typically only produced
when rdseed fails (CF=0).
This suggests there is a bug which causes rdseed to silently fail.
This was reproduced reliably by launching 2-threads per available
core, 1-thread per for hamming on RDSEED, and 1-thread per core
collectively eating and hammering on ~90% of memory.
This was observed on more than 1 Zen5 model, so it should be disabled
for all of Zen5 until/unless a comprehensive blacklist can be built.
Cc: stable@...r.kernel.org
Signed-off-by: Gregory Price <gourry@...rry.net>
---
arch/x86/kernel/cpu/amd.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 5398db4dedb4..1af30518d3e7 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -1037,6 +1037,10 @@ static void init_amd_zen4(struct cpuinfo_x86 *c)
static void init_amd_zen5(struct cpuinfo_x86 *c)
{
+ /* Disable RDSEED on AMD Turin because of an error. */
+ clear_cpu_cap(c, X86_FEATURE_RDSEED);
+ msr_clear_bit(MSR_AMD64_CPUID_FN_7, 18);
+ pr_emerg("RDSEED is not reliable on this platform; disabling.\n");
}
static void init_amd(struct cpuinfo_x86 *c)
--
2.51.0
Powered by blists - more mailing lists