Re: [PATCH bpf-next v3 2/7] bpf: introduce bpf subcommand BPF_TASK_FD_QUERY

2018-05-23 Thread Yonghong Song
On 5/23/18 2:04 PM, Alexei Starovoitov wrote: On Wed, May 23, 2018 at 10:13:22AM -0700, Martin KaFai Lau wrote: + __u32 prog_id;/* output: prod_id */ + __u32 attach_info;/* output: BPF_ATTACH_* */ + __u64 probe

Re: [PATCH bpf-next v3 2/7] bpf: introduce bpf subcommand BPF_TASK_FD_QUERY

2018-05-23 Thread Yonghong Song
On 5/23/18 10:13 AM, Martin KaFai Lau wrote: On Tue, May 22, 2018 at 09:30:46AM -0700, Yonghong Song wrote: Currently, suppose a userspace application has loaded a bpf program and attached it to a tracepoint/kprobe/uprobe, and a bpf introspection tool, e.g., bpftool, wants to show which bpf pr

Re: [PATCH bpf-next v3 2/7] bpf: introduce bpf subcommand BPF_TASK_FD_QUERY

2018-05-23 Thread Alexei Starovoitov
On Wed, May 23, 2018 at 10:13:22AM -0700, Martin KaFai Lau wrote: > > + __u32 prog_id;/* output: prod_id */ > > + __u32 attach_info;/* output: BPF_ATTACH_* */ > > + __u64 probe_offset; /* output: probe_offset */ > > +

Re: [PATCH bpf-next v3 2/7] bpf: introduce bpf subcommand BPF_TASK_FD_QUERY

2018-05-23 Thread Martin KaFai Lau
On Tue, May 22, 2018 at 09:30:46AM -0700, Yonghong Song wrote: > Currently, suppose a userspace application has loaded a bpf program > and attached it to a tracepoint/kprobe/uprobe, and a bpf > introspection tool, e.g., bpftool, wants to show which bpf program > is attached to which tracepoint/kpro

[PATCH bpf-next v3 2/7] bpf: introduce bpf subcommand BPF_TASK_FD_QUERY

2018-05-22 Thread Yonghong Song
Currently, suppose a userspace application has loaded a bpf program and attached it to a tracepoint/kprobe/uprobe, and a bpf introspection tool, e.g., bpftool, wants to show which bpf program is attached to which tracepoint/kprobe/uprobe. Such attachment information will be really useful to underst