RE: clang asm-goto support (Was Re: [PATCH v2] x86/retpoline: Add clang support)

From: Yatsina, Marina
Date: Wed Feb 14 2018 - 05:11:06 EST


I believe we do have the infrastructure in llvm to implement a working patch.
The "asm goto" was introduced as a solution to a problem (optimizing tracepoints/ nop patching).
When we started the discussion in llvm about adding this feature, questions arose if we can design a better solution for this problem than "asm goto".

You can find a more about the discussion in the llvm community here:
http://lists.llvm.org/pipermail/llvm-dev/2017-April/111748.html

* This is the middle of the thread, and there are more messages later on.

Thanks,
Marina

-----Original Message-----
From: Greg Kroah-Hartman [mailto:gregkh@xxxxxxxxxxxxxxxxxxxx]
Sent: Wednesday, February 14, 2018 11:53
To: Chandler Carruth <chandlerc@xxxxxxxxxx>
Cc: Yatsina, Marina <marina.yatsina@xxxxxxxxx>; Kees Cook <keescook@xxxxxxxxxx>; David Woodhouse <dwmw2@xxxxxxxxxxxxx>; Kreitzer, David L <david.l.kreitzer@xxxxxxxxx>; Grischenko, Andrei L <andrei.l.grischenko@xxxxxxxxx>; rnk@xxxxxxxxxx; LLVM Developers <llvm-dev@xxxxxxxxxxxxxx>; ehsan@xxxxxxxxxxx; Tayree, Coby <coby.tayree@xxxxxxxxx>; Matthias Braun <matze@xxxxxxxxxx>; Dean Michael Berris <dean.berris@xxxxxxxxx>; James Y Knight <jyknight@xxxxxxxxxx>; Guenter Roeck <linux@xxxxxxxxxxxx>; X86 ML <x86@xxxxxxxxxx>; LKML <linux-kernel@xxxxxxxxxxxxxxx>; Alan Cox <gnomes@xxxxxxxxxxxxxxxxxxx>; Rik van Riel <riel@xxxxxxxxxx>; Andi Kleen <ak@xxxxxxxxxxxxxxx>; Josh Poimboeuf <jpoimboe@xxxxxxxxxx>; Tom Lendacky <thomas.lendacky@xxxxxxx>; Peter Zijlstra <peterz@xxxxxxxxxxxxx>; Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>; Jiri Kosina <jikos@xxxxxxxxxx>; Andy Lutomirski <luto@xxxxxxxxxxxxxx>; Hansen, Dave <dave.hansen@xxxxxxxxx>; Tim Chen <tim.c.chen@xxxxxxxxxxxxxxx>; Paul Turner <pjt@xxxxxxxxxx>; Stephen Hines <srhines@xxxxxxxxxx>; Nick Desaulniers <ndesaulniers@xxxxxxxxxx>
Subject: Re: clang asm-goto support (Was Re: [PATCH v2] x86/retpoline: Add clang support)

On Wed, Feb 14, 2018 at 08:41:43AM +0000, Chandler Carruth wrote:
> Marina, Kees:
>
> I think the combination of LKML and the LLVM developer's list is
> probably too large a set of folks to have a (somewhat) lengthy
> exploration of options and how to go about this and find a good path forward.

Why is there any need to discuss "options" here? What is preventing the implementation of "asm goto" in llvm? Is it the lack of a working patch, or something else?

thanks,

greg k-h
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.