This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] Support Intel CET
AbandonedPublic

Authored by hjl.tools on Oct 2 2021, 10:58 AM.

Details

Summary
  1. Include <cet.h> in sanitizer_common/sanitizer_asm.h to mark Intel CET support when Intel CET is enabled.
  2. Add _CET_ENDBR to function entries in assembly codes so that ENDBR instruction will be generated when Intel CET is enabled.

Diff Detail

Event Timeline

hjl.tools created this revision.Oct 2 2021, 10:58 AM
hjl.tools requested review of this revision.Oct 2 2021, 10:58 AM

[compiler-rt] Support Intel CET

compiler-rt consists of sanitizers, builtins (similar to libgcc), xray, orc (for JIT), and a bunch of other things.
If this is for sanitizer functions which may be called indirectly, using a [sanitizer] tag may be better.

Has this been verified on CET capable hardware by testing check-all (which includes check-asan check-msan check-tsan check-ubsan ...)?

I assume that builtins will be made CET compatible by D109811.

MaskRay added a reviewer: Restricted Project.Oct 4 2021, 6:05 PM
hjl.tools abandoned this revision.Oct 5 2021, 3:00 PM

[compiler-rt] Support Intel CET

compiler-rt consists of sanitizers, builtins (similar to libgcc), xray, orc (for JIT), and a bunch of other things.
If this is for sanitizer functions which may be called indirectly, using a [sanitizer] tag may be better.

I created a new one: D111185.

Has this been verified on CET capable hardware by testing check-all (which includes check-asan check-msan check-tsan check-ubsan ...)?

Yes.

I assume that builtins will be made CET compatible by D109811.

Yes,