From: Thomas Gleixner <tglx@linutronix.de>
To: Peter Jung <ptr1337@cachyos.org>,
linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org
Cc: stable@vger.kernel.org, Gregory Price <gourry@gourry.net>,
"Borislav Petkov (AMD)" <bp@alien8.de>,
x86@kernel.org
Subject: Re: [tip: x86/urgent] x86/CPU/AMD: Add RDSEED fix for Zen5
Date: Mon, 03 Nov 2025 17:12:54 +0100 [thread overview]
Message-ID: <878qgnw0vt.ffs@tglx> (raw)
In-Reply-To: <9a27f2e6-4f62-45a6-a527-c09983b8dce4@cachyos.org>
On Mon, Nov 03 2025 at 14:59, Peter Jung wrote:
>> static void init_amd_zen5(struct cpuinfo_x86 *c)
>> {
>> + if (!x86_match_min_microcode_rev(zen5_rdseed_microcode)) {
>> + clear_cpu_cap(c, X86_FEATURE_RDSEED);
>> + msr_clear_bit(MSR_AMD64_CPUID_FN_7, 18);
>> + pr_emerg_once("RDSEED32 is broken. Disabling the corresponding CPUID bit.\n");
>> + }
>> }
>>
>> static void init_amd(struct cpuinfo_x86 *c)
>
> This fix seems to break quite a bunch of users in CachyOS. There has
> been now several users reporting that there system can not get properly
> into the graphical interface.
>
> CachyOS is compiling the packages with -march=znver5 and the GCC
> compiler currently does pass RDSEED.
You get what you ask for. You build a binary for a CPU which does
not provide a functional correct RDSEED16/32 instruction.
> This patch results into that also Client CPUs (Strix Point, Granite
> Ridge), can not execute this. There has been a microcode fix deployed in
> linux-firmware for Turin, but no other microcode changes seen yet.
>
> I think it would be possible to exclude clients or providing a fix for this.
There are only two fixes:
1) New microcode
2) Fix all source code to either use the 64bit variant of RDSEED
or check the result for 0 and treat it like RDSEED with CF=0
(fail) or make it check the CPUID bit....
New microcode will come around soon and fixing all source code is not
possible.
Excluding clients is not an option because that leaves anything crypto
related which relies on randomness with a big hole. Clients require
functional crypto as much as any other system, no?
So the only workaround for now is to use a build which does not emit
RDSEED or checks CPUID for availability before blindly using it.
Thanks,
tglx
next prev parent reply other threads:[~2025-11-03 16:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-28 12:01 [tip: x86/urgent] x86/CPU/AMD: Add RDSEED fix for Zen5 tip-bot2 for Gregory Price
2025-10-30 18:05 ` Jason A. Donenfeld
2025-10-30 21:48 ` Jason A. Donenfeld
2025-11-03 13:59 ` Peter Jung
2025-11-03 14:28 ` Borislav Petkov
2025-11-03 16:12 ` Thomas Gleixner [this message]
2025-11-24 22:18 ` Pavel Machek
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=878qgnw0vt.ffs@tglx \
--to=tglx@linutronix.de \
--cc=bp@alien8.de \
--cc=gourry@gourry.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=ptr1337@cachyos.org \
--cc=stable@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