[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <eed206b7-ba77-93f7-4cc7-484bf7446d2c@fb.com>
Date: Thu, 15 Feb 2018 21:37:39 -0800
From: Alexei Starovoitov <ast@...com>
To: Daniel Borkmann <daniel@...earbox.net>
CC: <netdev@...r.kernel.org>, Dennis Zhou <dennisszhou@...il.com>
Subject: Re: [PATCH bpf] bpf: fix mlock precharge on arraymaps
On 2/15/18 4:10 PM, Daniel Borkmann wrote:
> syzkaller recently triggered OOM during percpu map allocation;
> while there is work in progress by Dennis Zhou to add __GFP_NORETRY
> semantics for percpu allocator under pressure, there seems also a
> missing bpf_map_precharge_memlock() check in array map allocation.
>
> Given today the actual bpf_map_charge_memlock() happens after the
> find_and_alloc_map() in syscall path, the bpf_map_precharge_memlock()
> is there to bail out early before we go and do the map setup work
> when we find that we hit the limits anyway. Therefore add this for
> array map as well.
>
> Fixes: 6c9059817432 ("bpf: pre-allocate hash map elements")
> Fixes: a10423b87a7e ("bpf: introduce BPF_MAP_TYPE_PERCPU_ARRAY map")
> Reported-by: syzbot+adb03f3f0bb57ce3acda@...kaller.appspotmail.com
> Signed-off-by: Daniel Borkmann <daniel@...earbox.net>
> Cc: Dennis Zhou <dennisszhou@...il.com>
Applied to bpf tree, Thanks Daniel.
Powered by blists - more mailing lists