artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5486fdb
)
Add lfence after ret in retpoline thunk.
author
mortimer
<mortimer@openbsd.org>
Wed, 1 Sep 2021 13:37:14 +0000
(13:37 +0000)
committer
mortimer
<mortimer@openbsd.org>
Wed, 1 Sep 2021 13:37:14 +0000
(13:37 +0000)
Recommended by AMD white paper Software Techniques for Managing
Speculation on AMD Processors (9.17.20) mitigation V2-1.
Pointed out by bluhm@. ok bluhm@ kettenis@
gnu/llvm/llvm/lib/Target/X86/X86IndirectThunks.cpp
patch
|
blob
|
history
diff --git
a/gnu/llvm/llvm/lib/Target/X86/X86IndirectThunks.cpp
b/gnu/llvm/llvm/lib/Target/X86/X86IndirectThunks.cpp
index
828887d
..
ae26ed4
100644
(file)
--- a/
gnu/llvm/llvm/lib/Target/X86/X86IndirectThunks.cpp
+++ b/
gnu/llvm/llvm/lib/Target/X86/X86IndirectThunks.cpp
@@
-250,6
+250,7
@@
void RetpolineThunkInserter::populateThunk(MachineFunction &MF) {
CallTarget->back().setPreInstrSymbol(MF, TargetSym);
BuildMI(CallTarget, DebugLoc(), TII->get(RetOpc));
+ BuildMI(CallTarget, DebugLoc(), TII->get(X86::LFENCE));
}
FunctionPass *llvm::createX86IndirectThunksPass() {