kcsan: Add __kcsan_{enable,disable}_current() variants
authorMarco Elver <elver@google.com>
Fri, 24 Apr 2020 15:47:29 +0000 (17:47 +0200)
committerPaul E. McKenney <paulmck@kernel.org>
Wed, 6 May 2020 17:58:46 +0000 (10:58 -0700)
commit19acd03d95dad1f50d06f28179a1866fca431fed
tree1f451d663d7d1898ab8dca276e893fd880999d00
parent5099a722e9727fe9a93fac51e961735f40e5b6c8
kcsan: Add __kcsan_{enable,disable}_current() variants

The __kcsan_{enable,disable}_current() variants only call into KCSAN if
KCSAN is enabled for the current compilation unit. Note: This is
typically not what we want, as we usually want to ensure that even calls
into other functions still have KCSAN disabled.

These variants may safely be used in header files that are shared
between regular kernel code and code that does not link the KCSAN
runtime.

Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
include/linux/kcsan-checks.h
kernel/kcsan/core.c