Re: [PATCH bpf] bpf: run bpf programs with preemption disabled

2019-01-31 Thread Daniel Borkmann
On 01/29/2019 03:43 AM, Alexei Starovoitov wrote: > Disabled preemption is necessary for proper access to per-cpu maps > from BPF programs. > > But the sender side of socket filters didn't have preemption disabled: > unix_dgram_sendmsg->sk_filter->sk_filter_trim_cap->bpf_prog_run_save_cb->BPF_PROG

Re: [PATCH bpf] bpf: run bpf programs with preemption disabled

2019-01-28 Thread Song Liu
> On Jan 28, 2019, at 6:43 PM, Alexei Starovoitov wrote: > > Disabled preemption is necessary for proper access to per-cpu maps > from BPF programs. > > But the sender side of socket filters didn't have preemption disabled: > unix_dgram_sendmsg->sk_filter->sk_filter_trim_cap->bpf_prog_run_sav

[PATCH bpf] bpf: run bpf programs with preemption disabled

2019-01-28 Thread Alexei Starovoitov
Disabled preemption is necessary for proper access to per-cpu maps from BPF programs. But the sender side of socket filters didn't have preemption disabled: unix_dgram_sendmsg->sk_filter->sk_filter_trim_cap->bpf_prog_run_save_cb->BPF_PROG_RUN and a combination of af_packet with tun device didn't