<div dir="ltr"><div dir="ltr">I cannot see the patch: Phabricator says that "You Shall Not Pass: Restricted Differential Revision". Can you fix this?<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Jan 6, 2019 at 5:53 PM Xiang Zhang via Phabricator via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">xiangzhangllvm created this revision.<br>
xiangzhangllvm added reviewers: hjl.tools, LuoYuanke, craig.topper, vzakhari, annita.zhang, smaslov.<br>
xiangzhangllvm added a project: lld.<br>
Herald added subscribers: llvm-commits, MaskRay, arichardson, emaste.<br>
Herald added a reviewer: espindola.<br>
<br>
Control-flow Enforcement Technology (CET)<br>
provides the following capabilities to defend against ROP/JOP style control-flow subversion attacks:  <br>
Shadow Stack (SHSTK) – return address protection to defend against Return Oriented Programming, <br>
Indirect branch tracking (IBT) – free branch protection to defend against Jump/Call Oriented Programming.<br>
<br>
The key implement of the feature in LLD:<br>
The flags of SHSTK and IBT will be set at the GNU_PROPERTY_X86_FEATURE_1_AND related structure in .note.gnu.property section if the CET is enabled.<br>
The LLD will first check if all the relocatable object files contain the GNU_PROPERTY_X86_FEATURE_1_AND related structure.<br>
Then to create the GNU_PROPERTY_X86_FEATURE_1_AND related section in output file or not.<br>
It is the OS and hardware to check these flags in the related segment, and run the features or not.<br>
Because of the IBT feature need to insert a endbr* instruction at the end of indirect jump. So we also deal with the Lazy binding in the LLD by adding a second PLT.<br>
<br>
<br>
Repository:<br>
  rLLD LLVM Linker<br>
<br>
<a href="https://reviews.llvm.org/D56373" rel="noreferrer" target="_blank">https://reviews.llvm.org/D56373</a><br>
<br>
Files:<br>
  ELF/Arch/X86.cpp<br>
  ELF/Arch/X86_64.cpp<br>
  ELF/Config.h<br>
  ELF/Driver.cpp<br>
  ELF/Driver.h<br>
  ELF/InputSection.cpp<br>
  ELF/InputSection.h<br>
  ELF/Relocations.cpp<br>
  ELF/Symbols.cpp<br>
  ELF/Symbols.h<br>
  ELF/SyntheticSections.cpp<br>
  ELF/SyntheticSections.h<br>
  ELF/Target.h<br>
  ELF/Writer.cpp<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>