]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
lib/crypto: sha1: Rename sha1_init() to sha1_init_raw()
authorEric Biggers <ebiggers@kernel.org>
Sat, 12 Jul 2025 23:22:53 +0000 (16:22 -0700)
committerEric Biggers <ebiggers@kernel.org>
Mon, 14 Jul 2025 15:22:31 +0000 (08:22 -0700)
Rename the existing sha1_init() to sha1_init_raw(), since it conflicts
with the upcoming library function.  This will later be removed, but
this keeps the kernel building for the introduction of the library.

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20250712232329.818226-3-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
include/crypto/sha1.h
kernel/bpf/core.c
lib/crypto/sha1.c
net/ipv6/addrconf.c

index f48230b1413c3ddfcf98db7c27ef9c6c094bff46..d853d3b9316991c5a6b8fb05126b7522e3a118ae 100644 (file)
@@ -33,7 +33,7 @@ struct sha1_state {
  */
 #define SHA1_DIGEST_WORDS      (SHA1_DIGEST_SIZE / 4)
 #define SHA1_WORKSPACE_WORDS   16
-void sha1_init(__u32 *buf);
+void sha1_init_raw(__u32 *buf);
 void sha1_transform(__u32 *digest, const char *data, __u32 *W);
 
 #endif /* _CRYPTO_SHA1_H */
index c20babbf998f4ea7adeab1c4d9300ecef8f5c225..dae281a1286d56e3f88e7e7b053f88f77b1c63df 100644 (file)
@@ -304,7 +304,7 @@ int bpf_prog_calc_tag(struct bpf_prog *fp)
        if (!raw)
                return -ENOMEM;
 
-       sha1_init(digest);
+       sha1_init_raw(digest);
        memset(ws, 0, sizeof(ws));
 
        /* We need to take out the map fd for the digest calculation
index 6d809c3088be3ec9c23e8f6798518f101114ef32..813ad96daa25af8900aa34622b651332f07b04dc 100644 (file)
@@ -124,10 +124,10 @@ void sha1_transform(__u32 *digest, const char *data, __u32 *array)
 EXPORT_SYMBOL(sha1_transform);
 
 /**
- * sha1_init - initialize the vectors for a SHA1 digest
+ * sha1_init_raw - initialize the vectors for a SHA1 digest
  * @buf: vector to initialize
  */
-void sha1_init(__u32 *buf)
+void sha1_init_raw(__u32 *buf)
 {
        buf[0] = 0x67452301;
        buf[1] = 0xefcdab89;
@@ -135,7 +135,7 @@ void sha1_init(__u32 *buf)
        buf[3] = 0x10325476;
        buf[4] = 0xc3d2e1f0;
 }
-EXPORT_SYMBOL(sha1_init);
+EXPORT_SYMBOL(sha1_init_raw);
 
 MODULE_DESCRIPTION("SHA-1 Algorithm");
 MODULE_LICENSE("GPL");
index ba2ec7c870ccbab3c9a1650c578f23974b8b66b4..d0e5b94c10af4c86429733275516090d2fe22f7b 100644 (file)
@@ -3367,7 +3367,7 @@ static int ipv6_generate_stable_address(struct in6_addr *address,
 retry:
        spin_lock_bh(&lock);
 
-       sha1_init(digest);
+       sha1_init_raw(digest);
        memset(&data, 0, sizeof(data));
        memset(workspace, 0, sizeof(workspace));
        memcpy(data.hwaddr, idev->dev->perm_addr, idev->dev->addr_len);