Re: [PATCH net 0/3] Fix for BPF devmap percpu allocation splat
From: Tejun Heo
Date: Wed Oct 18 2017 - 09:27:50 EST
Hello, Daniel.
(cc'ing Dennis)
On Tue, Oct 17, 2017 at 04:55:51PM +0200, Daniel Borkmann wrote:
> The set fixes a splat in devmap percpu allocation when we alloc
> the flush bitmap. Patch 1 is a prerequisite for the fix in patch 2,
> patch 1 is rather small, so if this could be routed via -net, for
> example, with Tejun's Ack that would be good. Patch 3 gets rid of
> remaining PCPU_MIN_UNIT_SIZE checks, which are percpu allocator
> internals and should not be used.
>
> Thanks!
>
> Daniel Borkmann (3):
> mm, percpu: add support for __GFP_NOWARN flag
This looks fine.
> bpf: fix splat for illegal devmap percpu allocation
> bpf: do not test for PCPU_MIN_UNIT_SIZE before percpu allocations
These look okay too but if it helps percpu allocator can expose the
maximum size / alignment supported to take out the guessing game too.
Also, the reason why PCPU_MIN_UNIT_SIZE is what it is is because
nobody needed anything bigger. Increasing the size doesn't really
cost much at least on 64bit archs. Is that something we want to be
considering?
Thanks.
--
tejun