public inbox for linux-modules@vger.kernel.org
 help / color / mirror / Atom feed
From: Venkat <venkat88@linux.ibm.com>
To: David Howells <dhowells@redhat.com>
Cc: Michael Kelley <mhklinux@outlook.com>,
	Sami Tolvanen <samitolvanen@google.com>,
	Lukas Wunner <lukas@wunner.de>,
	Ignat Korchagin <ignat@cloudflare.com>,
	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>,
	"Jason A . Donenfeld" <Jason@zx2c4.com>,
	Ard Biesheuvel <ardb@kernel.org>,
	Stephan Mueller <smueller@chronox.de>,
	"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
	"keyrings@vger.kernel.org" <keyrings@vger.kernel.org>,
	"linux-modules@vger.kernel.org" <linux-modules@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v15 6/7] modsign: Enable ML-DSA module signing
Date: Tue, 3 Feb 2026 15:12:28 +0530	[thread overview]
Message-ID: <7973F81B-FDA4-46EE-B4AF-2206BCB24861@linux.ibm.com> (raw)
In-Reply-To: <2416273.1770032906@warthog.procyon.org.uk>



> On 2 Feb 2026, at 5:18 PM, David Howells <dhowells@redhat.com> wrote:
> 
> Michael Kelley <mhklinux@outlook.com> wrote:
> 
>> Pardon my ignorance of the signing details, but I don't see an indication
>> of having selected PKCS#7 with SHA1 in my .config. What am I looking for?
> 
> Actually, if you have openssl >= 1.0.0 then it sign-file will be built to use
> CMS rather than PKCS#7, and will use the configured hash algo, so you can
> ignore this.
> 
>> The symbols CMS_NO_SIGNING_TIME,
> 
> I can probably just not add that.
> 
>> EVP_PKEY_is_a()
> 
> I guess I can probably make this contingent on >= 3.0.0.
> 
>> and OPENSSL_VERSION_MAJOR don't exist in the include/openssl/* files for
>> that old version.
> 
> I should probably use OPENSSL_VERSION_NUMBER instead - though we already use
> it for selecting #includes (I guess #if doesn't complain).
> 
> Do the attached changes work for you?
> 
> David
> ---
> diff --git a/scripts/sign-file.c b/scripts/sign-file.c
> index 547b97097230..78276b15ab23 100644
> --- a/scripts/sign-file.c
> +++ b/scripts/sign-file.c
> @@ -27,7 +27,7 @@
> #include <openssl/evp.h>
> #include <openssl/pem.h>
> #include <openssl/err.h>
> -#if OPENSSL_VERSION_MAJOR >= 3
> +#if OPENSSL_VERSION_NUMBER >= 0x30000000L
> # define USE_PKCS11_PROVIDER
> # include <openssl/provider.h>
> # include <openssl/store.h>
> @@ -323,18 +323,21 @@ int main(int argc, char **argv)
> CMS_DETACHED |
> CMS_STREAM  |
> CMS_NOSMIMECAP |
> +#ifdef CMS_NO_SIGNING_TIME
> CMS_NO_SIGNING_TIME |
> +#endif
> use_keyid;
> 
> - if ((EVP_PKEY_is_a(private_key, "ML-DSA-44") ||
> -     EVP_PKEY_is_a(private_key, "ML-DSA-65") ||
> -     EVP_PKEY_is_a(private_key, "ML-DSA-87")) &&
> -    OPENSSL_VERSION_MAJOR < 4) {
> +#if OPENSSL_VERSION_NUMBER >= 0x30000000L && OPENSSL_VERSION_NUMBER < 0x40000000L
> + if (EVP_PKEY_is_a(private_key, "ML-DSA-44") ||
> +    EVP_PKEY_is_a(private_key, "ML-DSA-65") ||
> +    EVP_PKEY_is_a(private_key, "ML-DSA-87")) {
> /* ML-DSA + CMS_NOATTR is not supported in openssl-3.5
>  * and before.
>  */
> use_signed_attrs = 0;
> }
> +#endif
> 
> flags |= use_signed_attrs;
> 

Tested this, and build is successful. Please add below tag.

Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>

Regards,
Venkat.


  parent reply	other threads:[~2026-02-03  9:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-26 14:29 [PATCH v15 0/7] x509, pkcs7, crypto: Add ML-DSA signing David Howells
2026-01-26 14:29 ` [PATCH v15 1/7] crypto: Add ML-DSA crypto_sig support David Howells
2026-01-26 14:29 ` [PATCH v15 2/7] x509: Separately calculate sha256 for blacklist David Howells
2026-01-28 23:14   ` Jarkko Sakkinen
2026-01-26 14:29 ` [PATCH v15 3/7] pkcs7, x509: Rename ->digest to ->m David Howells
2026-01-28 23:15   ` Jarkko Sakkinen
2026-01-26 14:29 ` [PATCH v15 4/7] pkcs7: Allow the signing algo to do whatever digestion it wants itself David Howells
2026-01-26 14:29 ` [PATCH v15 5/7] pkcs7, x509: Add ML-DSA support David Howells
2026-01-26 14:29 ` [PATCH v15 6/7] modsign: Enable ML-DSA module signing David Howells
2026-01-31 16:00   ` Michael Kelley
2026-02-01 16:44     ` David Howells
2026-02-01 19:30       ` Michael Kelley
2026-02-02 11:48         ` David Howells
2026-02-02 15:45           ` Michael Kelley
2026-02-03  9:42           ` Venkat [this message]
2026-01-26 14:29 ` [PATCH v15 7/7] pkcs7: Allow authenticatedAttributes for ML-DSA 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=7973F81B-FDA4-46EE-B4AF-2206BCB24861@linux.ibm.com \
    --to=venkat88@linux.ibm.com \
    --cc=Jason@zx2c4.com \
    --cc=ardb@kernel.org \
    --cc=da.gomez@kernel.org \
    --cc=dhowells@redhat.com \
    --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=mhklinux@outlook.com \
    --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