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: <CAHk-=wg1PAJR6ChVXE7O_H2wEG=1mWxi2uc0fH5bthOC_81uTA@mail.gmail.com>
Date:   Sun, 4 Aug 2019 11:09:19 -0700
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Joe Perches <joe@...ches.com>
Cc:     Miguel Ojeda <miguel.ojeda.sandonis@...il.com>,
        Kees Cook <keescook@...omium.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Borislav Petkov <bp@...en8.de>,
        "H . Peter Anvin" <hpa@...or.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Pavel Machek <pavel@....cz>,
        "Gustavo A . R . Silva" <gustavo@...eddedor.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Kan Liang <kan.liang@...ux.intel.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Jiri Olsa <jolsa@...hat.com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Shawn Landden <shawn@....icu>,
        "the arch/x86 maintainers" <x86@...nel.org>,
        Linux List Kernel Mailing <linux-kernel@...r.kernel.org>,
        Neil Horman <nhorman@...driver.com>,
        David Miller <davem@...emloft.net>
Subject: Re: [RFC PATCH] compiler_attributes.h: Add 'fallthrough' pseudo
 keyword for switch/case use

On Sun, Aug 4, 2019 at 11:01 AM Joe Perches <joe@...ches.com> wrote:
>
> Linus?  Do you have an opinion about this RFC/patch?

So my only real concern is that the comment approach has always been
the really traditional one, going back all the way to 'lint' days.

And you obviously cannot use a #define to create a comment, so this
whole keyword model will never be able to do that.

At the same time, all the modern tools we care about do seem to be
happy with it, either through the gcc attribute, the clang
[[clang:fallthrough]] or the (eventual) standard C [[fallthrough]]
model.

So I'm ok with just saying "the comment model may be traditional, but
it's not very good".

I didn't look at all the patches, but the one I *did* see had a few issues:

 - it didn't seem to handle clang

 - we'd need to make -Wimplicit-fallthrough be dependent on the
compiler actually supporting the attribute, not just on supporting the
flag.

without those changes, nobody can actually start doing any
conversions. But I assume such patches exist somewhere, and I've just
missed them.

               Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ