]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
x86: Ignore stack unwinding in KCOV
authorDmitry Vyukov <dvyukov@google.com>
Tue, 11 Jun 2024 07:50:33 +0000 (09:50 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 8 Aug 2024 15:36:35 +0000 (17:36 +0200)
Stack unwinding produces large amounts of uninteresting coverage.
It's called from KASAN kmalloc/kfree hooks, fault injection, etc.
It's not particularly useful and is not a function of system call args.
Ignore that code.

Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Alexander Potapenko <glider@google.com>
Reviewed-by: Marco Elver <elver@google.com>
Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/all/eaf54b8634970b73552dcd38bf9be6ef55238c10.1718092070.git.dvyukov@google.com
arch/x86/kernel/Makefile

index a847180836e475c8ebf4d52fe9f8f7ec682f5d9c..f7918980667a332ef9da8baa14855cda58098378 100644 (file)
@@ -35,6 +35,14 @@ KMSAN_SANITIZE_nmi.o                                 := n
 # If instrumentation of the following files is enabled, boot hangs during
 # first second.
 KCOV_INSTRUMENT_head$(BITS).o                          := n
+# These are called from save_stack_trace() on debug paths,
+# and produce large amounts of uninteresting coverage.
+KCOV_INSTRUMENT_stacktrace.o                           := n
+KCOV_INSTRUMENT_dumpstack.o                            := n
+KCOV_INSTRUMENT_dumpstack_$(BITS).o                    := n
+KCOV_INSTRUMENT_unwind_orc.o                           := n
+KCOV_INSTRUMENT_unwind_frame.o                         := n
+KCOV_INSTRUMENT_unwind_guess.o                         := n
 
 CFLAGS_irq.o := -I $(src)/../include/asm/trace