llvm-project/compiler-rt/lib
jinge90 6fab274275 Control-flow Enforcement Technology (CET), published by Intel, introduces
indirect branch tracking(IBT) feature aiming to ensure the target address
of an indirect jump/call is not tampered.
When IBT is enabled, each function or target of any indirect jump/call will start
with an 'endbr32/64' instruction otherwise the program will crash during execution.
To build an application with CET enabled. we need to ensure:

  1. build the source code with "-fcf-protection=full"
  2. all the libraries linked with .o files must be CET enabled too

This patch aims to enable CET for compiler-rt builtins library, we add an option
"COMPILER_RT_ENABLE_CET" whose default value is OFF to enable CET for compiler-rt
in building time and when this option is "ON", "-fcf-protection=full" is added to
BUILTINS_CFLAG and the "endbr32/64" will be placed in the beginning of each assembly
function. We also enabled CET for crtbegin, crtend object files in this patch.

Reviewed by: MaskRay, compnerd, manojgupta, efriedma
Differential Revision: https://reviews.llvm.org/D109811

Signed-off-by: jinge90 <ge.jin@intel.com>
2022-01-10 11:01:11 +08:00
..
asan sanitizer_common: prefix thread-safety macros with SANITIZER_ 2022-01-07 15:11:00 +01:00
BlocksRuntime
builtins Control-flow Enforcement Technology (CET), published by Intel, introduces 2022-01-10 11:01:11 +08:00
cfi sanitizer_common: prefix thread-safety macros with SANITIZER_ 2022-01-07 15:11:00 +01:00
crt Control-flow Enforcement Technology (CET), published by Intel, introduces 2022-01-10 11:01:11 +08:00
dfsan [NFC][DFSan] Cleanup code to use align functions. 2022-01-06 14:42:38 -08:00
fuzzer [libc++] Disable coverage with sanitize-coverage=0 2022-01-07 17:53:21 -08:00
gwp_asan
hwasan [sanitizer] Support IsRssLimitExceeded in all sanitizers 2021-12-03 12:45:44 -08:00
interception [asan] Additionnal prologue decoding for WinSDK 10.0.22000 2021-12-30 20:11:45 -05:00
lsan [ASan][Darwin] Avoid crash during ASan initialization 2022-01-07 12:28:38 -08:00
memprof sanitizer_common: prefix thread-safety macros with SANITIZER_ 2022-01-07 15:11:00 +01:00
msan msan: check that ucontext_t is initialized on signal return 2022-01-05 13:20:50 +01:00
orc [ORC-RT] Add missing headers from 1d82e19f37. 2022-01-08 17:46:14 +11:00
profile [profile] Fix writing binary id into profiles 2021-12-27 19:20:19 +00:00
safestack
sanitizer_common [ASan][Darwin] Avoid crash during ASan initialization 2022-01-07 12:28:38 -08:00
scudo scudo: fix thread-safety macro name 2022-01-07 18:28:15 +01:00
stats
tsan sanitizer_common: prefix thread-safety macros with SANITIZER_ 2022-01-07 15:11:00 +01:00
ubsan [NFC] Fix endif comments to match with include guard 2022-01-07 15:52:59 +08:00
ubsan_minimal
xray Reapply [xray] add support for hexagon 2021-12-10 05:32:28 -08:00
CMakeLists.txt