Re: [PATCH] crypto: x86/aes-gcm - simplify GCM hash subkey derivation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Biggers <ebiggers@xxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux