[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AM4PR0501MB27232A20751B0443EBA7B446D45E0@AM4PR0501MB2723.eurprd05.prod.outlook.com>
Date: Tue, 31 Oct 2017 07:14:12 +0000
From: Ilya Lesokhin <ilyal@...lanox.com>
To: Herbert Xu <herbert@...dor.apana.org.au>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"sd@...asysnail.net" <sd@...asysnail.net>,
Boris Pismenny <borisp@...lanox.com>,
"davejwatson@...com" <davejwatson@...com>
Subject: RE: Using the aesni generic gcm(aes) aead in atomic context
On Mon Tuesday, October 31, 2017 6:10 AM, Herbert Xu wrote:
>
> Are you allocating the tfm from atomic context? That is not allowed.
>
> Normally you would allocate the tfm in process context, e.g., when the
> connection is setup.
>
I call crypto_alloc_aead("gcm(aes)", 0, flags) in process context.
and aead_request_set_tfm(aead_req, aead) in atomic context.
I'm assuming by tfm you are referring to the struct crypto_aead allocated in the first call I mentioned.
I was able to resolve the "sleeping function called from invalid context" issue
By clearing the CRYPTO_TFM_REQ_MAY_SLEEP flag using
aead_request_set_callback with flags = 0.
However I'm still concerned about the lack of irq_fpu_usable() check.
and I don't really want to do the check myself outside of the crypto code as it is
arch specific.
Powered by blists - more mailing lists