[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190522201624.eza3pe2v55sn2t2w@ast-mbp.dhcp.thefacebook.com>
Date: Wed, 22 May 2019 13:16:25 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Kris Van Hees <kris.van.hees@...cle.com>
Cc: netdev@...r.kernel.org, bpf@...r.kernel.org,
dtrace-devel@....oracle.com, linux-kernel@...r.kernel.org,
rostedt@...dmis.org, mhiramat@...nel.org, acme@...nel.org,
ast@...nel.org, daniel@...earbox.net, peterz@...radead.org
Subject: Re: [RFC PATCH 00/11] bpf, trace, dtrace: DTrace BPF program type
implementation and sample use
On Wed, May 22, 2019 at 12:12:53AM -0400, Kris Van Hees wrote:
>
> Could you elaborate on why you believe my patches are not adding generic
> features? I can certainly agree that the DTrace-specific portions are less
> generic (although they are certainly available for anyone to use), but I
> don't quite understand why the new features are deemed non-generic and why
> you believe no one else can use this?
And once again your statement above contradicts your own patches.
The patch 2 adds new prog type BPF_PROG_TYPE_DTRACE and the rest of the patches
are tying everything to it.
This approach contradicts bpf philosophy of being generic execution engine
and not favoriting one program type vs another.
I have nothing against dtrace language and dtrace scripts.
Go ahead and compile them into bpf.
All patches to improve bpf infrastructure are very welcomed.
In particular you brought up a good point that there is a use case
for sharing a piece of bpf program between kprobe and tracepoint events.
The better way to do that is via bpf2bpf call.
Example:
void bpf_subprog(arbitrary args)
{
}
SEC("kprobe/__set_task_comm")
int bpf_prog_kprobe(struct pt_regs *ctx)
{
bpf_subprog(...);
}
SEC("tracepoint/sched/sched_switch")
int bpf_prog_tracepoint(struct sched_switch_args *ctx)
{
bpf_subprog(...);
}
Such configuration is not supported by the verifier yet.
We've been discussing it for some time, but no work has started,
since there was no concrete use case.
If you can work on adding support for it everyone will benefit.
Could you please consider doing that as a step forward?
Powered by blists - more mailing lists