diff options
author | Nick Desaulniers <ndesaulniers@google.com> | 2021-06-21 16:18:20 -0700 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2021-06-22 11:00:30 -0700 |
commit | 380d53c45ff21f66870ee965b62613137f9d010d (patch) | |
tree | 9d3a86f6f868101c984b92c5903c60f626e284c2 /include/linux/compiler_types.h | |
parent | 583bfd484bcc85e9371e7205fa9e827c18ae34fb (diff) | |
download | linux-380d53c45ff21f66870ee965b62613137f9d010d.tar.gz linux-380d53c45ff21f66870ee965b62613137f9d010d.tar.bz2 linux-380d53c45ff21f66870ee965b62613137f9d010d.zip |
compiler_attributes.h: define __no_profile, add to noinstr
noinstr implies that we would like the compiler to avoid instrumenting a
function. Add support for the compiler attribute
no_profile_instrument_function to compiler_attributes.h, then add
__no_profile to the definition of noinstr.
Link: https://lore.kernel.org/lkml/20210614162018.GD68749@worktop.programming.kicks-ass.net/
Link: https://reviews.llvm.org/D104257
Link: https://reviews.llvm.org/D104475
Link: https://reviews.llvm.org/D104658
Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223
Reviewed-by: Fangrui Song <maskray@google.com>
Reviewed-by: Miguel Ojeda <ojeda@kernel.org>
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20210621231822.2848305-2-ndesaulniers@google.com
Diffstat (limited to 'include/linux/compiler_types.h')
-rw-r--r-- | include/linux/compiler_types.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h index d29bda7f6ebd..d509169860f1 100644 --- a/include/linux/compiler_types.h +++ b/include/linux/compiler_types.h @@ -210,7 +210,7 @@ struct ftrace_likely_data { /* Section for code which can't be instrumented at all */ #define noinstr \ noinline notrace __attribute((__section__(".noinstr.text"))) \ - __no_kcsan __no_sanitize_address + __no_kcsan __no_sanitize_address __no_profile #endif /* __KERNEL__ */ |