[lkml]   [2015]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: Crypto Fixes for 4.2
On Fri, Jun 26, 2015 at 01:07:02PM -0700, Linus Torvalds wrote:
> On Fri, Jun 26, 2015 at 3:22 AM, Herbert Xu <> wrote:
> >
> > * Kill testmgr warning for gcm-aes-aesni.
> Hmm. You killed one of the warnings, but the setkey one remains.
> alg: aead: setkey failed on test 1 for rfc4106-gcm-aesni: flags=0
> Expected?

I wanted to explore a more complete fix with delaying the testing
until all built-in registrations are complete but it turned out to
be too complicated for now.

So I think Tadeusz's patch is the simplest fix for 4.2. Could you
please test it to see if it makes your warning go away? Just in
case you're running into something else that happens to look the

Here is his patch again with a corrected changelog.


From: Tadeusz Struk <>
Subject: crypto: aesni - fix failing setkey for rfc4106-gcm-aesni

rfc4106(gcm(aes)) uses ctr(aes) to generate hash key. ctr(aes) needs
chainiv, but the chainiv gets initialized after aesni_intel when both
are statically linked so the setkey fails.
This patch forces aesni_intel to be initialized after chainiv.

Signed-off-by: Tadeusz Struk <>
arch/x86/crypto/aesni-intel_glue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni-intel_glue.c
index ebcb981d..cb630a8 100644
--- a/arch/x86/crypto/aesni-intel_glue.c
+++ b/arch/x86/crypto/aesni-intel_glue.c
@@ -1537,7 +1537,7 @@ static void __exit aesni_exit(void)


MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm, Intel AES-NI instructions optimized");

Email: Herbert Xu <>
Home Page:
PGP Key:

 \ /
  Last update: 2015-06-27 09:21    [W:0.595 / U:7.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site