]> git.ipfire.org Git - thirdparty/linux.git/commit
lib/crypto: arm64/aes: Move assembly code for AES modes into libaes
authorEric Biggers <ebiggers@kernel.org>
Wed, 18 Feb 2026 21:34:50 +0000 (13:34 -0800)
committerEric Biggers <ebiggers@kernel.org>
Mon, 9 Mar 2026 20:27:20 +0000 (13:27 -0700)
commit4b908403209252e59ecad4c068bf967fa3f07525
tree7463411f34352f966f04abfd47b2682ae3261c39
parentf8f08d7cc43237e91e3aedf7b67d015d24c38fcc
lib/crypto: arm64/aes: Move assembly code for AES modes into libaes

To migrate the support for CBC-based MACs into libaes, the corresponding
arm64 assembly code needs to be moved there.  However, the arm64 AES
assembly code groups many AES modes together; individual modes aren't
easily separable.  (This isn't unique to arm64; other architectures
organize their AES modes similarly.)

Since the other AES modes will be migrated into the library eventually
too, just move the full assembly files for the AES modes into the
library.  (This is similar to what I already did for PowerPC and SPARC.)

Specifically: move the assembly files aes-ce.S, aes-modes.S, and
aes-neon.S and their build rules; declare the assembly functions in
<crypto/aes.h>; and export the assembly functions from libaes.

Note that the exports and public declarations of the assembly functions
are temporary.  They exist only to keep arch/arm64/crypto/ working until
the AES modes are fully moved into the library.

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20260218213501.136844-5-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
arch/arm64/crypto/Makefile
arch/arm64/crypto/aes-ce-ccm-glue.c
arch/arm64/crypto/aes-glue.c
arch/arm64/crypto/aes-neonbs-glue.c
include/crypto/aes.h
lib/crypto/Makefile
lib/crypto/arm64/aes-ce.S [moved from arch/arm64/crypto/aes-ce.S with 96% similarity]
lib/crypto/arm64/aes-modes.S [moved from arch/arm64/crypto/aes-modes.S with 99% similarity]
lib/crypto/arm64/aes-neon.S [moved from arch/arm64/crypto/aes-neon.S with 99% similarity]
lib/crypto/arm64/aes.h