diff options
author | Oren Ben Simhon <oren.ben.simhon@intel.com> | 2018-03-17 13:29:46 +0000 |
---|---|---|
committer | Oren Ben Simhon <oren.ben.simhon@intel.com> | 2018-03-17 13:29:46 +0000 |
commit | fdd72fd5225dedb4431473fb3ac7b3d45fc8ed00 (patch) | |
tree | b1819bd5c756e40209091ea07d752efab4cf83ac /llvm/docs | |
parent | dbcf1bf503880084e33e57e9fb916a66703d18d7 (diff) | |
download | bcm5719-llvm-fdd72fd5225dedb4431473fb3ac7b3d45fc8ed00.tar.gz bcm5719-llvm-fdd72fd5225dedb4431473fb3ac7b3d45fc8ed00.zip |
[X86] Added support for nocf_check attribute for indirect Branch Tracking
X86 Supports Indirect Branch Tracking (IBT) as part of Control-Flow Enforcement Technology (CET).
IBT instruments ENDBR instructions used to specify valid targets of indirect call / jmp.
TheĀ `nocf_check` attribute has two roles in the context of X86 IBT technology:
1. Appertains to a function - do not add ENDBR instruction at the beginning of the function.
2. Appertains to a function pointer - do not track the target function of this pointer by adding nocf_check prefix to the indirect-call instruction.
This patch implementsĀ `nocf_check` context for Indirect Branch Tracking.
It also auto generatesĀ `nocf_check` prefixes before indirect branchs to jump tables that are guarded by range checks.
Differential Revision: https://reviews.llvm.org/D41879
llvm-svn: 327767
Diffstat (limited to 'llvm/docs')
-rw-r--r-- | llvm/docs/BitCodeFormat.rst | 1 | ||||
-rw-r--r-- | llvm/docs/LangRef.rst | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/llvm/docs/BitCodeFormat.rst b/llvm/docs/BitCodeFormat.rst index 39a7a925e68..24c007a2254 100644 --- a/llvm/docs/BitCodeFormat.rst +++ b/llvm/docs/BitCodeFormat.rst @@ -1054,6 +1054,7 @@ The integer codes are mapped to well-known attributes as follows. * code 53: ``speculatable`` * code 54: ``strictfp`` * code 55: ``sanitize_hwaddress`` +* code 56: ``nocf_check`` .. note:: The ``allocsize`` attribute has a special encoding for its arguments. Its two diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst index 5bbbf32710d..5a62bff4181 100644 --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -1699,6 +1699,12 @@ example: show that no exceptions passes by it. This is normally the case for the ELF x86-64 abi, but it can be disabled for some compilation units. +``nocf_check`` + This attribute indicates that no control-flow check will be perfomed on + the attributed entity. It disables -fcf-protection=<> for a specific + entity to fine grain the HW control flow protection mechanism. The flag + is target independant and currently appertains to a function or function + pointer. .. _glattrs: |