Re: [PATCH bpf] bpf: fix bpf_prog_array_copy_to_user warning from perf event prog query

2018-02-14 Thread Alexei Starovoitov
On Wed, Feb 14, 2018 at 03:31:00PM +0100, Daniel Borkmann wrote: > syzkaller tried to perform a prog query in perf_event_query_prog_array() > where struct perf_event_query_bpf had an ids_len of 1,073,741,353 and > thus causing a warning due to failed kcalloc() allocation out of the > bpf_prog_array

[PATCH bpf] bpf: fix bpf_prog_array_copy_to_user warning from perf event prog query

2018-02-14 Thread Daniel Borkmann
syzkaller tried to perform a prog query in perf_event_query_prog_array() where struct perf_event_query_bpf had an ids_len of 1,073,741,353 and thus causing a warning due to failed kcalloc() allocation out of the bpf_prog_array_copy_to_user() helper. Given we cannot attach more than 64 programs to a