[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..
Andrei via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 4 13:35:24 PST 2018
AndreiGrischenko added inline comments.
================
Comment at: llvm/lib/Target/X86/X86InstrCompiler.td:1160
(TCRETURNdi tglobaladdr:$dst, imm:$off)>,
- Requires<[NotLP64]>;
+ Requires<[NotLP64, NotUseRetpoline]>;
----------------
Hi Chandler,
Do you really want to use "NotUseRetpoline" here? It will match RETPOLINE_TCRETURN32 then even it is not an indirect branch.
I guess the following test case will crash llc.
```
target triple = "i386-unknown-linux-gnu"
define void @FOO() {
ret void
}
define void @FOO1() {
entry:
tail call void @FOO()
ret void
}
```
================
Comment at: llvm/lib/Target/X86/X86RetpolineThunks.cpp:121
+
+ createThunk(M, "r11", X86::R11);
+ } else {
----------------
You will create thunk function even if it is not necessary? For example for " tail call void @FOO()"?
https://reviews.llvm.org/D41723
More information about the llvm-commits
mailing list