aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorMarco Elver <elver@google.com>2019-11-14 19:02:54 +0100
committerPaul E. McKenney <paulmck@kernel.org>2019-11-16 07:23:13 -0800
commitdfd402a4c4baae42398ce9180ff424d589b8bffc (patch)
treee628a40284725614b915478123302ed0371523e4 /include/linux/sched.h
parentLinux 5.4-rc7 (diff)
downloadwireguard-linux-dfd402a4c4baae42398ce9180ff424d589b8bffc.tar.xz
wireguard-linux-dfd402a4c4baae42398ce9180ff424d589b8bffc.zip
kcsan: Add Kernel Concurrency Sanitizer infrastructure
Kernel Concurrency Sanitizer (KCSAN) is a dynamic data-race detector for kernel space. KCSAN is a sampling watchpoint-based data-race detector. See the included Documentation/dev-tools/kcsan.rst for more details. This patch adds basic infrastructure, but does not yet enable KCSAN for any architecture. Signed-off-by: Marco Elver <elver@google.com> Acked-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 67a1d86981a9..ae4f341c1db4 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -31,6 +31,7 @@
#include <linux/task_io_accounting.h>
#include <linux/posix-timers.h>
#include <linux/rseq.h>
+#include <linux/kcsan.h>
/* task_struct member predeclarations (sorted alphabetically): */
struct audit_context;
@@ -1172,6 +1173,9 @@ struct task_struct {
#ifdef CONFIG_KASAN
unsigned int kasan_depth;
#endif
+#ifdef CONFIG_KCSAN
+ struct kcsan_ctx kcsan_ctx;
+#endif
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
/* Index of current stored address in ret_stack: */