[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..

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 5 18:36:17 PST 2018


LGTM.


Chandler Carruth via Phabricator <reviews at reviews.llvm.org> writes:

> chandlerc updated this revision to Diff 128834.
> chandlerc added a comment.
>
> Teach the thunk emission to put them in comdats and enhance tests to verify
> this.
>
> Also add test coverage for nonlazybind calls which on 64-bit architectures
> require retpoline there despite no user written indirect call. This already
> worked, but Rafael rightly pointed out we should test it.
>

Just a correction, the issue is not 32 X 64 bits, it is that no one
implemented -fno-plt for x86 in llvm:

$ clang -m32 -fno-plt -S test.c -o - | grep call
        calll   f at PLT
$ gcc -m32 -fno-plt -S test.c -o - | grep call
        call    *f at GOT

Cheers,
Rafael


More information about the llvm-commits mailing list