Re: per-process namespace?
From: Mike Waychison
Date: Wed Jun 30 2004 - 08:32:36 EST
-----BEGIN PGP SIGNED MESSAGE-----
Ram Pai wrote:
> On Tue, 2004-06-29 at 14:10, Mike Waychison wrote:
>>-----BEGIN PGP SIGNED MESSAGE-----
>>Ram Pai wrote:
>>>Is there a way for an application to
>>>1. fork its own namespace and modify it, and
>>>2. still be able to see changes to the system namespace?
>>>Al Viro's Per-process namespace implementation provides the first
>>>feature. But is there any work done to do the second part? Is it worth
>>In what sense?
>>The current model has no definition for a 'system namespace'.
> by 'system namespace' I mean the very first initial hand-crafted
The problem is that namespaces have no inherent hierarchy to them. Once
you create one, all relation to the parenting namespace is lost. You
can't even tell if you are in a different namespace from the 'system
namespace' other than by comparing /proc/self/mounts with /proc/1/mounts.
>>Accessing /proc/<pid>/mounts where <pid> is running in a different
>>namespace appears to work.
> Are you sure? I dont see it to be the case. I just verified it on 2.6.7
> /proc/<pid>/mounts is a file. However /proc/pid/root is a symbolic link
> to the root directory of the process. So the process with a cloned
> namespace wont be able to access it through its namespace.
Yes. mounts gives you the mount-table. root is a symbolic link. You
can obtain the fd across a fork or over a unix socket. Proc doesn't
give you any magic files to access namespaces directly.
Sun Microsystems, Inc.
1 (650) 352-5299 voice
1 (416) 202-8336 voice
NOTICE: The opinions expressed in this email are held by me,
and may not represent the views of Sun Microsystems, Inc.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
-----END PGP SIGNATURE-----
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/