From: Karl Mehltretter <kmehltretter@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Andrey Konovalov <andreyknvl@gmail.com>,
Alexander Potapenko <glider@google.com>,
Dmitry Vyukov <dvyukov@google.com>,
Marco Elver <elver@google.com>,
Bradley Morgan <include@grrlz.net>,
Anna-Maria Behnsen <anna-maria@linutronix.de>,
Frederic Weisbecker <frederic@kernel.org>,
Thomas Gleixner <tglx@kernel.org>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Valentin Schneider <vschneid@redhat.com>,
K Prateek Nayak <kprateek.nayak@amd.com>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Clark Williams <clrkwllms@kernel.org>,
linux-rt-devel@lists.linux.dev, kasan-dev@googlegroups.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/6] kcov: Suppress timer and scheduler coverage leaks
Date: Tue, 1 Sep 2026 07:50:04 +0200 [thread overview]
Message-ID: <apZlkC1lCUFFMKsl@gmail.com> (raw)
In-Reply-To: <20260811154111.64669-1-kmehltretter@gmail.com>
On Tue, Aug 11, 2026 at 05:41:05PM +0100, Karl Mehltretter wrote:
>
> Add a nestable KCOV_PAUSED bit and a kcov_pause guard. Use the guard for
> deferred hrtimer rearm, __schedule(), the try_to_wake_up() wakeup body
> and wake_up_new_task(). This suppresses their instrumented callees
> without excluding those callees from task-context coverage.
>
Andrey, Alexander, Dmitry,
Could you please take a look at this series from the KCOV side?
It fixes the CONFIG_KCOV_SELFTEST failures covered by this series. Some
architectures still need further architecture-specific KCOV
instrumentation exclusions.
The three syzkaller A/B pairs from the cover letter also suggest
better coverage: at matched execution counts, the patched kernels had
14-19% more coverage and 42-54% larger corpora.
Do you think the pause mechanism and the places where it is used make
sense? Do you want me to continue with a v3?
I also looked at the Sashiko dashboard report:
https://sashiko.dev/#/patchset/20260811154111.64669-1-kmehltretter@gmail.com
I don't think the remaining warning about reordering or removing the
kcov_mode stores is real for these call sites.
One small change opportunity for v3: In try_to_wake_up(), I would take
the kcov_pause guard before the preempt guard. Cleanup then runs
preempt_enable() while KCOV is still paused and resumes KCOV afterwards.
I would also replace "uninstrumented" with "built without KCOV
instrumentation" to avoid the ambiguity Peter pointed out.
Separately, I will look at turning Peter's IRQ-exit preempt-count
proposal into a standalone patch for instrumentation in general,
especially KCSAN. It does not replace this KCOV series, since it only
covers work run directly from IRQ exit.
Thanks,
Karl
prev parent reply other threads:[~2026-09-01 5:50 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-11 15:41 [PATCH v2 0/6] kcov: Suppress timer and scheduler coverage leaks Karl Mehltretter
2026-08-11 15:41 ` [PATCH v2 1/6] kcov: Use unsigned int for kcov_start() mode parameter Karl Mehltretter
2026-09-01 13:31 ` Alexander Potapenko
2026-08-11 15:41 ` [PATCH v2 2/6] kcov: Add a kcov_pause guard Karl Mehltretter
2026-09-01 14:22 ` Alexander Potapenko
2026-08-11 15:41 ` [PATCH v2 3/6] hrtimer: Pause KCOV during deferred rearm Karl Mehltretter
2026-08-12 10:21 ` Peter Zijlstra
2026-08-13 5:59 ` Karl Mehltretter
2026-08-13 13:08 ` Peter Zijlstra
2026-08-17 1:43 ` Karl Mehltretter
2026-08-11 15:41 ` [PATCH v2 4/6] sched/core: Pause KCOV in __schedule() Karl Mehltretter
2026-08-12 10:35 ` Peter Zijlstra
2026-08-11 15:41 ` [PATCH v2 5/6] sched/core: Pause KCOV in try_to_wake_up() Karl Mehltretter
2026-08-12 10:35 ` Peter Zijlstra
2026-08-11 15:41 ` [PATCH v2 6/6] sched/core: Pause KCOV in wake_up_new_task() Karl Mehltretter
2026-08-12 10:36 ` Peter Zijlstra
2026-08-11 19:59 ` [PATCH v2 0/6] kcov: Suppress timer and scheduler coverage leaks Bradley Morgan
2026-08-12 10:36 ` Peter Zijlstra
2026-09-01 5:50 ` Karl Mehltretter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=apZlkC1lCUFFMKsl@gmail.com \
--to=kmehltretter@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@gmail.com \
--cc=anna-maria@linutronix.de \
--cc=bigeasy@linutronix.de \
--cc=bsegall@google.com \
--cc=clrkwllms@kernel.org \
--cc=dietmar.eggemann@arm.com \
--cc=dvyukov@google.com \
--cc=elver@google.com \
--cc=frederic@kernel.org \
--cc=glider@google.com \
--cc=include@grrlz.net \
--cc=juri.lelli@redhat.com \
--cc=kasan-dev@googlegroups.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@kernel.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.