From: Herbert Xu <herbert@gondor.apana.org.au>
To: Eric Biggers <ebiggers@kernel.org>
Cc: linux-crypto@vger.kernel.org, x86@kernel.org
Subject: Re: [PATCH] crypto: x86/aes-gcm - simplify GCM hash subkey derivation
Date: Fri, 26 Apr 2024 17:39:19 +0800 [thread overview]
Message-ID: <Zit2R6Ju7UvAiuwS@gondor.apana.org.au> (raw)
In-Reply-To: <20240420181942.GA786@quark.localdomain>
Eric Biggers <ebiggers@kernel.org> wrote:
> On Fri, Apr 19, 2024 at 11:00:37PM -0700, Eric Biggers wrote:
>> + aes_encrypt(aes_key, hash_subkey, page_address(ZERO_PAGE(0)));
>
> Actually, page_address(ZERO_PAGE(0)) expands into a surprisingly large number of
> instructions. Using empty_zero_page directly would avoid this, but there's
> little precedent for doing that. For now, I think just using something like
> 'static const u8 zeroes[16]' is the way to go for small buffers like this.
Yes it's not worth the effort given the small size. But still it
looks like lib/raid6 could benefit from using a shared zero page
too.
Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
prev parent reply other threads:[~2024-04-26 9:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-20 6:00 [PATCH] crypto: x86/aes-gcm - simplify GCM hash subkey derivation Eric Biggers
2024-04-20 18:19 ` Eric Biggers
2024-04-26 9:39 ` Herbert Xu [this message]
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=Zit2R6Ju7UvAiuwS@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=ebiggers@kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=x86@kernel.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).