Received: by 10.223.176.5 with SMTP id f5csp3116428wra; Mon, 29 Jan 2018 09:01:48 -0800 (PST) X-Google-Smtp-Source: AH8x224uGsRWziCf3SNqgWRPwKVnfkV6XIBwYhiR3paue3aGgDnkjyhfMIjH17qFw6jsoWVvdzpH X-Received: by 10.101.74.129 with SMTP id b1mr22424851pgu.317.1517245307941; Mon, 29 Jan 2018 09:01:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517245307; cv=none; d=google.com; s=arc-20160816; b=KJRJPtjw5q6/t7UntNd8Ylv6znvnQta0zZduRk90x6NWHjH3hwejwxTwb6BNoQUy6X xJiUw0T64rjK9n/QHrnUJijTPg6eqCIzmzoGI9uWhv+MJPf58TFf8WYBD2uoz/4dd8kz BJq299ypgdRsf6rCAxl1GJVwMp6JXtkBKp/3u8b9QoJNu/mXOQM8l++zj9Pm5Gxma6gB Xv7xZ6+PiTlfbQzEGc8rvcaHGYjbTxPPc0bctbAYadE0J0WRixzpuBphzCIo9TOZMiqU sqfdzETBOJ1YIZiDdZV2aSuNyEawAH/Okj2BkL/RI3W6Aj8/kd3AvUlNDEWvpJmubcep tnTQ== 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:arc-authentication-results; bh=hlWCGtqa9tLe7wnQLMVgtsiNpVkTdcQLhdlAqrV21GY=; b=PL/LnNxKfLxw00ef69YBCQ7q5V/9fow3/Gc+yKyLM+ZlL2QlxqXR8NSpqOSDwka7uH 7IQPLnptAPRhHsQ4RB21Gjlo9fNtT3c6agsr03JQtLziLVoPtmIGaz441Xk8pIFufqCC kSwckPTaL92xUZ3SuLnmYeQKN1TxsHJxTPgu5qFsM1PkdamdWXaa3oU4gxT8j+Md1NSP hNybk3/01Hdg4RuUM8ruj4vbUtAztYq3iuTLBXMKR/q8MlVsZQNCFVBY8ZMFvyiGtusd wum8m2TKFHvSYwp5NLRCu1lT9zljMTilSoa5BKvU0LGfbPrFMYW9+oOjd5IiGE62g4Fy TDQw== ARC-Authentication-Results: i=1; mx.google.com; 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 o16si855375pgd.125.2018.01.29.09.01.32; Mon, 29 Jan 2018 09:01:47 -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; 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 S1751464AbeA2RAe (ORCPT + 99 others); Mon, 29 Jan 2018 12:00:34 -0500 Received: from Chamillionaire.breakpoint.cc ([146.0.238.67]:38006 "EHLO Chamillionaire.breakpoint.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750959AbeA2RAc (ORCPT ); Mon, 29 Jan 2018 12:00:32 -0500 Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.84_2) (envelope-from ) id 1egCkE-0000W9-Cx; Mon, 29 Jan 2018 17:57:22 +0100 Date: Mon, 29 Jan 2018 17:57:22 +0100 From: Florian Westphal To: "Kirill A. Shutemov" Cc: Florian Westphal , 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: <20180129165722.GF5906@breakpoint.cc> References: <001a1144b0caee2e8c0563d9de0a@google.com> <201801290020.w0T0KK8V015938@www262.sakura.ne.jp> <20180129072357.GD5906@breakpoint.cc> <20180129082649.sysf57wlp7i7ltb2@node.shutemov.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180129082649.sysf57wlp7i7ltb2@node.shutemov.name> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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.