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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 15 Nov 2021 09:44:40 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     "Gustavo A. R. Silva" <gustavoars@...nel.org>
Cc:     Nathan Chancellor <nathan@...nel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Kees Cook <keescook@...omium.org>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-hardening@...r.kernel.org,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        llvm@...ts.linux.dev
Subject: Re: [PATCH] kconfig: Add support for -Wimplicit-fallthrough

On Mon, Nov 15, 2021 at 9:30 AM Gustavo A. R. Silva
<gustavoars@...nel.org> wrote:
>
> On Sun, Nov 14, 2021 at 05:17:51PM -0700, Nathan Chancellor wrote:
> > On Sun, Nov 14, 2021 at 02:18:41PM -0700, Nathan Chancellor wrote:
> > > On Sat, Nov 13, 2021 at 06:57:25PM -0600, Gustavo A. R. Silva wrote:
> > > > Add Kconfig support for -Wimplicit-fallthrough for both GCC and Clang.
> > > >
> > > > The compiler option is under configuration CC_IMPLICIT_FALLTHROUGH,
> > > > which is enabled by default.
> > > >
> > > > Special thanks to Nathan Chancellor who fixed the Clang bug[1][2]. This
> > > > bugfix only appears in Clang 14.0.0, so older versions still contain
> > > > the bug and -Wimplicit-fallthrough won't be enabled for them, for now.
> > > >
> > > > This concludes a long journey and now we are finally getting rid
> > > > of the unintentional fallthrough bug-class in the kernel, entirely. :)
> > > >
> > > > [1] https://github.com/llvm/llvm-project/commit/9ed4a94d6451046a51ef393cd62f00710820a7e8
> > > > [2] https://bugs.llvm.org/show_bug.cgi?id=51094
> > > >
> > > > Link: https://github.com/KSPP/linux/issues/115
> > > > Link: https://github.com/ClangBuiltLinux/linux/issues/236
> > > > Co-developed-by: Kees Cook <keescook@...omium.org>
> > > > Signed-off-by: Kees Cook <keescook@...omium.org>
> > > > Co-developed-by: Linus Torvalds <torvalds@...ux-foundation.org>
> > > > Signed-off-by: Linus Torvalds <torvalds@...ux-foundation.org>
> > > > Signed-off-by: Gustavo A. R. Silva <gustavoars@...nel.org>
> > >
> > > This appears to do the right thing with both clang-13 and clang-14.
> >
> > Now that I gave this a look for the GCC side, I think it is wrong.
> >
> > -Wimplicit-fallthrough=5 was under cc-option because it was only
> > available in GCC 7.x and newer so the build is now broken for GCC 5.x
> > and 6.x:
> >
> > gcc: error: unrecognized command line option '-Wimplicit-fallthrough=5';
> > did you mean '-Wno-fallthrough'?
>
> I'll send a patch for this right away. Thanks for the report, Nathan! :)


Please use a subject prefix different than "kconfig:"

I want to see "kconfig:' only for changes in scripts/kconfig/.



--
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ