From: Herbert Xu <herbert@gondor.apana.org.au>
To: Dave Watson <davejwatson@fb.com>
Cc: Mauro Rossi <issor.oruam@gmail.com>,
linux-crypto@vger.kernel.org, Junaid Shahid <junaids@google.com>,
linux-kernel@vger.kernel.org,
Stephan Mueller <smueller@chronox.de>
Subject: Re: [PATCH] crypto: aesni - Use unaligned loads from gcm_context_data
Date: Sat, 25 Aug 2018 21:28:01 +0800 [thread overview]
Message-ID: <20180825132801.fnsr72cx4s2ohovy@gondor.apana.org.au> (raw)
In-Reply-To: <20180815172942.mkk56gh6poqgjgnb@davejwatson-mba.local>
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@gmail.com>
> Fixes: 1476db2d12 ("Move HashKey computation from stack to gcm_context")
> Signed-off-by: Dave Watson <davejwatson@fb.com>
Patch applied. Thanks.
--
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:[~2018-08-25 13:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-15 17:29 [PATCH] crypto: aesni - Use unaligned loads from gcm_context_data Dave Watson
2018-08-25 13:28 ` 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=20180825132801.fnsr72cx4s2ohovy@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=davejwatson@fb.com \
--cc=issor.oruam@gmail.com \
--cc=junaids@google.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=smueller@chronox.de \
/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 NNTP newsgroup(s).