lkml.org 
[lkml]   [2024]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] crypto: ecdsa - Fix module auto-load on add-key
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

\
 
 \ /
  Last update: 2024-05-27 16:13    [W:1.393 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site