From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RESEND] SHASH_DESC_ON_STACK macro
Date: Thu, 5 Apr 2018 03:26:54 -0500 [thread overview]
Message-ID: <296706fc-9578-1ca5-ac7f-9b0a5e863114@embeddedor.com> (raw)
In-Reply-To: <20180327100709.GA12961@gondor.apana.org.au>
Hi Herbert,
On 03/27/2018 05:07 AM, Herbert Xu wrote:
> On Fri, Mar 23, 2018 at 02:09:46PM -0500, Gustavo A. R. Silva wrote:
>>
>> Hi Herbert,
>>
>> There is an ongoing effort to remove all VLAs from the code base [1] and
>> while working on that I came across the following macro at
>> include/crypto/hash.h:154:
>>
>> #define SHASH_DESC_ON_STACK(shash, ctx) \
>> char __##shash##_desc[sizeof(struct shash_desc) + \
>> crypto_shash_descsize(ctx)] CRYPTO_MINALIGN_ATTR; \
>> struct shash_desc *shash = (struct shash_desc *)__##shash##_desc
>>
>>
>> Currently, this macro is being used in 46 different places.
>>
>> I wonder how big can tfm->descsize can get?
>
> descsize is capped at PAGE_SIZE / 8.
>
Sorry for the late response. It seems I lost track of this email somehow.
OK. So based on your response I will propose a patch for this.
Thanks!
--
Gustavo
prev parent reply other threads:[~2018-04-05 8:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-21 15:07 [RFC] " Gustavo A. R. Silva
2018-03-23 19:09 ` [RESEND] " Gustavo A. R. Silva
2018-03-27 10:07 ` Herbert Xu
2018-04-05 8:26 ` Gustavo A. R. Silva [this message]
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=296706fc-9578-1ca5-ac7f-9b0a5e863114@embeddedor.com \
--to=gustavo@embeddedor.com \
--cc=davem@davemloft.net \
--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
all inboxes | Powered by JetHome®