summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86LoadValueInjectionRetHardening.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [X86] Fix to X86LoadValueInjectionRetHardeningPass for possible segfaultScott Constable2020-06-241-0/+3
| | | | | | `MBB.back()` could segfault if `MBB.empty()`. Fixed by checking for `MBB.empty()` in the loop. Differential Revision: https://reviews.llvm.org/D77584
* [X86] Add RET-hardening Support to mitigate Load Value Injection (LVI)Scott Constable2020-06-241-0/+140
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
OpenPOWER on IntegriCloud