[PATCH] D41723: Introduce the "retpoline" x86 mitigation technique for variant #2 of the speculative execution vulnerabilities disclosed today, specifically identified by CVE-2017-5715, "Branch Target Injection", and is one of the two halves to Spectre..

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 4 10:07:51 PST 2018


On Thu, Jan 4, 2018 at 12:55 PM Roger via Phabricator <
reviews at reviews.llvm.org> wrote:

> royger added a comment.
>
> AFAICT this change doesn't allow to use different indirect thunks, gcc
> allows such usage with the
> -mindirect-branch=thunk-extern/-mindirect-branch-register options. The
> following patches for example allow Xen to choose the optimal thunk
> depending on the processor:
>
> https://lists.xenproject.org/archives/html/xen-devel/2018-01/msg00112.html
> https://lists.xenproject.org/archives/html/xen-devel/2018-01/msg00118.html


While allowing external thunks seems useful for experimentation, I much
prefer that we don't have to establish a precise API / ABI for the exact
thunks. One advantage of the way we're handling this in LLVM is that the
thunks are *completely* transparent and work cleanly even in dynamic
executables.

Is there any benchmark data showing that the different thunk is superior on
AMD processors? Any official AMD documentation we can cite here?

We can easily extend this code to generate custom thunks for specific
processors -- we have that kind of information inside the compiler.


>
>
>
> https://reviews.llvm.org/D41723
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180104/f6e7e0a5/attachment.html>


More information about the llvm-commits mailing list