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] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 3 Mar 2019 17:04:28 +0000
From:   Jonathan Cameron <jic23@...nel.org>
To:     "Gustavo A. R. Silva" <gustavo@...eddedor.com>
Cc:     Hartmut Knaack <knaack.h@....de>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Peter Meerwald-Stadler <pmeerw@...erw.net>,
        linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
        Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH] iio: mma8452: mark expected switch fall-through

On Wed, 20 Feb 2019 12:07:28 -0600
"Gustavo A. R. Silva" <gustavo@...eddedor.com> wrote:

> On 2/20/19 11:21 AM, Gustavo A. R. Silva wrote:
> > 
> > 
> > On 2/20/19 6:17 AM, Jonathan Cameron wrote:  
> >> On Mon, 11 Feb 2019 16:23:18 -0600
> >> "Gustavo A. R. Silva" <gustavo@...eddedor.com> wrote:
> >>  
> >>> In preparation to enabling -Wimplicit-fallthrough, mark switch
> >>> cases where we are expecting to fall through.
> >>>
> >>> This patch fixes the following warning:
> >>>
> >>> drivers/iio/accel/mma8452.c: In function ‘mma8452_probe’:
> >>> drivers/iio/accel/mma8452.c:1581:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
> >>>    if (ret == data->chip_info->chip_id)
> >>>       ^
> >>> drivers/iio/accel/mma8452.c:1584:2: note: here
> >>>   default:
> >>>   ^~~~~~~
> >>>
> >>> Warning level 3 was used: -Wimplicit-fallthrough=3
> >>>
> >>> Notice that, in this particular case, the code comment is modified
> >>> in accordance with what GCC is expecting to find.
> >>>
> >>> This patch is part of the ongoing efforts to enable
> >>> -Wimplicit-fallthrough.
> >>>
> >>> Signed-off-by: Gustavo A. R. Silva <gustavo@...eddedor.com>  
> >> I know Peter probably won't like this, as it doesn't
> >> read a as well, with the else dropped, but I'm going to take
> >> it as we have had a lot of bugs caught by this code and this
> >> is generating a false positive.
> >>
> >> Applied to the togreg branch of iio.git and pushed out as testing
> >> for the autobuilders to play with it.
> >>  
> > 
> > Thanks, Jonathan.
> >   
> 
> BTW, Jonathan, I wonder if you can apply this one too:
> 
> https://lore.kernel.org/patchwork/patch/996804/
> 
> Thanks
Now resolved.  The issue here was the code was 'interesting/crazy' so
we needed someone with hardware to rewrite it and test the result.

Simply fixing the fall through wasn't enough :(

Jonathan

> --
> Gustavo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ