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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ