Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp340339lqh; Thu, 28 Mar 2024 03:57:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVkNy2wH7AZd7da1i7HTV2hg0QGjFUO04U2p3AM0B8RX73ly1TXQf+qQyK8SgBS7e5+a+2fSY7+/jnlysOr/vL+X1FKOqHIeWLrzNr2fA== X-Google-Smtp-Source: AGHT+IGMjxU1voe68XxG+Swzo1XfwmFSKfQyX/HUCz/5MG6Y2b279RH9CUvUzGA2R5giGHzFSFVH X-Received: by 2002:a17:90a:142:b0:2a0:486e:780a with SMTP id z2-20020a17090a014200b002a0486e780amr2433645pje.15.1711623430622; Thu, 28 Mar 2024 03:57:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711623430; cv=pass; d=google.com; s=arc-20160816; b=unQO2q+QuFJ6scTl6fqRbR8DdJn6Ymxi2O8tsvNBq4Vr3EKS0UTJi36zhZWXKkUP3d eC8zlhX6Q004vVohaxyZ6+pm/50nV4bJzQajgLG4THo4iYEM9/yhhzbAXcuLicl68RI0 jTTCNM3AnBxA0TrmDzt1LCYRJVw+oVCMR2+tSWUSNdO/XjkkAtjLpjgZN6wGglUeEzaj s1CE5H/McYlCaLzxr6G4uGOFI+jtVIRa3STV/iKVrk+WdTYOGSrEGc/ufC6sZZjabMJ5 LZVG1t3XxZpi0F/5diiApxFB9ZFxuwm2FcnJb1oKHEPa9oWqg1+Ny6rmwRTtr3cVBke7 GTfw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=ufzd9MLLoUy5RtEGNDKI6TsKZlQ3kDKD1JfOoHRVMJM=; fh=XrPWn6u2Zgfi4Bfs4+/7ab6z+0Ul9w9EBGDcU46YFMk=; b=CFLD3Xb0HaurbllLplco48UQRENChh9Ntg6I2PwknzgRl+qGP9XSsEiJ/4V8BvMVGL IFMPb5CWFcFYHjHCnRTSunhKIgPH2WgLpF4eX9meb679tcXNdjsUfgc6QVWUn/dY7ErP MtIMWj1ff8KsaIqwtKXyxDS+0hYHhF5tDrZGHIrCRvca4oPhvYmKuiF1kjacQJ8DDzaw HjK/3hoiOfnUr/XembuUuc+dxpsi/y0j2N7Mjph4r1EWf78T3OJYsxtvkWthoZzqFJAR y7QeQx3CnpPI4rgbNfGm1HGc2tG+nF0lb5n9mVMq+L89YBXPA6LaSK6FeAOwTpoy+EmD nytQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gondor.apana.org.au dmarc=pass fromdomain=gondor.apana.org.au); spf=pass (google.com: domain of linux-crypto+bounces-3000-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-crypto+bounces-3000-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=REJECT sp=QUARANTINE dis=NONE) header.from=apana.org.au Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id co11-20020a17090afe8b00b002a09366d05csi3304404pjb.124.2024.03.28.03.57.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 03:57:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-3000-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gondor.apana.org.au dmarc=pass fromdomain=gondor.apana.org.au); spf=pass (google.com: domain of linux-crypto+bounces-3000-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-crypto+bounces-3000-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=REJECT sp=QUARANTINE dis=NONE) header.from=apana.org.au 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id EF5342990EE for ; Thu, 28 Mar 2024 10:57:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 931657E103; Thu, 28 Mar 2024 10:56:53 +0000 (UTC) X-Original-To: linux-crypto@vger.kernel.org Received: from abb.hmeau.com (abb.hmeau.com [144.6.53.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73E682B9C6; Thu, 28 Mar 2024 10:56:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=144.6.53.87 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711623413; cv=none; b=W/Hwl0jcQE1itdl9TI9HoWBTXzsLtcU8h9XPSjZawq0Ib8JzJpSvN9ZbLVdA9jtNTFwzvn+/k+4L3p2bC7Jo6Lq5yguHJ4m5hG6bLmM0dpWd0p59lFRSWrz5rdEfM+ohOhEuomf7L/9WmgiFSOAYWjzAEiHBYxtFVMnjsiQnzvc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711623413; c=relaxed/simple; bh=TPIsNz6gfRZzaJZqY9pHJHdC43AuokpDy2fKWTQJ8Rg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=H7R+I/KPCrLtPecqGYfZWsyrhWT9Zt1XOd+lFjxRi6ykAQjPsVzTQf8hqtoc8QF+7RGnDIww6UPOPBZPn0JYkfszorarATOUuLz+io5MI8hBz2Iz+RuURDNfgql3AXaGRfvIzcFrXtD1dzoA6HEgXDZzjXJCOOg/kP6uzRDsAqQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gondor.apana.org.au; spf=pass smtp.mailfrom=gondor.apana.org.au; arc=none smtp.client-ip=144.6.53.87 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gondor.apana.org.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gondor.apana.org.au Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1rpnQw-00C8T2-2E; Thu, 28 Mar 2024 18:56:35 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Thu, 28 Mar 2024 18:56:50 +0800 Date: Thu, 28 Mar 2024 18:56:50 +0800 From: Herbert Xu To: Stefan Berger 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 Message-ID: References: <20240321144433.1671394-1-stefanb@linux.ibm.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > --- > crypto/ecdsa.c | 3 +++ > 1 file changed, 3 insertions(+) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt