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:   Sat, 29 Jun 2019 09:10:11 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Nick Desaulniers <ndesaulniers@...gle.com>
Cc:     "Gustavo A. R. Silva" <gustavo@...eddedor.com>,
        Joe Perches <joe@...ches.com>,
        Miguel Ojeda <miguel.ojeda.sandonis@...il.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>,
        Nathan Chancellor <natechancellor@...il.com>,
        Luc Van Oostenryck <luc.vanoostenryck@...il.com>,
        Chandler Carruth <chandlerc@...gle.com>,
        Jann Horn <jannh@...gle.com>, Bill Wendling <morbo@...gle.com>,
        Alexander Potapenko <glider@...gle.com>
Subject: Re: [PATCH] perf/x86/intel: Mark expected switch fall-throughs

On Fri, Jun 28, 2019 at 11:44:16AM -0700, Nick Desaulniers wrote:
> On Fri, Jun 28, 2019 at 6:31 AM Peter Zijlstra <peterz@...radead.org> wrote:

> > For those with interest; full patches at:
> >
> >   https://lkml.kernel.org/r/20190628102113.360432762@infradead.org
> 
> Do you have a branch pushed that I can pull this from to quickly test w/ Clang?

I've not yet pushied it out, will do on Monday or so.

> The .skip trick is wild; I don't quite understand the negation in the
> above or patch 8/8 for is_byte/is_long.

Yes, that's a bit magic. What happens is that GAS has:

 false := 0
 true := ~false

(it lacks a boolean not and uses a bitwise negate instead). Therefore,
the result of an (true) compare is all-1-s (or -1), and since we want a
single .skip we have to negate.

The actual condition for the result is more complicated than it should
be, but that only came to me after sendind out these patches, basically
it should be:

  (val >> 31) == (val >> 7)

to test if a s32 van be represented in a s8.

> For the wrong __jump_table entry; I consider that a critical issue we
> need to fix before the clang-9 release.  I'm unloading my current
> responsibilities at work to be able to sit and focus on bug.  I'll
> probably start a new thread with you, tglx, Josh, and our mailing list
> next week (sorry for co-opting this thread).  I have been using
> creduce quite successfully for finding and fixing our previous codegen
> bugs (https://nickdesaulniers.github.io/blog/2019/01/18/finding-compiler-bugs-with-c-reduce/),
> but I need to sit and understand the precise failure more in order to
> reduce the input.  We can see pretty well where in the compilation
> pipeline things go wrong; I just find it hard to page through large
> inputs such as whole translation units.

Sure; add me to the thread and I'll be glad to answer anything I can.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ