lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ