[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180129182811.fze4vrb5zd5cojmr@node.shutemov.name>
Date: Mon, 29 Jan 2018 21:28:11 +0300
From: "Kirill A. Shutemov" <kirill@...temov.name>
To: Florian Westphal <fw@...len.de>
Cc: Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
davem@...emloft.net, netfilter-devel@...r.kernel.org,
coreteam@...filter.org, netdev@...r.kernel.org,
aarcange@...hat.com, yang.s@...baba-inc.com, mhocko@...e.com,
syzkaller-bugs@...glegroups.com, linux-kernel@...r.kernel.org,
mingo@...nel.org, linux-mm@...ck.org, rientjes@...gle.com,
akpm@...ux-foundation.org, guro@...com,
kirill.shutemov@...ux.intel.com
Subject: Re: [netfilter-core] kernel panic: Out of memory and no killable
processes... (2)
On Mon, Jan 29, 2018 at 05:57:22PM +0100, Florian Westphal wrote:
> Kirill A. Shutemov <kirill@...temov.name> 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
Powered by blists - more mailing lists