From: sashiko-bot@kernel.org
To: "Eric Biggers" <ebiggers@kernel.org>
Cc: linux-raid@vger.kernel.org, yukuai@fygo.io
Subject: Re: [PATCH 4/6] crypto: x86/aria - add missing vzeroupper in AVX2 code
Date: Sat, 15 Aug 2026 21:08:37 +0000 [thread overview]
Message-ID: <20260815210837.C58041F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260815205750.169336-5-ebiggers@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Missing `vzeroupper` in the AVX-512 optimized ARIA code (`aria-gfni-avx512-asm_64.S`), causing a significant performance regression due to AVX-SSE transition penalties. This problem wasn't introduced by this patch, but the patch fixes the exact same issue in the AVX2 implementation while missing the AVX-512 code.
--
--- Patch [4]: [PATCH 4/6] crypto: x86/aria - add missing vzeroupper in AVX2 code ---
commit 92a2e79950d33a63291c62ee57a893ce808d68d2
Author: Eric Biggers <ebiggers@kernel.org>
crypto: x86/aria - add missing vzeroupper in AVX2 code
This commit adds missing vzeroupper instructions to the AVX2 ARIA assembly
code. This prevents performance degradation for any later SSE code that might
be executed by avoiding transition penalties from the YMM registers being left
in a dirty state.
> diff --git a/arch/x86/crypto/aria-aesni-avx2-asm_64.S b/arch/x86/crypto/aria-aesni-avx2-asm_64.S
> index ed53d4f46bd7c..fda8cb8a99a8a 100644
> --- a/arch/x86/crypto/aria-aesni-avx2-asm_64.S
> +++ b/arch/x86/crypto/aria-aesni-avx2-asm_64.S
[ ... ]
> @@ -1428,6 +1433,7 @@ SYM_TYPED_FUNC_START(aria_aesni_avx2_gfni_ctr_crypt_32way)
> %ymm8, %ymm9, %ymm10, %ymm11, %ymm12, %ymm13, %ymm14,
> %ymm15, %r10);
>
> + vzeroupper;
> FRAME_END
> RET;
> SYM_FUNC_END(aria_aesni_avx2_gfni_ctr_crypt_32way)
[Severity: High]
This is a pre-existing issue, but does the AVX-512 ARIA code also need the
same fix?
Looking at arch/x86/crypto/aria-gfni-avx512-asm_64.S, the AVX-512 optimized
functions like aria_gfni_avx512_encrypt_64way(),
aria_gfni_avx512_decrypt_64way(), and aria_gfni_avx512_ctr_crypt_64way()
return without executing vzeroupper:
arch/x86/crypto/aria-gfni-avx512-asm_64.S:aria_gfni_avx512_encrypt_64way() {
...
FRAME_END
RET;
SYM_FUNC_END(aria_gfni_avx512_encrypt_64way)
}
Since zmm registers are used, wouldn't returning without clearing the EVEX
dirty state cause the same performance transition penalties for subsequent
legacy SSE code?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260815205750.169336-1-ebiggers@kernel.org?part=4
next prev parent reply other threads:[~2026-08-15 21:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-15 20:57 [PATCH 0/6] x86: add missing vzeroupper instructions Eric Biggers
2026-08-15 20:57 ` [PATCH 1/6] xor: add missing vzeroupper to AVX code Eric Biggers
2026-08-15 20:57 ` [PATCH 2/6] raid6: add missing vzeroupper to AVX2 code Eric Biggers
2026-08-15 21:07 ` sashiko-bot
2026-08-15 20:57 ` [PATCH 3/6] raid6: add missing vzeroupper to AVX-512 code Eric Biggers
2026-08-15 21:06 ` sashiko-bot
2026-08-15 20:57 ` [PATCH 4/6] crypto: x86/aria - add missing vzeroupper in AVX2 code Eric Biggers
2026-08-15 21:08 ` sashiko-bot [this message]
2026-08-15 20:57 ` [PATCH 5/6] crypto: x86/aria - add missing vzeroupper in AVX-512 code Eric Biggers
2026-08-15 20:57 ` [PATCH 6/6] netfilter: nft_set_pipapo_avx2: add missing vzeroupper Eric Biggers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260815210837.C58041F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=ebiggers@kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=yukuai@fygo.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.