Received: by 2002:a89:2d5:0:b0:1ef:f8eb:5d24 with SMTP id d21csp192480lqs; Sun, 17 Mar 2024 17:43:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV6jjjhYBE3E4mBTrI465MYqCkDBtKtFLMoAHRuNllXPDWC6mEDKatwzcx87hxsDwbltIi5nGLqxJS+dJm/wZRseU/GqHTTeH5+VUCSZA== X-Google-Smtp-Source: AGHT+IHCPwCTKoufu7MliK/ph+p1pocx89g7i/HXl9VR3DF8eNFMDhCPxzwnbMeHsdh2MsluY3Ej X-Received: by 2002:a05:6122:98c:b0:4c0:9ed8:57b3 with SMTP id g12-20020a056122098c00b004c09ed857b3mr6759511vkd.1.1710722618406; Sun, 17 Mar 2024 17:43:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710722618; cv=pass; d=google.com; s=arc-20160816; b=yEc8dIcl59nr7qaapCriuibKcJFrrpdIP3LWsPv18weYJvcObzvwFiqUp6SQPFsbAv JmP7Oxtx/XpxwnXgsGjaE6vjl/QJUqyzZ2tesohh4SXEn/Z3Bm0UzqvpOIKr29S6jzPK 6khQ+R22Zr6TaD7AxmwAxTL+a6btmvJVsekiW46eDkwRtpAo0yXbUnHbLzGC9QqRmGC1 NKzqHpA90ebdboFFiLqknFqU6IHxMOVME/2lb5zcOTn2WXx6wzdQJyT8+mrvu8S8Htx5 0QiYoeMV42SxXQy9+IGtS67PGdBT2jSXeCHnc5RRh93nh0ka6iwubChzOIOSbxEUKZJB GBWg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=t1xkNN05NXRY7/DgvAaNP4vPetJt0H+Y42cgffiCgpM=; fh=Z32vx7qS5RlWpkl3Cr2ACfychbg5Nic4b+QhkKseePA=; b=a1lrmhuRxk95Qxq9aLrnL7BsKED0+HHXPr2GjRKwjoYvxiU9hRtX+kb+5/x+M07FUq 2ocrr0IFM+EA2fHeSbdPAWV6UMAG3r/fDu/ANTD4PyloXGW8Q8AsMGtzK/Gmv6Z6fsyR woxXrak342aCDXUq9uJNA4GrUVomQUO2PPkcmTafBcUfDZcp/qS988HK6eD+sP0p8A/p o3DhAT0wyGTucPPwAFQ6hr9FY5FcTsCS9Wt0fLyWiDcqmonFWndpj5ox9drY2+wbtRly fxqtOLJCS9U+y79Ym9POLGxlKvYEBgtzpHR3KuXxN6tITmW4uQWTcrtsW3bOhmBW20Cm bJ7A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=altlinux.org); spf=pass (google.com: domain of linux-crypto+bounces-2701-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2701-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id iw15-20020a0562140f2f00b0068d0503a3a8si7593358qvb.439.2024.03.17.17.43.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Mar 2024 17:43:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-2701-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=altlinux.org); spf=pass (google.com: domain of linux-crypto+bounces-2701-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2701-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 10C9E1C2136B for ; Mon, 18 Mar 2024 00:43:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 322FBFBF3; Mon, 18 Mar 2024 00:43:33 +0000 (UTC) X-Original-To: linux-crypto@vger.kernel.org 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 Content-Transfer-Encoding: 8bit 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 --- 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"); -- 2.42.1