Re: [RFC PATCH 2/4] tracing/probes: Compile all fetchargs into a single BPF program per event
From: Alexei Starovoitov <hidden>
Date: 2026-07-02 00:01:14
Also in:
bpf, linux-kselftest, lkml
From: Alexei Starovoitov <hidden>
Date: 2026-07-02 00:01:14
Also in:
bpf, linux-kselftest, lkml
On Wed, Jul 1, 2026 at 3:40 PM Masami Hiramatsu [off-list ref] wrote:
On Wed, 01 Jul 2026 11:41:26 -0700 "Alexei Starovoitov" [off-list ref] wrote:quoted
Nack. I really don't like it. There were days in the past when the kernel generating bpf directly was appealing. These days are gone. Performance improvements for fetchargs is not a good reason to add all this complexity and bypass verifier checks. bpf insns should come from user space.Thanks for your comment! OK, I don't mind because this is a kind of investigation project. And some people had asked me about the same idea, now I can tell them the result. I'm satisfied with the current outcome, as this development process gave me insight into the implementation of BPF and demonstrated the potential for optimization via JIT. :) And also, as noted in the cover letter, the current performance of fetcharg is better than I thought, and is good enough for debugging. :) BTW, I'm also interested in calling the verifier on this generated code. Even it it is not merged, I think showing the correct way to implement it will be useful in the future.
The whole feature you're trying to do is imo reinvention of the wheel. bpf could do that kind of filtering years ago. I don't buy the excuse that embedded environments without any kind of user space needs this facility.