Skip to content

Commit

Permalink
Merge master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6
Browse files Browse the repository at this point in the history
* master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  [CRYPTO] padlock: Fix alignment after aes_ctx rearrange
  • Loading branch information
Linus Torvalds committed Jul 15, 2006
2 parents 5694ca9 + cc08632 commit d6c93e1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions drivers/crypto/padlock-aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,20 @@
#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;
struct cword decrypt;
} 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 ====== */
Expand Down

0 comments on commit d6c93e1

Please sign in to comment.