mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Stefan Berger <stefanb@linux.ibm.com>
Cc: linux-crypto@vger.kernel.org, davem@davemloft.net,
	linux-kernel@vger.kernel.org, saulo.alessandre@tse.jus.br,
	vt@altlinux.org, stable@vger.kernel.org
Subject: Re: [PATCH] crypto: ecdsa - Fix module auto-load on add-key
Date: Thu, 28 Mar 2024 18:56:50 +0800	[thread overview]
Message-ID: <ZgVM8nNQhkIPgh30@gondor.apana.org.au> (raw)
In-Reply-To: <20240321144433.1671394-1-stefanb@linux.ibm.com>

On Thu, Mar 21, 2024 at 10:44:33AM -0400, Stefan Berger wrote:
> Add module alias with the algorithm cra_name similar to what we have for
> RSA-related and other algorithms.
> 
> The kernel attempts to modprobe asymmetric algorithms using the names
> "crypto-$cra_name" and "crypto-$cra_name-all." However, since these
> aliases are currently missing, the modules are not loaded. For instance,
> when using the `add_key` function, the hash algorithm is typically
> loaded automatically, but the asymmetric algorithm is not.
> 
> Steps to test:
> 
> 1. Create certificate
> 
>   openssl req -x509 -sha256 -newkey ec \
>   -pkeyopt "ec_paramgen_curve:secp384r1" -keyout key.pem -days 365 \
>   -subj '/CN=test' -nodes -outform der -out nist-p384.der
> 
> 2. Optionally, trace module requests with: trace-cmd stream -e module &
> 
> 3. Trigger add_key call for the cert:
> 
>    # keyctl padd asymmetric "" @u < nist-p384.der
>    641069229
>    # lsmod | head -2
>    Module                  Size  Used by
>    ecdsa_generic          16384  0
> 
> Fixes: c12d448ba939 ("crypto: ecdsa - Register NIST P384 and extend test suite")
> Cc: stable@vger.kernel.org
> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
> ---
>  crypto/ecdsa.c | 3 +++
>  1 file changed, 3 insertions(+)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

      parent reply	other threads:[~2024-03-28 10:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-21 14:44 Stefan Berger
2024-03-22 22:27 ` Vitaly Chikunov
2024-03-28 10:56 ` Herbert Xu [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=ZgVM8nNQhkIPgh30@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=davem@davemloft.net \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=saulo.alessandre@tse.jus.br \
    --cc=stable@vger.kernel.org \
    --cc=stefanb@linux.ibm.com \
    --cc=vt@altlinux.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®