lkml.org 
[lkml]   [2018]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/10] crypto: aead - allow to allocate AEAD requests on the stack
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
> > SKCIPHER_REQUEST_ON_STACK and AHASH_REQUEST_ON_STACK. Those haven't been
> > tackled down so far by the whole VLA removal so the idea was that the
> > same solution will apply to the 3 of them (and then I'm not really
> > adding a new one).
>
> Those constructs only exist for reasons of backwards compatibility.
>
> There is no such reason for AEAD. So why do you need this?

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 and hashes. So when adding the AEAD
algs support, in patch 8/10, AEAD_REQUEST_ON_STACK is used for the same
reason.

Should we allocate this in a different way?

Thanks!
Antoine

--
Antoine Ténart, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

\
 
 \ /
  Last update: 2018-05-04 09:19    [W:0.079 / U:0.656 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site