archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <>
To: Nick Desaulniers <>
	"H.J. Lu" <>,,,
	Masahiro Yamada <>
Subject: Re: [PATCH] x86: Use -mindirect-branch-cs-prefix for RETPOLINE builds
Date: Fri, 19 Nov 2021 16:11:25 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Thu, Nov 18, 2021 at 02:08:04PM -0800, Nick Desaulniers wrote:
> On Thu, Nov 18, 2021 at 10:54 AM Peter Zijlstra <> wrote:
> >
> >
> > In order to further enable commit:
> >
> >   bbe2df3f6b6d ("x86/alternative: Try inline spectre_v2=retpoline,amd")
> >
> > add the new GCC flag -mindirect-branch-cs-prefix:
> >
> >
> >
> > to RETPOLINE=y builds. This should allow fully inlining retpoline,amd
> > for GCC builds.
> Do you mind adding the following link tags:
> Link:
> Link:
> Link:

My scripts will strip that, they only like to have a Link to to the
actual email as posted. I can put in the URLs, the first is already in
the Changelog.

> If the feature would be helpful to implement in Clang, would you mind
> keeping the cc-option, but moving the check outside of the `ifdef
> CONFIG_CC_IS_GCC` block? That way, we don't need to revisit the
> Makefile?

I was thinking that clang would want to name it differently to be
consistent with their own retpoline flags, something like:


> (Tangential: I wonder why RETPOLINE_CFLAGS aren't defined in
> arch/x86/Makefile; they seem to be x86 specific at the moment).

Yeah, I think there was hoping that other archs would find it useful,
but so far x86 is the only one having grown them things. I can move them
I suppose. If ever another arch grows them we can reconsider.

> With the above link tags, and with or without moving this outside the
> gcc-specific guard:
> Acked-by: Nick Desaulniers <>

Thanks, let me repost as two patches.

      reply	other threads:[~2021-11-19 15:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <>
2021-11-18 22:08 ` [PATCH] x86: Use -mindirect-branch-cs-prefix for RETPOLINE builds Nick Desaulniers
2021-11-19 15:11   ` Peter Zijlstra [this message]

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:

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

  git send-email \ \ \ \ \ \ \ \ \ \

* 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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).