Re: [PATCH v2] kcov: report the first spurious PC in the interrupt selftest

From: Karl Mehltretter

Date: Sat Sep 19 2026 - 04:01:05 EST


On Mon, Sep 14, 2026 at 12:21:38PM +0100, Alexander Potapenko wrote:
> What do you think of increasing the buffer size to, say, 16 elements?
> This way we'll be able to detect more than one spurious coverage event
> without needing to rebuild the kernel.

Good idea. v3 uses 16 elements, the count plus up to 15 PCs, and no
longer stops at the first PC: KCOV stays enabled for the full 300 ms,
then is disabled. If any PCs were recorded, it prints them all and
panics.

> > + if (selftest_area[0]) {
> > + ip = decanonicalize_ip(selftest_area[1]);
> > + pr_err("spurious coverage detected during interrupt selftest: %pS\n",
>
> Nit: should this be %pB?

Agreed. KCOV records return addresses, so %pB handles function-boundary
cases. I'll also change the trailer to the new Assisted-by: LLM.

Thanks for the review!

Karl