From: Thorsten Blum <thorsten.blum@linux.dev>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] w1: Use kfree_sensitive() instead of memset(0) and kfree()
Date: Mon, 30 Sep 2024 14:15:18 +0200 [thread overview]
Message-ID: <581388A8-4FC3-4FC0-9D5B-9F13DCB90073@linux.dev> (raw)
In-Reply-To: <fc0c13df-a0a6-4cf7-badc-c08a9a7054f6@kernel.org>
On 30. Sep 2024, at 13:50, Krzysztof Kozlowski <krzk@kernel.org> wrote:
> On 30/09/2024 13:44, Thorsten Blum wrote:
>> Use kfree_sensitive() to simplify w1_unref_slave() and remove the
>> following Coccinelle/coccicheck warning reported by
>> kfree_sensitive.cocci:
>>
>> WARNING opportunity for kfree_sensitive/kvfree_sensitive
>
> So are you fixing coccinelle just to hide the warning or actually fixing
> issue? Why this structure should be zeroed?
No issue, just a refactoring (+zeroing out) to silence the warning. The
structure probably doesn't need to be zeroed out, but why is it done
for DEBUG builds?
>> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
>> ---
>> Please note: this change assumes that #ifdef DEBUG is no longer needed
>> and we should always zero out the memory.
>
> But why are you assuming that? Your patch is not equivalent and I do not
> see any explanation in commit msg why is that.
next prev parent reply other threads:[~2024-09-30 12:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-30 11:44 [PATCH] w1: Use kfree_sensitive() instead of memset(0) and kfree() Thorsten Blum
2024-09-30 11:50 ` Krzysztof Kozlowski
2024-09-30 12:15 ` Thorsten Blum [this message]
2024-09-30 13:08 ` Thorsten Blum
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=581388A8-4FC3-4FC0-9D5B-9F13DCB90073@linux.dev \
--to=thorsten.blum@linux.dev \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.