[Devel] Re: [RFC][PATCH 0/8][v2]: Enable multiple mounts of devpts

2008-09-03 Thread Cedric Le Goater
>>> When a task does mq_open(name, flag), then name is in the mqueuefs >>> found in current->nsproxy->mnt_namespace->mqns. >>> >>> But if a task does >>> >>> clone(CLONE_NEWMNT); >>> mount --move /dev/mqueue /oldmqueue >>> mount -o newinstance -t mqueue none /dev/mqueue >>> >>> then tha

[Devel] Re: [RFC][PATCH 0/8][v2]: Enable multiple mounts of devpts

2008-09-03 Thread Serge E. Hallyn
Quoting Cedric Le Goater ([EMAIL PROTECTED]): > Serge E. Hallyn wrote: > > Quoting Eric W. Biederman ([EMAIL PROTECTED]): > >> "Serge E. Hallyn" <[EMAIL PROTECTED]> writes: > >> > (3.2) mnt namespace maybe ? > >>> I think the last one is the way to go. > >>> > >>> mnt_namespace points to m

[Devel] Re: [RFC][PATCH 0/8][v2]: Enable multiple mounts of devpts

2008-09-03 Thread Serge E. Hallyn
Quoting Cedric Le Goater ([EMAIL PROTECTED]): > >> > >> (3) move mq_ns out of nsproxy. where shall I put it then ? > >> > >> (3.1) task_struct ? > >> (3.2) mnt namespace maybe ? > > > > I think the last one is the way to go. > > > > mnt_namespace points to mq_ns. > > > > At clone(CLON

[Devel] Re: [RFC][PATCH 0/8][v2]: Enable multiple mounts of devpts

2008-09-03 Thread Serge E. Hallyn
Quoting Cedric Le Goater ([EMAIL PROTECTED]): > Eric W. Biederman wrote: > > "Serge E. Hallyn" <[EMAIL PROTECTED]> writes: > > > >>> (3.2) mnt namespace maybe ? > >> I think the last one is the way to go. > >> > >> mnt_namespace points to mq_ns. > >> > >> At clone(CLONE_NEWMNT), the new mnt na

[Devel] Re: [RFC][PATCH 0/8][v2]: Enable multiple mounts of devpts

2008-09-03 Thread Eric W. Biederman
Cedric Le Goater <[EMAIL PROTECTED]> writes: > ok. complete isolation would require 2 steps. I guess this is > acceptable because mq uses a fs > > allowing the host to see the child's /dev/mqueue is also 'a nice > to have' feature. unfortunately, we can't do that for all namespaces, > for sysvipc

[Devel] Re: [RFC][PATCH 0/8][v2]: Enable multiple mounts of devpts

2008-09-03 Thread Cedric Le Goater
Eric W. Biederman wrote: > Cedric Le Goater <[EMAIL PROTECTED]> writes: >> Hello Eric, >> >> I've spent some time on the code and I'm facing some issues with the nsproxy >> API if we are to keep the mqueue namespace in nsproxy: >> >> int copy_namespaces(unsigned long flags, struct task_struc

[Devel] Re: [RFC][PATCH 0/8][v2]: Enable multiple mounts of devpts

2008-09-03 Thread Cedric Le Goater
Serge E. Hallyn wrote: > Quoting Eric W. Biederman ([EMAIL PROTECTED]): >> "Serge E. Hallyn" <[EMAIL PROTECTED]> writes: >> (3.2) mnt namespace maybe ? >>> I think the last one is the way to go. >>> >>> mnt_namespace points to mq_ns. >>> >>> At clone(CLONE_NEWMNT), the new mnt namespace re

[Devel] Re: [RFC][PATCH 0/8][v2]: Enable multiple mounts of devpts

2008-09-03 Thread Cedric Le Goater
Eric W. Biederman wrote: > "Serge E. Hallyn" <[EMAIL PROTECTED]> writes: > >>> (3.2) mnt namespace maybe ? >> I think the last one is the way to go. >> >> mnt_namespace points to mq_ns. >> >> At clone(CLONE_NEWMNT), the new mnt namespace receives a copy of the >> parent's mq_ns. >> >> If a tas

[Devel] Re: [RFC][PATCH 0/8][v2]: Enable multiple mounts of devpts

2008-09-03 Thread Cedric Le Goater
>> >> (3) move mq_ns out of nsproxy. where shall I put it then ? >> >> (3.1) task_struct ? >> (3.2) mnt namespace maybe ? > > I think the last one is the way to go. > > mnt_namespace points to mq_ns. > > At clone(CLONE_NEWMNT), the new mnt namespace receives a copy of the > parent's m

[Devel] Re: [RFC][PATCH 0/8][v2]: Enable multiple mounts of devpts

2008-09-02 Thread Serge E. Hallyn
Quoting Eric W. Biederman ([EMAIL PROTECTED]): > "Serge E. Hallyn" <[EMAIL PROTECTED]> writes: > > >> (3.2) mnt namespace maybe ? > > > > I think the last one is the way to go. > > > > mnt_namespace points to mq_ns. > > > > At clone(CLONE_NEWMNT), the new mnt namespace receives a copy of the >

[Devel] Re: [RFC][PATCH 0/8][v2]: Enable multiple mounts of devpts

2008-09-02 Thread Eric W. Biederman
"Serge E. Hallyn" <[EMAIL PROTECTED]> writes: >> (3.2) mnt namespace maybe ? > > I think the last one is the way to go. > > mnt_namespace points to mq_ns. > > At clone(CLONE_NEWMNT), the new mnt namespace receives a copy of the > parent's mq_ns. > > If a task does > mount -o newinstance

[Devel] Re: [RFC][PATCH 0/8][v2]: Enable multiple mounts of devpts

2008-09-02 Thread Eric W. Biederman
Cedric Le Goater <[EMAIL PROTECTED]> writes: > Hello Eric, > > I've spent some time on the code and I'm facing some issues with the nsproxy > API if we are to keep the mqueue namespace in nsproxy: > > int copy_namespaces(unsigned long flags, struct task_struct *tsk); > void exit_task_

[Devel] Re: [RFC][PATCH 0/8][v2]: Enable multiple mounts of devpts

2008-09-01 Thread Serge E. Hallyn
Quoting Cedric Le Goater ([EMAIL PROTECTED]): > Cedric Le Goater wrote: > > Eric W. Biederman wrote: > >> Cedric Le Goater <[EMAIL PROTECTED]> writes: > >> > >>> H. Peter Anvin wrote: > Cedric Le Goater wrote: > >> I suggest "newinstance", but "newns" works, too. > > Could we also use

[Devel] Re: [RFC][PATCH 0/8][v2]: Enable multiple mounts of devpts

2008-08-29 Thread Cedric Le Goater
Cedric Le Goater wrote: > Eric W. Biederman wrote: >> Cedric Le Goater <[EMAIL PROTECTED]> writes: >> >>> H. Peter Anvin wrote: Cedric Le Goater wrote: >> I suggest "newinstance", but "newns" works, too. > Could we also use this mount option to 'unshare' a new posix message > queue

[Devel] Re: [RFC][PATCH 0/8][v2]: Enable multiple mounts of devpts

2008-08-21 Thread Cedric Le Goater
Eric W. Biederman wrote: > Cedric Le Goater <[EMAIL PROTECTED]> writes: > >> H. Peter Anvin wrote: >>> Cedric Le Goater wrote: > I suggest "newinstance", but "newns" works, too. Could we also use this mount option to 'unshare' a new posix message queue namespace ? >>> Sorry, I fail t

[Devel] Re: [RFC][PATCH 0/8][v2]: Enable multiple mounts of devpts

2008-08-21 Thread Eric W. Biederman
Cedric Le Goater <[EMAIL PROTECTED]> writes: > H. Peter Anvin wrote: >> Cedric Le Goater wrote: > I suggest "newinstance", but "newns" works, too. >>> >>> Could we also use this mount option to 'unshare' a new posix message >>> queue namespace ? >> >> Sorry, I fail to see the connection

[Devel] Re: [RFC][PATCH 0/8][v2]: Enable multiple mounts of devpts

2008-08-21 Thread Serge E. Hallyn
Quoting Cedric Le Goater ([EMAIL PROTECTED]): > H. Peter Anvin wrote: > > Cedric Le Goater wrote: > > >>> I suggest "newinstance", but "newns" works, too. > >> > >> Could we also use this mount option to 'unshare' a new posix message > >> queue namespace ? > > > > Sorry, I fail to see the con

[Devel] Re: [RFC][PATCH 0/8][v2]: Enable multiple mounts of devpts

2008-08-21 Thread Cedric Le Goater
H. Peter Anvin wrote: > Cedric Le Goater wrote: >>> I suggest "newinstance", but "newns" works, too. >> >> Could we also use this mount option to 'unshare' a new posix message >> queue namespace ? > > Sorry, I fail to see the connection with devpts here? Are you > suggesting using the same o

[Devel] Re: [RFC][PATCH 0/8][v2]: Enable multiple mounts of devpts

2008-08-21 Thread H. Peter Anvin
Cedric Le Goater wrote: > H. Peter Anvin wrote: >> Cedric Le Goater wrote: I suggest "newinstance", but "newns" works, too. >>> Could we also use this mount option to 'unshare' a new posix message >>> queue namespace ? >> Sorry, I fail to see the connection with devpts here? Are you >> sugges

[Devel] Re: [RFC][PATCH 0/8][v2]: Enable multiple mounts of devpts

2008-08-21 Thread H. Peter Anvin
Cedric Le Goater wrote: >>> >> I suggest "newinstance", but "newns" works, too. > > Could we also use this mount option to 'unshare' a new posix message queue > namespace ? > Sorry, I fail to see the connection with devpts here? Are you suggesting using the same option for another filesystem

[Devel] Re: [RFC][PATCH 0/8][v2]: Enable multiple mounts of devpts

2008-08-21 Thread Cedric Le Goater
H. Peter Anvin wrote: > [EMAIL PROTECTED] wrote: >>> I don't like the name "newmnt" for the option; it is not just another >>> mount, but a whole new instance of the pty space. >> I agree. Its mostly a place-holder for now. How about newns or newptsns ? >> > > I suggest "newinstance", but "newns

[Devel] Re: [RFC][PATCH 0/8][v2]: Enable multiple mounts of devpts

2008-08-20 Thread H. Peter Anvin
[EMAIL PROTECTED] wrote: >> >> I don't like the name "newmnt" for the option; it is not just another >> mount, but a whole new instance of the pty space. > > I agree. Its mostly a place-holder for now. How about newns or newptsns ? > I suggest "newinstance", but "newns" works, too. >> I obser

[Devel] Re: [RFC][PATCH 0/8][v2]: Enable multiple mounts of devpts

2008-08-20 Thread sukadev
H. Peter Anvin [EMAIL PROTECTED] wrote: > [EMAIL PROTECTED] wrote: >> TODO: >> - Remove even initial kernel mount of devpts ? (If we do, how >>do we preserve single-mount semantics) ? > > Doesn't make sense unless we decide to drop single-mount semantics in the > (far) future. As long

[Devel] Re: [RFC][PATCH 0/8][v2]: Enable multiple mounts of devpts

2008-08-20 Thread H. Peter Anvin
[EMAIL PROTECTED] wrote: > > TODO: > - Remove even initial kernel mount of devpts ? (If we do, how > do we preserve single-mount semantics) ? Doesn't make sense unless we decide to drop single-mount semantics in the (far) future. As long as we have an instance that services unconn