From: Kyle Moffett <mrmacman_g4@mac.com>
To: Albert Cahalan <acahalan@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
akpm@osdl.org, pj@sgi.com, linux-kernel@vger.kernel.org
Subject: Re: [RFC] ps command race fix
Date: Tue, 15 Aug 2006 22:20:16 -0400 [thread overview]
Message-ID: <06D0393F-8EB3-4A9C-96B2-829E935100C3@mac.com> (raw)
In-Reply-To: <787b0d920608131308se2376f3ua2a775533d99f58e@mail.gmail.com>
On Aug 13, 2006, at 16:08:20, Albert Cahalan wrote:
> In general, process namespaces are useful for:
>
> 1. silly marketing (see Sun and FreeBSD)
>
> 2. the very obscure case of "root" account providers who are too
> clueless to use SE Linux or Xen
3. Kernel developers who need to test their kernel changes on
multiple distributions can install those distributions unmodified in
containers (requires process namespaces)
4. Server admins who want an absolutely unbreakable way (well, as
close as one can get) to isolate virtual servers from each other and
from the hardware. This also doesn't have the overhead of running 2
stacked memory allocators (Xen allocator and kernel allocator) as
well as multiple copies of each kernel.
> I don't think either case justifies the complexity. I am not
> looking forward to the demands that I support this mess in procps.
> I suspect I am not alone; soon people will be asking for support in
> pstools, gdb, fuser, killall... until every app which interacts
> with other processes will need hacks.
IMHO support for PID namespaces should/would/will be done without
changing the existing /proc entries or underlying layout. For
example, one compatible solution would be to add a new "pidspace="
mount option to procfs which specifies which pidspace will be
represented. Another method (also compatible with the pidspace=
mount option and enabling hierarchical pid spaces would be to
represent child pidspaces in their parent pidspace as a single
process, such that sending signals to said process will send signals
to the "init" process in the child pidspace as though they came from
the kernel (IE: They aren't blocked-by-default), then add a
"pidspace" subdirectory that contains all of the proc entries for
processes in that space. Example:
# mount -t proc proc /proc
# create_new_pidspace /bin/sleep 100000 &
[1] 1234
# ls /proc
...
...
1234
...
...
# ls /proc/1234/pidspace
1
There are obviously still problems with this scenario (what numbering
schemes do pidspaces use and how is the pidspace= mount option
interpreted?), but it's an example of a few ways to preserve ABI
compatibility with existing userspace. I think the idea behind all
of this is to make it possible to run 6 different unmodified distros
on a single system (but you need a few extra tools in the parent
"boot" namespace).
> If the cost were only an #ifdef in the kernel, there would be no
> problem. Unfortunately, this is quite a hack in the kernel and it
> has far-reaching consequenses in user space.
I believe it's been stated that rule #1 for this stuff is preserving
backwards compatibility and kernel<=>userspace ABI with every
change. We might add new APIs (which then have to remain the same in
future versions, barring outright showstopper bugs), but existing
APIs will still work correctly.
Cheers,
Kyle Moffett
next prev parent reply other threads:[~2006-08-16 2:20 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-14 11:39 KAMEZAWA Hiroyuki
2006-07-25 1:20 ` Andrew Morton
2006-07-25 1:48 ` Paul Jackson
2006-07-25 2:00 ` Andrew Morton
2006-07-25 2:08 ` KAMEZAWA Hiroyuki
2006-07-25 2:33 ` Andrew Morton
2006-07-25 2:50 ` KAMEZAWA Hiroyuki
2006-07-25 3:16 ` KAMEZAWA Hiroyuki
2006-08-13 16:29 ` Eric W. Biederman
2006-08-13 17:34 ` Andrew Morton
2006-08-13 19:00 ` Eric W. Biederman
2006-08-13 19:12 ` Paul Jackson
2006-08-16 1:23 ` KAMEZAWA Hiroyuki
2006-08-17 4:59 ` Eric W. Biederman
2006-08-17 6:32 ` KAMEZAWA Hiroyuki
2006-08-17 13:39 ` Eric W. Biederman
2006-08-17 18:16 ` Jean Delvare
2006-08-18 0:21 ` KAMEZAWA Hiroyuki
2006-08-18 3:53 ` Eric W. Biederman
2006-08-13 20:08 ` Albert Cahalan
2006-08-16 2:20 ` Kyle Moffett [this message]
2006-07-25 7:22 ` Paul Jackson
2006-07-25 1:53 ` KAMEZAWA Hiroyuki
2006-07-25 2:06 ` Andrew Morton
2006-07-25 2:34 ` KAMEZAWA Hiroyuki
2006-07-25 6:09 ` Eric W. Biederman
2006-07-25 6:47 Albert Cahalan
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=06D0393F-8EB3-4A9C-96B2-829E935100C3@mac.com \
--to=mrmacman_g4@mac.com \
--cc=acahalan@gmail.com \
--cc=akpm@osdl.org \
--cc=ebiederm@xmission.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pj@sgi.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
all inboxes | Powered by JetHome®