On Tue, 16 Jun 2020, Eric Biggers wrote: > On Tue, Jun 16, 2020 at 11:02:50AM -0400, Mikulas Patocka wrote: > > Fix the crypto drivers that don't respect CRYPTO_TFM_REQ_MAY_SLEEP. If > > CRYPTO_TFM_REQ_MAY_SLEEP is not set, the driver must not do allocation > > that sleeps. > > > > Signed-off-by: Mikulas Patocka <mpato...@redhat.com> > > I think you need to split this up per driver with a proper explanation and a > "Fixes:" tag for each driver. > > Also, these bugs should have been detected by the crypto self-tests already, > since they test having preemption disabled and CRYPTO_TFM_REQ_MAY_SLEEP > cleared. > Can you double check whether these are all valid fixes? One thing to watch > out > for is that CRYPTO_TFM_REQ_MAY_SLEEP only applies to the function call like > crypto_skcipher_encrypt() itself. If the implementation is asynchronous and > the > request gets processed in the background (i.e. if crypto_skcipher_encrypt() > returns -EINPROGRESS), the background work doesn't have to honor > CRYPTO_TFM_REQ_MAY_SLEEP. > > - Eric I can only compile-test this patch. I don't have the hardware. Mikulas
- [PATCH 1/4] crypto: introduce CRYPTO_ALG_ALLOCATES_MEMORY Mikulas Patocka
- Re: [dm-devel] [PATCH 1/4] crypto: introduce CRYPTO_... Eric Biggers
- Re: [dm-devel] [PATCH 1/4] crypto: introduce CRY... Mikulas Patocka
- [PATCH 1/3] crypto: pass the flag CRYPTO_ALG_ALL... Mikulas Patocka
- Re: [PATCH 1/3] crypto: pass the flag CRYPTO_ALG... Herbert Xu
- [PATCH 2/3] crypto: set the flag CRYPTO_ALG_ALLO... Mikulas Patocka
- [PATCH 3/3] dm-crypt: don't use drivers that hav... Mikulas Patocka
- [PATCH 4/4] crypto: fix the drivers that don't respect CR... Mikulas Patocka
- Re: [dm-devel] [PATCH 4/4] crypto: fix the drivers t... Eric Biggers
- Re: [dm-devel] [PATCH 4/4] crypto: fix the drive... Mikulas Patocka
- Re: [dm-devel] [PATCH 4/4] crypto: fix the drive... Eric Biggers
- Re: [dm-devel] [PATCH 4/4] crypto: fix the drive... Mikulas Patocka
- [PATCH 1/2] cpt-crypto: don't sleep of CRYPTO_TF... Mikulas Patocka
- Re: [PATCH 1/2] cpt-crypto: don't sleep of CRYPT... Herbert Xu
- [PATCH 2/2] hisilicon-crypto: don't sleep of CRY... Mikulas Patocka
- Re: [dm-devel] [PATCH 2/2] hisilicon-crypto: don... Jonathan Cameron
- [PATCH 3/4] crypto: set the flag CRYPTO_ALG_ALLOCATES_MEM... Mikulas Patocka