[all-commits] [llvm/llvm-project] f95a67: [X86] Add RET-hardening Support to mitigate Load V...

Scott Constable via All-commits all-commits at lists.llvm.org
Fri Apr 3 12:09:02 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f95a67d8b8a8cec326ee4a7e8427b779936d100a
      https://github.com/llvm/llvm-project/commit/f95a67d8b8a8cec326ee4a7e8427b779936d100a
  Author: Scott Constable <scott.d.constable at intel.com>
  Date:   2020-04-03 (Fri, 03 Apr 2020)

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

  Log Message:
  -----------
  [X86] Add RET-hardening Support to mitigate Load Value Injection (LVI)

Adding a pass that replaces every ret instruction with the sequence:

pop <scratch-reg>
lfence
jmp *<scratch-reg>

where <scratch-reg> is some available scratch register, according to the
calling convention of the function being mitigated.

Differential Revision: https://reviews.llvm.org/D75935




More information about the All-commits mailing list