Re: [PATCH] sched/tracing: append prev_state to tp args instead

From: Peter Zijlstra
Date: Fri Apr 22 2022 - 07:10:00 EST


On Thu, Apr 21, 2022 at 10:12:25PM +0000, Delyan Kratunov wrote:
> Hi folks,
>
> While working on bpf tooling, we noticed that the sched_switch tracepoint
> signature recently changed in an incompatible manner. This affects the
> runqslower tools in the kernel tree, as well as multiple libbpf tools in iovisor/bcc.
>
> It would be a fair amount of churn to fix all these tools, not to mention any
> non-public tools people may be using.

So on the one hand, too bad, deal with it. None of this is ABI.

> If you are open to it, here's a
> description and a patch that moves the new argument to the end,
> so existing tools can continue working without change (the new argument
> just won't be extracted in existing programs):

And on the other hand; those users need to be fixed anyway, right?
Accessing prev->__state is equally broken.

Yes, the proposed hack is cute, but I have very little sympathy for any
of this. These are in-kernel interfaces, they change, there must not be
any impediment to change.

If bpf wants to ride on them, it needs to suffer the pain of doing so.