Re: [PATCH v3 bpf-next 2/5] bpf: Introduce sleepable BPF programs

2020-08-31 Thread Alexei Starovoitov
On Mon, Aug 31, 2020 at 7:52 AM Björn Töpel wrote: > > On Fri, 28 Aug 2020 at 00:02, Alexei Starovoitov > wrote: > > > > From: Alexei Starovoitov > > > > [...] > > > diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c > > index 6f5a9f51cc03..3ebfdb7bd427 100644 > > [...] > > > > > +/* non

Re: [PATCH v3 bpf-next 2/5] bpf: Introduce sleepable BPF programs

2020-08-31 Thread Björn Töpel
On Fri, 28 Aug 2020 at 00:02, Alexei Starovoitov wrote: > > From: Alexei Starovoitov > [...] > diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c > index 6f5a9f51cc03..3ebfdb7bd427 100644 [...] > > +/* non exhaustive list of sleepable bpf_lsm_*() functions */ > +BTF_SET_START(btf_slee

Re: [PATCH v3 bpf-next 2/5] bpf: Introduce sleepable BPF programs

2020-08-27 Thread Josef Bacik
On 8/27/20 6:01 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 might sleep. At prese

Re: [PATCH v3 bpf-next 2/5] bpf: Introduce sleepable BPF programs

2020-08-27 Thread KP Singh
On Fri, Aug 28, 2020 at 12:01 AM 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() tha

[PATCH v3 bpf-next 2/5] bpf: Introduce sleepable BPF programs

2020-08-27 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