From: "Ard Biesheuvel" <ardb@kernel.org>
To: "Eric Biggers" <ebiggers@kernel.org>, linux-crypto@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
"Jason A . Donenfeld" <Jason@zx2c4.com>,
"Herbert Xu" <herbert@gondor.apana.org.au>,
x86@kernel.org, linux-riscv@lists.infradead.org
Subject: Re: [PATCH v2 00/20] Migrate x86 and RISC-V accelerated AES modes into library
Date: Wed, 30 Sep 2026 15:15:35 +0200 [thread overview]
Message-ID: <e357ed97-6098-49c1-b031-c4955c97a35a@app.fastmail.com> (raw)
In-Reply-To: <20260927224418.109759-1-ebiggers@kernel.org>
On Mon, 28 Sep 2026, at 00:42, Eric Biggers wrote:
> This series applies to v7.3-rc4. It can also be retrieved from:
>
> git fetch
> https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git
> aes-lib-x86-riscv-v2
>
> Patch 1 was already applied to libcrypto-fixes, but is resent to make
> this series applicable directly to v7.3-rc4 (ensuring that the Sashiko
> review runs). Patches 2-20 are targeting libcrypto-next for 7.4.
>
> This series migrates the x86 and RISC-V accelerated implementations of
> the AES modes ECB, CBC, CBC-CTS, CTR, XCTR, and XTS into lib/crypto/.
>
> This makes the corresponding library APIs be properly accelerated on
> these architectures, while still accelerating crypto_skcipher as well
> (via the library-based code in crypto/aes.c).
>
> It removes a lot of redundant glue code, since crypto API boilerplate no
> longer needs to be duplicated per-architecture.
>
> Finally, it fixes the longstanding issue where these optimizations were
> disabled by default.
>
> In the case of RISC-V, this series handles all remaining AES code in
> arch/riscv/crypto/. In the case of x86, AES-GCM is still left in
> arch/x86/crypto/ for now; it will be handled later. Other architectures
> will be handled later as well.
>
> For various reasons, aesni-intel_asm.S (the x86-accelerated ECB, CBC,
> CBC-CTS, CTR, and XTS code that doesn't use AVX or VAES) is replaced
> with new functions written from scratch. The other assembly functions
> are kept but are modified slightly for integration into the library.
>
> Changed in v2:
> - Fixed 32-bit x86 bisection hazards by making aesni-intel depend on
> CONFIG_64BIT earlier in the series.
>
> - Fixed handling of lengths over S32_MAX in RISC-V CTR code.
>
> - Restored selection of CRYPTO_SKCIPHER by CRYPTO_AES_NI_INTEL, since
> it is still needed.
>
> - Made the 32-bit x86 XTS code spill the tweaks to the stack rather
> than to the destination buffer.
>
> - Removed the no-longer-needed single block special case from the
> RISC-V CBC-CTS assembly code.
>
> - Made x86 CBC-CTS encryption and decryption share more code.
>
> - Reordered the function parameters in aes-xts-avx-x86_64.S and
> aes-ctr-avx-x86_64.S.
>
> - Other miscellaneous cleanups.
>
> Eric Biggers (20):
> crypto: aes - Fix undesired override of some optimized AES modes
> lib/crypto: aes-xctr: Pass counter by value to aes_xctr_arch()
> lib/crypto: x86/aes: Clean up aes-aesni.S in preparation for AES modes
> lib/crypto: x86/aes-ecb: Add AES-NI optimization
> lib/crypto: x86/aes-cbc: Add AES-NI optimization
> lib/crypto: x86/aes-ctr: Add AES-NI optimization
> lib/crypto: x86/aes-xts: Add AES-NI optimization
> crypto: x86/aes - Drop superseded 32-bit build support
> crypto: x86/aes-ecb - Remove superseded ECB skcipher
> crypto: x86/aes-cbc - Remove superseded CBC skciphers
> crypto: x86/aes-ctr - Remove superseded CTR skcipher
> crypto: x86/aes-xts - Remove superseded XTS skcipher
> lib/crypto: x86/aes-ctr: Migrate AVX-optimized code into library
> lib/crypto: x86/aes-xts: Migrate AVX-optimized code into library
> lib/crypto: riscv/aes: Copy aes-macros.S to library
> lib/crypto: riscv/aes: Pass key struct to assembly code
> lib/crypto: riscv/aes-ecb: Migrate optimized code into library
> lib/crypto: riscv/aes-cbc: Migrate optimized code into library
> lib/crypto: riscv/aes-ctr: Migrate optimized code into library
> lib/crypto: riscv/aes-xts: Migrate optimized code into library
>
For the series,
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
next prev parent reply other threads:[~2026-09-30 13:16 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-27 22:42 Eric Biggers
2026-09-27 22:42 ` [PATCH v2 01/20] crypto: aes - Fix undesired override of some optimized AES modes Eric Biggers
2026-09-27 22:42 ` [PATCH v2 02/20] lib/crypto: aes-xctr: Pass counter by value to aes_xctr_arch() Eric Biggers
2026-09-27 22:42 ` [PATCH v2 03/20] lib/crypto: x86/aes: Clean up aes-aesni.S in preparation for AES modes Eric Biggers
2026-09-27 22:42 ` [PATCH v2 04/20] lib/crypto: x86/aes-ecb: Add AES-NI optimization Eric Biggers
2026-09-27 22:42 ` [PATCH v2 05/20] lib/crypto: x86/aes-cbc: " Eric Biggers
2026-09-27 22:42 ` [PATCH v2 06/20] lib/crypto: x86/aes-ctr: " Eric Biggers
2026-09-27 22:42 ` [PATCH v2 07/20] lib/crypto: x86/aes-xts: " Eric Biggers
2026-09-27 22:42 ` [PATCH v2 08/20] crypto: x86/aes - Drop superseded 32-bit build support Eric Biggers
2026-09-27 22:43 ` [PATCH v2 09/20] crypto: x86/aes-ecb - Remove superseded ECB skcipher Eric Biggers
2026-09-27 22:43 ` [PATCH v2 10/20] crypto: x86/aes-cbc - Remove superseded CBC skciphers Eric Biggers
2026-09-27 22:43 ` [PATCH v2 11/20] crypto: x86/aes-ctr - Remove superseded CTR skcipher Eric Biggers
2026-09-27 22:43 ` [PATCH v2 12/20] crypto: x86/aes-xts - Remove superseded XTS skcipher Eric Biggers
2026-09-27 22:43 ` [PATCH v2 13/20] lib/crypto: x86/aes-ctr: Migrate AVX-optimized code into library Eric Biggers
2026-09-27 22:43 ` [PATCH v2 14/20] lib/crypto: x86/aes-xts: " Eric Biggers
2026-09-27 22:43 ` [PATCH v2 15/20] lib/crypto: riscv/aes: Copy aes-macros.S to library Eric Biggers
2026-09-27 22:43 ` [PATCH v2 16/20] lib/crypto: riscv/aes: Pass key struct to assembly code Eric Biggers
2026-09-27 22:43 ` [PATCH v2 17/20] lib/crypto: riscv/aes-ecb: Migrate optimized code into library Eric Biggers
2026-09-27 22:43 ` [PATCH v2 18/20] lib/crypto: riscv/aes-cbc: " Eric Biggers
2026-09-27 22:43 ` [PATCH v2 19/20] lib/crypto: riscv/aes-ctr: " Eric Biggers
2026-09-27 22:43 ` [PATCH v2 20/20] lib/crypto: riscv/aes-xts: " Eric Biggers
2026-09-30 13:15 ` Ard Biesheuvel [this message]
2026-09-30 16:56 ` [PATCH v2 00/20] Migrate x86 and RISC-V accelerated AES modes " Eric Biggers
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=e357ed97-6098-49c1-b031-c4955c97a35a@app.fastmail.com \
--to=ardb@kernel.org \
--cc=Jason@zx2c4.com \
--cc=ebiggers@kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.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
all inboxes | Powered by JetHome®