[PATCH] D75935: Add RET-hardening Support to X86 to mitigate Load Value Injection (LVI) [3/5]

Scott Constable via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 11 15:33:01 PDT 2020


sconstab updated this revision to Diff 249770.
sconstab added a comment.

In the case where there is no scratch register available, changed from using OR 0 to SHL 0 to load/store from/to RSP. The benefit of SHL 0 is that it does not clobber EFLAGS.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75935/new/

https://reviews.llvm.org/D75935

Files:
  llvm/lib/Target/X86/CMakeLists.txt
  llvm/lib/Target/X86/X86.h
  llvm/lib/Target/X86/X86LoadValueInjectionRetHardening.cpp
  llvm/lib/Target/X86/X86TargetMachine.cpp
  llvm/test/CodeGen/X86/O0-pipeline.ll
  llvm/test/CodeGen/X86/O3-pipeline.ll
  llvm/test/CodeGen/X86/lvi-hardening-ret.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75935.249770.patch
Type: text/x-patch
Size: 10957 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200311/96f3058d/attachment.bin>


More information about the llvm-commits mailing list