From patchwork Mon Mar 18 00:42:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vitaly Chikunov X-Patchwork-Id: 13594895 X-Patchwork-Delegate: herbert@gondor.apana.org.au Received: from vmicros1.altlinux.org (vmicros1.altlinux.org [194.107.17.57]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C2450F9C8; Mon, 18 Mar 2024 00:43:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.107.17.57 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710722613; cv=none; b=DylPgiLphiWLbPE9bP/2RPIDWR1VKlWzabjnrP/l5KAgkbdPu0IArKGfTDZ99lz4Cbz2nWs4ntPkIdbiH/F/nuGEwpZ/tVrvdSQR48IDT4YtYr88GPmjyVHco2NQbtvpELhQZLjkeyo2Xzasnnu7A8FA+SzcRUaeTBRLEDv27NA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710722613; c=relaxed/simple; bh=uJMCAo6oQPgb1Sif+u5CTBxzLZGo22rQRJdgKSMDosc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=b9XRc52O18vapDNtZL9AHL5FdcJR6FtPCbuxD6vYZ8tZ3xUzCGRTBHSQte86W0Q+YTGupmjPErmy8T0x1M5jVqVeuyLNliPbYK4exyf5JGQfcRODBFcWlcXNf63dYMtNnzOF7e+oSzGtET0WbwvxlAiwK0Fi5soSn0aVH9oygA0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=altlinux.org; spf=pass smtp.mailfrom=altlinux.org; arc=none smtp.client-ip=194.107.17.57 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=altlinux.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=altlinux.org Received: from imap.altlinux.org (imap.altlinux.org [194.107.17.38]) by vmicros1.altlinux.org (Postfix) with ESMTP id 7503E72C8F5; Mon, 18 Mar 2024 03:43:22 +0300 (MSK) Received: from beacon.altlinux.org (unknown [193.43.10.9]) by imap.altlinux.org (Postfix) with ESMTPSA id 6649F36D015F; Mon, 18 Mar 2024 03:43:22 +0300 (MSK) From: Vitaly Chikunov To: Herbert Xu , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Paul Wolneykien , "David S. Miller" Subject: [PATCH] crypto: ecrdsa - Fix module auto-load on add_key Date: Mon, 18 Mar 2024 03:42:40 +0300 Message-ID: <20240318004241.2925876-1-vt@altlinux.org> X-Mailer: git-send-email 2.42.1 Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 --- crypto/ecrdsa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/crypto/ecrdsa.c b/crypto/ecrdsa.c index f3c6b5e15e75..3811f3805b5d 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");