[PATCH] lib/crypto: arm64: Drop checks for CONFIG_KERNEL_MODE_NEON
Ard Biesheuvel
ardb at kernel.org
Tue Mar 17 04:09:34 PDT 2026
On Sat, 14 Mar 2026, at 18:50, Eric Biggers wrote:
> CONFIG_KERNEL_MODE_NEON is always enabled on arm64, and it always has
> been since its introduction in 2013. Given that and the fact that the
> usefulness of kernel-mode NEON has only been increasing over time,
> checking for this option in arm64-specific code is unnecessary. Remove
> these checks from lib/crypto/ to simplify the code and prevent any
> future bugs where e.g. code gets disabled due to a typo in this logic.
>
> Signed-off-by: Eric Biggers <ebiggers at kernel.org>
> ---
>
> This patch is targeting libcrypto-next
> (https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/log/?h=libcrypto-next)
>
> lib/crypto/Kconfig | 12 ++++++------
> lib/crypto/Makefile | 17 ++++++-----------
> lib/crypto/arm64/aes.h | 16 ++++------------
> lib/crypto/arm64/sha256.h | 8 ++------
> lib/crypto/arm64/sha512.h | 5 +----
> 5 files changed, 19 insertions(+), 39 deletions(-)
>
Acked-by: Ard Biesheuvel <ardb at kernel.org>
Actually, we should just get rid of CONFIG_KERNEL_MODE_NEON entirely on arm64, although there is some code shared with ARM that would still need some checks. But anything that is arm64-only should never look at this at all.
More information about the linux-arm-kernel
mailing list