[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180825132801.fnsr72cx4s2ohovy@gondor.apana.org.au>
Date: Sat, 25 Aug 2018 21:28:01 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Dave Watson <davejwatson@...com>
Cc: Mauro Rossi <issor.oruam@...il.com>, linux-crypto@...r.kernel.org,
Junaid Shahid <junaids@...gle.com>,
linux-kernel@...r.kernel.org, Stephan Mueller <smueller@...onox.de>
Subject: Re: [PATCH] crypto: aesni - Use unaligned loads from gcm_context_data
On Wed, Aug 15, 2018 at 10:29:42AM -0700, Dave Watson wrote:
> 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@...il.com>
> Fixes: 1476db2d12 ("Move HashKey computation from stack to gcm_context")
> Signed-off-by: Dave Watson <davejwatson@...com>
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists