From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E95D0C8302D for ; Mon, 30 Jun 2025 16:57:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kt4sp2VhnIWEOeMcH73t899orOG4QC4oYu9cxkK9Ix8=; b=GUvFsuWY5OufPgZhV0tr3bQeUF 7UKrGqHYR6XIC7dCeIASOnBYAQvb+YfEyOmA3wXKxZgpFIu/Oc68hNpzwsUmcNpv2NMsjjLW2+zy9 nX+gBbZTPPG2rbu6bQyiaypHk221UAU6CY7XW9fyZmP6HSZ9sxTlebTVpTGAd9b0Y38wXyq8wn7lP rd8qcYNnojFMgo17uxXhoqbHumYT0KQGFNUJ1idSBBwErccyGSIS0tM0lZbQE9WG4GlNd0swCz/0E IjjZBDcvqL4r6bzfGVtlRU9NwdiWh6qsH9yaUhipXvXhVQLVljOnRNVQXTjwqXUvALfU1rW1W85Ez hmeyNtXA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uWHoa-000000030Z1-3uji; Mon, 30 Jun 2025 16:57:08 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uWH4L-00000002pic-44dG; Mon, 30 Jun 2025 16:09:24 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 545B7A4F86A; Mon, 30 Jun 2025 16:09:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9BAC1C4CEF1; Mon, 30 Jun 2025 16:09:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1751299761; bh=oP/HTNYTl9LXpDk4PHssqzdxrIaWg9Dc4X7a2efoHe0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i1sDTgELYRSRNAFZVOP1NxIWH+kNYmHvowh3XGVDACcMSCP75QQyHveAF+wOTzgst bFgOJEykz/D+oYZczddK0gK0qHnZKTS3SdS+6yNsW99rAfIg7ExwcjIc629lG8uUzP 6RXbIgB0Lnq7FEpxdAwuJhnZsIxN1JnlOiPjIAhce93Tzmp0yCX5ze/tBjdO9hEM93 5It48cSTjDq/iAFNIdf91pghNIg9JiVU9THkutS5boFEIvhgmKf0YpmHF2ztLN5r8o j+IAjk5UtyQtYisGd3wBItTS2GoyKfYlW/lLBDrXq+RrsTLZZMh9UJ5AHTpPPhc3H7 WnO7/m1FYmYwA== From: Eric Biggers To: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, x86@kernel.org, Ard Biesheuvel , "Jason A . Donenfeld" , Eric Biggers Subject: [PATCH v2 01/14] libceph: Rename hmac_sha256() to ceph_hmac_sha256() Date: Mon, 30 Jun 2025 09:06:32 -0700 Message-ID: <20250630160645.3198-2-ebiggers@kernel.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250630160645.3198-1-ebiggers@kernel.org> References: <20250630160645.3198-1-ebiggers@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250630_090922_098715_FE657E29 X-CRM114-Status: GOOD ( 11.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. Signed-off-by: Eric Biggers --- net/ceph/messenger_v2.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/net/ceph/messenger_v2.c b/net/ceph/messenger_v2.c index bd608ffa06279..5483b4eed94e1 100644 --- a/net/ceph/messenger_v2.c +++ b/net/ceph/messenger_v2.c @@ -791,12 +791,12 @@ static int setup_crypto(struct ceph_connection *con, con_secret + CEPH_GCM_KEY_LEN + CEPH_GCM_IV_LEN, CEPH_GCM_IV_LEN); 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; int i; @@ -1460,12 +1460,12 @@ static int prepare_auth_signature(struct ceph_connection *con) buf = alloc_conn_buf(con, head_onwire_len(SHA256_DIGEST_SIZE, con_secure(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; return prepare_control(con, FRAME_TAG_AUTH_SIGNATURE, buf, SHA256_DIGEST_SIZE); @@ -2458,12 +2458,12 @@ static int process_auth_signature(struct ceph_connection *con, if (con->state != CEPH_CON_S_V2_AUTH_SIGNATURE) { con->error_msg = "protocol error, unexpected auth_signature"; 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; ceph_decode_need(&p, end, SHA256_DIGEST_SIZE, bad); if (crypto_memneq(p, hmac, SHA256_DIGEST_SIZE)) { -- 2.50.0