]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
libceph: Rename hmac_sha256() to ceph_hmac_sha256()
authorEric Biggers <ebiggers@kernel.org>
Mon, 30 Jun 2025 16:06:32 +0000 (09:06 -0700)
committerEric Biggers <ebiggers@kernel.org>
Fri, 4 Jul 2025 17:18:52 +0000 (10:18 -0700)
Rename hmac_sha256() to ceph_hmac_sha256(), to avoid a naming conflict
with the upcoming hmac_sha256() library function.

This code will be able to use the HMAC-SHA256 library, but that's left
for a later commit.

Acked-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20250630160645.3198-2-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
net/ceph/messenger_v2.c

index bd608ffa06279704b5f4f43e5e369035e3ff032c..5483b4eed94e1896db939d2fbdd5aff6cc4fd69b 100644 (file)
@@ -793,8 +793,8 @@ static int setup_crypto(struct ceph_connection *con,
        return 0;  /* auth_x, secure mode */
 }
 
-static int hmac_sha256(struct ceph_connection *con, const struct kvec *kvecs,
-                      int kvec_cnt, u8 *hmac)
+static int ceph_hmac_sha256(struct ceph_connection *con,
+                           const struct kvec *kvecs, int kvec_cnt, u8 *hmac)
 {
        SHASH_DESC_ON_STACK(desc, con->v2.hmac_tfm);  /* tfm arg is ignored */
        int ret;
@@ -1462,8 +1462,8 @@ static int prepare_auth_signature(struct ceph_connection *con)
        if (!buf)
                return -ENOMEM;
 
-       ret = hmac_sha256(con, con->v2.in_sign_kvecs, con->v2.in_sign_kvec_cnt,
-                         CTRL_BODY(buf));
+       ret = ceph_hmac_sha256(con, con->v2.in_sign_kvecs,
+                              con->v2.in_sign_kvec_cnt, CTRL_BODY(buf));
        if (ret)
                return ret;
 
@@ -2460,8 +2460,8 @@ static int process_auth_signature(struct ceph_connection *con,
                return -EINVAL;
        }
 
-       ret = hmac_sha256(con, con->v2.out_sign_kvecs,
-                         con->v2.out_sign_kvec_cnt, hmac);
+       ret = ceph_hmac_sha256(con, con->v2.out_sign_kvecs,
+                              con->v2.out_sign_kvec_cnt, hmac);
        if (ret)
                return ret;