]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/crypto/padlock-aes.c
Merge branch 'upstream-fixes-jgarzik' of git://lost.foo-projects.org/~ahkok/git/netde...
[linux-2.6-omap-h63xx.git] / drivers / crypto / padlock-aes.c
index 17ee684144f9d2d54aae8ff95b16f77bdd091965..b643d71298a911807d4e65f71e2924174cbd74e6 100644 (file)
@@ -59,6 +59,9 @@
 #define AES_EXTENDED_KEY_SIZE  64      /* in uint32_t units */
 #define AES_EXTENDED_KEY_SIZE_B        (AES_EXTENDED_KEY_SIZE * sizeof(uint32_t))
 
+/* Whenever making any changes to the following
+ * structure *make sure* you keep E, d_data
+ * and cword aligned on 16 Bytes boundaries!!! */
 struct aes_ctx {
        struct {
                struct cword encrypt;
@@ -66,8 +69,10 @@ struct aes_ctx {
        } cword;
        u32 *D;
        int key_length;
-       u32 E[AES_EXTENDED_KEY_SIZE];
-       u32 d_data[AES_EXTENDED_KEY_SIZE];
+       u32 E[AES_EXTENDED_KEY_SIZE]
+               __attribute__ ((__aligned__(PADLOCK_ALIGNMENT)));
+       u32 d_data[AES_EXTENDED_KEY_SIZE]
+               __attribute__ ((__aligned__(PADLOCK_ALIGNMENT)));
 };
 
 /* ====== Key management routines ====== */