Received: by 10.223.176.5 with SMTP id f5csp3229906wra; Mon, 29 Jan 2018 10:29:08 -0800 (PST) X-Google-Smtp-Source: AH8x226+6BgrJrHFv+C52HSeahvQ4ct97VCkNczGMzxasR/q4RuqYlcl3B89UQmifwfDEGhaOnoX X-Received: by 10.98.28.209 with SMTP id c200mr17962729pfc.24.1517250548824; Mon, 29 Jan 2018 10:29:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517250548; cv=none; d=google.com; s=arc-20160816; b=OwF5p6sVYKr9IcVmQ9tytwc4fBIZ76YXeUXnk/9ViS+WaylEihK8O+FwoqmQI2sbjJ 1TRX5n1Cqp/dhrS+rhwVunEd0pjViWa0L2SAWNrqLdSCfMrcyCdec8Kwn043zjWuDXGZ DglnnlLCb8LyvrI4+ZdCKFd9O3Jl92vTiN7pQHAAjaL/yGTxQzHBbQeb2gUit7rbVGDc 9mYGh2eyKgzZQ3oUT+aSFW2y+gbQMTDQURHGL0On/aZrkfw3LASzk/NbrjpAsyyOBfBf DYR5SiTd2dX0TSk7NLSJ3bk1PJ6p+RfoJGUYr1CWcsJV2WzGfYpt4c73gun8G2eSzzxn h7yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=rOq9J45ykWGMCbuwX0mYUyPw0jXipGGuPWGcMgO7TH8=; b=wBuL49svtnR4Hb3AuW88lCWPSC5+hHOW6BoAmBuRka8RHYElh1hWIOlgqh5E96M0tk +OC3Ij31VYdjmQxltvqBNWn27+wpclS4lC8SamZ2uq08GHNs67ChlCb7Ip+HE+w/wstW nbLwgqZ79c9eqQ0pD2u/PDWdBzUXnXuqscUok863ktFb2kQ9RLfBpUG0wIUMFpFQf8BQ XWg1IhdGg3bzHSLIQ4WlOjl6gT2n3KtbwfJa9lUFW5C6ztT169txOxO+70TbimY0Mvpr 3Tl2DYWhopkIk6y3NyTcWiae3CW9GOUClwSNz04tfwJBx3EORnvQ2EKw+6mWbDBZh51u swBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=vTWclm/i; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c41-v6si95981plj.682.2018.01.29.10.28.54; Mon, 29 Jan 2018 10:29:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=vTWclm/i; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751554AbeA2S2Q (ORCPT + 99 others); Mon, 29 Jan 2018 13:28:16 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:50514 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751249AbeA2S2O (ORCPT ); Mon, 29 Jan 2018 13:28:14 -0500 Received: by mail-wm0-f68.google.com with SMTP id f71so16186571wmf.0 for ; Mon, 29 Jan 2018 10:28:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=rOq9J45ykWGMCbuwX0mYUyPw0jXipGGuPWGcMgO7TH8=; b=vTWclm/ii2AA8WYl5AYUIO1NS2TI6yLCORDqMYjCc7oRDzxE+TvszNQYjNDojerCGG AdTYhtyVRrHGqn8+T6eckXrV5LG28ZQPhLITSAg5kcPxQ2hgkBDBlbk4KegxhzpDEk9q vFxlML5rSCXnnMZeR6BKcAHbNd2dMRspT/kiMQeupfOdHzTRVhQBhtsPVAOP++H+yF1W O4wEqMVLsuz3GhJgH9VDLyk+jUYKcQpK40K7BCELtBVbeXo9DY7E6lfHpaQVah4kgEYK ADEHOcf5lnDmoMzZEGIOqm5K46PRmq0Bksyrsy1acypLDID0T5zIZNv9zVThNmv7EMe/ DmQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=rOq9J45ykWGMCbuwX0mYUyPw0jXipGGuPWGcMgO7TH8=; b=B0N5zQoCY7HWfWdR/VSTHD3ZrpgXebDesUZ3LJ+vsKtG67FOjNBwzYQ969M79jhWNU 65BGvaFDbi9ZFx533ApqU6uJyEyRpa/5J9l9HKC0fJ5GbK73Gx8/1lVq0e6Wl7Haejj4 kLpJkCk+RR3f0fCOulNDpIyLFyLPTQJSYvD+r63g7l0WtxpIi649+EKOEh5oRnnxwvV7 VEWfa2XTnfcf71K8T7mdX92JHGqqrWg6N1dSH93umOlKbfst2uaCV5O2GuZrsNVEBIcm LY97uPQXADJ/v5IoJJON4V6K+pYyvr5T4285aqJeXtBwMqdE65pK84R7KHU8yXbow5UO NV3w== X-Gm-Message-State: AKwxytft4BKeBEwsfcdfyyMY+KLqzpa3LUkMA/3nPzDuPJ3D7t7VB9OS 4oG/oggv/CZ5AqEEkvhoMCRPPA== X-Received: by 10.80.217.202 with SMTP id x10mr42217528edj.118.1517250493441; Mon, 29 Jan 2018 10:28:13 -0800 (PST) Received: from node.shutemov.name (mm-211-80-122-178.brest.dynamic.pppoe.byfly.by. [178.122.80.211]) by smtp.gmail.com with ESMTPSA id b12sm6536568eda.81.2018.01.29.10.28.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Jan 2018 10:28:12 -0800 (PST) Received: by node.shutemov.name (Postfix, from userid 1000) id 1B19B648D520; Mon, 29 Jan 2018 21:28:11 +0300 (+03) Date: Mon, 29 Jan 2018 21:28:11 +0300 From: "Kirill A. Shutemov" To: Florian Westphal Cc: Tetsuo Handa , davem@davemloft.net, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, aarcange@redhat.com, yang.s@alibaba-inc.com, mhocko@suse.com, syzkaller-bugs@googlegroups.com, linux-kernel@vger.kernel.org, mingo@kernel.org, linux-mm@kvack.org, rientjes@google.com, akpm@linux-foundation.org, guro@fb.com, kirill.shutemov@linux.intel.com Subject: Re: [netfilter-core] kernel panic: Out of memory and no killable processes... (2) Message-ID: <20180129182811.fze4vrb5zd5cojmr@node.shutemov.name> References: <001a1144b0caee2e8c0563d9de0a@google.com> <201801290020.w0T0KK8V015938@www262.sakura.ne.jp> <20180129072357.GD5906@breakpoint.cc> <20180129082649.sysf57wlp7i7ltb2@node.shutemov.name> <20180129165722.GF5906@breakpoint.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180129165722.GF5906@breakpoint.cc> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 29, 2018 at 05:57:22PM +0100, Florian Westphal wrote: > Kirill A. Shutemov wrote: > > On Mon, Jan 29, 2018 at 08:23:57AM +0100, Florian Westphal wrote: > > > > vmalloc() once became killable by commit 5d17a73a2ebeb8d1 ("vmalloc: back > > > > off when the current task is killed") but then became unkillable by commit > > > > b8c8a338f75e052d ("Revert "vmalloc: back off when the current task is > > > > killed""). Therefore, we can't handle this problem from MM side. > > > > Please consider adding some limit from networking side. > > > > > > I don't know what "some limit" would be. I would prefer if there was > > > a way to supress OOM Killer in first place so we can just -ENOMEM user. > > > > Just supressing OOM kill is a bad idea. We still leave a way to allocate > > arbitrary large buffer in kernel. > > Isn't that what we do everywhere in network stack? > > I think we should try to allocate whatever amount of memory is needed > for the given xtables ruleset, given that is what admin requested us to do. Is it correct that "admin" in this case is root in random container? I mean, can we get access to it with CLONE_NEWUSER|CLONE_NEWNET? This can be fun. > I also would not know what limit is sane -- I've seen setups with as much > as 100k iptables rules, and that was 5 years ago. > > And even if we add a "Xk rules" limit, it might be too much for > low-memory systems, or not enough for whatever other use case there > might be. I hate what I'm saying, but I guess we need some tunable here. Not sure what exactly. -- Kirill A. Shutemov