From: Michal Hocko <mhocko@kernel.org>
To: Dmitry Vyukov <dvyukov@google.com>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>,
Florian Westphal <fw@strlen.de>,
Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
David Miller <davem@davemloft.net>,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
netdev <netdev@vger.kernel.org>,
Andrea Arcangeli <aarcange@redhat.com>,
Yang Shi <yang.s@alibaba-inc.com>,
syzkaller-bugs@googlegroups.com,
LKML <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>, Linux-MM <linux-mm@kvack.org>,
David Rientjes <rientjes@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
guro@fb.com,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Subject: Re: [netfilter-core] kernel panic: Out of memory and no killable processes... (2)
Date: Tue, 30 Jan 2018 10:57:39 +0100 [thread overview]
Message-ID: <20180130095739.GV21609@dhcp22.suse.cz> (raw)
In-Reply-To: <CACT4Y+bFKwoxopr1dwnc7OHUoHy28ksVguqtMY6tD=aRh-7LyQ@mail.gmail.com>
On Tue 30-01-18 10:02:34, Dmitry Vyukov wrote:
> On Tue, Jan 30, 2018 at 9:28 AM, Kirill A. Shutemov
> <kirill@shutemov.name> wrote:
> > On Tue, Jan 30, 2018 at 09:11:27AM +0100, Florian Westphal wrote:
> >> Michal Hocko <mhocko@kernel.org> wrote:
> >> > On Mon 29-01-18 23:35:22, Florian Westphal wrote:
> >> > > Kirill A. Shutemov <kirill@shutemov.name> wrote:
> >> > [...]
> >> > > > I hate what I'm saying, but I guess we need some tunable here.
> >> > > > Not sure what exactly.
> >> > >
> >> > > Would memcg help?
> >> >
> >> > That really depends. I would have to check whether vmalloc path obeys
> >> > __GFP_ACCOUNT (I suspect it does except for page tables allocations but
> >> > that shouldn't be a big deal). But then the other potential problem is
> >> > the life time of the xt_table_info (or other potentially large) data
> >> > structures. Are they bound to any process life time.
> >>
> >> No.
> >
> > Well, IIUC they bound to net namespace life time, so killing all
> > proccesses in the namespace would help to get memory back. :)
>
> ... unless the namespace is mounted into file system.
>
> Let's start with NOWARN as that's what kernel generally uses for
> allocations with user-controllable size. ENOMEM is roughly as
> informative as the WARNING message in this case.
You want __GFP_NORETRY but that is not _fully_ supported by kvmalloc
right now. More specifically kvmalloc doesn't guanratee that the request
will not trigger the OOM killer (like regular __GFP_NORETRY). This is
because of internal vmalloc restrictions. If you are however OK to
simply bail out in most cases then __GFP_NORETRY should work reasonably
fine.
> I think we also need to consider setting up memory cgroup for
> syzkaller test processes (we do RLIMIT_AS, but that's weak).
Well, this is not about syzkaller, it merely pointed out a potential
DoS... And that has to be addressed somehow.
--
Michal Hocko
SUSE Labs
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2018-01-30 9:57 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-28 17:58 syzbot
2018-01-29 0:20 ` Tetsuo Handa
2018-01-29 7:23 ` [netfilter-core] " Florian Westphal
2018-01-29 8:26 ` Kirill A. Shutemov
2018-01-29 16:57 ` Florian Westphal
2018-01-29 18:24 ` Jan Engelhardt
2018-01-29 18:25 ` Michal Hocko
2018-01-29 18:28 ` Kirill A. Shutemov
2018-01-29 22:35 ` Florian Westphal
2018-01-30 7:52 ` Michal Hocko
2018-01-30 8:11 ` Florian Westphal
2018-01-30 8:28 ` Kirill A. Shutemov
2018-01-30 9:02 ` Dmitry Vyukov
2018-01-30 9:57 ` Michal Hocko [this message]
2018-01-30 14:01 ` Michal Hocko
2018-01-30 14:01 ` Florian Westphal
2018-01-30 14:39 ` Michal Hocko
2018-02-02 11:41 ` Pablo Neira Ayuso
2018-01-30 19:27 ` Andrew Morton
2018-01-31 8:19 ` Michal Hocko
2018-02-07 17:44 ` Pablo Neira Ayuso
2018-02-07 19:06 ` Andrew Morton
2018-02-07 19:15 ` Pablo Neira Ayuso
2018-01-30 9:51 ` Michal Hocko
2018-03-23 10:40 ` Tetsuo Handa
2018-03-23 11:23 ` Michal Hocko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180130095739.GV21609@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=dvyukov@google.com \
--cc=fw@strlen.de \
--cc=guro@fb.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=rientjes@google.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=yang.s@alibaba-inc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox