Re: [PATCH 09/20] crypto: x86/aes-cbc - Remove superseded CBC skciphers

From: Karl Mehltretter

Date: Tue Sep 22 2026 - 00:17:07 EST


On Sun, 20 Sep 2026 22:08:55 -0700 Eric Biggers <ebiggers@xxxxxxxxxx> wrote:
> Now that the AES-CBC (and AES-CBC-CTS) library functions are optimized
> with dedicated AES-NI code and exposed via the skcipher API via
> crypto/aes.c, the similar implementation in aesni-intel is redundant.
> Remove it.

Hello Eric,

This breaks the 32-bit build from here until patch 13.

After this patch the only callers of aesni_skcipher_setkey() are the
CTR and XTS skciphers, and those are under #ifdef CONFIG_X86_64. On
i386 the function is left unused, and WERROR is on in i386_defconfig
and allmodconfig:

arch/x86/crypto/aesni-intel_glue.c:104:12: error: 'aesni_skcipher_setkey' defined but not used [-Werror=unused-function]

Patch 11 does the same to xts_setkey_aesni(). Patch 13 removes both
helpers, from there on it builds again. I built every commit of the
series with i386_defconfig plus CRYPTO_AES_NI_INTEL=y, gcc 15.2:

08 ok
09 aesni_skcipher_setkey unused
10 aesni_skcipher_setkey unused
11 aesni_skcipher_setkey, xts_setkey_aesni unused
12 xts_setkey_aesni unused
13 ok
14 ok

x86_64 and riscv64 build at every commit, so this is the only break I
found.

lib/crypto/x86/aes-aesni.S is built for 32-bit too, so after patch 7
the 32-bit aesni-intel module is already redundant. Moving the
"depends on 64BIT" from patch 14 ahead of patch 8 would avoid the
problem, the glue file is then never built for 32-bit while the
skciphers go away. Patch 14 as a whole does not move cleanly, its help
text and Makefile hunks are written against the tree after patch 13.

Thanks,
Karl