[PATCH] D58102: Support X86 Control-flow Enforcement Technology (CET) in LLD

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 19 18:31:08 PST 2019


ruiu added a comment.

In D58102#1403358 <https://reviews.llvm.org/D58102#1403358>, @LuoYuanke wrote:

> I think SPLT has better compatibility compared to change the original PLT entry. Given the platform is old, and use the old dynamic linker, the new library that build with SPLT can still be linked by dynamic linker. I am not sure if it still works if we change the struct of PLT entry.


PLT itself works fine even if we change the instructions and the size of the PLT entry. I know that because we already did that for Retpoline PLT. As a mitigation for Spectre, lld can emit a PLT that uses RET instead of indirect JMP. That hardened PLT entry is larger than the standard one.

> The second issue is GNU toolchain has already adopt SPLT, if we want to change the design, we need also influence the GNU community to revise the design and all their libraries which are built with CET enabled toolchain.

But I strongly believe you should do that. As I said, imagine the future in which CET is widely adopted. All x86 executables in the future would have two PLTs for no obvious technical reason? I don't really want it to happen.


Repository:
  rLLD LLVM Linker

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58102/new/

https://reviews.llvm.org/D58102





More information about the llvm-commits mailing list