Re: [PATCH v2 01/11] x86: kcov: disable instrumentation of arch/x86/kernel/tsc.c
From: Alexander Potapenko
Date: Fri Jun 27 2025 - 06:52:36 EST
On Fri, Jun 27, 2025 at 9:59 AM Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> On Thu, Jun 26, 2025 at 03:41:48PM +0200, Alexander Potapenko wrote:
> > sched_clock() appears to be called from interrupts, producing spurious
> > coverage, as reported by CONFIG_KCOV_SELFTEST:
>
> NMI context even. But I'm not sure how this leads to problems. What does
> spurious coverage even mean?
This leads to KCOV collecting slightly different coverage when
executing the same syscall multiple times.
For syzkaller that means higher chance to pick a less interesting
input incorrectly assuming it produced some new coverage.
There's a similar discussion at
https://lore.kernel.org/all/20240619111936.GK31592@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/T/#u