[RFC][PATCH 0/7] Clone PTS namespace

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>
Cc: Containers <containers@...>, Pavel Emelyanov <xemul@...>, <serue@...>, <clg@...>
Date: Tuesday, April 8, 2008 - 5:53 pm

Devpts namespace patchset

In continuation of the implementation of containers in mainline, we need to
support multiple PTY namespaces so that the PTY index (ie the tty names) in
one container is independent of the PTY indices of other containers.  For
instance this would allow each container to have a '/dev/pts/0' PTY and
refer to different terminals.

	[PATCH 1/7]: Propagate error code from devpts_pty_new
	[PATCH 2/7]: Factor out PTY index allocation
	[PATCH 3/7]: Enable multiple mounts of /dev/pts
	[PATCH 4/7]: Allow mknod of ptmx and tty in devpts
	[PATCH 5/7]: Implement get_pts_ns() and put_pts_ns()
	[PATCH 6/7]: Determine pts_ns from a pty's inode
	[PATCH 7/7]: Enable cloning PTY namespaces

Todo:
	- This patchset depends on availability of additional clone flags.
	  and relies on on Cedric's clone64 patchset. See

		  http://marc.info/?l=linux-kernel&m=120272411925609&w=2
	
	- Needs some cleanup and more testing

	- Ensure patchset is bisect-safe

---
Changelogs from earlier posts to Containers@.

Changelog[v2]:

	 (Patches 4 and 6 differ significantly from [v1]. Others are mostly
	 the same)

	- [Alexey Dobriyan, Pavel Emelyanov] Removed the hack to check for
	  user-space mount.

	- [Serge Hallyn] Added rcu locking around access to sb->s_fs_info.

	- [Serge Hallyn] Allow creation of /dev/pts/ptmx and /dev/pts/tty
	  devices to simplify the process of finding the 'owning' pts-ns
	  of the device (specially when accessed from parent-pts-ns)
	  See patches 4 and 6 for details.

Changelog[v1]:
	- Fixed circular reference by not caching the pts_ns in sb->s_fs_info
	  (without incrementing reference count) and clearing the sb->s_fs_info
	  when destroying the pts_ns

	- To allow access to a child container's ptys from parent container,
	  determine the 'pts_ns' of a 'pty' from its inode.

	- Added a check (hack) to ensure user-space mount of /dev/pts is
	  done before creating PTYs in a new pts-ns.

	- Reorganized the patchset and removed redundant changes.
	
	- Ported to work wih Cedric Le Goater's clone64() system call now
	  that we are out of clone_flags.

Changelog[v0]:

	This patchset is based on earlier versions developed by Serge Hallyn
	and Matt Helsley.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC][PATCH 0/7] Clone PTS namespace, , (Tue Apr 8, 5:53 pm)
Re: [RFC][PATCH 0/7] Clone PTS namespace, H. Peter Anvin, (Tue Apr 8, 8:53 pm)
Re: [RFC][PATCH 0/7] Clone PTS namespace, Eric W. Biederman, (Wed Apr 9, 6:15 pm)
Re: [RFC][PATCH 0/7] Clone PTS namespace, Serge E. Hallyn, (Wed Apr 9, 9:59 pm)
Re: [RFC][PATCH 0/7] Clone PTS namespace, Eric W. Biederman, (Thu Apr 10, 3:36 am)
Re: [RFC][PATCH 0/7] Clone PTS namespace, Serge E. Hallyn, (Tue Apr 22, 10:25 am)
Re: [RFC][PATCH 0/7] Clone PTS namespace, Eric W. Biederman, (Tue Apr 22, 2:53 pm)
Re: [RFC][PATCH 0/7] Clone PTS namespace, Serge E. Hallyn, (Wed Apr 23, 10:36 am)
Re: [RFC][PATCH 0/7] Clone PTS namespace, Serge E. Hallyn, (Wed Apr 23, 1:57 pm)
Re: [RFC][PATCH 0/7] Clone PTS namespace, Eric W. Biederman, (Wed Apr 23, 2:49 pm)
Re: [RFC][PATCH 0/7] Clone PTS namespace, Serge E. Hallyn, (Fri Apr 25, 3:21 pm)
Re: [RFC][PATCH 0/7] Clone PTS namespace, Eric W. Biederman, (Fri Apr 25, 3:47 pm)
Re: [RFC][PATCH 0/7] Clone PTS namespace, Serge E. Hallyn, (Sat Apr 26, 9:02 am)
Re: [RFC][PATCH 0/7] Clone PTS namespace, Serge E. Hallyn, (Thu Apr 10, 12:44 pm)
Re: [RFC][PATCH 0/7] Clone PTS namespace, H. Peter Anvin, (Wed Apr 9, 2:01 pm)
Re: [RFC][PATCH 0/7] Clone PTS namespace, H. Peter Anvin, (Wed Apr 9, 6:38 pm)