Re: [PATCH 01/10] crypto: aead - allow to allocate AEAD requests on the stack

2018-05-05 Thread 'Antoine Tenart'
Hi Herbert, On Sat, May 05, 2018 at 02:18:55PM +0800, Herbert Xu wrote: > On Fri, May 04, 2018 at 09:18:41AM +0200, 'Antoine Tenart' wrote: > > > > In this driver we need to perform in certain cases an invalidation, > > which is done thanks to invalidation requests. To do this we create > > dummy

Re: [PATCH 01/10] crypto: aead - allow to allocate AEAD requests on the stack

2018-05-04 Thread Herbert Xu
On Fri, May 04, 2018 at 09:18:41AM +0200, 'Antoine Tenart' wrote: > > In this driver we need to perform in certain cases an invalidation, > which is done thanks to invalidation requests. To do this we create > dummy requests, using SKCIPHER_REQUEST_ON_STACK and > AHASH_REQUEST_ON_STACK for ciphers

Re: [PATCH 01/10] crypto: aead - allow to allocate AEAD requests on the stack

2018-05-04 Thread 'Antoine Tenart'
Hi Herbert, On Fri, May 04, 2018 at 07:00:06AM +0800, Herbert Xu wrote: > On Thu, May 03, 2018 at 02:23:30PM +0200, 'Antoine Tenart' wrote: > > > > I was expecting this question :) The thing is this define looks *a lot* > > like the ones defined in other places in the crypto framework, such as > >

Re: [PATCH 01/10] crypto: aead - allow to allocate AEAD requests on the stack

2018-05-03 Thread Herbert Xu
On Thu, May 03, 2018 at 02:23:30PM +0200, 'Antoine Tenart' wrote: > > I was expecting this question :) The thing is this define looks *a lot* > like the ones defined in other places in the crypto framework, such as > SKCIPHER_REQUEST_ON_STACK and AHASH_REQUEST_ON_STACK. Those haven't been > tackled

Re: [PATCH 01/10] crypto: aead - allow to allocate AEAD requests on the stack

2018-05-03 Thread 'Antoine Tenart'
Hi David, On Wed, May 02, 2018 at 02:55:19PM +, David Laight wrote: > From: Antoine Tenart > > > > +#define AEAD_REQUEST_ON_STACK(name, tfm) \ > > + char __##name##_desc[sizeof(struct aead_request) + \ > > + crypto_aead_reqsize(tfm)] CRYPTO_MINALIGN_ATTR; \ > > + struct aead_req

RE: [PATCH 01/10] crypto: aead - allow to allocate AEAD requests on the stack

2018-05-02 Thread David Laight
From: Antoine Tenart > Sent: 02 May 2018 10:57 > Adds the AEAD_REQUEST_ON_STACK primitive to allow allocating AEAD > requests on the stack, as it can already be done with various other > crypto algorithms within the kernel. > > Signed-off-by: Antoine Tenart > --- > include/crypto/aead.h | 5

[PATCH 01/10] crypto: aead - allow to allocate AEAD requests on the stack

2018-05-02 Thread Antoine Tenart
Adds the AEAD_REQUEST_ON_STACK primitive to allow allocating AEAD requests on the stack, as it can already be done with various other crypto algorithms within the kernel. Signed-off-by: Antoine Tenart --- include/crypto/aead.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/cryp