]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
lib/crypto: x86/nh: Migrate optimized code into library
authorEric Biggers <ebiggers@kernel.org>
Thu, 11 Dec 2025 01:18:37 +0000 (17:18 -0800)
committerEric Biggers <ebiggers@kernel.org>
Mon, 12 Jan 2026 19:07:50 +0000 (11:07 -0800)
commita229d83235c7627c490deb7dd4744a72567cea12
treecf14423955f3d8cdc96681e287d5040a79680c11
parentb4a8528d17fbcd9027290c168efd6ba7ac4d4cd2
lib/crypto: x86/nh: Migrate optimized code into library

Migrate the x86_64 implementations of NH into lib/crypto/.  This makes
the nh() function be optimized on x86_64 kernels.

Note: this temporarily makes the adiantum template not utilize the
x86_64 optimized NH code.  This is resolved in a later commit that
converts the adiantum template to use nh() instead of "nhpoly1305".

Link: https://lore.kernel.org/r/20251211011846.8179-6-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
arch/x86/crypto/Kconfig
arch/x86/crypto/Makefile
arch/x86/crypto/nhpoly1305-avx2-glue.c [deleted file]
arch/x86/crypto/nhpoly1305-sse2-glue.c [deleted file]
lib/crypto/Kconfig
lib/crypto/Makefile
lib/crypto/x86/nh-avx2.S [moved from arch/x86/crypto/nh-avx2-x86_64.S with 98% similarity]
lib/crypto/x86/nh-sse2.S [moved from arch/x86/crypto/nh-sse2-x86_64.S with 97% similarity]
lib/crypto/x86/nh.h [new file with mode: 0644]