From: Kees Cook <keescook@chromium.org>
To: Mark Rutland <mark.rutland@arm.com>
Cc: Li zeming <zeming@nfschina.com>,
gor@linux.ibm.com, hca@linux.ibm.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] stackleak: Remove unnecessary '0' values from ret
Date: Wed, 18 Oct 2023 17:39:21 -0700 [thread overview]
Message-ID: <202310181704.F1089D5B@keescook> (raw)
In-Reply-To: <ZS5ek5RrW3XaBph9@FVFF77S0Q05N>
On Tue, Oct 17, 2023 at 11:14:43AM +0100, Mark Rutland wrote:
> On Tue, Oct 17, 2023 at 02:08:24PM +0800, Li zeming wrote:
> > ret is assigned first, so it does not need to initialize the assignment.
> >
> > Signed-off-by: Li zeming <zeming@nfschina.com>
>
> Does this actually need to change? It's not harmful, and deleting the
> assignment doesn't save any lines of code.
I prefer explicit initialization. Any unused initialization will be
optimized away by the compiler during Dead Store Elimination, so all
removing the initialization does is make the code more fragile in the
future.
> That said, I don't have strong feelings either way, and Kees is the
> de-facto-yet-undocumented maintainer for this code, so I will leave it to him
> to decide whether to apply.
Oh, hm, good point. I will add a MAINTAINER entry for it. Thanks!
-Kees
--
Kees Cook
next prev parent reply other threads:[~2023-10-19 0:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-17 6:08 [PATCH] stackleak: Remove unnecessary ‘0’ values from ret Li zeming
2023-10-17 10:14 ` [PATCH] stackleak: Remove unnecessary '0' " Mark Rutland
2023-10-19 0:39 ` Kees Cook [this message]
2023-11-01 4:03 ` Guenter Roeck
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=202310181704.F1089D5B@keescook \
--to=keescook@chromium.org \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=zeming@nfschina.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