[llvm-dev] retpoline mitigation and 6.0
David Woodhouse via llvm-dev
llvm-dev at lists.llvm.org
Tue Feb 6 16:46:55 PST 2018
On Wed, 2018-02-07 at 00:36 +0000, Chandler Carruth wrote:
> > That would be __x86_indirect_thunk but the kernel doesn't use it.
> > We use -mindirect-branch-register and only ever expect the compiler
> > to use the register versions which are CET-compatible.
> > However, in at least one case in the 32-bit kernel we do emit the
> > old ret-equivalent retpoline inline, because there literally wasn't
> > a single register we could use (yay x86).
> > I would definitely consider ditching our use of -mindirect-thunk-
> > register with GCC for 32-bit and exporting the
> > __x86_indirect_thunk, to be consistent if that's what clang wants
> > to do.
> :: sigh :: is there no way to change the name?
> We use a "push" suffix to reduce ambiguity about what convention is
> expected here.... But I guess we can just use the base name if that's
> already shipped.
It has indeed already shipped in GCC 7.3; sorry. It had no
disambiguation in its name because it was the original retpoline,
before we realised that CET would break things.
The other thing to keep an eye on is the *return* thunk, which might
end up being needed on Skylake-era CPUs. See the thread at
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5213 bytes
Desc: not available
More information about the llvm-dev