Skip to content

Commit 0fbafd0

Browse files
tstrukherbertx
authored andcommitted
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 <tadeusz.struk@intel.com> Tested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 12a4bd3 commit 0fbafd0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/crypto/aesni-intel_glue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1537,7 +1537,7 @@ static void __exit aesni_exit(void)
15371537
crypto_fpu_exit();
15381538
}
15391539

1540-
module_init(aesni_init);
1540+
late_initcall(aesni_init);
15411541
module_exit(aesni_exit);
15421542

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

0 commit comments

Comments
 (0)