[llvm-dev] retpoline mitigation and 6.0

David Woodhouse via llvm-dev llvm-dev at lists.llvm.org
Fri Feb 2 16:59:46 PST 2018

On Sat, 2018-02-03 at 00:51 +0000, Chandler Carruth wrote:
> While you *can* export your external thunk, that's a choice of the
> code defining the thunk.
The driving force in the kernel is to be able to runtime patch the
thunks away, when running on a CPU or in a mode that doesn't need them.
We really want to have central implementations and have everything use
> > 

> > 
> > You can even use __x86_indirect_thunk_\reg for *now* and reserve the
> > 
> > right to use a different name if you ever do revise the ABI.> > Maybe I don't understand, but I'm surprised that there is a significant burden to having aliases for now instead? 

You can make that work within the kernel image itself, and export only
the existing names. It gets somewhat harder to support loadable modules
which attempt to use the thunks by different names to the function
that's exported. I'm not sure how we'd hack up the unresolved symbols
in the module objects to match the exported symbol names.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180203/0f539d8c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5213 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180203/0f539d8c/attachment.bin>

More information about the llvm-dev mailing list