public inbox for linux-modules@vger.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Ignat Korchagin <ignat@cloudflare.com>
Cc: dhowells@redhat.com, Lukas Wunner <lukas@wunner.de>,
	Jarkko Sakkinen <jarkko@kernel.org>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Eric Biggers <ebiggers@kernel.org>,
	Luis Chamberlain <mcgrof@kernel.org>,
	Petr Pavlu <petr.pavlu@suse.com>,
	Daniel Gomez <da.gomez@kernel.org>,
	Sami Tolvanen <samitolvanen@google.com>,
	"Jason A . Donenfeld" <Jason@zx2c4.com>,
	Ard Biesheuvel <ardb@kernel.org>,
	Stephan Mueller <smueller@chronox.de>,
	linux-crypto@vger.kernel.org, keyrings@vger.kernel.org,
	linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v12 02/10] pkcs7: Allow the signing algo to calculate the digest itself
Date: Tue, 20 Jan 2026 16:10:58 +0000	[thread overview]
Message-ID: <1189035.1768925458@warthog.procyon.org.uk> (raw)
In-Reply-To: <CALrw=nH8zOXiyiCGkx1A533ijM=pyVebbhYCFpUyvP0bnjrXzA@mail.gmail.com>

Ignat Korchagin <ignat@cloudflare.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


  reply	other threads:[~2026-01-20 16:11 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-15 21:50 [PATCH v12 00/10] x509, pkcs7, crypto: Add ML-DSA and RSASSA-PSS signing David Howells
2026-01-15 21:50 ` [PATCH v12 01/10] crypto: Add ML-DSA crypto_sig support David Howells
2026-01-15 21:50 ` [PATCH v12 02/10] pkcs7: Allow the signing algo to calculate the digest itself David Howells
2026-01-20 14:06   ` Ignat Korchagin
2026-01-20 16:10     ` David Howells [this message]
2026-01-15 21:50 ` [PATCH v12 03/10] pkcs7: Allow direct signing of data with ML-DSA David Howells
2026-01-15 21:50 ` [PATCH v12 04/10] pkcs7, x509: Add ML-DSA support David Howells
2026-01-15 21:50 ` [PATCH v12 05/10] modsign: Enable ML-DSA module signing David Howells
2026-01-15 21:50 ` [PATCH v12 06/10] crypto: Add supplementary info param to asymmetric key signature verification David Howells
2026-01-20 22:03   ` Eric Biggers
2026-01-20 23:39     ` David Howells
2026-01-21  0:06       ` Eric Biggers
2026-01-25 14:19     ` Jarkko Sakkinen
2026-01-15 21:50 ` [PATCH v12 07/10] crypto: Add RSASSA-PSS support David Howells
2026-01-20 14:26   ` Ignat Korchagin
2026-01-15 21:50 ` [PATCH v12 08/10] pkcs7, x509: " David Howells
2026-01-20 14:39   ` Ignat Korchagin
2026-01-20 15:28     ` David Howells
2026-01-15 21:50 ` [PATCH v12 09/10] modsign: Enable RSASSA-PSS module signing David Howells
2026-01-15 21:50 ` [PATCH v12 10/10] x509, pkcs7: Limit crypto combinations that may be used for " David Howells

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=1189035.1768925458@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=Jason@zx2c4.com \
    --cc=ardb@kernel.org \
    --cc=da.gomez@kernel.org \
    --cc=ebiggers@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=ignat@cloudflare.com \
    --cc=jarkko@kernel.org \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-modules@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=mcgrof@kernel.org \
    --cc=petr.pavlu@suse.com \
    --cc=samitolvanen@google.com \
    --cc=smueller@chronox.de \
    /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