Re: [PATCH] crypto: testmgr - reduce stack usage in fuzzers
From: Arnd Bergmann
Date: Mon Jun 17 2019 - 10:59:30 EST
On Mon, Jun 17, 2019 at 4:24 PM Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> wrote:
>
> On Mon, Jun 17, 2019 at 04:10:44PM +0200, Arnd Bergmann wrote:
> >
> > In most cases, this ends up in favor of clang (concerning the stack
> > warning size limit) because most variables are small, but here we have
> > a large stack object (two objects for the hash fuzzing) with a large redzone.
>
> Oh I missed the fact that there is another large stack variable
> further up the stack. So what happens if you just convert that
> one and leave the shash descriptor alone?
Just converting the three testvec_config variables is what I originally
had in my patch. It got some configurations below the warning level,
but some others still had the problem. I considered sending two
separate patches, but as the symptom was the same, I just folded
it all into one patch that does the same thing in four functions.
Arnd