lkml.org 
[lkml]   [2009]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH crypto 1/4] AES-NI: Move key_length in struct crypto_aes_ctx to be the last field
On Mon, Jan 05, 2009 at 10:02:07AM +0800, Huang Ying wrote:
> The Intel AES-NI AES acceleration instructions need key_enc, key_dec
> in struct crypto_aes_ctx to be 16 byte aligned, it make this easier to
> move key_length to be the last one.
>
> Signed-off-by: Huang Ying <ying.huang@intel.com>

Patch applied.

> struct crypto_aes_ctx {
> - u32 key_length;
> u32 key_enc[AES_MAX_KEYLENGTH_U32];
> u32 key_dec[AES_MAX_KEYLENGTH_U32];
> + u32 key_length;
> };

I added a comment here so people don't break this down the track.

+/*
+ * Please ensure that the first two fields are 16-byte aligned
+ * relative to the start of the structure, i.e., don't move them!
+ */

Thanks,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


\
 
 \ /
  Last update: 2009-01-09 06:53    [W:0.056 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site