Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1357084

Re: userns, netns, and quick physical memory consumption by unprivileged user

From Michal Hocko <mhocko@kernel.org>
Newsgroups linux.kernel
Subject Re: userns, netns, and quick physical memory consumption by unprivileged user
Date 2016-03-14 10:20 +0100
Message-ID <rcwPo-1Mw-3@gated-at.bofh.it> (permalink)
References <rbxkt-8dl-15@gated-at.bofh.it> <rbxkt-8dl-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri 11-03-16 18:06:59, Yuriy M. Kaminskiy wrote:
[...]
> And also tried with memcg:
>   t=/sys/fs/cgroup/memory/test1;mkdir $t;echo 0 >$t/tasks;
>   echo 48M >$t/memory.limit_in_bytes; su testuser [...]
> and it has not helped at all (rather opposite, it ended up with killed
> init and kernel panic; well, later is pure (un)luck; but point is, memcg
> apparently *CANNOT* curb net/ns allocations).

It seems you were using memcg v1 here. This didn't have the kernel
memory accounting enabled by default. With the v2 you get both user and
kernel (well some subset of it) accounting enabled. Whether we account
also netns related data structures sufficiently is a question. I haven't
checked.  But it would be worth trying and fix.

-- 
Michal Hocko
SUSE Labs

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: userns, netns, and quick physical memory consumption by unprivileged user yumkam@gmail.com (Yuriy M. Kaminskiy) - 2016-03-11 19:50 +0100
  Re: userns, netns, and quick physical memory consumption by  unprivileged user Michal Hocko <mhocko@kernel.org> - 2016-03-14 10:20 +0100

csiph-web