[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202310181704.F1089D5B@keescook>
Date: Wed, 18 Oct 2023 17:39:21 -0700
From: Kees Cook <keescook@...omium.org>
To: Mark Rutland <mark.rutland@....com>
Cc: Li zeming <zeming@...china.com>, gor@...ux.ibm.com,
hca@...ux.ibm.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] stackleak: Remove unnecessary '0' values from ret
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@...china.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
Powered by blists - more mailing lists