Re: [PATCH bpf] devmap: use bpf_map_area_alloc() for allocating hash buckets

2020-06-17 Thread Alexei Starovoitov
On Tue, Jun 16, 2020 at 11:07 PM John Fastabend wrote: > > Toke Høiland-Jørgensen wrote: > > Syzkaller discovered that creating a hash of type devmap_hash with a large > > number of entries can hit the memory allocator limit for allocating > > contiguous memory regions. There's really no reason to

RE: [PATCH bpf] devmap: use bpf_map_area_alloc() for allocating hash buckets

2020-06-16 Thread John Fastabend
Toke Høiland-Jørgensen wrote: > Syzkaller discovered that creating a hash of type devmap_hash with a large > number of entries can hit the memory allocator limit for allocating > contiguous memory regions. There's really no reason to use kmalloc_array() > directly in the devmap code, so just switch

[PATCH bpf] devmap: use bpf_map_area_alloc() for allocating hash buckets

2020-06-16 Thread Toke Høiland-Jørgensen
Syzkaller discovered that creating a hash of type devmap_hash with a large number of entries can hit the memory allocator limit for allocating contiguous memory regions. There's really no reason to use kmalloc_array() directly in the devmap code, so just switch it to the existing bpf_map_area_alloc