summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@kernel.org>2026-09-27 15:42:58 -0700
committerEric Biggers <ebiggers@kernel.org>2026-09-30 09:42:10 -0700
commit0c2cf81e9f1db7bfce51f495a27a2582e39f49a6 (patch)
tree9350489a60abf5d4b81f6f97ca95a0843d678ace /tools/perf/scripts/python/stackcollapse.py
parent0a125ba0c31bd0250107ca62845cdd7bb8799689 (diff)
downloadlinux-0c2cf81e9f1db7bfce51f495a27a2582e39f49a6.tar.gz
linux-0c2cf81e9f1db7bfce51f495a27a2582e39f49a6.zip
lib/crypto: x86/aes-xts: Add AES-NI optimization
Optimize the crypto library's AES-XTS support with AES-NI, bringing its performance on par with the "xts-aes-aesni" skcipher algorithm it will supersede. The new assembly code is written from scratch to fit well into the crypto library and to be more consistent with aes-xts-avx-x86_64.S than the code in arch/x86/crypto/aesni-intel_asm.S that it will supersede. At a high level it is quite similar though, including doing 4 blocks per iteration and supporting 32-bit mode for parity with the old code. The new assembly code also fixes the flaw the old code had where the encrypted tweaks were spilled to the destination buffer, rather than kept entirely in registers (64-bit mode) or spilled to the stack (32-bit mode). The encrypted tweaks are secret values that should not be exposed to any code that doesn't have access to the key itself. Note: the priority of xts-aes-lib is left unchanged at 110 temporarily. It will be increased when the AVX-optimized AES-XTS code is migrated too. Most systems use the AVX-optimized code; this commit just deals with support for older CPUs that have AES-NI but not AVX (and 32-bit). Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Link: https://patch.msgid.link/20260927224418.109759-8-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions