[PATCH] D51083: [x86/SLH] Teach SLH to harden indirect branches and switches without retpolines.

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 23 20:00:33 PDT 2018


chandlerc added a comment.

Thanks for the review, should all be addressed.



================
Comment at: llvm/lib/Target/X86/X86SpeculativeLoadHardening.cpp:945-947
+/// special code executing next to the victim. This attack can also be mitigated
+/// through retpolines, but those will remove all indirect branches from the
+/// code naturally disabling this. This mitigation can replace retpoline-style
----------------
rnk wrote:
> This sentence doesn't seem as precise as it could be. retpolines don't remove indirect branches, they replace them with indirect branches that always misspeculate. Maybe the right way to state this is that retpolines block all indirect branch speculation, whereas this mitigation allows for more correct indirect branch speculation.
Tried to improve comment. The tricky thing is that we do in practice just "eliminate" indirect branches by avoiding jump table lowerings.

Anyways, I' think I've gotten the comment more clear, but please let me know if there is a better way to explain all of this.


Repository:
  rL LLVM

https://reviews.llvm.org/D51083





More information about the llvm-commits mailing list