[PATCH] D49663: [x86/SLH] Teach the x86 speculative load hardening pass to harden against v1.2 BCBS attacks directly.

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 24 06:16:10 PDT 2018


chandlerc updated this revision to Diff 157015.
chandlerc added a comment.

Confirmed that this does-the-right-thing with retpolines (as they get
a different instruction).

Notably, we still harden a loaded value that is potentially a secret, because
speculating even a retpoline has a risk of disclosing the loaded value.
However, when the target of the retpoline is not considered a secret (it is
loaded from RO memory for example), we don't force hardening the target as the
retpoline will block any BCBS-style attack.

I've added a retpoline mode to the indirect test which shows both of these
behaviors.

I think this patch is now good-to-go for a last round of review.


Repository:
  rL LLVM

https://reviews.llvm.org/D49663

Files:
  llvm/lib/Target/X86/X86SpeculativeLoadHardening.cpp
  llvm/test/CodeGen/X86/speculative-load-hardening-indirect.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49663.157015.patch
Type: text/x-patch
Size: 21040 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180724/4557a02f/attachment.bin>


More information about the llvm-commits mailing list