linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gilad Ben-Yossef <gilad@benyossef.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Biggers <ebiggers@google.com>,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
	Linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] crypto: ccree - reduce kernel stack usage with clang
Date: Sun, 17 Mar 2019 08:06:44 +0200	[thread overview]
Message-ID: <CAOtvUMeGsk8zuX_0QP7G_JXP_iuWh=ytKPDmaPvdhUKQDqTLRw@mail.gmail.com> (raw)
In-Reply-To: <20190314090951.840339-1-arnd@arndb.de>

On Thu, Mar 14, 2019 at 11:10 AM Arnd Bergmann <arnd@arndb.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@benyossef.com>

Gilad
-- 
Gilad Ben-Yossef
Chief Coffee Drinker

values of β will give rise to dom!

  reply	other threads:[~2019-03-17  6:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-14  9:09 [PATCH] crypto: ccree - reduce kernel stack usage with clang Arnd Bergmann
2019-03-17  6:06 ` Gilad Ben-Yossef [this message]
2019-03-22 13:04 ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOtvUMeGsk8zuX_0QP7G_JXP_iuWh=ytKPDmaPvdhUKQDqTLRw@mail.gmail.com' \
    --to=gilad@benyossef.com \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=ebiggers@google.com \
    --cc=gustavo@embeddedor.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).