stacktrace: move filter_irq_stacks() to kernel/stacktrace.c
authorMarco Elver <elver@google.com>
Fri, 5 Nov 2021 20:45:25 +0000 (13:45 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Apr 2022 18:59:28 +0000 (20:59 +0200)
commitc9ea4fb1f3f356d7a04ebe15ac867ba3192c6d4f
tree58098987cfbffd25aa5c4f440e16b2e80de6fb0b
parentfddb88bd266f4513abab7c36bca98935c9148a98
stacktrace: move filter_irq_stacks() to kernel/stacktrace.c

commit f39f21b3ddc7fc0f87eb6dc75ddc81b5bbfb7672 upstream.

filter_irq_stacks() has little to do with the stackdepot implementation,
except that it is usually used by users (such as KASAN) of stackdepot to
reduce the stack trace.

However, filter_irq_stacks() itself is not useful without a stack trace
as obtained by stack_trace_save() and friends.

Therefore, move filter_irq_stacks() to kernel/stacktrace.c, so that new
users of filter_irq_stacks() do not have to start depending on
STACKDEPOT only for filter_irq_stacks().

Link: https://lkml.kernel.org/r/20210923104803.2620285-1-elver@google.com
Signed-off-by: Marco Elver <elver@google.com>
Acked-by: Dmitry Vyukov <dvyukov@google.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Jann Horn <jannh@google.com>
Cc: Aleksandr Nogikh <nogikh@google.com>
Cc: Taras Madan <tarasmadan@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/stackdepot.h
include/linux/stacktrace.h
kernel/stacktrace.c
lib/stackdepot.c