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]
Date:   Thu, 12 Oct 2023 13:40:04 +0300
From:   Dan Carpenter <dan.carpenter@...aro.org>
To:     Masami Hiramatsu <mhiramat@...nel.org>
Cc:     Julia Lawall <julia.lawall@...ia.fr>,
        Steven Rostedt <rostedt@...dmis.org>,
        kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH] tracing/eprobe: drop unneeded breaks

On Sat, Sep 30, 2023 at 06:19:02PM +0900, Masami Hiramatsu wrote:
> On Fri, 29 Sep 2023 13:37:08 +0200 (CEST)
> Julia Lawall <julia.lawall@...ia.fr> wrote:
> 
> > 
> > 
> > On Fri, 29 Sep 2023, Masami Hiramatsu  wrote:
> > 
> > > On Thu, 28 Sep 2023 12:43:34 +0200
> > > Julia Lawall <Julia.Lawall@...ia.fr> wrote:
> > >
> > > > Drop break after return.
> > > >
> > >
> > > Good catch! This looks good to me.
> > >
> > > Acked-by: Masami Hiramatsu (Google) <mhiramat@...nel.org>
> > >
> > > And
> > >
> > > Fixes: 7491e2c44278 ("tracing: Add a probe that attaches to trace events")
> > 
> > Thanks.  I didn't include that because it's not a bug.  But it does break
> > Coccinelle, which is how I noticed it.
> 
> OK, I got it. I thought it may cause a compiler warning because the
> 'break' never be executed. (maybe it is just a flow-control word,
> so it may not need to be warned, but a bit storange.)

I don't think GCC warns about unreachable code, but yeah, in Smatch
unreachable break statements do not trigger a warning.  People like
to add extra break statements to switch statements.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ