[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1189035.1768925458@warthog.procyon.org.uk>
Date: Tue, 20 Jan 2026 16:10:58 +0000
From: David Howells <dhowells@...hat.com>
To: Ignat Korchagin <ignat@...udflare.com>
Cc: dhowells@...hat.com, Lukas Wunner <lukas@...ner.de>,
Jarkko Sakkinen <jarkko@...nel.org>,
Herbert Xu <herbert@...dor.apana.org.au>,
Eric Biggers <ebiggers@...nel.org>,
Luis Chamberlain <mcgrof@...nel.org>,
Petr Pavlu <petr.pavlu@...e.com>, Daniel Gomez <da.gomez@...nel.org>,
Sami Tolvanen <samitolvanen@...gle.com>,
"Jason A . Donenfeld" <Jason@...c4.com>,
Ard Biesheuvel <ardb@...nel.org>,
Stephan Mueller <smueller@...onox.de>, linux-crypto@...r.kernel.org,
keyrings@...r.kernel.org, linux-modules@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v12 02/10] pkcs7: Allow the signing algo to calculate the digest itself
Ignat Korchagin <ignat@...udflare.com> wrote:
> > + sig->digest = kmalloc(umax(sinfo->authattrs_len, sig->digest_size),
> > + GFP_KERNEL);
>
> I'm still bothered by this "reallocation". You mentioned we need to do
> some parsing for attributes, but it seems by the time this function is
> called we have all the data to do something like
> kmalloc(sig->algo_does_hash ? umax(sinfo->authattrs_len,
> sig->digest_size) : sig->digest_size, GFP_KERNEL) during the initial
> allocation. Or am I missing something?
Actually, you're right, we do have that info at this point
David
Powered by blists - more mailing lists