]> www.infradead.org Git - users/jedix/linux-maple.git/commit
crypto: x86/aes - drop the avx10_256 AES-XTS and AES-CTR code
authorEric Biggers <ebiggers@google.com>
Wed, 2 Apr 2025 00:24:01 +0000 (17:24 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 7 Apr 2025 05:22:27 +0000 (13:22 +0800)
commit7d14fbc5691b39b8ab322c0220713c2ac3298b29
treead85c97ba0110c2e1408725b210e95cdb02f3276
parent5ebc052d3b8233f72cfc0a57afed0cb4b2d2b287
crypto: x86/aes - drop the avx10_256 AES-XTS and AES-CTR code

Intel made a late change to the AVX10 specification that removes support
for a 256-bit maximum vector length and enumeration of the maximum
vector length.  AVX10 will imply a maximum vector length of 512 bits.
I.e. there won't be any such thing as AVX10/256 or AVX10/512; there will
just be AVX10, and it will essentially just consolidate AVX512 features.

As a result of this new development, my strategy of providing both
*_avx10_256 and *_avx10_512 functions didn't turn out to be that useful.
The only remaining motivation for the 256-bit AVX512 / AVX10 functions
is to avoid downclocking on older Intel CPUs.  But in the case of
AES-XTS and AES-CTR, I already wrote *_avx2 code too (primarily to
support CPUs without AVX512), which performs almost as well as
*_avx10_256.  So we should just use that.

Therefore, remove the *_avx10_256 AES-XTS and AES-CTR functions and
algorithms, and rename the *_avx10_512 AES-XTS and AES-CTR functions and
algorithms to *_avx512.  Make Ice Lake and Tiger Lake use *_avx2 instead
of *_avx10_256 which they previously used.

I've left AES-GCM unchanged for now.  There is no VAES+AVX2 optimized
AES-GCM in the kernel yet, so the path forward for that is not as clear.
However, I did write a VAES+AVX2 optimized AES-GCM for BoringSSL.  So
one option is to port that to the kernel and then do the same cleanup.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/x86/crypto/aes-ctr-avx-x86_64.S
arch/x86/crypto/aes-xts-avx-x86_64.S
arch/x86/crypto/aesni-intel_glue.c