[PATCH v6 02/17] arm64/sha3: Rename conflicting functions

Christophe Leroy christophe.leroy at csgroup.eu
Sat Oct 18 02:00:32 PDT 2025



Le 17/10/2025 à 16:42, David Howells a écrit :
> Rename the arm64 sha3_* functions to have an "arm64_" prefix to avoid
> conflict with generic code.

Same comment as previous patch, the functions are static, why would they 
conflict with generic code ?

Also generic code doesn't have such functions at the moment, are they 
added by a follow patch ?

Christophe


> 
> Signed-off-by: David Howells <dhowells at redhat.com>
> cc: Eric Biggers <ebiggers at kernel.org>
> cc: Jason A. Donenfeld <Jason at zx2c4.com>
> cc: Ard Biesheuvel <ardb at kernel.org>
> cc: Catalin Marinas <catalin.marinas at arm.com>
> cc: Will Deacon <will at kernel.org>
> cc: Herbert Xu <herbert at gondor.apana.org.au>
> cc: Stephan Mueller <smueller at chronox.de>
> cc: linux-crypto at vger.kernel.org
> cc: linux-arm-kernel at lists.infradead.org
> ---
>   arch/arm64/crypto/sha3-ce-glue.c | 22 +++++++++++-----------
>   1 file changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/arch/arm64/crypto/sha3-ce-glue.c b/arch/arm64/crypto/sha3-ce-glue.c
> index b4f1001046c9..426d8044535a 100644
> --- a/arch/arm64/crypto/sha3-ce-glue.c
> +++ b/arch/arm64/crypto/sha3-ce-glue.c
> @@ -31,7 +31,7 @@ MODULE_ALIAS_CRYPTO("sha3-512");
>   asmlinkage int sha3_ce_transform(u64 *st, const u8 *data, int blocks,
>   				 int md_len);
>   
> -static int sha3_update(struct shash_desc *desc, const u8 *data,
> +static int arm64_sha3_update(struct shash_desc *desc, const u8 *data,
>   		       unsigned int len)
>   {
>   	struct sha3_state *sctx = shash_desc_ctx(desc);
> @@ -55,8 +55,8 @@ static int sha3_update(struct shash_desc *desc, const u8 *data,
>   	return len;
>   }
>   
> -static int sha3_finup(struct shash_desc *desc, const u8 *src, unsigned int len,
> -		      u8 *out)
> +static int arm64_sha3_finup(struct shash_desc *desc, const u8 *src, unsigned int len,
> +			    u8 *out)
>   {
>   	struct sha3_state *sctx = shash_desc_ctx(desc);
>   	struct crypto_shash *tfm = desc->tfm;
> @@ -90,8 +90,8 @@ static int sha3_finup(struct shash_desc *desc, const u8 *src, unsigned int len,
>   static struct shash_alg algs[] = { {
>   	.digestsize		= SHA3_224_DIGEST_SIZE,
>   	.init			= crypto_sha3_init,
> -	.update			= sha3_update,
> -	.finup			= sha3_finup,
> +	.update			= arm64_sha3_update,
> +	.finup			= arm64_sha3_finup,
>   	.descsize		= SHA3_STATE_SIZE,
>   	.base.cra_name		= "sha3-224",
>   	.base.cra_driver_name	= "sha3-224-ce",
> @@ -102,8 +102,8 @@ static struct shash_alg algs[] = { {
>   }, {
>   	.digestsize		= SHA3_256_DIGEST_SIZE,
>   	.init			= crypto_sha3_init,
> -	.update			= sha3_update,
> -	.finup			= sha3_finup,
> +	.update			= arm64_sha3_update,
> +	.finup			= arm64_sha3_finup,
>   	.descsize		= SHA3_STATE_SIZE,
>   	.base.cra_name		= "sha3-256",
>   	.base.cra_driver_name	= "sha3-256-ce",
> @@ -114,8 +114,8 @@ static struct shash_alg algs[] = { {
>   }, {
>   	.digestsize		= SHA3_384_DIGEST_SIZE,
>   	.init			= crypto_sha3_init,
> -	.update			= sha3_update,
> -	.finup			= sha3_finup,
> +	.update			= arm64_sha3_update,
> +	.finup			= arm64_sha3_finup,
>   	.descsize		= SHA3_STATE_SIZE,
>   	.base.cra_name		= "sha3-384",
>   	.base.cra_driver_name	= "sha3-384-ce",
> @@ -126,8 +126,8 @@ static struct shash_alg algs[] = { {
>   }, {
>   	.digestsize		= SHA3_512_DIGEST_SIZE,
>   	.init			= crypto_sha3_init,
> -	.update			= sha3_update,
> -	.finup			= sha3_finup,
> +	.update			= arm64_sha3_update,
> +	.finup			= arm64_sha3_finup,
>   	.descsize		= SHA3_STATE_SIZE,
>   	.base.cra_name		= "sha3-512",
>   	.base.cra_driver_name	= "sha3-512-ce",
> 
> 




More information about the linux-arm-kernel mailing list