[llvm-dev] retpoline mitigation and 6.0

Guenter Roeck via llvm-dev llvm-dev at lists.llvm.org
Fri Feb 2 17:56:42 PST 2018

On 02/02/2018 04:27 PM, Chandler Carruth wrote:
> On Fri, Feb 2, 2018 at 4:23 PM Chandler Carruth <chandlerc at google.com <mailto:chandlerc at google.com>> wrote:
>     On Fri, Feb 2, 2018 at 4:03 PM David Woodhouse <dwmw2 at infradead.org <mailto:dwmw2 at infradead.org>> wrote:
>         On Thu, 2018-02-01 at 10:10 +0100, Hans Wennborg via llvm-dev wrote:
>          >
>          > I saw the retpoline mitigation landed in r323155. Are we ready to
>          > merge this to 6.0, or are there any open issues that we're waiting
>          > for? Also, were there any followups I should know about? Also,
>          > release notes please :-)
>         Eep, please can we keep the command line option for clang and the thunk
>         ABI matching what GCC, the Linux kernel and Xen are all doing?
>         To say that I am not stunningly keen on
>         https://lkml.org/lkml/2018/2/2/975 would be a bit of an
>         understatement...
> A minor note on this specific patch:
> You don't need '-mretpoline -mretpoline-external-thunk'. The second flag implies the first. (Or should, if not, its a bug.) Our goal was that you needed exactly one flag to enable this in whatever form.

The llvm commit log says:

"... They can write this custom thunk and use `-mretpoline-external-thunk`
*in addition* to `-mretpoline`. In this case, on x86-64 thu thunk names
must be: ... "

which I understand to mean that _both_ are needed. I'll be happy to stand
corrected if that is guaranteed not to be the case.


More information about the llvm-dev mailing list