aboutsummaryrefslogtreecommitdiff
path: root/drivers/crypto/padlock-aes.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-07-17 09:25:26 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-07-17 09:25:26 -0400
commit4bf311ddfbffe12d41ad1a3c311ab727db6f72cb (patch)
tree9d19a2774e83637d86dc876f3af22af1dacf0bec /drivers/crypto/padlock-aes.c
parent597d0cae0f99f62501e229bed50e8149604015bb (diff)
parent82d6897fefca6206bca7153805b4c5359ce97fc4 (diff)
Merge branch 'master'
Diffstat (limited to 'drivers/crypto/padlock-aes.c')
-rw-r--r--drivers/crypto/padlock-aes.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/crypto/padlock-aes.c b/drivers/crypto/padlock-aes.c
index 17ee684144f..b643d71298a 100644
--- a/drivers/crypto/padlock-aes.c
+++ b/drivers/crypto/padlock-aes.c
@@ -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 ====== */