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:   Tue, 25 Jun 2019 00:28:23 +0200
From:   Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To:     "Gustavo A. R. Silva" <gustavo@...eddedor.com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Joe Perches <joe@...ches.com>, Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Borislav Petkov <bp@...en8.de>,
        "H. Peter Anvin" <hpa@...or.com>,
        "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
        Kan Liang <kan.liang@...ux.intel.com>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Kees Cook <keescook@...omium.org>,
        Shawn Landden <shawn@....icu>
Subject: Re: [PATCH] perf/x86/intel: Mark expected switch fall-throughs

On Mon, Jun 24, 2019 at 10:53 PM Gustavo A. R. Silva
<gustavo@...eddedor.com> wrote:
>
> Once the C++17 `__attribute__((fallthrough))` is more widely handled by C compilers,
> static analyzers, and IDEs, we can switch to using that instead. Also, we are a few
> warnings away (less than five) from being able to enable -Wimplicit-fallthrough. After
> this option has been finally enabled (in v5.3) we can easily go and replace the comments
> to whatever we agree upon.

Indeed -- the decision last year was to wait for a while since not
everyone had support for it. My branch is waiting here:

    https://github.com/ojeda/linux/tree/compiler-attributes-fallthrough

The good news is that there is some progress. For instance, LLVM is
working on supporting the GNU spelling:

    https://reviews.llvm.org/D63260
    https://bugs.llvm.org/show_bug.cgi?id=37135
    https://github.com/ClangBuiltLinux/linux/issues/235

Also note that C2x may get [[fallthrough]]. See N2267 and N2335. At
that point, surely tools/IDEs/analyzers will support it :-) The
question is whether we want to wait that long to replace the comments.

On related news, we also may get __has_c_attribute() standardized
(i.e. we use __has_attribute() now), too, see N2333.

Cheers,
Miguel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ