diff options
author | Marco Elver <elver@google.com> | 2020-03-31 22:32:32 +0300 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2020-04-14 03:18:14 +0300 |
commit | 01b4ff58f72dbee926077d9afa0650f6e685e866 (patch) | |
tree | 9511655aab9c348cebd0a4dc5078d3688c237fcb /include/linux/kcsan-checks.h | |
parent | d8949ef1d9f1062848cd068cf369a57ce33dae6f (diff) | |
download | linux-01b4ff58f72dbee926077d9afa0650f6e685e866.tar.xz |
kcsan: Move kcsan_{disable,enable}_current() to kcsan-checks.h
Both affect access checks, and should therefore be in kcsan-checks.h.
This is in preparation to use these in compiler.h.
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'include/linux/kcsan-checks.h')
-rw-r--r-- | include/linux/kcsan-checks.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/kcsan-checks.h b/include/linux/kcsan-checks.h index 101df7f46d89..ef95ddc49182 100644 --- a/include/linux/kcsan-checks.h +++ b/include/linux/kcsan-checks.h @@ -37,6 +37,20 @@ void __kcsan_check_access(const volatile void *ptr, size_t size, int type); /** + * kcsan_disable_current - disable KCSAN for the current context + * + * Supports nesting. + */ +void kcsan_disable_current(void); + +/** + * kcsan_enable_current - re-enable KCSAN for the current context + * + * Supports nesting. + */ +void kcsan_enable_current(void); + +/** * kcsan_nestable_atomic_begin - begin nestable atomic region * * Accesses within the atomic region may appear to race with other accesses but @@ -133,6 +147,8 @@ void kcsan_end_scoped_access(struct kcsan_scoped_access *sa); static inline void __kcsan_check_access(const volatile void *ptr, size_t size, int type) { } +static inline void kcsan_disable_current(void) { } +static inline void kcsan_enable_current(void) { } static inline void kcsan_nestable_atomic_begin(void) { } static inline void kcsan_nestable_atomic_end(void) { } static inline void kcsan_flat_atomic_begin(void) { } |