Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp636857pxb; Wed, 3 Mar 2021 11:22:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJxYwaWNQXcCL6mTOZKES1pZ2uv3EYsy3Grg12NJ09aajmVPFJFsjwNdWxjfeucdKqYVuQnz X-Received: by 2002:a05:6402:1152:: with SMTP id g18mr900133edw.18.1614799328137; Wed, 03 Mar 2021 11:22:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614799328; cv=none; d=google.com; s=arc-20160816; b=xUrqi0L+zAMY70JBBYR8C3R1Urrp1lt9OTHFji0gtig5NECb5i46xSwcYvWTw9vRER bYZblwYdUHy+pYjqKa1HHaQ8UvKX0lzeEYeGOr2jex+iInARR/k1EtLq/bATt8QADwaq fpDhGA2KgI2Rj/yplWHcrolRuXuOstxpkPbxWEFhR8k1BFxR9R9av7gc7lc9hspGPcpW W0K2XFC57V2iJwa0xGVm6+IvEbyaZf9TAuDrNgp4fuIpUwjfv+yw6YVKxJoZWDuC9jgS mgn/CfqqWJLY7aD90Fv0Wv84IU/QZvaNXpJ4PXw0vt6z162LAcWIxwPanAz5y0seoIC3 +h5A== 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=BICFgtKCEw/dzxkHhaL8l1n0D8g+OSGDhfk5hz3i5/0=; b=LChES1HJu8QzmHFG1rEz4TCBMVIXZC93QNC2K0vOlcP2XrboIVJKaxXwFjAGn5LUFY s0QLjIEYg46QkKeUXh7Pgk4Ml3OLkX6y9BVvOK7pSV2B0CO5aQRvSr2UBMP+xlY8lWEC B81MdfYcplzaUXnwAQA8E1WKbwNoREYgnGU0wEcoltbugws7exnZGSsBG/xFaVEWrPqf 7ECcTCv2yaVbrOz5Xsit29MnIdxmtueqkPDxBFwXPCajnpenoNQwJIVB/Hg+ndwiArHV l05FS7Xb0z1gceWO4RFocRJmV+52NpnfGGa4qeCgTxkxYi8FGG0tTe/d6Xz6ZqaDnVJk waig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PK5vGPJV; 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 w22si2361796edd.295.2021.03.03.11.20.54; Wed, 03 Mar 2021 11:22:08 -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=PK5vGPJV; 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 S1378625AbhCBBHP (ORCPT + 99 others); Mon, 1 Mar 2021 20:07:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:37334 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240952AbhCATEU (ORCPT ); Mon, 1 Mar 2021 14:04:20 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B8E306524F; Mon, 1 Mar 2021 17:28:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614619681; bh=sTMTOH1a9bWdZBA7rXXjxIeWPEp360MpiNzx+8H/OqI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PK5vGPJVFysXUVSGaOrGxNVJ+PmkDfmc56LprJY2AJ1U1il9BsOrXD/dg/DLQC2r0 3JrOdtjd3ZzHPOY8fjQaqM7BzGIVcHWUVmtj8WvR1j+etyCCeWx5HllncG2QCj7b9c TiZnCIiwbIIrTPUFRfWPbYywLq0RTwsi3HIagT10= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ard Biesheuvel , Herbert Xu Subject: [PATCH 5.10 542/663] crypto: arm64/sha - add missing module aliases Date: Mon, 1 Mar 2021 17:13:10 +0100 Message-Id: <20210301161208.685449268@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161141.760350206@linuxfoundation.org> References: <20210301161141.760350206@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 @@ -19,6 +19,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 @@ -19,6 +19,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 @@ -23,6 +23,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 @@ -23,6 +23,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);