From a96974de734beb51a733a89b3283bcf7b433b54c Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 21 Nov 2012 10:35:28 +0100 Subject: [PATCH] Fix segv with AES-NI on some platforms. * cipher/rijndael.c (RIJNDAEL_context): Align on 16 bytes. -- The trigger for this problem is the allocation of the context in the selftest functions. The other code paths use a 16 byte alignment anyway by means of the allocation of the context in cipher.c Thanks to Gentoo hacker Joakim Tjernlund for figuring out the reason of this problem. GnuPG-bug-id: 1452 --- cipher/rijndael.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cipher/rijndael.c b/cipher/rijndael.c index d9a95cb..a2aedf0 100644 --- a/cipher/rijndael.c +++ b/cipher/rijndael.c @@ -126,7 +126,7 @@ typedef struct #ifdef USE_AESNI int use_aesni; /* AES-NI shall be used. */ #endif /*USE_AESNI*/ -} RIJNDAEL_context; +} RIJNDAEL_context ATTR_ALIGNED_16; /* Macros defining alias for the keyschedules. */ #define keyschenc u1.keyschedule -- 1.8.0