Re: [PATCH 1/3] crypto: pass the flag CRYPTO_ALG_ALLOCATES_MEMORY

2020-06-26 Thread Mikulas Patocka
On Fri, 26 Jun 2020, Herbert Xu wrote: > On Wed, Jun 17, 2020 at 11:09:28AM -0400, Mikulas Patocka wrote: > > > > Index: linux-2.6/include/linux/crypto.h > > === > > --- linux-2.6.orig/include/linux/crypto.h > > +++ linux-2.6/inclu

Re: [PATCH 1/3] crypto: pass the flag CRYPTO_ALG_ALLOCATES_MEMORY

2020-06-25 Thread Herbert Xu
On Wed, Jun 17, 2020 at 11:09:28AM -0400, Mikulas Patocka wrote: > > Index: linux-2.6/include/linux/crypto.h > === > --- linux-2.6.orig/include/linux/crypto.h > +++ linux-2.6/include/linux/crypto.h > @@ -97,9 +97,18 @@ > #define CRYPT

[PATCH 1/3] crypto: pass the flag CRYPTO_ALG_ALLOCATES_MEMORY

2020-06-17 Thread Mikulas Patocka
Introduce a new flag CRYPTO_ALG_ALLOCATES_MEMORY and pass it down the crypto stack. If the flag is set, then the crypto driver allocates memory in its request routine. Such drivers are not suitable for disk encryption because GFP_ATOMIC allocation can fail anytime (causing random I/O errors) and G