[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOtvUMeGsk8zuX_0QP7G_JXP_iuWh=ytKPDmaPvdhUKQDqTLRw@mail.gmail.com>
Date: Sun, 17 Mar 2019 08:06:44 +0200
From: Gilad Ben-Yossef <gilad@...yossef.com>
To: Arnd Bergmann <arnd@...db.de>
Cc: Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>,
Eric Biggers <ebiggers@...gle.com>,
"Gustavo A. R. Silva" <gustavo@...eddedor.com>,
Linux Crypto Mailing List <linux-crypto@...r.kernel.org>,
Linux kernel mailing list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] crypto: ccree - reduce kernel stack usage with clang
On Thu, Mar 14, 2019 at 11:10 AM Arnd Bergmann <arnd@...db.de> wrote:
>
> Building with clang for a 32-bit architecture runs over the stack
> frame limit in the setkey function:
>
> drivers/crypto/ccree/cc_cipher.c:318:12: error: stack frame size of 1152 bytes in function 'cc_cipher_setkey' [-Werror,-Wframe-larger-than=]
>
> The problem is that there are two large variables: the temporary
> 'tmp' array and the SHASH_DESC_ON_STACK() declaration. Moving
> the first into the block in which it is used reduces the
> total frame size to 768 bytes, which seems more reasonable
> and is under the warning limit.
>
Thank you , Ard.
I will also revisit splitting that function to further reduce stack
usage after I finish tackling the fallout of the new testmgr... :-)
Acked-By: Gilad Ben-Yossef <gilad@...yossef.com>
Gilad
--
Gilad Ben-Yossef
Chief Coffee Drinker
values of β will give rise to dom!
Powered by blists - more mailing lists