lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 3 May 2018 14:23:30 +0200
From:   'Antoine Tenart' <antoine.tenart@...tlin.com>
To:     David Laight <David.Laight@...lab.com>
Cc:     'Antoine Tenart' <antoine.tenart@...tlin.com>,
        "herbert@...dor.apana.org.au" <herbert@...dor.apana.org.au>,
        "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 David,

On Wed, May 02, 2018 at 02:55:19PM +0000, 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_request *name = (void *)__##name##_desc
> > +
> 
> This looks stunningly like a VLA.

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).

If you do have a suggestion on how to fix the 3 of them, I'll be glad to
make a patch for that, but I'm not sure there's an easy solution. And I
don't think I saw a patch on the mailing list about those defines.

Thanks,
Antoine

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ