From: Jens Axboe <axboe@kernel.dk>
To: Eric Biggers <ebiggers@kernel.org>, linux-block@vger.kernel.org
Cc: Satya Tangirala <satyat@google.com>
Subject: Re: [PATCH] block/keyslot-manager: use kvfree_sensitive()
Date: Mon, 29 Jun 2020 13:24:18 -0600 [thread overview]
Message-ID: <bf08a91c-bd40-fd1d-3d03-c2ba822df1c2@kernel.dk> (raw)
In-Reply-To: <20200629165159.GB20492@sol.localdomain>
On 6/29/20 10:51 AM, Eric Biggers wrote:
> On Tue, Jun 16, 2020 at 08:56:54AM -0700, Eric Biggers wrote:
>> From: Eric Biggers <ebiggers@google.com>
>>
>> Make blk_ksm_destroy() use the kvfree_sensitive() function (which was
>> introduced in v5.8-rc1) instead of open-coding it.
>>
>> Signed-off-by: Eric Biggers <ebiggers@google.com>
>> ---
>> block/keyslot-manager.c | 3 +--
>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/block/keyslot-manager.c b/block/keyslot-manager.c
>> index c2ef41b3147b..35abcb1ec051 100644
>> --- a/block/keyslot-manager.c
>> +++ b/block/keyslot-manager.c
>> @@ -374,8 +374,7 @@ void blk_ksm_destroy(struct blk_keyslot_manager *ksm)
>> if (!ksm)
>> return;
>> kvfree(ksm->slot_hashtable);
>> - memzero_explicit(ksm->slots, sizeof(ksm->slots[0]) * ksm->num_slots);
>> - kvfree(ksm->slots);
>> + kvfree_sensitive(ksm->slots, sizeof(ksm->slots[0]) * ksm->num_slots);
>> memzero_explicit(ksm, sizeof(*ksm));
>> }
>> EXPORT_SYMBOL_GPL(blk_ksm_destroy);
>> --
>
> Ping?
Applied, thanks.
--
Jens Axboe
prev parent reply other threads:[~2020-06-29 19:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-16 15:56 [PATCH] block/keyslot-manager: use kvfree_sensitive() Eric Biggers
2020-06-29 16:51 ` Eric Biggers
2020-06-29 19:24 ` Jens Axboe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bf08a91c-bd40-fd1d-3d03-c2ba822df1c2@kernel.dk \
--to=axboe@kernel.dk \
--cc=ebiggers@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=satyat@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).