[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250210210103.GC348261@sol.localdomain>
Date: Mon, 10 Feb 2025 13:01:03 -0800
From: Eric Biggers <ebiggers@...nel.org>
To: Borislav Petkov <bp@...en8.de>
Cc: linux-kernel@...r.kernel.org, linux-crypto@...r.kernel.org,
x86@...nel.org, linux-block@...r.kernel.org,
Ard Biesheuvel <ardb@...nel.org>, Keith Busch <kbusch@...nel.org>,
Kent Overstreet <kent.overstreet@...ux.dev>,
"Martin K . Petersen" <martin.petersen@...cle.com>,
Ingo Molnar <mingo@...nel.org>
Subject: Re: [PATCH v4 1/6] x86: move ZMM exclusion list into CPU feature flag
On Mon, Feb 10, 2025 at 09:40:30PM +0100, Borislav Petkov wrote:
> On Mon, Feb 10, 2025 at 09:45:35AM -0800, Eric Biggers wrote:
> > @@ -1598,11 +1578,11 @@ static int __init register_avx_algs(void)
> > ARRAY_SIZE(aes_gcm_algs_vaes_avx10_256),
> > aes_gcm_simdalgs_vaes_avx10_256);
> > if (err)
> > return err;
> >
> > - if (x86_match_cpu(zmm_exclusion_list)) {
> > + if (boot_cpu_has(X86_FEATURE_PREFER_YMM)) {
>
> s/boot_cpu_has/cpu_feature_enabled/
>
$ git grep boot_cpu_has arch/x86/crypto | wc -l
87
$ git grep cpu_feature_enabled arch/x86/crypto | wc -l
0
It wouldn't make sense to change just this one. Should they really all be
changed?
I see that cpu_feature_enabled() uses code patching while boot_cpu_has() does
not. All these checks occur once at module load time, though, so code patching
wouldn't be beneficial.
- Eric
Powered by blists - more mailing lists