You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[clang] Function type attribute to prevent CFI instrumentation
This introduces the attribute discussed in
https://discourse.llvm.org/t/rfc-function-type-attribute-to-prevent-cfi-instrumentation/85458.
The proposed name has been changed from `no_cfi` to
`cfi_unchecked_callee` to help differentiate from `no_sanitize("cfi")`
more easily. The proposed attribute has the following semantics:
1. Indirect calls to a function type with this attribute will not be
instrumented with CFI. That is, the indirect call will not be
checked. Note that this only changes the behavior for indirect calls
on pointers to function types having this attribute. It does not
prevent all indirect function calls for a given type from being checked.
2. All direct references to a function whose type has this attribute will
always reference the true function definition rather than an entry
in the CFI jump table.
3. When a pointer to a function with this attribute is implicitly cast
to a pointer to a function without this attribute, the compiler
will give a warning saying this attribute is discarded. This warning
can be silenced with an explicit C-style cast or C++ static_cast.
0 commit comments