[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250904172558.GA854551@google.com>
Date: Thu, 4 Sep 2025 17:25:58 +0000
From: Eric Biggers <ebiggers@...nel.org>
To: Ilya Dryomov <idryomov@...il.com>
Cc: ceph-devel@...r.kernel.org, Xiubo Li <xiubli@...hat.com>,
linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] libceph: Use HMAC-SHA256 library instead of crypto_shash
On Thu, Sep 04, 2025 at 12:24:08PM +0200, Ilya Dryomov wrote:
> > - if (con->v2.hmac_tfm) {
> > - crypto_free_shash(con->v2.hmac_tfm);
> > - con->v2.hmac_tfm = NULL;
> > - }
> > + memzero_explicit(&con->v2.hmac_key, sizeof(con->v2.hmac_key));
> > + con->v2.hmac_key_set = false;
>
> Hi Eric,
>
> Since we have hmac_key_set anyway, could the call to memzero_explicit()
> be conditioned on it?
If you want. It's less code to just do it unconditionally.
- Eric
Powered by blists - more mailing lists