Re: Per-instance devpts

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <sukadev@...>
Cc: H. Peter Anvin <hpa@...>, Eric W. Biederman <ebiederm@...>, Andrew Morton <akpm@...>, <serue@...>, <matthltc@...>, Pavel Emelyanov <xemul@...>, Containers <containers@...>, <linux-kernel@...>, Greg KH <greg@...>, <sukadev@...>
Date: Sunday, August 3, 2008 - 8:04 am

> > 1. /dev/ptmx would have to change to a symlink, ptmx -> pts/ptmx.

Making them symlinks is asking for trouble because some code does go
around using stat and the like and tools like MAKEDEV have definite ideas.

For /dev/tty the definition is precisely that it is your controlling
tty. No reference to namespace and a task whose controlling tty is in a
different namespace should still open the controlling tty not some
parallel in another universe when you open /dev/tty.

If you want to make sure the controlling tty is in the right namespace
that can be done in userspace when transferring control into a namespace.
In many cases I doubt that is even what is wanted.


/dev/tty and /dev/ptmx already primarily operate by identifying a device
and switching the work to that. Actually putting a bit of namespace logic
in the driver code so the actual files stay as expected (device nodes
etc) seems a *lot* simpler than trying to do symlink hacks.

Alan
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 0/4] Helper patches for PTY namespaces, Eric W. Biederman, (Sat Apr 12, 3:06 pm)
Per-instance devpts, H. Peter Anvin, (Fri Aug 1, 2:12 pm)
Re: Per-instance devpts, , (Sun Aug 3, 1:08 am)
Re: Per-instance devpts, Alan Cox, (Sun Aug 3, 8:04 am)
Re: Per-instance devpts, , (Sun Aug 3, 1:46 pm)
Re: Per-instance devpts, Alan Cox, (Sun Aug 3, 1:54 pm)
Re: Per-instance devpts, H. Peter Anvin, (Sun Aug 3, 7:31 am)
Re: Per-instance devpts, Bastian Blank, (Sat Aug 2, 4:54 am)
Re: Per-instance devpts, Dave Hansen, (Fri Aug 1, 3:23 pm)
Re: Per-instance devpts, H. Peter Anvin, (Fri Aug 1, 3:37 pm)
Re: Per-instance devpts, Al Viro, (Fri Aug 1, 3:35 pm)
Re: [PATCH 0/4] Helper patches for PTY namespaces, Serge E. Hallyn, (Sat Apr 12, 8:59 pm)
Multiple instances of devpts, H. Peter Anvin, (Sat Apr 12, 2:54 pm)
Re: Multiple instances of devpts, Eric W. Biederman, (Sat Apr 12, 3:15 pm)
Re: Multiple instances of devpts, H. Peter Anvin, (Sat Apr 12, 3:24 pm)
Re: Multiple instances of devpts, H. Peter Anvin, (Sat Apr 12, 3:30 pm)
Re: [PATCH 0/4] Helper patches for PTY namespaces, H. Peter Anvin, (Sat Apr 12, 2:09 pm)