* [PATCH] tracing: disable kcov on trace_preemptirq.c
@ 2022-05-23 6:30 Congyu Liu
2022-05-23 8:35 ` Dmitry Vyukov
0 siblings, 1 reply; 2+ messages in thread
From: Congyu Liu @ 2022-05-23 6:30 UTC (permalink / raw)
To: dvyukov, andreyknvl, rostedt, mingo; +Cc: kasan-dev, linux-kernel, Congyu Liu
Functions in trace_preemptirq.c could be invoked from early interrupt
code that bypasses kcov trace function's in_task() check. Disable kcov
on this file to reduce random code coverage.
Signed-off-by: Congyu Liu <liu3101@purdue.edu>
---
kernel/trace/Makefile | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kernel/trace/Makefile b/kernel/trace/Makefile
index d77cd8032213..0d261774d6f3 100644
--- a/kernel/trace/Makefile
+++ b/kernel/trace/Makefile
@@ -31,6 +31,10 @@ ifdef CONFIG_GCOV_PROFILE_FTRACE
GCOV_PROFILE := y
endif
+# Functions in this file could be invoked from early interrupt
+# code and produce random code coverage.
+KCOV_INSTRUMENT_trace_preemptirq.o := n
+
CFLAGS_bpf_trace.o := -I$(src)
CFLAGS_trace_benchmark.o := -I$(src)
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tracing: disable kcov on trace_preemptirq.c
2022-05-23 6:30 [PATCH] tracing: disable kcov on trace_preemptirq.c Congyu Liu
@ 2022-05-23 8:35 ` Dmitry Vyukov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Vyukov @ 2022-05-23 8:35 UTC (permalink / raw)
To: Congyu Liu; +Cc: andreyknvl, rostedt, mingo, kasan-dev, linux-kernel
On Mon, 23 May 2022 at 08:30, Congyu Liu <liu3101@purdue.edu> wrote:
>
> Functions in trace_preemptirq.c could be invoked from early interrupt
> code that bypasses kcov trace function's in_task() check. Disable kcov
> on this file to reduce random code coverage.
>
> Signed-off-by: Congyu Liu <liu3101@purdue.edu>
Acked-by: Dmitry Vyukov <dvyukov@google.com>
> ---
> kernel/trace/Makefile | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/kernel/trace/Makefile b/kernel/trace/Makefile
> index d77cd8032213..0d261774d6f3 100644
> --- a/kernel/trace/Makefile
> +++ b/kernel/trace/Makefile
> @@ -31,6 +31,10 @@ ifdef CONFIG_GCOV_PROFILE_FTRACE
> GCOV_PROFILE := y
> endif
>
> +# Functions in this file could be invoked from early interrupt
> +# code and produce random code coverage.
> +KCOV_INSTRUMENT_trace_preemptirq.o := n
> +
> CFLAGS_bpf_trace.o := -I$(src)
>
> CFLAGS_trace_benchmark.o := -I$(src)
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-23 8:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-23 6:30 [PATCH] tracing: disable kcov on trace_preemptirq.c Congyu Liu
2022-05-23 8:35 ` Dmitry Vyukov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.