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  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 <>
To:     Nick Desaulniers <>
Cc:     "Gustavo A. R. Silva" <>,
        Joe Perches <>,
        Miguel Ojeda <>,
        Ingo Molnar <>,
        Arnaldo Carvalho de Melo <>,
        Alexander Shishkin <>,
        Jiri Olsa <>,
        Namhyung Kim <>,
        Thomas Gleixner <>,
        Borislav Petkov <>,
        "H. Peter Anvin" <>,
        "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <>,
        Kan Liang <>,
        linux-kernel <>,
        Kees Cook <>,
        Shawn Landden <>,
        Nathan Chancellor <>,
        Luc Van Oostenryck <>,
        Chandler Carruth <>,
        Jann Horn <>, Bill Wendling <>,
        Alexander Potapenko <>
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 <> wrote:

> > For those with interest; full patches at:
> >
> >
> 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 (,
> 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