[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <AM4PR0501MB2723742986C5098642C50D01D4590@AM4PR0501MB2723.eurprd05.prod.outlook.com>
Date: Mon, 30 Oct 2017 15:18:21 +0000
From: Ilya Lesokhin <ilyal@...lanox.com>
To: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"sd@...asysnail.net" <sd@...asysnail.net>,
"herbert@...dor.apana.org.au" <herbert@...dor.apana.org.au>
CC: Boris Pismenny <borisp@...lanox.com>
Subject: Using the aesni generic gcm(aes) aead in atomic context
Hi,
I've tried using the aesni generic gcm(aes) aead to implement TLS SW fallback and
I'm getting
[ 3356.839506] BUG: sleeping function called from invalid context at ./include/crypto/algapi.h:417
The warning is coming from a ___might_sleep() macro that is called if CRYPTO_TFM_REQ_MAY_SLEEP is set.
I'm getting the warning regardless of if pass CRYPTO_ALG_ASYNC or 0 as flags to crypto_alloc_aead("gcm(aes)", 0, flags).
I've also noticed that rfc4106_encrypt() includes a irq_fpu_usable() check while generic_gcmaes_encrypt() doesn't.
Is the generic gcm(aes) aead unsafe in atomic context?
And if so which aead should I use?
Finally, out of curiosity, doesn't macsec crypto run in atomic context?
Thanks,
Ilya
Powered by blists - more mailing lists