From: Antonio Quartulli <antonio@mandelbit.com>
To: Eric Biggers <ebiggers@kernel.org>, linux-crypto@vger.kernel.org
Cc: Ard Biesheuvel <ardb@kernel.org>,
"Jason A . Donenfeld" <Jason@zx2c4.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
Martin Willi <martin@strongswan.org>
Subject: Re: [PATCH] lib/crypto: x86/chacha: Use bzhi to simplify mask generation
Date: Wed, 4 Nov 2026 01:02:13 +0100 [thread overview]
Message-ID: <8b8ec7f8-8417-4a68-9efd-e7ff492a46e9@mandelbit.com> (raw)
In-Reply-To: <20261103235027.63382-1-ebiggers@kernel.org>
Hi,
On 04/11/2026 00:50, Eric Biggers wrote:
> When XOR'ing the bytes from a partial register at the end, use the bzhi
> instruction (from BMI2) to generate the needed mask a bit more
> efficiently. All real processors with AVX-512 also have BMI2, so we
> might as well make use of it. This follows the example of the AVX-512
> optimized AES-GCM code which already does this.
>
> Signed-off-by: Eric Biggers <ebiggers@kernel.org>
KUnit test is happy and my tests (on Zen 5) too :)
Tested-by: Antonio Quartulli <antonio@mandelbit.com>
--
Antonio Quartulli
CEO and Co-Founder
Mandelbit Srl
https://www.mandelbit.com
next prev parent reply other threads:[~2026-11-04 0:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 23:50 [PATCH] lib/crypto: x86/chacha: Use bzhi to simplify mask generation Eric Biggers
2026-11-04 0:02 ` Antonio Quartulli [this message]
2026-11-07 21:39 ` 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=8b8ec7f8-8417-4a68-9efd-e7ff492a46e9@mandelbit.com \
--to=antonio@mandelbit.com \
--cc=Jason@zx2c4.com \
--cc=ardb@kernel.org \
--cc=ebiggers@kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=martin@strongswan.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox