All of lore.kernel.org
 help / color / mirror / Atom feed
From: ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org (Eric W. Biederman)
To: Glauber Costa <glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
Cc: Kir Kolyshkin <kir-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>,
	Serge Hallyn
	<serge.hallyn-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>,
	Frederic Weisbecker
	<fweisbec-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Daniel Lezcano
	<daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>,
	Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Rohit Seth <rohitseth-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	Greg Thelen <gthelen-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	Balbir Singh
	<bsingharora-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Dhaval Giani
	<dhaval.giani-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	KAMEZAWA Hiroyuki
	<kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>,
	Paul Turner <pjt-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	Tim Hockin <thockin-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	Suleiman Souhlal
	<ssouhlal-HZy0K5TPuP5AfugRpC6u6w@public.gmane.org>,
	Dave Kleikamp
	<dave.kleikamp-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
	cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devel-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org,
	James Bottomley
	<jbottomley-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>,
	Pavel Emelyanov <xemul-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>,
	Maxim Patlasov
	<MPatlasov-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
Subject: Re: containers and cgroups mini-summit @ Linux Plumbers
Date: Thu, 26 Jul 2012 03:57:09 -0700	[thread overview]
Message-ID: <877gtq4woq.fsf@xmission.com> (raw)
In-Reply-To: <50110AE6.2080701-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org> (Glauber Costa's message of "Thu, 26 Jul 2012 13:16:22 +0400")

Glauber Costa <glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org> writes:

> On 07/26/2012 07:57 AM, Eric W. Biederman wrote:
>> Glauber Costa <glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org> writes:
>> 
>>> I just came up with the following preliminary list of sessions:
>>>
>>> http://wiki.linuxplumbersconf.org/2012:containers
>>>
>>> Since people mostly said what they wanted to talk about, but without
>>> extensive descriptions, I took the liberty of coming up with a small
>>> text for each in the blueprints. If you believe this is inaccurate, or
>>> would like to see it extended (although I personally don't see the point
>>> about going into very formal and deep details here), just let me know
>>> and I will edit it.
>>>
>>> This is all still subject to change.
>> 
>> Something that just came up recently and worth looking at if it hasn't
>> already be resolved.
>> 
>> The network namespace, the user namespace, and the memory control group
>> are not meshing well.
>> 
>> In particular we need some additional checks for an unprivileged user
>> who can set tcp_mem.  If you are the creator of a network namespace you
>> should at least be able to set the values down.  I don't know at all
>> about increasing the amount of memory consumed by the tcp stack.
>
> This is between the user namespace and net namespace only, right ?
>
> To be quite honest, I haven't looked thoroughly at UNS after your last
> work. How do you yourself believe this should be?

I looked a little deeper and there are a few more places in the
networking stack besides tcp_mem, that are setting memory limits
that unprivileged users should not be able to touch.

What I would expect one of.
- A global limit accross network namespaces that the per netns limit
  can not allow you to escape.
- Something like rlimits where the limit can be reduced but not
  increased.
- capability checks that prevent anyone except the global root from
  changing the value (of course this has the problem that creating
  a fresh network namespace allows memory limit escaping).

The driving factor is that in the 3.7 time frame it will be possible to
create user namespaces and network namespaces as unprivileged users.  So
we have to be careful that we setup the limits so that the global root
on the host can set limits that are not trivially overridden.

>> The non-nesting nature of memory control groups with respect to the
>> network stack also seems very bizarre.
>
> Correction:
>
> The non-nesting nature of memory control groups is very bizarre. No need
> for modifiers. It does support nesting, though. Just that it is
> selectable, and not the default. But there is work in progress to change
> that.

Which leads to another bit of fun.  It is possible to create containers
in containers in containers, which has interesting implications for
control groups in general, and especially interesting implications for
control groups that don't nest.

Eric

  parent reply	other threads:[~2012-07-26 10:57 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-11 21:41 containers and cgroups mini-summit @ Linux Plumbers Kir Kolyshkin
     [not found] ` <4FFDF321.4030103-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2012-07-12  3:47   ` Serge Hallyn
2012-07-13 15:09     ` Kir Kolyshkin
     [not found]       ` <50003A13.4000201-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2012-07-16 20:29         ` Serge Hallyn
2012-07-12 13:26   ` Frederic Weisbecker
2012-07-16 21:08   ` Dhaval Giani
2012-07-17  6:59   ` Balbir Singh
     [not found]     ` <CAKTCnzmhWZa=_+EE9rA63NuJf3kQ-bXNYStXmZXt8r2w-N02ag-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-07-18 10:36       ` James Bottomley
2012-07-17  7:26   ` Daniel Lezcano
2012-07-17  7:26     ` Daniel Lezcano
     [not found]     ` <50051390.7010109-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2012-07-25  8:48       ` Glauber Costa
2012-07-17 20:06   ` Tejun Heo
     [not found]     ` <20120717200606.GD24336-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-07-17 20:15       ` Paul Turner
2012-07-20 16:30   ` Johannes Weiner
2012-07-21  1:59   ` Kamezawa Hiroyuki
2012-07-25  8:55   ` Glauber Costa
     [not found]     ` <500FB473.3090606-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2012-07-25 10:00       ` Eric W. Biederman
     [not found]         ` <871uk0b1p4.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2012-07-25 10:00           ` Glauber Costa
     [not found]             ` <500FC3C9.4010005-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2012-07-25 10:02               ` [Devel] " Glauber Costa
     [not found]                 ` <500FC44C.1030606-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2012-07-25 11:16                   ` Eric W. Biederman
2012-07-26 11:16               ` Andrea Righi
2012-07-25 10:53   ` Glauber Costa
     [not found]     ` <500FD022.6000608-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2012-07-25 11:51       ` Serge Hallyn
2012-07-25 11:52         ` Glauber Costa
     [not found]           ` <500FDE1B.4090907-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2012-07-25 12:15             ` Serge Hallyn
2012-07-26  3:57       ` Eric W. Biederman
     [not found]         ` <877gtr6uo5.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2012-07-26  9:16           ` Glauber Costa
     [not found]             ` <50110AE6.2080701-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2012-07-26  9:26               ` [Devel] " Glauber Costa
     [not found]                 ` <50110D53.2090407-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2012-07-26 10:42                   ` Eric W. Biederman
     [not found]                     ` <874nou6bx1.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2012-07-26 18:15                       ` Tejun Heo
     [not found]                         ` <20120726181528.GA25660-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-07-26 19:19                           ` Eric W. Biederman
     [not found]                             ` <87a9ymwcsv.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2012-07-26 19:44                               ` Tejun Heo
2012-07-26 18:16                       ` Serge Hallyn
2012-07-26 19:38                         ` Eric W. Biederman
2012-07-26 10:57               ` Eric W. Biederman [this message]
2012-07-26 18:09           ` Serge Hallyn
2012-08-02  8:37   ` Daniel Wagner
     [not found]     ` <501A3C48.6060607-kQCPcA+X3s7YtjvyW6yDsg@public.gmane.org>
2012-08-02  8:37       ` Glauber Costa
     [not found]         ` <501A3C4D.1020101-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2012-08-02  9:42           ` Daniel Wagner

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=877gtq4woq.fsf@xmission.com \
    --to=ebiederm-as9lmozglivwk0htik3j/w@public.gmane.org \
    --cc=MPatlasov-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org \
    --cc=bsingharora-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=dave.kleikamp-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=devel-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org \
    --cc=dhaval.giani-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=fweisbec-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org \
    --cc=gthelen-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org \
    --cc=jbottomley-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org \
    --cc=kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org \
    --cc=kir-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org \
    --cc=pjt-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=rohitseth-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=serge.hallyn-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org \
    --cc=ssouhlal-HZy0K5TPuP5AfugRpC6u6w@public.gmane.org \
    --cc=thockin-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=xemul-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.