archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <>
To: Dave Watson <>
Cc: Mauro Rossi <>,, Junaid Shahid <>,,
	Stephan Mueller <>
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: <> (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 <>
> Fixes: 1476db2d12 ("Move HashKey computation from stack to gcm_context")
> Signed-off-by: Dave Watson <>

Patch applied.  Thanks.
Email: Herbert Xu <>
Home Page:
PGP Key:

      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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \

* 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).