summaryrefslogtreecommitdiff
path: root/include/linux/kcsan-checks.h
diff options
context:
space:
mode:
authorMarco Elver <elver@google.com>2021-08-09 13:25:13 +0200
committerPaul E. McKenney <paulmck@kernel.org>2021-09-13 16:41:19 -0700
commitf4c87dbbef2638f6da6e29b5e998e3b1dcdb08ee (patch)
tree503e52d978b3897ceef9f5390ab5dccf0d256933 /include/linux/kcsan-checks.h
parent55a55fec5015b326235873b925a5882ac56ecaa2 (diff)
kcsan: Save instruction pointer for scoped accesses
Save the instruction pointer for scoped accesses, so that it becomes possible for the reporting code to construct more accurate stack traces that will show the start of the scope. 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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/kcsan-checks.h b/include/linux/kcsan-checks.h
index 9fd0ad80fef6..5f5965246877 100644
--- a/include/linux/kcsan-checks.h
+++ b/include/linux/kcsan-checks.h
@@ -100,9 +100,12 @@ void kcsan_set_access_mask(unsigned long mask);
/* Scoped access information. */
struct kcsan_scoped_access {
struct list_head list;
+ /* Access information. */
const volatile void *ptr;
size_t size;
int type;
+ /* Location where scoped access was set up. */
+ unsigned long ip;
};
/*
* Automatically call kcsan_end_scoped_access() when kcsan_scoped_access goes