summaryrefslogtreecommitdiffstats
path: root/mm/kasan/kasan.h
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@google.com>2022-09-05 23:05:41 +0200
committerAndrew Morton <akpm@linux-foundation.org>2022-10-03 14:03:00 -0700
commit015b109f1f7a799a51def6be37a53b650c4a8fda (patch)
tree29cb31ba4edb2f7a57c664a01c78ea7b43d267c0 /mm/kasan/kasan.h
parenta794898a0e17c1c563fcce614efbd3644d48fa2e (diff)
downloadlinux-stable-015b109f1f7a799a51def6be37a53b650c4a8fda.tar.gz
linux-stable-015b109f1f7a799a51def6be37a53b650c4a8fda.tar.bz2
linux-stable-015b109f1f7a799a51def6be37a53b650c4a8fda.zip
kasan: introduce complete_report_info
Introduce a complete_report_info() function that fills in the first_bad_addr field of kasan_report_info instead of doing it in kasan_report_*(). This function will be extended in the next patch. Link: https://lkml.kernel.org/r/8eb1a9bd01f5d31eab4524da54a101b8720b469e.1662411799.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov <andreyknvl@google.com> Reviewed-by: Marco Elver <elver@google.com> Cc: Alexander Potapenko <glider@google.com> Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Evgenii Stepanov <eugenis@google.com> Cc: Peter Collingbourne <pcc@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/kasan/kasan.h')
-rw-r--r--mm/kasan/kasan.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/mm/kasan/kasan.h b/mm/kasan/kasan.h
index 4fddfdb08abf..7e07115873d3 100644
--- a/mm/kasan/kasan.h
+++ b/mm/kasan/kasan.h
@@ -153,12 +153,15 @@ enum kasan_report_type {
};
struct kasan_report_info {
+ /* Filled in by kasan_report_*(). */
enum kasan_report_type type;
void *access_addr;
- void *first_bad_addr;
size_t access_size;
bool is_write;
unsigned long ip;
+
+ /* Filled in by the common reporting code. */
+ void *first_bad_addr;
};
/* Do not change the struct layout: compiler ABI. */