diff options
author | Marco Elver <elver@google.com> | 2020-02-11 19:04:22 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2020-03-21 11:44:08 +0300 |
commit | 81af89e15862909881ff010a0adb67148487e88a (patch) | |
tree | d2cc4b1598e5136a418154244fbbff9997fde592 /include/linux/kcsan.h | |
parent | b738f6169f1260b4ed5bd9f220b1c84d79f3ab8d (diff) | |
download | linux-81af89e15862909881ff010a0adb67148487e88a.tar.xz |
kcsan: Add kcsan_set_access_mask() support
When setting up an access mask with kcsan_set_access_mask(), KCSAN will
only report races if concurrent changes to bits set in access_mask are
observed. Conveying access_mask via a separate call avoids introducing
overhead in the common-case fast-path.
Acked-by: John Hubbard <jhubbard@nvidia.com>
Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/kcsan.h')
-rw-r--r-- | include/linux/kcsan.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/kcsan.h b/include/linux/kcsan.h index 7a614ca558f6..3b84606e1e67 100644 --- a/include/linux/kcsan.h +++ b/include/linux/kcsan.h @@ -35,6 +35,11 @@ struct kcsan_ctx { */ int atomic_nest_count; bool in_flat_atomic; + + /* + * Access mask for all accesses if non-zero. + */ + unsigned long access_mask; }; /** |