diff options
author | Dave Watson <davejwatson@fb.com> | 2018-08-15 10:29:42 -0700 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2018-08-25 19:50:42 +0800 |
commit | e5b954e8d11fdde55eed35017370a3a0d8837754 (patch) | |
tree | 414336a7951061bec987fd8b83bd4662df6ef0c4 /arch/arm64/crypto/ghash-ce-glue.c | |
parent | 65b2c12dcdb883fc015c0ec65d6c2f857e0456ac (diff) |
crypto: aesni - Use unaligned loads from gcm_context_data
A regression was reported bisecting to 1476db2d12
"Move HashKey computation from stack to gcm_context". That diff
moved HashKey computation from the stack, which was explicitly aligned
in the asm, to a struct provided from the C code, depending on
AESNI_ALIGN_ATTR for alignment. It appears some compilers may not
align this struct correctly, resulting in a crash on the movdqa
instruction when attempting to encrypt or decrypt data.
Fix by using unaligned loads for the HashKeys. On modern
hardware there is no perf difference between the unaligned and
aligned loads. All other accesses to gcm_context_data already use
unaligned loads.
Reported-by: Mauro Rossi <issor.oruam@gmail.com>
Fixes: 1476db2d12 ("Move HashKey computation from stack to gcm_context")
Cc: <stable@vger.kernel.org>
Signed-off-by: Dave Watson <davejwatson@fb.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch/arm64/crypto/ghash-ce-glue.c')
0 files changed, 0 insertions, 0 deletions