Re: [PATCH v3 11/19] objtool: Point the remaining coverage accesses in noinstr code at a sink

From: Sasha Levin

Date: Thu Dec 03 2026 - 04:47:37 EST


On Tue, Dec 01, 2026 at 11:25:50PM -0800, Josh Poimboeuf wrote:
>I think patch 10 isn't necessary; the patch 11 approach could be used
>universally. But also even patch 11 is overly complicated and I suspect
>something like the below would be sufficient:

I gave it a spin and it works :) On the three builds I test it catches exactly
what 10 and 11 catch, with a lot less code.

I did spot a few issues:

- The stores are still there, so the sink can be watched. A write
breakpoint on it hangs my guest, like the one on the counter did.
With the NOPs, GCC had nothing left to watch.

- The sink only has a section symbol, so there's no name to refuse in
hw_breakpoint if we ever want to. In vmlinux it shows up as
__gcov0.__memcpy_flushcache+0x70.

- Every counter update in the entry code still runs, and they all hit
the same 8 bytes. With GCC, a getppid() loop is about 1.5x slower
than with the NOPs.

If you're OK with those, I'm happy to switch to it for v4.

--
Thanks,
Sasha