[PATCH 1/2] bpf: Remove struct bpf_verifier_env argument from print_bpf_insn

2018-03-23 Thread Jiri Olsa
We use print_bpf_insn in user space (bpftool and soon perf), so it'd be nice to keep it generic and strip it off the kernel struct bpf_verifier_env argument. This argument can be safely removed, because its users can use the struct bpf_insn_cbs::private_data to pass it. By changing the argument t

Re: [PATCH 1/2] bpf: Remove struct bpf_verifier_env argument from print_bpf_insn

2018-03-23 Thread Jiri Olsa
On Thu, Mar 22, 2018 at 05:07:48PM +0100, Daniel Borkmann wrote: SNIP > >>> + va_end(args); > >>> +} > >>> EXPORT_SYMBOL_GPL(bpf_verifier_log_write); > >>> + > >>> +__printf(2, 3) static void print_ins(void *private_data, > >>> + const char *fmt, ...) > >> > >> Unles

Re: [PATCH 1/2] bpf: Remove struct bpf_verifier_env argument from print_bpf_insn

2018-03-22 Thread Daniel Borkmann
On 03/22/2018 04:57 PM, Jiri Olsa wrote: > On Thu, Mar 22, 2018 at 03:35:42PM +, Quentin Monnet wrote: >> 2018-03-22 14:32 UTC+0100 ~ Jiri Olsa >>> On Thu, Mar 22, 2018 at 10:34:18AM +0100, Daniel Borkmann wrote: On 03/21/2018 07:37 PM, Jiri Olsa wrote: > On Wed, Mar 21, 2018 at 05:25

Re: [PATCH 1/2] bpf: Remove struct bpf_verifier_env argument from print_bpf_insn

2018-03-22 Thread Jiri Olsa
On Thu, Mar 22, 2018 at 03:35:42PM +, Quentin Monnet wrote: > 2018-03-22 14:32 UTC+0100 ~ Jiri Olsa > > On Thu, Mar 22, 2018 at 10:34:18AM +0100, Daniel Borkmann wrote: > >> On 03/21/2018 07:37 PM, Jiri Olsa wrote: > >>> On Wed, Mar 21, 2018 at 05:25:33PM +, Quentin Monnet wrote: > 20

Re: [PATCH 1/2] bpf: Remove struct bpf_verifier_env argument from print_bpf_insn

2018-03-22 Thread Quentin Monnet
2018-03-22 14:32 UTC+0100 ~ Jiri Olsa > On Thu, Mar 22, 2018 at 10:34:18AM +0100, Daniel Borkmann wrote: >> On 03/21/2018 07:37 PM, Jiri Olsa wrote: >>> On Wed, Mar 21, 2018 at 05:25:33PM +, Quentin Monnet wrote: 2018-03-21 16:02 UTC+0100 ~ Jiri Olsa > We use print_bpf_insn in user s

Re: [PATCH 1/2] bpf: Remove struct bpf_verifier_env argument from print_bpf_insn

2018-03-22 Thread Jiri Olsa
On Thu, Mar 22, 2018 at 10:34:18AM +0100, Daniel Borkmann wrote: > On 03/21/2018 07:37 PM, Jiri Olsa wrote: > > On Wed, Mar 21, 2018 at 05:25:33PM +, Quentin Monnet wrote: > >> 2018-03-21 16:02 UTC+0100 ~ Jiri Olsa > >>> We use print_bpf_insn in user space (bpftool and soon perf), > >>> so it'

Re: [PATCH 1/2] bpf: Remove struct bpf_verifier_env argument from print_bpf_insn

2018-03-22 Thread Daniel Borkmann
On 03/21/2018 07:37 PM, Jiri Olsa wrote: > On Wed, Mar 21, 2018 at 05:25:33PM +, Quentin Monnet wrote: >> 2018-03-21 16:02 UTC+0100 ~ Jiri Olsa >>> We use print_bpf_insn in user space (bpftool and soon perf), >>> so it'd be nice to keep it generic and strip it off the kernel >>> struct bpf_ver

Re: [PATCH 1/2] bpf: Remove struct bpf_verifier_env argument from print_bpf_insn

2018-03-21 Thread Jiri Olsa
On Wed, Mar 21, 2018 at 05:25:33PM +, Quentin Monnet wrote: > 2018-03-21 16:02 UTC+0100 ~ Jiri Olsa > > We use print_bpf_insn in user space (bpftool and soon perf), > > so it'd be nice to keep it generic and strip it off the kernel > > struct bpf_verifier_env argument. > > > > This argument c

Re: [PATCH 1/2] bpf: Remove struct bpf_verifier_env argument from print_bpf_insn

2018-03-21 Thread Quentin Monnet
2018-03-21 16:02 UTC+0100 ~ Jiri Olsa > We use print_bpf_insn in user space (bpftool and soon perf), > so it'd be nice to keep it generic and strip it off the kernel > struct bpf_verifier_env argument. > > This argument can be safely removed, because its users can > use the struct bpf_insn_cbs::p

[PATCH 1/2] bpf: Remove struct bpf_verifier_env argument from print_bpf_insn

2018-03-21 Thread Jiri Olsa
We use print_bpf_insn in user space (bpftool and soon perf), so it'd be nice to keep it generic and strip it off the kernel struct bpf_verifier_env argument. This argument can be safely removed, because its users can use the struct bpf_insn_cbs::private_data to pass it. Signed-off-by: Jiri Olsa