Re: [PATCH v2 bpf-next 2/4] bpf: Introduce sleepable BPF programs

2020-05-30 Thread kbuild test robot
Hi Alexei, I love your patch! Yet something to improve: [auto build test ERROR on net-next/master] [also build test ERROR on v5.7-rc7 next-20200529] [cannot apply to bpf-next/master bpf/master net/master] [if your patch is applied to the wrong git tree, please drop us a note to help improve the s

Re: [PATCH v2 bpf-next 2/4] bpf: Introduce sleepable BPF programs

2020-05-30 Thread kbuild test robot
Hi Alexei, I love your patch! Yet something to improve: [auto build test ERROR on net-next/master] [also build test ERROR on v5.7-rc7 next-20200529] [cannot apply to bpf-next/master bpf/master net/master] [if your patch is applied to the wrong git tree, please drop us a note to help improve the s

Re: [PATCH v2 bpf-next 2/4] bpf: Introduce sleepable BPF programs

2020-05-29 Thread Alexei Starovoitov
On Fri, May 29, 2020 at 01:38:40PM -0700, Andrii Nakryiko wrote: > > > > if (prog->type == BPF_PROG_TYPE_STRUCT_OPS) > > > > return check_struct_ops_btf_id(env); > > > > > > > > @@ -10762,8 +10801,29 @@ static int check_attach_btf_id(struct > > > > bpf_verifier_env *env) >

Re: [PATCH v2 bpf-next 2/4] bpf: Introduce sleepable BPF programs

2020-05-29 Thread Andrii Nakryiko
On Fri, May 29, 2020 at 1:12 PM Alexei Starovoitov wrote: > > On Fri, May 29, 2020 at 01:25:06AM -0700, Andrii Nakryiko wrote: > > > index 11584618e861..26b18b6a3dbc 100644 > > > --- a/kernel/bpf/arraymap.c > > > +++ b/kernel/bpf/arraymap.c > > > @@ -393,6 +393,11 @@ static void array_map_free(str

Re: [PATCH v2 bpf-next 2/4] bpf: Introduce sleepable BPF programs

2020-05-29 Thread Alexei Starovoitov
On Fri, May 29, 2020 at 01:25:06AM -0700, Andrii Nakryiko wrote: > > index 11584618e861..26b18b6a3dbc 100644 > > --- a/kernel/bpf/arraymap.c > > +++ b/kernel/bpf/arraymap.c > > @@ -393,6 +393,11 @@ static void array_map_free(struct bpf_map *map) > > */ > > synchronize_rcu(); > > >

Re: [PATCH v2 bpf-next 2/4] bpf: Introduce sleepable BPF programs

2020-05-29 Thread Andrii Nakryiko
On Thu, May 28, 2020 at 9:39 PM Alexei Starovoitov wrote: > > From: Alexei Starovoitov > > Introduce sleepable BPF programs that can request such property for themselves > via BPF_F_SLEEPABLE flag at program load time. In such case they will be able > to use helpers like bpf_copy_from_user() that

[PATCH v2 bpf-next 2/4] bpf: Introduce sleepable BPF programs

2020-05-28 Thread Alexei Starovoitov
From: Alexei Starovoitov Introduce sleepable BPF programs that can request such property for themselves via BPF_F_SLEEPABLE flag at program load time. In such case they will be able to use helpers like bpf_copy_from_user() that might sleep. At present only fentry/fexit/fmod_ret and lsm programs c