[PATCH] D40224: [X86] Control-Flow Enforcement Technology - Shadow Stack and Indirect Branch Tracking support (Clang side)

Oren Ben Simhon via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 19 05:29:27 PST 2017


oren_ben_simhon created this revision.
Herald added a subscriber: mgorny.

Control Flow Enforcement Technology (CET) provides HW capabilities to defend against Return Oriented Programming (ROP) attack and similarly Call/Jmp Oriented Programming (COP/JOP) attack.
Control flow subversion attacks are handled using two CET’s mechanisms:

1. Shadow Stack (SHSTK) – return address protection to defend against ROP.
2. Indirect Branch Tracking (IBT) – free branch protection to defend against JOP/COP.

Shadow stack solution introduces a new stack for return addresses only. The stack has a Shadow Stack Pointer (SSP) that points to the last address to which we expect to return. If we return to a different address an exception is triggered.
This patch includes shadow stack intrinsics as well as the corresponding CET header. It includes CET clang flags for shadow stack and Indirect Branch Tracking.

For more information, please see the following:
https://software.intel.com/sites/default/files/managed/4d/2a/control-flow-enforcement-technology-preview.pdf


Repository:
  rL LLVM

https://reviews.llvm.org/D40224

Files:
  include/clang/Basic/BuiltinsX86.def
  include/clang/Basic/BuiltinsX86_64.def
  include/clang/Driver/Options.td
  lib/Basic/Targets/X86.cpp
  lib/Basic/Targets/X86.h
  lib/Headers/CMakeLists.txt
  lib/Headers/cetintrin.h
  lib/Headers/immintrin.h
  test/CodeGen/builtins-x86.c
  test/CodeGen/cetintrin.c
  test/Driver/x86-target-features.c
  test/Preprocessor/x86_target_features.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40224.123497.patch
Type: text/x-patch
Size: 16059 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171119/7fa727a0/attachment.bin>


More information about the llvm-commits mailing list