Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp406836pxb; Wed, 3 Mar 2021 06:22:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxi3tcDs955A4nErw0aEJ3W5c70O4o299zfz3MWfDibLvONNnDWv4umtK77v3vhyu8LsG57 X-Received: by 2002:a17:906:600f:: with SMTP id o15mr26485843ejj.76.1614781360640; Wed, 03 Mar 2021 06:22:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614781360; cv=none; d=google.com; s=arc-20160816; b=PuRRsBuEMoeGwt3Gi8LGKJA/FGJ5WE3NlCThoMMMP6BxIirrHdZmB0AKLhmt2z0bgZ BNyYINd+LHRrewpY+orUrHHEsIQ8UAsnBhoTJEiyiHemMyllJBpCgvDaTdgFatj3xvSZ i6e04LBMTyEVcwyfT8GR/WrJ8l7gHj+03mwcDkHliyrVRSLsLwjeKxqbyn+KDFITr1iE yZtw5jyAL6wEWMW5Ut8JGFOMtc8eOxOYGsY5n00ETTTcSV3gCbmQ7haq++7dc4UBluHu UymhfP/uf6HmmH3DHpVD2x4A9YyvBhg7d0ivt45sfL2zVtDySVahO1yIN+wMnLat9iME KRqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=J8zCIRZm2I7GejctzCVxHqJ4W18TSNY0qEiH296FgSA=; b=cum3AiUJGEc8zq3gwEq/SaPkCrY+CKw+q7Ql0DmhOnzcvoIpf+3Y7pdiw1Mj3+M+fS QdABmcKzOjT/66wFIve0Yers5snd/yslU1x7LCR7y6EErJx4jOKJjnY1S4NgUJBEQJkv O9NoYczcjJzcdsG+NUG1QzqDUaEdgumY5oCHhPO90OPYWnzJ34LBa0WBHnYYFHjJQDl3 Tzjuq+gqEGHWxhwDTgJNSudTT3rnNNTwsD6KAV2ROBM+cGqnmoMsSEOCzS9+vXLdPgBb 7Cak6BF2XJTYWnl3NabOlDJtRk4MwcwxKzoLQiT5MQw3NAGvNBCCXekcKff67y6RvovD ndjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="XK2C//Ty"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jt20si15366760ejb.157.2021.03.03.06.21.43; Wed, 03 Mar 2021 06:22:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="XK2C//Ty"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240067AbhCAVPX (ORCPT + 99 others); Mon, 1 Mar 2021 16:15:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:48192 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237974AbhCARNx (ORCPT ); Mon, 1 Mar 2021 12:13:53 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id BB3FF64F4C; Mon, 1 Mar 2021 16:44:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614617092; bh=NDL6jseudX0heYRReTyaG0ksccIA+HaWNtRNkwq9JO4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XK2C//TybO6lEXRZx8o9k0Usxr0loHkfCv6a0aZ0I7FPSvdzhuDu97pYujvVPRkjT 0hPowS2W43nBesicdC1S2x9ac+8iY2KFCOFrwokqB1gxxHnWfLOn8wAJEyICdnlB59 auC6n/+2ImWubJ0guVZyquEU3dTP/yxMQiUTnRj0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ard Biesheuvel , Herbert Xu Subject: [PATCH 4.19 200/247] crypto: arm64/sha - add missing module aliases Date: Mon, 1 Mar 2021 17:13:40 +0100 Message-Id: <20210301161041.449358349@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161031.684018251@linuxfoundation.org> References: <20210301161031.684018251@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ard Biesheuvel commit 0df07d8117c3576f1603b05b84089742a118d10a upstream. The accelerated, instruction based implementations of SHA1, SHA2 and SHA3 are autoloaded based on CPU capabilities, given that the code is modest in size, and widely used, which means that resolving the algo name, loading all compatible modules and picking the one with the highest priority is taken to be suboptimal. However, if these algorithms are requested before this CPU feature based matching and autoloading occurs, these modules are not even considered, and we end up with suboptimal performance. So add the missing module aliases for the various SHA implementations. Cc: Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- arch/arm64/crypto/sha1-ce-glue.c | 1 + arch/arm64/crypto/sha2-ce-glue.c | 2 ++ arch/arm64/crypto/sha3-ce-glue.c | 4 ++++ arch/arm64/crypto/sha512-ce-glue.c | 2 ++ 4 files changed, 9 insertions(+) --- a/arch/arm64/crypto/sha1-ce-glue.c +++ b/arch/arm64/crypto/sha1-ce-glue.c @@ -21,6 +21,7 @@ MODULE_DESCRIPTION("SHA1 secure hash using ARMv8 Crypto Extensions"); MODULE_AUTHOR("Ard Biesheuvel "); MODULE_LICENSE("GPL v2"); +MODULE_ALIAS_CRYPTO("sha1"); struct sha1_ce_state { struct sha1_state sst; --- a/arch/arm64/crypto/sha2-ce-glue.c +++ b/arch/arm64/crypto/sha2-ce-glue.c @@ -21,6 +21,8 @@ MODULE_DESCRIPTION("SHA-224/SHA-256 secure hash using ARMv8 Crypto Extensions"); MODULE_AUTHOR("Ard Biesheuvel "); MODULE_LICENSE("GPL v2"); +MODULE_ALIAS_CRYPTO("sha224"); +MODULE_ALIAS_CRYPTO("sha256"); struct sha256_ce_state { struct sha256_state sst; --- a/arch/arm64/crypto/sha3-ce-glue.c +++ b/arch/arm64/crypto/sha3-ce-glue.c @@ -22,6 +22,10 @@ MODULE_DESCRIPTION("SHA3 secure hash using ARMv8 Crypto Extensions"); MODULE_AUTHOR("Ard Biesheuvel "); MODULE_LICENSE("GPL v2"); +MODULE_ALIAS_CRYPTO("sha3-224"); +MODULE_ALIAS_CRYPTO("sha3-256"); +MODULE_ALIAS_CRYPTO("sha3-384"); +MODULE_ALIAS_CRYPTO("sha3-512"); asmlinkage void sha3_ce_transform(u64 *st, const u8 *data, int blocks, int md_len); --- a/arch/arm64/crypto/sha512-ce-glue.c +++ b/arch/arm64/crypto/sha512-ce-glue.c @@ -22,6 +22,8 @@ MODULE_DESCRIPTION("SHA-384/SHA-512 secure hash using ARMv8 Crypto Extensions"); MODULE_AUTHOR("Ard Biesheuvel "); MODULE_LICENSE("GPL v2"); +MODULE_ALIAS_CRYPTO("sha384"); +MODULE_ALIAS_CRYPTO("sha512"); asmlinkage void sha512_ce_transform(struct sha512_state *sst, u8 const *src, int blocks);