Re: [PATCH v2 3/5] ebpf: add a way to dump an eBPF program

2015-09-11 Thread Tycho Andersen
On Thu, Sep 10, 2015 at 07:29:42PM -0700, Alexei Starovoitov wrote: > On Thu, Sep 10, 2015 at 06:21:00PM -0600, Tycho Andersen wrote: > > +static int bpf_prog_dump(union bpf_attr *attr, union bpf_attr __user > > *uattr) > > +{ > > + int ufd = attr->prog_fd; > > + struct fd f = fdget(ufd); > >

Re: [PATCH v2 3/5] ebpf: add a way to dump an eBPF program

2015-09-11 Thread Tycho Andersen
On Fri, Sep 11, 2015 at 03:39:14PM +0200, Daniel Borkmann wrote: > On 09/11/2015 02:21 AM, Tycho Andersen wrote: > >This commit adds a way to dump eBPF programs. The initial implementation > >doesn't support maps, and therefore only allows dumping seccomp ebpf > >programs which themselves don't cur

Re: [PATCH v2 3/5] ebpf: add a way to dump an eBPF program

2015-09-11 Thread Daniel Borkmann
On 09/11/2015 02:21 AM, Tycho Andersen wrote: This commit adds a way to dump eBPF programs. The initial implementation doesn't support maps, and therefore only allows dumping seccomp ebpf programs which themselves don't currently support maps. v2: don't export a prog_id for the filter Signed-of

Re: [PATCH v2 3/5] ebpf: add a way to dump an eBPF program

2015-09-11 Thread Michael Kerrisk (man-pages)
Hi Tycho, On 11 September 2015 at 02:21, Tycho Andersen wrote: > This commit adds a way to dump eBPF programs. The initial implementation > doesn't support maps, and therefore only allows dumping seccomp ebpf > programs which themselves don't currently support maps. Same broken record :-). Chee

Re: [PATCH v2 3/5] ebpf: add a way to dump an eBPF program

2015-09-10 Thread Alexei Starovoitov
On Thu, Sep 10, 2015 at 06:21:00PM -0600, Tycho Andersen wrote: > +static int bpf_prog_dump(union bpf_attr *attr, union bpf_attr __user *uattr) > +{ > + int ufd = attr->prog_fd; > + struct fd f = fdget(ufd); > + struct bpf_prog *prog; > + int ret = -EINVAL; > + > + prog = get_pr

[PATCH v2 3/5] ebpf: add a way to dump an eBPF program

2015-09-10 Thread Tycho Andersen
This commit adds a way to dump eBPF programs. The initial implementation doesn't support maps, and therefore only allows dumping seccomp ebpf programs which themselves don't currently support maps. v2: don't export a prog_id for the filter Signed-off-by: Tycho Andersen CC: Kees Cook CC: Will Dr