Re: [RFC PATCH bpf-next 00/12] bpf: Introduce static-defined tracing probe for BPF

From: Leon Hwang

Date: Mon Jun 29 2026 - 22:14:47 EST


On 30/6/26 09:19, Xu Kuohai wrote:
> On 6/29/2026 9:53 PM, Leon Hwang wrote:
>
> So it is more of a user-space workaround than a formal solution. And even
> for this workaround, there is no need to add a new libbpf API to remove the
> stub. You can simply build two versions of bpf prog, one with subprog and
> one without. When you need to trace fentry, load the first one; otherwise,
> load the second one.

Yep.

>
> What SDT resolves is dynamic tracing after the prog is loaded, the hacking
> before loading does not apply.
>
I think current implementation is too complicated to justify this kind
of workaround. I'd be more comfortable with a simpler approach.

Thanks,
Leon