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]
Message-ID: <alpine.DEB.2.20.1711282220200.2222@nanos>
Date:   Tue, 28 Nov 2017 22:25:40 +0100 (CET)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     "Gustavo A. R. Silva" <garsilva@...eddedor.com>
cc:     Alan Cox <gnomes@...rguk.ukuu.org.uk>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
        LKML <linux-kernel@...r.kernel.org>,
        Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH] x86/syscalls: Mark expected switch fall-throughs

On Tue, 28 Nov 2017, Gustavo A. R. Silva wrote:
> The thing about taking 'any comment' as valid is false if you add the
> following to your Makefile:
> 
> KBUILD_CFLAGS  += $(call cc-option,-Wimplicit-fallthrough)
> 
> This option takes the following comments as valid:
> 
> /* fall through */
> /* Fall through */
> /* fall through - ... */
> /* Fall through - ... */
> 
> Comments as fallthru, fallthrough, FALLTHRU are invalid.
> 
> And of course if you intentionally change the option to:
> 
> KBUILD_CFLAGS  += $(call cc-option,-Wimplicit-fallthrough=1)
> 
> it means that you obviously want to ignore any warning.

So I have to ask WHY this information was not in the changelog of the patch
in question:

   1) How it works

   2) Why comments have been chosen over macros

> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.

It's not a reviewers job to chase that information down.

While I can understand that the comments are intentional due to existing
tools, I still prefer the macro/annotation. But I'm not religious about it
when there is common consensus. :)

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ