[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Sat, 5 May 2018 19:17:34 +0200
From: 'Antoine Tenart' <antoine.tenart@...tlin.com>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: 'Antoine Tenart' <antoine.tenart@...tlin.com>,
David Laight <David.Laight@...lab.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"thomas.petazzoni@...tlin.com" <thomas.petazzoni@...tlin.com>,
"maxime.chevallier@...tlin.com" <maxime.chevallier@...tlin.com>,
"gregory.clement@...tlin.com" <gregory.clement@...tlin.com>,
"miquel.raynal@...tlin.com" <miquel.raynal@...tlin.com>,
"nadavh@...vell.com" <nadavh@...vell.com>,
"oferh@...vell.com" <oferh@...vell.com>,
"igall@...vell.com" <igall@...vell.com>
Subject: Re: [PATCH 01/10] crypto: aead - allow to allocate AEAD requests on
the stack
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 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?
>
> These are not uses intended for the ON_STACK macros. They were
> only ever meant for existing users of the synchonous crypto API.
OK, I see.
> I would suggest either allocating a new request on the spot or if
> that is not convenient, pre-allocating it in the cra_init function.
Or we could have similar macros in the driver: we wouldn't have VLAs
since it would be driver specific.
Thanks!
Antoine
--
Antoine Ténart, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
Powered by blists - more mailing lists