compiler_attributes.h: Add __disable_sanitizer_instrumentation
authorAlexander Potapenko <glider@google.com>
Tue, 30 Nov 2021 11:44:32 +0000 (12:44 +0100)
committerPaul E. McKenney <paulmck@kernel.org>
Fri, 10 Dec 2021 00:42:28 +0000 (16:42 -0800)
commita015b7085979b12e55f67f3b86be0321fff6be3f
tree01dd3b8c30b0a0de4b3551685f7deb4a95b6a239
parent0509811952e41ad1e04c50d2378078250b6b7be3
compiler_attributes.h: Add __disable_sanitizer_instrumentation

The new attribute maps to
__attribute__((disable_sanitizer_instrumentation)), which will be
supported by Clang >= 14.0. Future support in GCC is also possible.

This attribute disables compiler instrumentation for kernel sanitizer
tools, making it easier to implement noinstr. It is different from the
existing __no_sanitize* attributes, which may still allow certain types
of instrumentation to prevent false positives.

Signed-off-by: Alexander Potapenko <glider@google.com>
Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
include/linux/compiler_attributes.h