linux-stable/mm/kasan
Andrey Konovalov 31c65110b9 kasan: call print_report from kasan_report_invalid_free
Call print_report() in kasan_report_invalid_free() instead of calling
printing functions directly.  Compared to the existing implementation of
kasan_report_invalid_free(), print_report() makes sure that the buggy
address has metadata before printing it.

The change requires adding a report type field into kasan_access_info and
using it accordingly.

kasan_report_async() is left as is, as using print_report() will only
complicate the code.

Link: https://lkml.kernel.org/r/9ea6f0604c5d2e1fb28d93dc6c44232c1f8017fe.1646237226.git.andreyknvl@google.com
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Marco Elver <elver@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-03-24 19:06:49 -07:00
..
common.c kasan, page_alloc: merge kasan_alloc_pages into post_alloc_hook 2022-03-24 19:06:46 -07:00
generic.c mm/kasan: Convert to struct folio and struct slab 2022-01-06 12:26:14 +01:00
hw_tags.c kasan: test: support async (again) and asymm modes for HW_TAGS 2022-03-24 19:06:48 -07:00
init.c
kasan.h kasan: call print_report from kasan_report_invalid_free 2022-03-24 19:06:49 -07:00
Makefile mm/kasan: remove unnecessary CONFIG_KASAN option 2022-03-24 19:06:48 -07:00
quarantine.c Merge branch 'akpm' (patches from Andrew) 2022-01-15 20:37:06 +02:00
report.c kasan: call print_report from kasan_report_invalid_free 2022-03-24 19:06:49 -07:00
report_generic.c kasan: simplify kasan_find_first_bad_addr call sites 2022-03-24 19:06:49 -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 mm/kasan: Convert to struct folio and struct slab 2022-01-06 12:26:14 +01:00
shadow.c kasan, vmalloc: only tag normal vmalloc allocations 2022-03-24 19:06:48 -07:00
sw_tags.c kasan: add kasan mode messages when kasan init 2021-11-11 09:34:35 -08:00
tags.c kasan: integrate the common part of two KASAN tag-based modes 2021-06-29 10:53:53 -07:00