From: "Albert Cahalan" <acahalan@gmail.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: "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: Sun, 13 Aug 2006 16:08:20 -0400 [thread overview]
Message-ID: <787b0d920608131308se2376f3ua2a775533d99f58e@mail.gmail.com> (raw)
In-Reply-To: <m1mza8wqdc.fsf@ebiederm.dsl.xmission.com>
On 8/13/06, Eric W. Biederman <ebiederm@xmission.com> wrote:
> KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> writes:
> > /*
> > * A maximum of 4 million PIDs should be enough for a while.
> > * [NOTE: PID/TIDs are limited to 2^29 ~= 500+ million, see futex.h.]
> > */
> > #define PID_MAX_LIMIT (CONFIG_BASE_SMALL ? PAGE_SIZE * 8 : \
> > (sizeof(long) > 4 ? 4 * 1024 * 1024 : PID_MAX_DEFAULT))
> >
> > ...we have to manage 4 millions tids.
BTW, it looks like powerpc runs out of MMU contexts if
there are more than 32768 processes. Badness happens.
> The basic posix/susv guarantee is that in readdir if a directory
> entry is neither deleted nor added between opendir and closedir of the
> directory you should see the directory entry. I could not
> quite tell what the rules were with regards seekdir.
Never minding the bare minimum, I think the user-visible
offset should be the PID plus some constant for all PIDs.
(sadly, the constant can't be 0 because of ".." and init)
> There are also other reasons to changing to a pid base traversal
> of /proc. It allows us to display information on process groups,
> and sessions whose original leader has died.
Huh?
> If namespaces get
> assigned a pid traversal by pid looks like a good way to display
> namespaces that are not used by any process but are still alive.
> Albert does that sound like a sane extension?
You mean /proc/42 could be non-process data?
That will surely break lots and lots of things.
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
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.
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.
next prev parent reply other threads:[~2006-08-13 20:08 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 [this message]
2006-08-16 2:20 ` Kyle Moffett
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=787b0d920608131308se2376f3ua2a775533d99f58e@mail.gmail.com \
--to=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®