public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kirill Korotaev <dev@sw.ru>
To: Herbert Poetzl <herbert@13thfloor.at>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
	linux-kernel@vger.kernel.org, vserver@list.linux-vserver.org,
	"Serge E. Hallyn" <serue@us.ibm.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Dave Hansen <haveblue@us.ibm.com>,
	Arjan van de Ven <arjan@infradead.org>,
	Suleiman Souhlal <ssouhlal@FreeBSD.org>,
	Hubertus Franke <frankeh@watson.ibm.com>,
	Cedric Le Goater <clg@fr.ibm.com>,
	Kyle Moffett <mrmacman_g4@mac.com>, Greg <gkurz@fr.ibm.com>,
	Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>,
	Greg KH <greg@kroah.com>, Rik van Riel <riel@redhat.com>,
	Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
	Andrey Savochkin <saw@sawoct.com>,
	Kirill Korotaev <dev@openvz.org>, Andi Kleen <ak@suse.de>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Jeff Garzik <jgarzik@pobox.com>,
	Trond Myklebust <trond.myklebust@fys.uio.no>,
	Jes Sorensen <jes@sgi.com>
Subject: Re: [RFC][PATCH 04/20] pspace: Allow multiple instaces of the process id namespace
Date: Mon, 20 Feb 2006 17:11:40 +0300	[thread overview]
Message-ID: <43F9CE1C.2020603@sw.ru> (raw)
In-Reply-To: <20060220123427.GA17478@MAIL.13thfloor.at>

>>I would disagree with you. These discussions IMHO led us to the wrong
>>direction.
>>
>>Can I ask a bunch of questions which are related to other
>>virtualization issues, but which are not addressed by Eric anyhow?
>>
>>- How are you planning to make hierarchical namespaces for such 
>>  resources as IPC? Sockets? Unix sockets?
> 
> in the same way as for resources or filesystems -
> management is within the parent, usage within the
> child
So taking example with IPC, you propose the following:
- parent is able to setup limits on segments, sizes, messages etc.
- parent doesn't see child objects itself, i.e. it is unable to share 
segments with a child, send messages to child etc.
Am I correct?

Provided I got it correctly, how does this differ from the situation, 
when one container is granted rights to manage another container?
So where is hierarchy?

Moreover, granting/revoking rights is more fine grained I suppose. And 
it is more secure, since uses the model - allow only things which are 
safe, while heirarchy uses model "allow everything" to do with a child 
and leads to possible DoS.

>>Process tree is hierarchical by it's nature. But what is heirarchical 
>>IPC and other resources?
> for resources it's simple, you have to 'give away'
> a certain share to your children, which in turn will
> enable them to utilize them up to the given amount,
> or (depending on the implementation) up to the total
> amount of the parent.
Again, how does this differ from the situation when one container is 
granted to manage another one? In this case it grant some portion of 
it's resources to anyone he wishes.

Take a look at this from another angle:
You have a child container, which was granted 1/2 of your resources.
But since parent consumed 3/4 of it, child will never be able to get his 
1/2 portion. And child will be unable to find out the reason for 
resources allocation denies.

> (check out ckrm as a proof of concept, and example
> how it should not be done :)
let's be more friendly to each other :)

>>And no one ever told me why we need heierarchy at all. No any _real_
>>use cases. But it's ok.
> 
> there are many use cases here, first, the VPS within
> a VPS (of course, not the most useful one, but the
> most obvious one), then there are all kind of test,
> build and security scenarios which can benefit from
> hierarchical structures and 'delegated' administrative
> power (just think web space management)
If you are talking about management, then see my prev paragraph. Rights 
can be granted. Can you provide some other example, what do you want 
from hierarchy?

>>- Eric wants to introduce name spaces, but totally forgots how much
>>  they are tied with each other. IPC refers to netlinks, network refers
>>  to proc and sysctl, etc. It is some rare cases when you will be able
>>  to use namespaces without full OpenVZ/vserver containers. 

> well, we already visited the following:
> 
>  - filesystem namespaces (works quite fine completely
>    independant of all other)
it is tightly interconnected with unix sockets, proc, sysfs, ipc, and 
I'm sure something else :)
Herber, Eric, I'm not against namespaces. Actualy OpenVZ doesn't care 
whether we have single container or namespaces, I'm just trying to show 
you, that all of them are not that separate namespaces as you are trying 
to think of them.

>  - pid spaces (again they are quite fine without any
>    other namespace)
only if we remove all these pid uses from fown, netlinks etc.

>  - resource spaces (another one which makes perfect
>    sense to have without the others)
which one? give me an example please.

> the fact that some things like proc or netlink is tied
> to networking and ipc IMHO is just a sign that those
> interfaces need revisiting and proper isolation or
> virtualization ...
it needs virtualization, really. But being virtualized they are still 
tied to the subsystems they were.

>>- How long these namespaces live? And which management interface each
>>  of them will have?
> well, the lifetime of such a space is very likely to
> be at least the time of the users, including all
> created sockets, file-handles, ipc resources, etc ...
So if you have a socket in TCP_FIN_WAIT1 state, which can live long 
time, what do you do with it?
Full example: the process dies, but network space is still alive due to 
such a socket. You won't be able to reuse the address:port until it died.
I'm curios about how do you propose to handle similar issues in separate 
namespaces?

Also as a continuation of this example, if all the processes exited, how 
can you manage namespaces which leaked? where should you go to see these 
sockets if /proc is tightly related to pspace on the task, but there are 
no tasks?

>>So I really hate that we concentrated on discussion of VPIDs,
>>while there are more general and global questions on the whole
>>virtualization itself.
> 
> 
> well, I was not the one rolling out the 'perfect'
> vpid solution ...
ha ha :) won't start flaming with you.

>>First of all, I don't think syscalls like
>>"do_something and exec" should be introduced.
> Linux-VServer does not have any of those syscalls
> and it works quite well, so why should we need such
> syscalls?
My question is the same! Why?

> I have no problem at all to discuss a general plan
> (hey I though we were already doing so :) or move
> to some other area (like networking :)
Yup. Would be nice to switch to networking, IPC or something like this.

Kirill


  reply	other threads:[~2006-02-20 14:10 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-06 19:19 [RFC][PATCH 0/20] Multiple instances of the process id namespace Eric W. Biederman
2006-02-06 19:22 ` [RFC][PATCH 01/20] pid: Intoduce the concept of a wid (wait id) Eric W. Biederman
2006-02-06 19:27   ` [RFC][PATCH 02/20] pspace: The parent process id of pid 1 is always 0 Eric W. Biederman
2006-02-06 19:29     ` [RFC][PATCH 03/20] pid: Introduce a generic helper to test for init Eric W. Biederman
2006-02-06 19:34       ` [RFC][PATCH 04/20] pspace: Allow multiple instaces of the process id namespace Eric W. Biederman
2006-02-06 19:36         ` [RFC][PATCH 05/20] sched: Fixup the scheduler syscalls to deal with pspaces Eric W. Biederman
2006-02-06 19:39           ` [RFC][PATCH 06/20] cad_pid: Fixup the cad_pid users to assume it is in the initial process id namespace Eric W. Biederman
2006-02-06 19:41             ` [RFC][PATCH 07/20] tty: Update the tty layer to work with pspaces Eric W. Biederman
2006-02-06 19:44               ` [RFC][PATCH 08/20] vt: Update the virtual console to handle pspaces Eric W. Biederman
2006-02-06 19:46                 ` [RFC][PATCH 09/20] ptrace: Update ptrace " Eric W. Biederman
2006-02-06 19:49                   ` [RFC][PATCH 10/20] capabilities: Update the capabilities code to " Eric W. Biederman
2006-02-06 19:51                     ` [RFC][PATCH 11/20] ioprio: Update ioprio " Eric W. Biederman
2006-02-06 19:54                       ` [RFC][PATCH 12/20] fcntl: Update fcntl to work with pspaces Eric W. Biederman
2006-02-06 19:57                         ` [RFC][PATCH 13/20] kthread: Update kthread " Eric W. Biederman
2006-02-06 19:59                           ` [RFC][PATCH 14/20] mm: Update vmscan " Eric W. Biederman
2006-02-06 20:00                             ` [RFC][PATCH 15/20] posix-timers: Update posix timers " Eric W. Biederman
2006-02-06 20:02                               ` [PATCH 16/20] nfs: Don't use pids to track the lockd server process Eric W. Biederman
2006-02-06 20:03                                 ` [RFC][PATCH 17/20] usb: Fixup usb so it works with pspaces Eric W. Biederman
2006-02-06 20:05                                   ` [RFC][PATCH 18/20] posix-mqueue: Make mqueues work with pspspaces Eric W. Biederman
2006-02-06 20:07                                     ` [RFC][PATCH 19/20] pspace: Upcate the pid_max sysctl to work in a per pspace fashion Eric W. Biederman
2006-02-06 20:12                                       ` [RFC][PATCH 20/20] proc: Update /proc to support multiple pid spaces Eric W. Biederman
2006-02-10 20:40                                         ` Kirill Korotaev
2006-02-11 10:10                                           ` Eric W. Biederman
2006-02-06 20:41                                   ` [RFC][PATCH 17/20] usb: Fixup usb so it works with pspaces Serge E. Hallyn
2006-02-06 20:53                                     ` Eric W. Biederman
2006-02-07 16:41         ` [RFC][PATCH 04/20] pspace: Allow multiple instaces of the process id namespace William Lee Irwin III
2006-02-07 17:05           ` Eric W. Biederman
2006-02-10 20:30         ` Kirill Korotaev
2006-02-11  9:42           ` Eric W. Biederman
2006-02-11 10:11           ` Eric W. Biederman
2006-02-11 10:43           ` Eric W. Biederman
2006-02-13  8:53             ` Kirill Korotaev
2006-02-13 16:40             ` Dave Hansen
2006-02-11 11:03           ` Eric W. Biederman
2006-02-13  9:02             ` Kirill Korotaev
2006-02-13 21:31               ` Serge E. Hallyn
2006-02-13 23:41               ` Eric W. Biederman
2006-02-11 11:57           ` Eric W. Biederman
2006-02-13  9:22             ` Kirill Korotaev
2006-02-13 17:02               ` Serge E. Hallyn
2006-02-14  5:59                 ` Eric W. Biederman
2006-02-14  5:54               ` Eric W. Biederman
2006-02-14 18:45                 ` Dave Hansen
2006-02-15 12:07                 ` Kirill Korotaev
2006-02-15 13:31                   ` Herbert Poetzl
2006-02-16 13:44                     ` Serge E. Hallyn
2006-02-20  9:27                       ` Kirill Korotaev
2006-02-20 17:04                         ` Herbert Poetzl
2006-02-21 16:29                           ` Kirill Korotaev
2006-02-21 23:23                             ` Herbert Poetzl
2006-02-20 11:29                     ` Kirill Korotaev
2006-02-20 12:34                       ` Herbert Poetzl
2006-02-20 14:11                         ` Kirill Korotaev [this message]
2006-02-20 15:08                           ` Herbert Poetzl
2006-03-01 22:06                             ` Cedric Le Goater
2006-02-15 18:40                   ` Eric W. Biederman
2006-02-06 19:56       ` [RFC][PATCH 03/20] pid: Introduce a generic helper to test for init Dave Hansen
2006-02-06 20:22         ` Eric W. Biederman
2006-02-07 15:08       ` Geert Uytterhoeven
2006-02-07 15:17         ` Eric W. Biederman
2006-02-06 19:54   ` [RFC][PATCH 01/20] pid: Intoduce the concept of a wid (wait id) Serge E. Hallyn
2006-02-06 20:23     ` Eric W. Biederman
2006-02-07 17:39   ` Jeff Dike
2006-02-07 18:32     ` Eric W. Biederman
2006-02-10 18:51   ` Kirill Korotaev
2006-02-11  9:25     ` Eric W. Biederman
2006-02-13  8:43       ` Kirill Korotaev
2006-02-14  0:04         ` Eric W. Biederman
2006-02-06 20:40 ` [RFC][PATCH 0/20] Multiple instances of the process id namespace Hubertus Franke
2006-02-06 20:51   ` Eric W. Biederman
2006-02-06 21:07     ` Hubertus Franke
2006-02-06 21:56       ` Eric W. Biederman
2006-02-07  0:48 ` Dave Hansen
2006-02-07  5:14   ` Eric W. Biederman
2006-02-07  9:33   ` Andi Kleen
2006-02-08  4:19     ` Randy.Dunlap
2006-02-08  4:28       ` Eric W. Biederman
2006-02-08  4:51         ` Randy.Dunlap

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=43F9CE1C.2020603@sw.ru \
    --to=dev@sw.ru \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=arjan@infradead.org \
    --cc=benh@kernel.crashing.org \
    --cc=clg@fr.ibm.com \
    --cc=dev@openvz.org \
    --cc=ebiederm@xmission.com \
    --cc=frankeh@watson.ibm.com \
    --cc=gkurz@fr.ibm.com \
    --cc=greg@kroah.com \
    --cc=haveblue@us.ibm.com \
    --cc=herbert@13thfloor.at \
    --cc=jes@sgi.com \
    --cc=jgarzik@pobox.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mrmacman_g4@mac.com \
    --cc=riel@redhat.com \
    --cc=saw@sawoct.com \
    --cc=serue@us.ibm.com \
    --cc=ssouhlal@FreeBSD.org \
    --cc=torvalds@osdl.org \
    --cc=trond.myklebust@fys.uio.no \
    --cc=vserver@list.linux-vserver.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox