From: Vitaly Chikunov Date: Mon, 18 Mar 2024 00:42:40 +0000 (+0300) Subject: crypto: ecrdsa - Fix module auto-load on add_key X-Git-Tag: v6.10-rc1~215^2~101 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eb5739a1efbc9ff216271aeea0ebe1c92e5383e5;p=thirdparty%2Fkernel%2Flinux.git crypto: ecrdsa - Fix module auto-load on add_key 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. Cert is generated usings ima-evm-utils test suite with `gen-keys.sh`, example cert is provided below: $ base64 -d >test-gost2012_512-A.cer < Cc: stable@vger.kernel.org Signed-off-by: Vitaly Chikunov Tested-by: Stefan Berger Signed-off-by: Herbert Xu --- diff --git a/crypto/ecrdsa.c b/crypto/ecrdsa.c index f3c6b5e15e75b..3811f3805b5d8 100644 --- a/crypto/ecrdsa.c +++ b/crypto/ecrdsa.c @@ -294,4 +294,5 @@ module_exit(ecrdsa_mod_fini); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Vitaly Chikunov "); MODULE_DESCRIPTION("EC-RDSA generic algorithm"); +MODULE_ALIAS_CRYPTO("ecrdsa"); MODULE_ALIAS_CRYPTO("ecrdsa-generic");