[PATCH] D76458: Add Indirect Thunk Support to X86 to mitigate Load Value Injection (LVI) [by modifying X86RetpolineThunks.cpp]
Zola Bridges via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 19 15:23:23 PDT 2020
zbrid added a comment.
I commented on the other patch about this before I saw this patch. Thanks for putting this up!
I think it looks pretty good, but could you do a more full refactor of the retpolinethunks pass in an NFC patch? Then have the LVI functionality added on top of that refactored patch?
S
================
Comment at: llvm/lib/Target/X86/X86Subtarget.h:870
bool enableIndirectBrExpand() const override {
- return useRetpolineIndirectBranches();
+ return useRetpolineIndirectBranches() || useLVIControlFlowIntegrity();
}
----------------
Probably can be changed to checking whether we are using indirect branch thunking, etc. I think there were a few other conditionals relating to retpolines that may also need to be changed. The renaming you did in the first indirect branch pass for some functions (ef EmitLoweredRetpoline -> EmitLoweredThunk) should perhaps also be preserved in whatever update you do.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76458/new/
https://reviews.llvm.org/D76458
More information about the cfe-commits
mailing list