WSL2-Linux-Kernel/mm/kasan
Marco Elver e940066089 lib/stackdepot: always do filter_irq_stacks() in stack_depot_save()
The non-interrupt portion of interrupt stack traces before interrupt
entry is usually arbitrary.  Therefore, saving stack traces of
interrupts (that include entries before interrupt entry) to stack depot
leads to unbounded stackdepot growth.

As such, use of filter_irq_stacks() is a requirement to ensure
stackdepot can efficiently deduplicate interrupt stacks.

Looking through all current users of stack_depot_save(), none (except
KASAN) pass the stack trace through filter_irq_stacks() before passing
it on to stack_depot_save().

Rather than adding filter_irq_stacks() to all current users of
stack_depot_save(), it became clear that stack_depot_save() should
simply do filter_irq_stacks().

Link: https://lkml.kernel.org/r/20211130095727.2378739-1-elver@google.com
Signed-off-by: Marco Elver <elver@google.com>
Reviewed-by: Alexander Potapenko <glider@google.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Vijayanand Jitta <vjitta@codeaurora.org>
Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: Imran Khan <imran.f.khan@oracle.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-01-22 08:33:38 +02:00
..
Makefile
common.c lib/stackdepot: always do filter_irq_stacks() in stack_depot_save() 2022-01-22 08:33:38 +02:00
generic.c mm/kasan: Convert to struct folio and struct slab 2022-01-06 12:26:14 +01:00
hw_tags.c kasan: add kasan mode messages when kasan init 2021-11-11 09:34:35 -08:00
init.c
kasan.h mm/kasan: Convert to struct folio and struct slab 2022-01-06 12:26:14 +01:00
quarantine.c Merge branch 'akpm' (patches from Andrew) 2022-01-15 20:37:06 +02:00
report.c mm/kasan: Convert to struct folio and struct slab 2022-01-06 12:26:14 +01:00
report_generic.c
report_hw_tags.c
report_sw_tags.c
report_tags.c mm/kasan: Convert to struct folio and struct slab 2022-01-06 12:26:14 +01:00
shadow.c mm: defer kmemleak object creation of module_alloc() 2022-01-15 16:30:25 +02:00
sw_tags.c kasan: add kasan mode messages when kasan init 2021-11-11 09:34:35 -08:00
tags.c