kasan-introduce-kasan_print_aux_stacks.patch removed from -mm tree
The quilt patch titled
Subject: kasan: introduce kasan_print_aux_stacks
has been removed from the -mm tree. Its filename was
kasan-introduce-kasan_print_aux_stacks.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Andrey Konovalov <[email protected]>
Subject: kasan: introduce kasan_print_aux_stacks
Date: Mon, 5 Sep 2022 23:05:21 +0200
Add a kasan_print_aux_stacks() helper that prints the auxiliary stack traces for the Generic mode.
This change hides references to alloc_meta from the common reporting code. This is desired as only the Generic mode will be using per-object metadata after this series.
---
mm/kasan/kasan.h | 6 ++++++ mm/kasan/report.c | 15 +-------------- mm/kasan/report_generic.c | 20 ++++++++++++++++++++ 3 files changed, 27 insertions(+), 14 deletions(-)
mm/kasan/kasan.h renamed from mm/kasan/kasan.h~kasan-introduce-kasan_print_aux_stacks +6 -0
@@ -266,6 +266,12 @@ void kasan_print_address_stack_frame(constatic inline void kasan_print_address_stack_frame (const void *addr) { }#endif +#ifdef CONFIG_KASAN_GENERIC +void kasan_print_aux_stacks (struct kmem_cache *cache,const void *object); +#else +static inline void kasan_print_aux_stacks (struct kmem_cache *cache,const void *object) { } +#endif +bool kasan_report (unsigned long addr,size_t size,bool is_write,unsigned long ip);void kasan_report_invalid_free (void *object,unsigned long ip,enum kasan_report_type type);
mm/kasan/report.c renamed from mm/kasan/report.c~kasan-introduce-kasan_print_aux_stacks +1 -14
@@ -270,20 +270,7 @@ static void describe_object_stacks(strucpr_err ("\n" ); } -#ifdef CONFIG_KASAN_GENERIC -if (!alloc_meta) -return ; -if (alloc_meta->aux_stack[0 ]) { -pr_err ("Last potentially related work creation:\n" ); -stack_depot_print (alloc_meta->aux_stack[0 ]); -pr_err ("\n" ); - } -if (alloc_meta->aux_stack[1 ]) { -pr_err ("Second to last potentially related work creation:\n" ); -stack_depot_print (alloc_meta->aux_stack[1 ]); -pr_err ("\n" ); - } -#endif +kasan_print_aux_stacks (cache, object); } static void describe_object(struct kmem_cache *cache, void *object,
mm/kasan/report_generic.c renamed from mm/kasan/report_generic.c~kasan-introduce-kasan_print_aux_stacks +20 -0
@@ -132,6 +132,26 @@ void kasan_metadata_fetch_row(char *buffmemcpy (buffer,kasan_mem_to_shadow (row),META_BYTES_PER_ROW ); } +void kasan_print_aux_stacks (struct kmem_cache *cache,const void *object) +{ +struct kasan_alloc_meta *alloc_meta; + + alloc_meta =kasan_get_alloc_meta (cache, object); +if (!alloc_meta) +return ; + +if (alloc_meta->aux_stack[0 ]) { +pr_err ("Last potentially related work creation:\n" ); +stack_depot_print (alloc_meta->aux_stack[0 ]); +pr_err ("\n" ); + } +if (alloc_meta->aux_stack[1 ]) { +pr_err ("Second to last potentially related work creation:\n" ); +stack_depot_print (alloc_meta->aux_stack[1 ]); +pr_err ("\n" ); + } +} +#ifdef CONFIG_KASAN_STACK static bool __must_check tokenize_frame_descr(const char **frame_descr, char *token, size_t max_tok_len,
_
Patches currently in -mm which might be from [email protected] are
kasan-fix-array-bounds-warnings-in-tests.patch