crypto: aesni - Move HashKey computation from stack to gcm_context
authorDave Watson <davejwatson@fb.com>
Wed, 14 Feb 2018 17:40:10 +0000 (09:40 -0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 22 Feb 2018 14:16:49 +0000 (22:16 +0800)
commit1476db2d129d5e4fc59e93a7abd22edcb26b52f5
tree018bc9513af4cb8d5bce210ca869c2a7c8d23a02
parente2e34b0856463727292498d756308cba957fe477
crypto: aesni - Move HashKey computation from stack to gcm_context

HashKey computation only needs to happen once per scatter/gather operation,
save it between calls in gcm_context struct instead of on the stack.
Since the asm no longer stores anything on the stack, we can use
%rsp directly, and clean up the frame save/restore macros a bit.

Hashkeys actually only need to be calculated once per key and could
be moved to when set_key is called, however, the current glue code
falls back to generic aes code if fpu is disabled.

Signed-off-by: Dave Watson <davejwatson@fb.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/x86/crypto/aesni-intel_asm.S