Re: [PATCH bpf 1/2] bpf/test_run: fix unkillable BPF_PROG_TEST_RUN

2019-02-18 Thread Daniel Borkmann
On 02/18/2019 06:29 PM, Stanislav Fomichev wrote: > On 02/16, Daniel Borkmann wrote: >> On 02/13/2019 12:42 AM, Stanislav Fomichev wrote: >>> Syzbot found out that running BPF_PROG_TEST_RUN with repeat=0x >>> makes process unkillable. The problem is that when CONFIG_PREEMPT is >>> enabled,

Re: [PATCH bpf 1/2] bpf/test_run: fix unkillable BPF_PROG_TEST_RUN

2019-02-18 Thread Stanislav Fomichev
On 02/16, Daniel Borkmann wrote: > On 02/13/2019 12:42 AM, Stanislav Fomichev wrote: > > Syzbot found out that running BPF_PROG_TEST_RUN with repeat=0x > > makes process unkillable. The problem is that when CONFIG_PREEMPT is > > enabled, we never see need_resched() return true. This is due

Re: [PATCH bpf 1/2] bpf/test_run: fix unkillable BPF_PROG_TEST_RUN

2019-02-15 Thread Daniel Borkmann
On 02/13/2019 12:42 AM, Stanislav Fomichev wrote: > Syzbot found out that running BPF_PROG_TEST_RUN with repeat=0x > makes process unkillable. The problem is that when CONFIG_PREEMPT is > enabled, we never see need_resched() return true. This is due to the > fact that preempt_enable() (whic

[PATCH bpf 1/2] bpf/test_run: fix unkillable BPF_PROG_TEST_RUN

2019-02-12 Thread Stanislav Fomichev
Syzbot found out that running BPF_PROG_TEST_RUN with repeat=0x makes process unkillable. The problem is that when CONFIG_PREEMPT is enabled, we never see need_resched() return true. This is due to the fact that preempt_enable() (which we do in bpf_test_run_one on each iteration) now handles