Skip to contentSkip to conversation

crypto: x86/aria - add missing vzeroupper in AVX-512 code

PATCH RESEND In review Eric Biggers 2 participants 2 messages Aug 31 – Sep 4

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 crypto: x86/aria - add missing vzeroupper in AVX-512 code

Since the AVX-512 optimized ARIA code uses ZMM registers, execute vzeroupper before returning from it. This is needed to avoid degrading the performance of any later SSE code that may happen to be executed.

Fixes c970d42001f2 ("crypto: x86/aria - implement aria-avx512")
Cc Taehee Yoo <[email protected]>

---

This didn't get picked up by the x86 maintainers yet. Herbert, can you take this through the crypto tree?

 arch/x86/crypto/aria-gfni-avx512-asm_64.S | 3 +++
 1 file changed, 3 insertions(+)
arch/x86/crypto/aria-gfni-avx512-asm_64.S +3 -0
index 860887e5d02e..ca83eb126e06 100644
@@ -800,6 +800,7 @@ SYM_TYPED_FUNC_START(aria_gfni_avx512_encrypt_64way)
 		     %zmm9, %zmm8, %zmm11, %zmm10, %zmm12, %zmm13, %zmm14,
 		     %zmm15, %rax);
 
+	vzeroupper;
 	FRAME_END
 	RET;
 SYM_FUNC_END(aria_gfni_avx512_encrypt_64way)
@@ -825,6 +826,7 @@ SYM_TYPED_FUNC_START(aria_gfni_avx512_decrypt_64way)
 		     %zmm9, %zmm8, %zmm11, %zmm10, %zmm12, %zmm13, %zmm14,
 		     %zmm15, %rax);
 
+	vzeroupper;
 	FRAME_END
 	RET;
 SYM_FUNC_END(aria_gfni_avx512_decrypt_64way)
@@ -966,6 +968,7 @@ SYM_TYPED_FUNC_START(aria_gfni_avx512_ctr_crypt_64way)
 		     %zmm9, %zmm8, %zmm11, %zmm10, %zmm12, %zmm13, %zmm14,
 		     %zmm15, %r10);
 
+	vzeroupper;
 	FRAME_END
 	RET;
 SYM_FUNC_END(aria_gfni_avx512_ctr_crypt_64way)

base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
prerequisite-patch-id: 464c5d2854c73d88ca57d9d6811ae20d6a66c2aa

Signature · 1 line
2.55.0
maintainer
#1 lore raw
Quoted 8 lines · Eric Biggers

Since the AVX-512 optimized ARIA code uses ZMM registers, execute vzeroupper before returning from it. This is needed to avoid degrading the performance of any later SSE code that may happen to be executed.

Fixes c970d42001f2 ("crypto: x86/aria - implement aria-avx512")
Cc Taehee Yoo <[email protected]>
Quoted 7 lines

---

This didn't get picked up by the x86 maintainers yet. Herbert, can you take this through the crypto tree?

 arch/x86/crypto/aria-gfni-avx512-asm_64.S | 3 +++
 1 file changed, 3 insertions(+)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt