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: <CA+55aFyCp-9Qqjcn9wp=VDp2KO7tfYuUMJxVKC75Xxu0wEB5Cw@mail.gmail.com>
Date:   Wed, 14 Feb 2018 09:39:33 -0800
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     "Yatsina, Marina" <marina.yatsina@...el.com>,
        Kees Cook <keescook@...gle.com>,
        David Woodhouse <dwmw2@...radead.org>,
        Chandler Carruth <chandlerc@...gle.com>,
        "Kreitzer, David L" <david.l.kreitzer@...el.com>,
        "Grischenko, Andrei L" <andrei.l.grischenko@...el.com>,
        "rnk@...gle.com" <rnk@...gle.com>,
        LLVM Developers <llvm-dev@...ts.llvm.org>,
        "ehsan@...illa.com" <ehsan@...illa.com>,
        "Tayree, Coby" <coby.tayree@...el.com>,
        Matthias Braun <matze@...unis.de>,
        Dean Michael Berris <dean.berris@...il.com>,
        James Y Knight <jyknight@...gle.com>,
        Guenter Roeck <linux@...ck-us.net>, X86 ML <x86@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Alan Cox <gnomes@...rguk.ukuu.org.uk>,
        Rik van Riel <riel@...hat.com>,
        Andi Kleen <ak@...ux.intel.com>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Tom Lendacky <thomas.lendacky@....com>,
        Jiri Kosina <jikos@...nel.org>,
        Andy Lutomirski <luto@...capital.net>,
        "Hansen, Dave" <dave.hansen@...el.com>,
        Tim Chen <tim.c.chen@...ux.intel.com>,
        Greg Kroah-Hartman <gregkh@...ux-foundation.org>,
        Paul Turner <pjt@...gle.com>,
        Stephen Hines <srhines@...gle.com>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Will Deacon <will.deacon@....com>
Subject: Re: clang asm-goto support (Was Re: [PATCH v2] x86/retpoline: Add
 clang support)

On Wed, Feb 14, 2018 at 2:34 AM, Peter Zijlstra <peterz@...radead.org> wrote:
>
> So it's far more than just tracepoints. We use it all over the kernel to
> do runtime branch patching.

Side note: I have a patch to the user access code to do "asm goto" for
the exception handling too.

In fact, the infrastructure is there already, but because we supported
older gcc versions that didn't have asm goto, I never applied the
final patch to actually make use of it.

See "unsafe_put_user()", which currently does

        if (unlikely(__pu_err)) goto err_label;

rather than just have the exception table itself directly reference
"err_label", and not needing any code at all in the regular path.

I suspect there are other things like that, where the lack of "asm
goto" means that it's not worth the pain of having two code paths.
Once we update to a newer gcc requirement, those suddenly will also
very naturally use asm goto.

The other asm use that the clang people might want to look at is the
"condition codes as return value" one. That one we currently handle
with CC_SET/CC_OUT, and it's somewhat more amenable to those kinds of
games, so missing it isn't as nasty. But it *is* a useful "modern"
extension of gcc asms.

Maybe clang already supports cflags output, I haven't checked.

              Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ