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 15:08:42 +0200 [thread overview]
Message-ID: <466B1286-FF37-46D1-BBD9-FCE3CC1252B6@linux.dev> (raw)
In-Reply-To: <581388A8-4FC3-4FC0-9D5B-9F13DCB90073@linux.dev>
On 30. Sep 2024, at 14:15, Thorsten Blum <thorsten.blum@linux.dev> wrote:
> 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.
Sorry, just ignore this patch for now. I misread the code and mixed
things up.
Thanks,
Thorsten
prev parent reply other threads:[~2024-09-30 13:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-30 11:44 Thorsten Blum
2024-09-30 11:50 ` Krzysztof Kozlowski
2024-09-30 12:15 ` Thorsten Blum
2024-09-30 13:08 ` Thorsten Blum [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=466B1286-FF37-46D1-BBD9-FCE3CC1252B6@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®