From: sukadev-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org
To: hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org,
alan-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org
Cc: kyle-hoO6YkzgTuCM0SS3m2neIg@public.gmane.org,
ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org,
bastian-yyjItF7Rl6lg9hUCZPvPmw@public.gmane.org,
containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org,
sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org,
xemul-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org
Subject: [PATCH 0/10][v4]: Enable multiple devpts instances
Date: Fri, 12 Sep 2008 10:48:45 -0700 [thread overview]
Message-ID: <20080912174845.GA17350@us.ibm.com> (raw)
Enable multiple instances of devpts filesystem so each container can allocate
ptys independently.
User interface:
Since supporting multiple mounts of devpts can break user-space, this
feature is enabled only if:
- CONFIG_DEVPTS_MULTIPLE_INSTANCES=y (new config token), and
- new mount option, -o newinstance is specified
If CONFIG_DEVPTS_MULTIPLE_INSTANCES=n, there should be no change in
behavior.
See [PATCH 10/10] - Documentation/filesystems/devpts.txt for detailed
usage/compatibility information.
[PATCH 01/10] Remove devpts_root global
[PATCH 02/10] Per-mount allocated_ptys
[PATCH 03/10] Per-mount 'config' object
[PATCH 04/10] Extract option parsing to new function
[PATCH 05/10] Add DEVPTS_MULTIPLE_INSTANCES config token
[PATCH 06/10] Define mknod_ptmx()
[PATCH 07/10] Update ptmx permissions during remount
[PATCH 08/10] Define get_sb_ref()
[PATCH 09/10] Enable multiple instances of devpts
[PATCH 10/10] Document usage of multiple-instances of devpts
Implementation notes:
1. To enable multiple mounts of /dev/pts, (most) devpts interfaces
need to know which instance of devpts is being accessed. This
patchset uses the 'struct inode' or 'struct tty_struct' of the
device being accessed to identify the appropriate devpts instance.
Hence the need for the /dev/pts/ptmx bind-mount.
2. See comments in get_sb_ref() in fs/super.c (could not find
existing interfaces that accomplish it).
3. Mount options must be parsed twice during mount (once to determine
the mode of mount (single/multi-instance) and once to actually
save the options. There does not seem to be an easy way to parse
once and reuse (See 'safe_process_mount_opts()' in [PATCH 9/10])
Changelog [v4]:
- Port to 2008-09-04 ttydev tree (and drop patches that were merged in)
- Add DEVPTS_MULTIPLE_INSTANCES config token (patch 5) and move new
behavior under #ifdef CONFIG_DEVPTS_MULTIPLE_INSTANCES.
- Create ptmx node even in initial mount
- Change default permissions of pts/ptmx node to 0000 (patch 6)
- Cache ptmx dentry and use to update permissions of ptmx node on
remount so legacy mode can use the node with a simpler change to
/etc/fstab (patch 7)
- Move get_sb_ref() helper code to separate patch (patch 8)
- Add Documentation/filesystems/devpts.txt and describe usage info
in that file.
Changelog [v3]:
- Port to 2008-08-28 ttydev tree
- Rename new mount options to 'ptmxmode' and 'newinstance'.
- [Alan Cox] Use tty driver data to identify devpts (this is used to
cleanup get_node() in devpts_pty_kill()).
- [H. Peter Anvin] get_node() cleanup in devpts (which was enabled by
the inode/tty parameter to devpts interfaces)
- Bugfix in multi-mount mode (see Patch 11/11).
- Executed pty tests in LTP (in both single-instance and multi-instance
mode)
- Should be bisect-safe :-)
Changelog [v2]:
- New mount option '-o newmnt' added (patch 8/8)
- Support both single-mount and multi-mount semantics (patch 8/8)
- Automatically create ptmx node when devpts is mounted (patch 7/8)
- Extract option parsing code to new function (patch 6/8)
- Make 'config' params per-mount variables (patch 5/8)
- Slightly re-ordered existing patches in set (patches 1/8, 2/8)
TODO:
- Do we need a '-o ptmxuid' and '-o ptmxgid' options as well ?
- Update mount(8) man page
- (Sometime in future) Remove even initial kernel mount of devpts
- Any other good test suites to test this (besides LTP, sshd).
next reply other threads:[~2008-09-12 17:48 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-12 17:48 sukadev-r/Jw6+rmf7HQT0dZR+AlfA [this message]
[not found] ` <20080912174845.GA17350-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-09-12 17:50 ` [PATCH 01/10] Remove devpts_root global sukadev-r/Jw6+rmf7HQT0dZR+AlfA
[not found] ` <20080912175057.GB17350-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-09-24 17:04 ` Serge E. Hallyn
2008-09-12 17:51 ` [PATCH 02/10] Per-mount allocated_ptys sukadev-r/Jw6+rmf7HQT0dZR+AlfA
[not found] ` <20080912175116.GC17350-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-09-24 17:14 ` Serge E. Hallyn
[not found] ` <20080924171408.GB25255-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-09-27 1:12 ` sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
2008-09-12 17:51 ` [PATCH 03/10] Per-mount 'config' object sukadev-r/Jw6+rmf7HQT0dZR+AlfA
[not found] ` <20080912175135.GD17350-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-09-24 17:20 ` Serge E. Hallyn
2008-09-12 17:51 ` [PATCH 04/10] Extract option parsing to new function sukadev-r/Jw6+rmf7HQT0dZR+AlfA
[not found] ` <20080912175153.GE17350-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-09-24 17:23 ` Serge E. Hallyn
2008-09-12 17:52 ` [PATCH 05/10] Add DEVPTS_MULTIPLE_INSTANCES config token sukadev-r/Jw6+rmf7HQT0dZR+AlfA
[not found] ` <20080912175210.GF17350-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-09-24 17:24 ` Serge E. Hallyn
2008-09-12 17:52 ` [PATCH 06/10] Define mknod_ptmx() sukadev-r/Jw6+rmf7HQT0dZR+AlfA
[not found] ` <20080912175237.GG17350-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-09-24 18:21 ` Serge E. Hallyn
[not found] ` <20080924182125.GF25255-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-09-26 21:32 ` sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
2008-09-24 18:50 ` Serge E. Hallyn
[not found] ` <20080924185046.GA31535-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-09-26 21:29 ` sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
[not found] ` <20080926212954.GE31505-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-09-29 13:14 ` Serge E. Hallyn
2008-09-12 17:52 ` [PATCH 07/10] Update ptmx permissions during remount sukadev-r/Jw6+rmf7HQT0dZR+AlfA
[not found] ` <20080912175252.GH17350-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-09-24 18:30 ` Serge E. Hallyn
2008-09-12 17:53 ` [PATCH 08/10] Define get_sb_ref() sukadev-r/Jw6+rmf7HQT0dZR+AlfA
[not found] ` <20080912175308.GI17350-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-09-24 19:20 ` Serge E. Hallyn
2008-09-24 19:55 ` Dave Hansen
2008-09-26 21:21 ` sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
[not found] ` <20080926212115.GD31505-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-09-26 21:31 ` Dave Hansen
2008-09-27 0:47 ` sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
[not found] ` <20080927004727.GA2161-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-09-29 14:00 ` Cedric Le Goater
[not found] ` <48E0DF71.2070007-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2008-09-30 15:13 ` Serge E. Hallyn
[not found] ` <20080930151325.GA26713-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-10-01 12:38 ` Cedric Le Goater
2008-09-27 20:29 ` sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
[not found] ` <20080927202924.GA16208-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-10-04 3:09 ` sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
2008-09-12 17:53 ` [PATCH 09/10] Enable multiple instances of devpts sukadev-r/Jw6+rmf7HQT0dZR+AlfA
[not found] ` <20080912175322.GJ17350-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-09-24 20:26 ` Serge E. Hallyn
[not found] ` <20080924202616.GB31664-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-09-26 21:03 ` sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
[not found] ` <20080926210347.GB31505-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-09-29 13:01 ` Serge E. Hallyn
[not found] ` <20080929130131.GA12531-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-09-29 15:18 ` sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
[not found] ` <20080929151828.GA10202-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-09-29 15:29 ` Serge E. Hallyn
[not found] ` <20080929152951.GA32518-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-09-29 15:58 ` Cedric Le Goater
2008-09-29 14:06 ` Cedric Le Goater
2008-09-12 17:53 ` [PATCH 10/10] Document usage of multiple-instances " sukadev-r/Jw6+rmf7HQT0dZR+AlfA
[not found] ` <20080912175347.GK17350-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-09-19 15:33 ` Alan Cox
[not found] ` <20080919163311.626b715f-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org>
2008-09-19 16:53 ` H. Peter Anvin
2008-09-20 16:17 ` sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
[not found] ` <20080920161717.GA23693-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-09-22 13:29 ` Serge E. Hallyn
[not found] ` <20080922132937.GA11932-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-09-22 19:25 ` Serge E. Hallyn
2008-09-22 16:16 ` Serge E. Hallyn
[not found] ` <20080922161658.GA27087-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-09-22 16:33 ` sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
2008-09-24 20:36 ` Serge E. Hallyn
[not found] ` <20080924203650.GC31664-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-09-26 21:05 ` sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
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=20080912174845.GA17350@us.ibm.com \
--to=sukadev-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
--cc=alan-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org \
--cc=bastian-yyjItF7Rl6lg9hUCZPvPmw@public.gmane.org \
--cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
--cc=ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org \
--cc=hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org \
--cc=kyle-hoO6YkzgTuCM0SS3m2neIg@public.gmane.org \
--cc=sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
--cc=xemul-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.