Re: [RFC PATCH 2/4] tracing/probes: Compile all fetchargs into a single BPF program per event
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Date: 2026-07-02 01:01:38
Also in:
bpf, linux-kselftest, lkml
On Wed, 1 Jul 2026 17:01:01 -0700 Alexei Starovoitov [off-list ref] wrote:
On Wed, Jul 1, 2026 at 3:40 PM Masami Hiramatsu [off-list ref] wrote:quoted
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.
Yeah, I understood it. I have no intention to merge this series. This is totally just for fun and my interest about BPF. But thanks for your comments. It is good to hear your thought in the RFC stage. I can stop this series here with peace of mind. :) Thank you! -- Masami Hiramatsu (Google) [off-list ref]