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 <herb...@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to