]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
lib/crypto: x86/blake2s: Reduce size of BLAKE2S_SIGMA2
authorEric Biggers <ebiggers@kernel.org>
Wed, 27 Aug 2025 15:11:26 +0000 (08:11 -0700)
committerEric Biggers <ebiggers@kernel.org>
Fri, 29 Aug 2025 16:50:19 +0000 (09:50 -0700)
commit453eda46b7f807f6fc4283f9639085697100ec08
tree41b1bd4c58e81919830f58e687c61b6b2136b7e8
parent13cecc526d8fe7eeb9b136159738688a1a10cd82
lib/crypto: x86/blake2s: Reduce size of BLAKE2S_SIGMA2

Save 480 bytes of .rodata by replacing the .long constants with .bytes,
and using the vpmovzxbd instruction to expand them.

Also update the code to do the loads before incrementing %rax rather
than after.  This avoids the need for the first load to use an offset.

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20250827151131.27733-8-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
lib/crypto/x86/blake2s-core.S