linux/mm/kasan
Andrey Konovalov 59e6e098d1 kasan: introduce kasan_complete_mode_report_info
Add bug_type and alloc/free_track fields to kasan_report_info and add a
kasan_complete_mode_report_info() function that fills in these fields. 
This function is implemented differently for different KASAN mode.

Change the reporting code to use the filled in fields instead of invoking
kasan_get_bug_type() and kasan_get_alloc/free_track().

For the Generic mode, kasan_complete_mode_report_info() invokes these
functions instead.  For the tag-based modes, only the bug_type field is
filled in; alloc/free_track are handled in the next patch.

Using a single function that fills in these fields is required for the
tag-based modes, as the values for all three fields are determined in a
single procedure implemented in the following patch.

Link: https://lkml.kernel.org/r/8432b861054fa8d0cee79a8877dedeaf3b677ca8.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>
2022-10-03 14:03:01 -07:00
..
common.c kasan: use kasan_addr_to_slab in print_address_description 2022-10-03 14:03:00 -07:00
generic.c kasan: move kasan_get_alloc/free_track definitions 2022-10-03 14:02:59 -07:00
hw_tags.c kasan: fix zeroing vmalloc memory with HW_TAGS 2022-07-03 18:08:39 -07:00
init.c kasan: use MAX_PTRS_PER_* for early shadow tables 2021-06-29 10:53:53 -07:00
kasan.h kasan: introduce kasan_complete_mode_report_info 2022-10-03 14:03:01 -07:00
Makefile mm/kasan: remove unnecessary CONFIG_KASAN option 2022-03-24 19:06:48 -07:00
quarantine.c kasan: give better names to shadow values 2022-05-13 07:20:19 -07:00
report.c kasan: introduce kasan_complete_mode_report_info 2022-10-03 14:03:01 -07:00
report_generic.c kasan: introduce kasan_complete_mode_report_info 2022-10-03 14:03:01 -07:00
report_hw_tags.c kasan: simplify kasan_find_first_bad_addr call sites 2022-03-24 19:06:49 -07:00
report_sw_tags.c kasan: simplify kasan_find_first_bad_addr call sites 2022-03-24 19:06:49 -07:00
report_tags.c kasan: introduce kasan_complete_mode_report_info 2022-10-03 14:03:01 -07:00
shadow.c UML: add support for KASAN under x86_64 2022-07-17 23:35:22 +02:00
sw_tags.c kasan: add kasan mode messages when kasan init 2021-11-11 09:34:35 -08:00
tags.c kasan: move kasan_get_alloc/free_track definitions 2022-10-03 14:02:59 -07:00