lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20220526235435.59a1b3074ecfb30825824948@kernel.org>
Date:   Thu, 26 May 2022 23:54:35 +0900
From:   Masami Hiramatsu (Google) <mhiramat@...nel.org>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     Gautam Menghani <gautammenghani201@...il.com>, mingo@...hat.com,
        linux-kernel@...r.kernel.org,
        linux-kernel-mentees@...ts.linuxfoundation.org,
        skhan@...uxfoundation.org, Masami Hiramatsu <mhiramat@...nel.org>
Subject: Re: [PATCH] kernel/trace: Initialize integer variable to prevent
 garbage return value

On Wed, 25 May 2022 11:25:51 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:

> On Sat, 21 May 2022 23:18:26 -0700
> Gautam Menghani <gautammenghani201@...il.com> wrote:
> 
> > Initialize the integer variable to 0 to fix the clang scan warning:
> > Undefined or garbage value returned to caller 
> > [core.uninitialized.UndefReturn]
> >         return ret;
> > 
> > Signed-off-by: Gautam Menghani <gautammenghani201@...il.com>
> > ---
> >  kernel/trace/trace_boot.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/kernel/trace/trace_boot.c b/kernel/trace/trace_boot.c
> > index 0580287d7a0d..778200dd8ede 100644
> > --- a/kernel/trace/trace_boot.c
> > +++ b/kernel/trace/trace_boot.c
> > @@ -300,7 +300,7 @@ trace_boot_hist_add_handlers(struct xbc_node *hnode, char **bufp,
> >  {
> >  	struct xbc_node *node;
> >  	const char *p, *handler;
> > -	int ret;
> > +	int ret = 0;
> 
> Looks good to me. Masami, care to ack it?

Thanks! This looks good to me.

Fixes: 8993665abcce ("tracing/boot: Support multiple handlers for per-event histogram")
Cc: stable@...r.kernel.org
Acked-by: Masami Hiramatsu (Google) <mhiramat@...nel.org>

Thank you!

> 
> -- Steve
> 
> >  
> >  	handler = xbc_node_get_data(hnode);
> >  
> 


-- 
Masami Hiramatsu (Google) <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ