[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250516181322.GGaCeAQjnIVQx_tX_R@fat_crate.local>
Date: Fri, 16 May 2025 20:13:22 +0200
From: Borislav Petkov <bp@...en8.de>
To: Eric Biggers <ebiggers@...nel.org>
Cc: Herbert Xu <herbert@...dor.apana.org.au>,
Jain@...menos.rohan.me.apana.org.au, Ayush <Ayush.Jain3@....com>,
Stephen Rothwell <sfr@...b.auug.org.au>, x86-ml <x86@...nel.org>,
lkml <linux-kernel@...r.kernel.org>, linux-crypto@...r.kernel.org
Subject: Re: [PATCH] crypto: lib/sha256 - Disable SIMD
On Fri, May 16, 2025 at 10:03:16AM -0700, Eric Biggers wrote:
> That's silly. We should just fix x86's irq_fpu_usable() to return false
> before the CPU is properly initialized. It already checks a per-cpu bool, so
> it shouldn't be too hard to fit that in.
Probably.
There's a fpu__init_cpu() call almost right after load_ucode_ap() which causes
this thing.
I'm not sure how much initialized stuff you need for SHA256 SIMD... perhaps
swap fpu__init_cpu() and load_ucode_ap() calls after proper code audit whether
that's ok.
Or add a "is the FPU initialized" check, as you propose, which is probably
easier.
As always, the x86 CPU init path is nasty and needs careful auditing.
> Using the generic SHA-256 code explicitly is also an option,
Or that.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists