From: Dave Hansen <haveblue@us.ibm.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: "SERGE E. HALLYN [imap]" <serue@us.ibm.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Hubertus Franke <frankeh@watson.ibm.com>,
Paul Jackson <pj@sgi.com>
Subject: Re: [RFC] [PATCH 00/13] Introduce task_pid api
Date: Wed, 07 Dec 2005 09:47:03 -0800 [thread overview]
Message-ID: <1133977623.24344.31.camel@localhost> (raw)
In-Reply-To: <m1slt5c6d8.fsf@ebiederm.dsl.xmission.com>
On Wed, 2005-12-07 at 07:46 -0700, Eric W. Biederman wrote:
> This set of patches looks like a global s/current->pid/task_pid(current)/
> Which may be an interesting exercise but I don't see how this
> helps your problem. And as has been shown by a few comments
> this process making all of these changes is subject to human error.
As with any good set of kernel changes, this is step one. Step two will
include calling something _other_ than task_pid(). But, in the
interests of small, incremental changes, this is what we decided to do
first.
> Many of the interesting places that deal with pids and where you
> want translation are not where the values are read from current->pid,
> but where the values are passed between functions. Think about
> the return value of do_fork.
Exactly. The next phase will focus on such places. Hubertus has some
stuff working that's probably not ready for LKML, but could certainly be
shared.
> There are also a lot of cases you haven't even tried to address.
> You haven't touched process groups, or sessions.
I preferred to keep the number of patches at 13, rather than 130. Those
are in the pipeline, but pids are the most important first step which
gets the most functionality.
> At the current time the patch definitely fails the no in kernel
> users test because it doesn't go as far as taking advantage
> of the abstraction it attempts to introduce. Which means
> other people can't read through the code and make sense
> of what you are trying to do or to see if there is a better way.
This isn't excatly a new feature, nor does it add any appreciable code
or complexity. I'm not sure that test even applies.
> I will also contend that walking down a path that does not cause
> compilation to fail when the subtle things like which flavor of
> pid you want to see is a problem.
I agree. I'm trying to figure out which way is best to go about this.
I have the feeling that using sparse tags like __user and __kernel is
the way to go, but we might also want to take the embedded struct
approach like atomic_t.
> Another question is how do your pid spaces nest.
They don't, and thankfully there is anybody asking for it. It adds
loads of complexity, and nobody apparently needs it.
> Currently
> it sounds like you are taking the vserver model and allowing
> everyone outside your pid space to see all of your internal
> pids. Is this really what you want?
For our application, yes. For vserver, maybe not. We'd like things
like 'top' to still work like normal, even though there are processes in
their own pidspace around.
> Who do you report as the source of your signal.
I've never dealt with signal enough from userspace to give you a good
answer. Can you explain the mechanics of how you would go about doing
this?
> What pid does waitpid return when the parent of your pidspace exits?
> What pid does waitpid return when both processes are in the same pidspace?
The pids coming out of system calls are always in the context of the
process doing the call.
> How does /proc handle multiple pid spaces?
I'm working on it :)
Right now, there's basically a hack in d_hash() to get new dentries for
each pidspace. It is horrible and causes a 50x decrease in performance
on some benchmarks like dbench.
I think the long-term solution is to make multiple, independent proc
mounts, and give each pidspace a separate filesystem view. That
requires some of the nifty new bind mount functionality and a chroot
when a new pidspace is created, but I think it works.
> While something allowing multiple pidspaces may be mergeable,
> unnecessary and incomplete changes rarely are. This is a fundamental
> change to the unix API so it will take a lot of scrutiny to get
> merged.
Lots of good questions. I think we need to take some of our initial,
private discussions and get them out on an open list somewhere. Any
suggestions? I hate creating new sourceforge projects :)
-- Dave
next prev parent reply other threads:[~2005-12-07 17:47 UTC|newest]
Thread overview: 86+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-14 21:23 [RFC] [PATCH 00/13] Introduce task_pid api Serge E. Hallyn
2005-11-14 21:23 ` [RFC] [PATCH 01/13] Change pid accesses: drivers Serge E. Hallyn
2005-11-14 21:23 ` [RFC] [PATCH 02/13] Change pid accesses: most archs Serge E. Hallyn
2005-11-14 21:23 ` [RFC] [PATCH 03/13] Change pid accesses: filesystems Serge E. Hallyn
2005-11-14 21:23 ` [RFC] [PATCH 04/13] Change pid accesses: include/ Serge E. Hallyn
2005-11-14 21:23 ` [RFC] [PATCH 05/13] Change pid accesses: ipc Serge E. Hallyn
2005-11-14 21:23 ` [RFC] [PATCH 06/13] Change pid accesses: kernel/ Serge E. Hallyn
2005-11-14 21:23 ` [RFC] [PATCH 07/13] Change pid accesses: lib/ Serge E. Hallyn
2005-11-14 21:23 ` [RFC] [PATCH 08/13] Change pid accesses: mm/ Serge E. Hallyn
2005-11-14 21:23 ` [RFC] [PATCH 09/13] Change pid accesses: net/ Serge E. Hallyn
2005-11-14 21:23 ` [RFC] [PATCH 10/13] Change pid accesses: security/ Serge E. Hallyn
2005-11-14 21:23 ` [RFC] [PATCH 11/13] Change pid accesses: sound/ Serge E. Hallyn
2005-11-14 21:23 ` [RFC] [PATCH 12/13] Change pid accesses: ia64 and mips Serge E. Hallyn
2005-11-15 23:08 ` Keith Owens
2005-11-16 11:58 ` Serge E. Hallyn
2005-11-16 13:53 ` Serge E. Hallyn
2005-11-14 21:23 ` [RFC] [PATCH 13/13] Define new task_pid api Serge E. Hallyn
2005-11-14 23:36 ` [RFC] [PATCH 00/13] Introduce " Paul Jackson
2005-11-15 1:01 ` Serge E. Hallyn
2005-11-15 1:35 ` Paul Jackson
2005-11-15 1:51 ` Paul Jackson
2005-11-15 2:29 ` Serge E. Hallyn
2005-11-15 3:37 ` Paul Jackson
2005-11-15 5:15 ` Serge E. Hallyn
2005-11-15 6:35 ` Paul Jackson
2005-11-15 8:11 ` Serge E. Hallyn
2005-11-15 9:06 ` Paul Jackson
2005-11-15 10:07 ` Dave Hansen
2005-11-15 18:10 ` Paul Jackson
2005-11-15 11:59 ` Robin Holt
2005-11-15 13:32 ` Serge E. Hallyn
2005-11-15 14:37 ` Hubertus Franke
2005-11-15 18:39 ` Paul Jackson
2005-11-15 18:54 ` Hubertus Franke
2005-11-15 19:00 ` Serge E. Hallyn
2005-11-15 19:17 ` Hubertus Franke
2005-11-15 22:11 ` Paul Jackson
2005-11-15 23:15 ` Cedric Le Goater
2005-11-15 23:28 ` Paul Jackson
2005-11-15 16:47 ` Greg KH
2005-11-15 17:08 ` Serge E. Hallyn
2005-11-15 17:33 ` Dave Hansen
2005-11-15 5:51 ` Serge E. Hallyn
2005-11-13 15:22 ` Pavel Machek
2005-11-16 19:36 ` Kyle Moffett
2005-11-16 20:36 ` Pavel Machek
2005-11-16 20:48 ` Dave Hansen
2005-11-19 23:30 ` Pavel Machek
2005-11-20 22:38 ` Serge E. Hallyn
2005-12-07 14:53 ` Eric W. Biederman
2005-11-20 23:29 ` Nix
2005-11-16 21:07 ` Paul Jackson
2005-11-16 20:24 ` Dave Hansen
2005-11-15 13:34 ` Serge E. Hallyn
2005-11-15 11:17 ` Robin Holt
2005-11-15 12:01 ` Dave Hansen
2005-11-15 19:21 ` Ray Bryant
2005-11-15 19:41 ` Serge E. Hallyn
2005-11-15 20:30 ` Ray Bryant
2005-11-15 21:05 ` Serge E. Hallyn
2005-11-15 22:43 ` Paul Jackson
2005-11-15 22:55 ` Cedric Le Goater
2005-11-16 1:12 ` Paul Jackson
2005-12-07 14:46 ` Eric W. Biederman
2005-12-07 17:47 ` Dave Hansen [this message]
2005-12-07 17:55 ` Arjan van de Ven
2005-12-07 18:09 ` Dave Hansen
2005-12-07 19:00 ` Arjan van de Ven
2005-12-07 19:42 ` Eric W. Biederman
2005-12-07 22:13 ` Dave Hansen
2005-12-07 22:20 ` Arjan van de Ven
2005-12-12 10:55 ` Dave Airlie
2005-12-19 14:04 ` Eric W. Biederman
2005-12-07 19:19 ` Eric W. Biederman
2005-12-07 21:40 ` Dave Hansen
2005-12-07 22:17 ` Eric W. Biederman
2004-12-14 15:23 ` Pavel Machek
2005-12-14 13:40 ` Arjan van de Ven
2005-12-14 16:29 ` Serge E. Hallyn
2005-12-07 22:31 ` Dave Hansen
2005-12-07 22:51 ` Eric W. Biederman
2005-12-08 5:42 ` Jeff Dike
2005-12-08 10:09 ` Andi Kleen
2005-12-07 22:17 ` Cedric Le Goater
-- strict thread matches above, loose matches on Subject: below --
2005-11-16 2:24 Hua Zhong (hzhong)
2005-11-16 17:52 ` Bernard Blackham
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=1133977623.24344.31.camel@localhost \
--to=haveblue@us.ibm.com \
--cc=ebiederm@xmission.com \
--cc=frankeh@watson.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pj@sgi.com \
--cc=serue@us.ibm.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