aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-07-14 21:57:45 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-14 21:57:45 -0700
commitd6c93e1ddde769010f9c81bbfab41a9844c0e9ba (patch)
treeab36ce8c77403da4362de0447d188cd049d52d81
parent5694ca9f46202c50df525472abb6d8c1dee4f8eb (diff)
parentcc08632f8f26d479500f8107c84e206770cb901c (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6: [CRYPTO] padlock: Fix alignment after aes_ctx rearrange
-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 ====== */