]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
crypto: x86/nh-avx2 - add missing vzeroupper
authorEric Biggers <ebiggers@google.com>
Sat, 6 Apr 2024 00:26:08 +0000 (20:26 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Jun 2024 11:32:02 +0000 (13:32 +0200)
[ Upstream commit 4ad096cca942959871d8ff73826d30f81f856f6e ]

Since nh_avx2() uses ymm registers, execute vzeroupper before returning
from it.  This is necessary to avoid reducing the performance of SSE
code.

Fixes: 0f961f9f670e ("crypto: x86/nhpoly1305 - add AVX2 accelerated NHPoly1305")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Acked-by: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/crypto/nh-avx2-x86_64.S

index 6a0b15e7196a8d711252482e725e5da1e3bc7d18..54c0ee41209d5472912bb6c5532f129fddb682ae 100644 (file)
@@ -153,5 +153,6 @@ SYM_FUNC_START(nh_avx2)
        vpaddq          T1, T0, T0
        vpaddq          T4, T0, T0
        vmovdqu         T0, (HASH)
+       vzeroupper
        RET
 SYM_FUNC_END(nh_avx2)