From: Herbert Xu <herbert@gondor.apana.org.au>
To: Stephan Mueller <smueller@chronox.de>
Cc: linux-crypto@vger.kernel.org
Subject: Re: [PATCH] crypto: add key wrapping block chaining mode
Date: Thu, 23 Apr 2015 09:39:28 +0800 [thread overview]
Message-ID: <20150423013928.GD16834@gondor.apana.org.au> (raw)
In-Reply-To: <1821606.i9q3K48O5i@myon.chronox.de>
On Wed, Apr 22, 2015 at 02:44:08PM +0200, Stephan Mueller wrote:
>
> > Where does this 8-byte alignment requirement come from?
>
> Well, I am accessing the data in 8-byte chunks. Moreover, in the scatterwalk
> copy functions, I search through the scatterlists in 8 byte increments. If,
> say, a scatterwalk is not a multiple of 8 bytes, the scatterwalk logic will
> not process the last chunk of memory.
Alignment refers to whether the address can handle a load of a
given size by the CPU, it does not mean that the length will
be a multiple of the alignment. Alignment is only required if
you do a load of the given size.
For example if you read a u64 then on many architectures that
will require an alignment of 8. Vice versa if you only do byte
loads then you do not need to specify the alignment.
I don't see any u64 loads in your code.
Cheers,
--
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
next prev parent reply other threads:[~2015-04-23 1:39 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-22 4:36 [PATCH] crypto: add key wrapping block chaining mode Stephan Mueller
2015-04-22 5:48 ` Herbert Xu
2015-04-22 12:44 ` Stephan Mueller
2015-04-23 1:39 ` Herbert Xu [this message]
2015-04-23 1:40 ` Stephan Mueller
2015-04-22 5:53 ` Herbert Xu
2015-04-22 6:13 ` Herbert Xu
2015-04-22 12:23 ` Stephan Mueller
2015-04-22 14:11 ` Stephan Mueller
2015-04-23 1:37 ` Herbert Xu
2015-04-23 1:33 ` Herbert Xu
2015-04-23 1:39 ` Stephan Mueller
2015-04-23 1:46 ` Herbert Xu
2015-04-23 1:58 ` Stephan Mueller
2015-04-23 2:03 ` Herbert Xu
2015-04-23 2:51 ` Stephan Mueller
2015-04-23 2:55 ` Herbert Xu
2015-04-23 13:42 ` Stephan Mueller
2015-04-23 23:21 ` Herbert Xu
2015-04-24 0:22 ` Stephan Mueller
2015-04-24 0:24 ` Herbert Xu
2015-04-22 6:06 ` Herbert Xu
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=20150423013928.GD16834@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=linux-crypto@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