aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@kernel.org>2025-11-01 18:52:56 -0700
committerEric Biggers <ebiggers@kernel.org>2025-11-03 09:07:57 -0800
commit0e253e250ed0e46f5ff6962c840157da9dab48cd (patch)
treeec8b64178310c595c83ea66623ce7be13b044b99
parent05794985b190e0592131b323d37d7cf506711f1f (diff)
downloadlinux-0e253e250ed0e46f5ff6962c840157da9dab48cd.tar.gz
crypto: x86/aes-gcm-vaes-avx2 - initialize full %rax return register
Update aes_gcm_dec_final_vaes_avx2() to be consistent with aes_gcm_dec_final_aesni() and aes_gcm_dec_final_vaes_avx512() by initializing the full %rax return register instead of just %al. Technically this is unnecessary, since these functions return bool. But I think it's worth being extra careful with the result of the tag comparison and also keeping the different implementations consistent. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20251102015256.171536-1-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
-rw-r--r--arch/x86/crypto/aes-gcm-vaes-avx2.S1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/crypto/aes-gcm-vaes-avx2.S b/arch/x86/crypto/aes-gcm-vaes-avx2.S
index d9754e683bde3a..93c9504a488ffb 100644
--- a/arch/x86/crypto/aes-gcm-vaes-avx2.S
+++ b/arch/x86/crypto/aes-gcm-vaes-avx2.S
@@ -1123,6 +1123,7 @@ SYM_FUNC_END(aes_gcm_aad_update_vaes_avx2)
lea .Lselect_high_bytes_table(%rip), %rax
vmovdqu (%rax, TAGLEN64), %xmm1
vpshufb BSWAP_MASK, %xmm1, %xmm1 // select low bytes, not high
+ xor %eax, %eax
vptest %xmm1, %xmm0
sete %al
.endif