]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
crypto: arm64/sha3 - Rename conflicting function
authorDavid Howells <dhowells@redhat.com>
Sun, 26 Oct 2025 05:50:19 +0000 (22:50 -0700)
committerEric Biggers <ebiggers@kernel.org>
Mon, 3 Nov 2025 17:10:58 +0000 (09:10 -0800)
Rename the arm64 sha3_update() function to have an "arm64_" prefix to
avoid a name conflict with the upcoming SHA-3 library.

Note: this code will be superseded later.  This commit simply keeps the
kernel building for the initial introduction of the library.

[EB: dropped unnecessary rename of sha3_finup(), and improved commit
     message]

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20251026055032.1413733-3-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
arch/arm64/crypto/sha3-ce-glue.c

index b4f1001046c9a19dcc7498b81670157af1d85f70..f5c83023493373f5e01f6fef055a510e617b7a4f 100644 (file)
@@ -31,8 +31,8 @@ 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,
-                      unsigned int len)
+static int arm64_sha3_update(struct shash_desc *desc, const u8 *data,
+                            unsigned int len)
 {
        struct sha3_state *sctx = shash_desc_ctx(desc);
        struct crypto_shash *tfm = desc->tfm;
@@ -90,7 +90,7 @@ 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,
+       .update                 = arm64_sha3_update,
        .finup                  = sha3_finup,
        .descsize               = SHA3_STATE_SIZE,
        .base.cra_name          = "sha3-224",
@@ -102,7 +102,7 @@ static struct shash_alg algs[] = { {
 }, {
        .digestsize             = SHA3_256_DIGEST_SIZE,
        .init                   = crypto_sha3_init,
-       .update                 = sha3_update,
+       .update                 = arm64_sha3_update,
        .finup                  = sha3_finup,
        .descsize               = SHA3_STATE_SIZE,
        .base.cra_name          = "sha3-256",
@@ -114,7 +114,7 @@ static struct shash_alg algs[] = { {
 }, {
        .digestsize             = SHA3_384_DIGEST_SIZE,
        .init                   = crypto_sha3_init,
-       .update                 = sha3_update,
+       .update                 = arm64_sha3_update,
        .finup                  = sha3_finup,
        .descsize               = SHA3_STATE_SIZE,
        .base.cra_name          = "sha3-384",
@@ -126,7 +126,7 @@ static struct shash_alg algs[] = { {
 }, {
        .digestsize             = SHA3_512_DIGEST_SIZE,
        .init                   = crypto_sha3_init,
-       .update                 = sha3_update,
+       .update                 = arm64_sha3_update,
        .finup                  = sha3_finup,
        .descsize               = SHA3_STATE_SIZE,
        .base.cra_name          = "sha3-512",