All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Lutomirski <luto@amacapital.net>
To: James Y Knight <jyknight@google.com>
Cc: "Yatsina, Marina" <marina.yatsina@intel.com>,
	Kees Cook <keescook@google.com>,
	David Woodhouse <dwmw2@infradead.org>,
	Chandler Carruth <chandlerc@google.com>,
	"Kreitzer, David L" <david.l.kreitzer@intel.com>,
	"Grischenko, Andrei L" <andrei.l.grischenko@intel.com>,
	"rnk@google.com" <rnk@google.com>,
	LLVM Developers <llvm-dev@lists.llvm.org>,
	"ehsan@mozilla.com" <ehsan@mozilla.com>,
	"Tayree, Coby" <coby.tayree@intel.com>,
	Matthias Braun <matze@braunis.de>,
	Dean Michael Berris <dean.berris@gmail.com>,
	Guenter Roeck <linux@roeck-us.net>, X86 ML <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Alan Cox <gnomes@lxorguk.ukuu.org.uk>,
	Rik van Riel <riel@redhat.com>, Andi Kleen <ak@linux.intel.com>,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Jiri Kosina <jikos@kernel.org>,
	"Hansen, Dave" <dave.hansen@intel.com>,
	Tim Chen <tim.c.chen@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linux-foundation.org>,
	Paul Turner <pjt@google.com>, Stephen Hines <srhines@google.com>,
	Nick Desaulniers <ndesaulniers@google.com>
Subject: Re: clang asm-goto support (Was Re: [PATCH v2] x86/retpoline: Add clang support)
Date: Wed, 14 Feb 2018 17:21:55 +0000	[thread overview]
Message-ID: <CALCETrVeOKXa_xiggzqjcx34TtTs_rMyq56u-EXCFYgQtcei5g@mail.gmail.com> (raw)
In-Reply-To: <CAA2zVHqxQeZRdQtfhL-QRjqE5W94g+NU9E9Lx8RwwjDof36M_Q@mail.gmail.com>

On Wed, Feb 14, 2018 at 3:31 PM, James Y Knight <jyknight@google.com> wrote:
> I'd be definitely in favor having clang support asm goto. I wouldn't
> want to exclude having other conversations about how to more directly
> provide compiler features that the linux kernel could use, ALSO, but I
> do not think that conversation should block implementing asm-goto.
>
> IMO, inline asm is, generally, a valuable feature to provide in the
> compiler as an escape hatch, and asm goto is a relatively sane
> extension of it. Supporting outgoing edges from an inline asm block is
> a reasonable thing for users to desire, and as far as anyone's said so
> far, seems like it ought to be fairly easily implementable, without
> causing bad side-effects in the compiler.
>
> Of course, we generally do want to minimize the need for users to use
> inline asm, by providing appropriate compiler support for the features
> people would otherwise be forced to implement using asm. But I don't
> see that as really any more important for asm-goto than any other
> inline asm. There will always be a desire for escape hatches, to do
> weird and unique things which aren't supported directly in the
> compiler. (Also, the kernel is a pretty special case in terms of its
> requirements, it seems exceedingly unlikely that we could ever provide
> enough compiler support to let it eliminate inline asm.).
>

If clang implements asm goto, could you also pretty please make it
better than GCC and support output constraints in the same asm
statements?  This would give us a very clean, short, and fast
implementation for __get_user() and __put_user(), and it would also
help put pressure on GCC to implement the same feature.

  reply	other threads:[~2018-02-14 17:21 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-14  0:28 clang asm-goto support (Was Re: [PATCH v2] x86/retpoline: Add clang support) Kees Cook
2018-02-14  8:33 ` Yatsina, Marina
2018-02-14  8:41   ` Chandler Carruth
2018-02-14  9:10     ` Peter Zijlstra
2018-02-14 10:44       ` Thomas Gleixner
2018-02-14  9:53     ` Greg Kroah-Hartman
2018-02-14 10:07       ` Yatsina, Marina
2018-02-14 10:17         ` Chandler Carruth
2018-02-14  9:08   ` Peter Zijlstra
2018-02-14  9:52     ` Yatsina, Marina
2018-02-14 10:34       ` Peter Zijlstra
2018-02-14 12:04         ` Ingo Molnar
2018-02-14 23:07           ` Ingo Molnar
2018-02-14 17:39         ` Linus Torvalds
2018-02-14 17:31     ` Kees Cook
2018-02-14 18:39       ` Peter Zijlstra
2018-02-14 15:31   ` James Y Knight
2018-02-14 17:21     ` Andy Lutomirski [this message]
2018-02-14 17:43     ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALCETrVeOKXa_xiggzqjcx34TtTs_rMyq56u-EXCFYgQtcei5g@mail.gmail.com \
    --to=luto@amacapital.net \
    --cc=ak@linux.intel.com \
    --cc=andrei.l.grischenko@intel.com \
    --cc=chandlerc@google.com \
    --cc=coby.tayree@intel.com \
    --cc=dave.hansen@intel.com \
    --cc=david.l.kreitzer@intel.com \
    --cc=dean.berris@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=ehsan@mozilla.com \
    --cc=gnomes@lxorguk.ukuu.org.uk \
    --cc=gregkh@linux-foundation.org \
    --cc=jikos@kernel.org \
    --cc=jpoimboe@redhat.com \
    --cc=jyknight@google.com \
    --cc=keescook@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=llvm-dev@lists.llvm.org \
    --cc=marina.yatsina@intel.com \
    --cc=matze@braunis.de \
    --cc=ndesaulniers@google.com \
    --cc=peterz@infradead.org \
    --cc=pjt@google.com \
    --cc=riel@redhat.com \
    --cc=rnk@google.com \
    --cc=srhines@google.com \
    --cc=thomas.lendacky@amd.com \
    --cc=tim.c.chen@linux.intel.com \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.