From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762986AbdJQPLX (ORCPT ); Tue, 17 Oct 2017 11:11:23 -0400 Received: from www62.your-server.de ([213.133.104.62]:37950 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762425AbdJQPLV (ORCPT ); Tue, 17 Oct 2017 11:11:21 -0400 Message-ID: <59E61D8F.5000505@iogearbox.net> Date: Tue, 17 Oct 2017 17:11:11 +0200 From: Daniel Borkmann User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: David Laight , "davem@davemloft.net" CC: "tj@kernel.org" , "ast@kernel.org" , "john.fastabend@gmail.com" , "mark.rutland@arm.com" , "richard@nod.at" , "sp3485@columbia.edu" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH net 0/3] Fix for BPF devmap percpu allocation splat References: <063D6719AE5E284EB5DD2968C1650D6DD009980D@AcuExch.aculab.com> In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6DD009980D@AcuExch.aculab.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/17/2017 05:03 PM, David Laight wrote: > From: Daniel Borkmann >> Sent: 17 October 2017 15:56 >> >> 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. > > Does it make sense to allow the user program to try to allocate ever > smaller very large maps until it finds one that succeeds - thus > using up all the percpu space? > > Or is this a 'root only' 'shoot self in foot' job? It's root only although John still has a pending fix to be flushed out for -net first in the next days to actually enforce that cap (devmap is not in an official kernel yet at this point, so all good), but apart from this, all map allocs in general are accounted for as well. Thanks, Daniel