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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 31 Aug 2019 00:12:10 -0500
From:   "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To:     Michal Suchanek <msuchanek@...e.de>, linux-kbuild@...r.kernel.org
Cc:     Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Michal Marek <michal.lkml@...kovi.net>,
        linux-kernel@...r.kernel.org, Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough to
 -Wimplicit-fallthrough=2



On 8/29/19 7:02 AM, Michal Suchanek wrote:
> From gcc documentation:
> 
> -Wimplicit-fallthrough=0
>   disables the warning altogether.
> -Wimplicit-fallthrough=1
>   matches .* regular expression, any comment is used as fallthrough comment.
> -Wimplicit-fallthrough=2
>   case insensitively matches .*falls?[ \t-]*thr(ough|u).* regular expression.
> -Wimplicit-fallthrough=3
>   case sensitively matches one of the following regular expressions:
>    -fallthrough
>    @fallthrough@
>    lint -fallthrough[ \t]*
>    [ \t.!]*(ELSE,? |INTENTIONAL(LY)? )?
>    FALL(S | |-)?THR(OUGH|U)[ \t.!]*(-[^\n\r]*)?
>    [ \t.!]*(Else,? |Intentional(ly)? )?
>    Fall((s | |-)[Tt]|t)hr(ough|u)[ \t.!]*(-[^\n\r]*)?
>    [ \t.!]*([Ee]lse,? |[Ii]ntentional(ly)? )?
>    fall(s | |-)?thr(ough|u)[ \t.!]*(-[^\n\r]*)?
> -Wimplicit-fallthrough=4
>   case sensitively matches one of the following regular expressions:
>    -fallthrough
>    @fallthrough@
>    lint -fallthrough[ \t]*
>    [ \t]*FALLTHR(OUGH|U)[ \t]*
> -Wimplicit-fallthrough=5
>   doesn’t recognize any comments as fallthrough comments, only attributes disable the warning.
> 
> In particular the default value of 3 does not match the comments like
> /* falls through to do foobar */
> generating suprious warnings on properly annotated code.
> 

NACK

How many of those case do you see? if any...

In any case, those comments can be easily transformed to:

/* falls through - to do foobar */

like in this case:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d2d833e0bf2bad221a955626b942b38312630894

Also, notice that code in linux-next is already ahead... :

https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=e2079e93f562c7f7a030eb7642017ee5eabaaa10

--
Gustavo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ