All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] crypto: aesni - fix failing setkey for rfc4106-gcm-aesni
@ 2015-06-24 14:14 Tadeusz Struk
  2015-06-25 14:25 ` Herbert Xu
  0 siblings, 1 reply; 4+ messages in thread
From: Tadeusz Struk @ 2015-06-24 14:14 UTC (permalink / raw)
  To: herbert; +Cc: linux-crypto, tadeusz.struk

rfc4106(gcm(aes)) uses cbc(aes) to generate hash key. cbc(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>
---
 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)
 	crypto_fpu_exit();
 }
 
-module_init(aesni_init);
+late_initcall(aesni_init);
 module_exit(aesni_exit);
 
 MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm, Intel AES-NI instructions optimized");

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-25 23:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-24 14:14 [PATCH] crypto: aesni - fix failing setkey for rfc4106-gcm-aesni Tadeusz Struk
2015-06-25 14:25 ` Herbert Xu
2015-06-25 18:59   ` Tadeusz Struk
2015-06-25 23:37   ` Linus Torvalds

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.