]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
crypto: x86/sha1 - Rename conflicting symbol
authorEric Biggers <ebiggers@kernel.org>
Sat, 12 Jul 2025 23:22:52 +0000 (16:22 -0700)
committerEric Biggers <ebiggers@kernel.org>
Mon, 14 Jul 2025 15:22:31 +0000 (08:22 -0700)
Rename x86's sha1_update() to sha1_update_x86(), since it conflicts with
the upcoming sha1_update() library function.

Note: the affected code will be superseded by later commits that migrate
the arch-optimized SHA-1 code into the library.  This commit simply
keeps the kernel building for the initial introduction of the library.

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20250712232329.818226-2-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
arch/x86/crypto/sha1_ssse3_glue.c

index 0a912bfc86c51ba725456ab1f2b410ad2b0804b3..826579a7473c4097f3aedf7497d8425749eab237 100644 (file)
@@ -34,7 +34,7 @@ static const struct x86_cpu_id module_cpu_ids[] = {
 };
 MODULE_DEVICE_TABLE(x86cpu, module_cpu_ids);
 
-static inline int sha1_update(struct shash_desc *desc, const u8 *data,
+static inline int sha1_update_x86(struct shash_desc *desc, const u8 *data,
                              unsigned int len, sha1_block_fn *sha1_xform)
 {
        int remain;
@@ -69,7 +69,7 @@ asmlinkage void sha1_transform_ssse3(struct sha1_state *state,
 static int sha1_ssse3_update(struct shash_desc *desc, const u8 *data,
                             unsigned int len)
 {
-       return sha1_update(desc, data, len, sha1_transform_ssse3);
+       return sha1_update_x86(desc, data, len, sha1_transform_ssse3);
 }
 
 static int sha1_ssse3_finup(struct shash_desc *desc, const u8 *data,
@@ -113,7 +113,7 @@ asmlinkage void sha1_transform_avx(struct sha1_state *state,
 static int sha1_avx_update(struct shash_desc *desc, const u8 *data,
                             unsigned int len)
 {
-       return sha1_update(desc, data, len, sha1_transform_avx);
+       return sha1_update_x86(desc, data, len, sha1_transform_avx);
 }
 
 static int sha1_avx_finup(struct shash_desc *desc, const u8 *data,
@@ -190,7 +190,7 @@ static inline void sha1_apply_transform_avx2(struct sha1_state *state,
 static int sha1_avx2_update(struct shash_desc *desc, const u8 *data,
                             unsigned int len)
 {
-       return sha1_update(desc, data, len, sha1_apply_transform_avx2);
+       return sha1_update_x86(desc, data, len, sha1_apply_transform_avx2);
 }
 
 static int sha1_avx2_finup(struct shash_desc *desc, const u8 *data,
@@ -234,7 +234,7 @@ asmlinkage void sha1_ni_transform(struct sha1_state *digest, const u8 *data,
 static int sha1_ni_update(struct shash_desc *desc, const u8 *data,
                             unsigned int len)
 {
-       return sha1_update(desc, data, len, sha1_ni_transform);
+       return sha1_update_x86(desc, data, len, sha1_ni_transform);
 }
 
 static int sha1_ni_finup(struct shash_desc *desc, const u8 *data,