Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d6c93e1d authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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
parents 5694ca9f cc08632f
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -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 ====== */