Eric W. Biederman
eedf265aa0
devpts: Make each mount of devpts an independent filesystem.
...
The /dev/ptmx device node is changed to lookup the directory entry "pts"
in the same directory as the /dev/ptmx device node was opened in. If
there is a "pts" entry and that entry is a devpts filesystem /dev/ptmx
uses that filesystem. Otherwise the open of /dev/ptmx fails.
The DEVPTS_MULTIPLE_INSTANCES configuration option is removed, so that
userspace can now safely depend on each mount of devpts creating a new
instance of the filesystem.
Each mount of devpts is now a separate and equal filesystem.
Reserved ttys are now available to all instances of devpts where the
mounter is in the initial mount namespace.
A new vfs helper path_pts is introduced that finds a directory entry
named "pts" in the directory of the passed in path, and changes the
passed in path to point to it. The helper path_pts uses a function
path_parent_directory that was factored out of follow_dotdot.
In the implementation of devpts:
- devpts_mnt is killed as it is no longer meaningful if all mounts of
devpts are equal.
- pts_sb_from_inode is replaced by just inode->i_sb as all cached
inodes in the tty layer are now from the devpts filesystem.
- devpts_add_ref is rolled into the new function devpts_ptmx. And the
unnecessary inode hold is removed.
- devpts_del_ref is renamed devpts_release and reduced to just a
deacrivate_super.
- The newinstance mount option continues to be accepted but is now
ignored.
In devpts_fs.h definitions for when !CONFIG_UNIX98_PTYS are removed as
they are never used.
Documentation/filesystems/devices.txt is updated to describe the current
situation.
This has been verified to work properly on openwrt-15.05, centos5,
centos6, centos7, debian-6.0.2, debian-7.9, debian-8.2, ubuntu-14.04.3,
ubuntu-15.10, fedora23, magia-5, mint-17.3, opensuse-42.1,
slackware-14.1, gentoo-20151225 (13.0?), archlinux-2015-12-01. With the
caveat that on centos6 and on slackware-14.1 that there wind up being
two instances of the devpts filesystem mounted on /dev/pts, the lower
copy does not end up getting used.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com >
Cc: Greg KH <greg@kroah.com >
Cc: Peter Hurley <peter@hurleysoftware.com >
Cc: Peter Anvin <hpa@zytor.com >
Cc: Andy Lutomirski <luto@amacapital.net >
Cc: Al Viro <viro@zeniv.linux.org.uk >
Cc: Serge Hallyn <serge.hallyn@ubuntu.com >
Cc: Willy Tarreau <w@1wt.eu >
Cc: Aurelien Jarno <aurelien@aurel32.net >
Cc: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk >
Cc: Jann Horn <jann@thejh.net >
Cc: Jiri Slaby <jslaby@suse.com >
Cc: Florian Weimer <fw@deneb.enyo.de >
Cc: Konstantin Khlebnikov <koct9i@gmail.com >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2016-06-05 10:36:01 -07:00
..
2016-04-05 16:53:41 -07:00
2016-05-24 11:00:20 -07:00
2016-05-09 11:07:28 +02:00
2016-05-30 23:00:22 +02:00
2016-05-09 16:18:37 +02:00
2016-02-04 18:25:55 +01:00
2016-05-17 10:15:34 +05:30
2016-03-04 23:50:27 -06:00
2016-04-05 16:57:15 +02:00
2016-04-14 14:03:25 +02:00
2016-04-23 22:14:34 +01:00
2016-01-27 14:32:48 -08:00
2016-06-02 17:59:44 +01:00
2016-05-28 12:32:01 -07:00
2016-05-05 23:23:05 -04:00
2016-05-20 14:35:07 -07:00
2016-05-26 09:36:10 -07:00
2016-05-10 15:44:18 -07:00
2016-04-29 11:02:33 +02:00
2016-03-02 20:05:23 +01:00
2016-03-02 20:05:23 +01:00
2016-03-02 20:05:23 +01:00
2016-04-25 14:11:10 +01:00
2016-04-29 16:44:47 +02:00
2016-04-21 00:01:21 +02:00
2016-05-26 20:52:15 +02:00
2016-03-17 12:50:55 -07:00
2016-05-17 12:29:34 -04:00
2016-01-21 14:47:08 -08:00
2016-05-17 18:06:18 +01:00
2016-03-17 15:09:34 -07:00
2016-05-18 13:14:02 -07:00
2016-04-25 18:51:31 +01:00
2016-05-28 16:15:25 -07:00
2016-03-17 15:09:34 -07:00
2016-05-04 10:25:58 -07:00
2016-05-16 16:45:48 +02:00
2016-04-09 03:12:58 +02:00
2016-05-23 17:53:39 -07:00
2016-03-11 14:00:03 +02:00
2016-03-07 16:11:14 -08:00
2016-05-05 09:58:52 +02:00
2016-05-18 18:46:55 -07:00
2016-03-15 16:55:16 -07:00
2016-03-15 16:55:16 -07:00
2016-04-04 10:41:08 -07:00
2016-05-04 23:41:14 +02:00
2016-05-13 14:01:43 +02:00
2016-01-24 03:47:37 +01:00
2016-01-24 03:49:03 +01:00
2016-05-05 13:03:29 -06:00
2016-02-19 22:54:09 -05:00
2016-05-09 09:24:02 -07:00
2016-04-25 19:13:44 -06:00
2016-04-12 15:07:36 -06:00
2016-05-26 19:34:26 -07:00
2016-05-10 08:41:37 -06:00
2016-05-19 19:12:14 -07:00
2016-05-04 00:52:29 -04:00
2016-03-25 11:37:57 -04:00
2016-04-04 10:41:08 -07:00
2016-03-03 21:18:29 +11:00
2016-02-22 08:51:38 +01:00
2016-03-22 15:36:02 -07:00
2016-04-20 17:50:06 +08:00
2016-04-25 15:45:14 -04:00
2016-02-16 13:04:58 -05:00
2016-01-27 09:10:29 -05:00
2016-04-21 14:47:18 -07:00
2016-04-19 16:54:26 -07:00
2016-01-27 12:38:03 +01:00
2016-04-22 11:38:56 -07:00
2016-05-20 17:58:30 -07:00
2016-03-22 15:36:02 -07:00
2016-02-08 19:04:55 +01:00
2016-05-19 19:12:14 -07:00
2016-05-19 19:12:14 -07:00
2016-03-25 19:10:03 +01:00
2016-05-23 11:48:48 -07:00
2016-02-20 14:11:01 -08:00
2016-05-03 14:59:30 -07:00
2016-02-20 14:11:01 -08:00
2016-05-06 14:58:25 +02:00
2016-04-08 22:41:36 +02:00
2016-05-06 14:58:25 +02:00
2016-05-06 14:58:22 +02:00
2016-05-19 19:12:14 -07:00
2016-05-13 14:01:59 +02:00
2016-03-22 15:36:02 -07:00
2016-04-15 22:35:44 +08:00
2016-03-01 16:55:48 -08:00
2016-05-26 20:00:28 -07:00
2016-05-28 16:15:25 -07:00
2016-04-12 14:14:21 -07:00
2016-05-19 19:12:14 -07:00
2016-04-15 11:20:32 -07:00
2016-05-03 11:20:07 +09:00
2016-03-10 17:12:09 -05:00
2016-05-20 21:26:15 -07:00
2016-06-05 10:36:01 -07:00
2016-02-11 15:33:38 +00:00
2016-05-31 22:12:43 +05:30
2016-05-09 15:33:29 +02:00
2016-05-09 15:33:29 +02:00
2016-04-12 21:07:06 +05:30
2016-02-09 13:05:23 +01:00
2016-02-11 19:23:28 -08:00
2016-05-20 17:58:30 -07:00
2016-05-27 16:03:22 -07:00
2016-05-17 15:48:12 -04:00
2016-04-18 14:45:08 -04:00
2016-03-29 16:30:56 -04:00
2016-02-25 22:12:26 -08:00
2016-04-15 08:49:47 -07:00
2016-03-15 16:55:16 -07:00
2016-05-02 16:24:49 +02:00
2016-05-31 22:17:05 +05:30
2016-05-02 19:49:28 -04:00
2016-05-16 13:49:32 -04:00
2016-02-29 08:35:10 +01:00
2016-03-17 15:09:34 -07:00
2016-05-27 17:14:05 -07:00
2016-06-01 10:29:39 +02:00
2016-05-07 10:32:33 -07:00
2016-04-19 22:04:53 +02:00
2016-05-19 19:12:14 -07:00
2016-03-14 00:17:28 -04:00
2016-05-17 17:11:27 -07:00
2016-05-20 17:58:30 -07:00
2016-05-10 15:43:09 -04:00
2016-03-17 15:09:34 -07:00
2016-02-20 12:53:31 +01:00
2016-05-20 17:58:30 -07:00
2016-05-28 15:48:31 -04:00
2016-03-17 15:09:34 -07:00
2016-05-19 19:12:14 -07:00
2016-05-20 17:58:30 -07:00
2016-05-19 19:12:14 -07:00
2016-05-20 17:58:30 -07:00
2016-04-30 14:01:37 -07:00
2016-05-04 22:39:17 +02:00
2016-05-04 22:39:17 +02:00
2016-04-06 13:18:19 +02:00
2016-04-13 10:41:08 +02:00
2016-03-11 14:58:58 -05:00
2016-05-03 16:00:54 -04:00
2016-02-06 02:59:51 -05:00
2016-02-11 09:59:22 -05:00
2016-05-01 09:23:52 -04:00
2016-02-22 08:51:37 +01:00
2016-02-15 12:42:38 +00:00
2016-03-25 16:37:42 -07:00
2016-05-03 18:23:02 +01:00
2016-05-03 18:23:02 +01:00
2016-03-22 15:36:02 -07:00
2016-05-09 19:39:17 +02:00
2016-05-16 15:12:02 -05:00
2016-04-20 15:42:24 -04:00
2016-05-11 19:31:40 -04:00
2016-05-02 13:42:51 +02:00
2016-05-11 22:37:54 +02:00
2016-05-02 13:42:51 +02:00
2016-05-02 13:42:50 +02:00
2016-05-02 09:32:04 -07:00
2016-05-16 11:14:29 -04:00
2016-01-28 14:19:12 -08:00
2016-05-05 22:35:54 -04:00
2016-05-20 17:58:30 -07:00
2016-05-20 17:58:30 -07:00
2016-03-22 15:36:02 -07:00
2016-05-20 22:20:48 -07:00
2016-05-20 21:26:15 -07:00
2016-05-23 17:04:14 -07:00
2016-04-11 22:44:15 +01:00
2016-04-11 22:44:15 +01:00
2016-03-22 15:36:02 -07:00
2016-05-25 16:12:05 +02:00
2016-02-09 11:54:23 +01:00
2016-05-06 10:26:07 +02:00
2016-05-09 12:36:46 -04:00
2016-04-28 16:23:16 -07:00
2016-05-06 12:51:10 -06:00
2016-03-17 15:09:34 -07:00
2016-03-09 15:43:42 -08:00
2016-05-17 12:06:35 +02:00
2016-05-16 14:47:16 -07:00
2016-05-19 09:21:36 -07:00
2016-02-22 22:44:04 -05:00
2016-03-14 12:19:46 -04:00
2016-05-03 15:07:35 -07:00
2016-04-11 21:15:48 -04:00
2016-05-20 17:58:30 -07:00
2016-05-27 15:23:32 -07:00
2016-03-17 13:47:50 -07:00
2016-05-19 19:12:14 -07:00
2016-05-19 19:12:14 -07:00
2016-03-15 16:55:16 -07:00
2016-03-20 16:47:13 -04:00
2016-05-19 19:12:14 -07:00
2016-05-26 15:35:44 -07:00
2016-05-27 15:57:31 -07:00
2016-02-18 19:46:30 +01:00
2016-03-15 16:55:16 -07:00
2016-04-28 11:44:19 +02:00
2016-05-20 17:58:30 -07:00
2016-04-01 15:00:10 +02:00
2016-02-07 19:10:12 -08:00
2016-06-05 10:36:01 -07:00
2016-04-22 12:26:23 -07:00
2016-05-04 00:52:29 -04:00
2016-05-20 18:03:15 -04:00
2016-05-20 18:03:15 -04:00
2016-03-02 20:05:26 +01:00
2016-02-18 11:42:22 -05:00
2016-05-17 15:48:12 -04:00
2016-05-17 15:47:55 -04:00
2016-05-17 15:05:23 -07:00
2016-04-04 10:41:08 -07:00
2016-05-26 10:33:33 -07:00
2016-05-23 17:04:14 -07:00
2016-04-25 15:09:11 -04:00
2016-03-23 12:34:17 +01:00
2016-05-19 19:12:14 -07:00
2016-03-01 20:36:58 +01:00
2016-02-16 13:04:58 -05:00
2016-03-21 19:30:06 -04:00
2016-05-02 09:13:35 -06:00
2016-05-01 14:01:00 -07:00
2016-05-12 07:07:42 -05:00
2016-05-16 07:22:35 -05:00
2016-05-02 09:00:56 -05:00
2016-05-09 15:33:29 +02:00
2016-05-20 14:51:34 -07:00
2016-04-15 11:52:28 +03:00
2016-04-26 10:19:38 +05:30
2016-05-23 17:04:14 -07:00
2016-05-19 19:12:14 -07:00
2016-03-15 16:55:16 -07:00
2016-06-03 15:06:22 -07:00
2016-03-15 16:55:16 -07:00
2016-05-19 19:12:14 -07:00
2016-03-17 15:09:34 -07:00
2016-05-20 17:58:30 -07:00
2016-05-20 17:58:30 -07:00
2016-04-08 11:08:12 -05:00
2016-03-07 11:39:16 -06:00
2016-05-19 13:10:54 -07:00
2016-05-03 10:35:49 -05:00
2016-05-20 17:58:30 -07:00
2016-05-25 17:05:40 -07:00
2016-02-11 18:35:48 -08:00
2016-02-11 18:35:48 -08:00
2016-03-14 15:43:11 -04:00
2016-05-10 15:06:19 -04:00
2016-02-18 19:46:33 +01:00
2016-04-09 03:10:50 +02:00
2016-03-17 02:32:04 +01:00
2016-04-22 02:29:17 +02:00
2016-05-05 01:38:44 +02:00
2016-04-22 01:32:37 +02:00
2016-04-22 01:32:37 +02:00
2016-04-14 09:01:47 -06:00
2016-04-22 10:29:05 +02:00
2016-03-15 16:55:16 -07:00
2016-05-19 19:12:14 -07:00
2016-03-31 00:30:26 -04:00
2016-03-02 16:44:27 +01:00
2016-02-15 07:02:32 +01:00
2016-03-02 17:13:02 -08:00
2016-05-20 17:58:30 -07:00
2016-02-16 13:04:58 -05:00
2016-04-09 03:10:50 +02:00
2016-04-25 23:47:44 +02:00
2016-03-10 09:43:36 -08:00
2016-03-03 14:23:43 -08:00
2016-05-17 14:48:03 +02:00
2016-02-09 19:01:11 +00:00
2016-03-17 15:09:34 -07:00
2016-02-09 13:05:23 +01:00
2016-02-09 13:05:23 +01:00
2016-05-20 17:58:30 -07:00
2016-05-20 17:58:30 -07:00
2016-04-14 21:14:03 -04:00
2016-04-23 18:51:33 -04:00
2016-03-31 13:34:50 -07:00
2016-03-31 13:37:37 -07:00
2016-03-31 13:37:37 -07:00
2016-03-05 21:30:41 +09:00
2016-05-12 15:50:19 -07:00
2016-05-31 22:12:43 +05:30
2016-03-30 15:42:03 +02:00
2016-04-04 18:15:23 +02:00
2016-02-24 09:12:45 +01:00
2016-04-05 10:56:32 +02:00
2016-03-22 15:36:02 -07:00
2016-03-22 15:36:02 -07:00
2016-03-22 15:36:02 -07:00
2016-03-17 15:09:34 -07:00
2016-03-10 16:04:24 -08:00
2016-05-06 11:09:00 -07:00
2016-03-14 17:08:15 +01:00
2016-04-13 10:42:20 +02:00
2016-05-26 00:04:58 -04:00
2016-04-15 16:53:14 -04:00
2016-05-26 15:35:44 -07:00
2016-02-16 09:26:27 +00:00
2016-05-31 11:59:06 -07:00
2016-05-17 14:41:03 -07:00
2016-04-30 09:26:55 -07:00
2016-04-14 12:56:09 -07:00
2016-05-26 15:35:44 -07:00
2016-04-30 09:26:55 -07:00
2016-04-30 09:26:55 -07:00
2016-01-22 18:08:52 -05:00
2016-05-23 17:04:14 -07:00
2016-05-20 19:58:32 -04:00
2016-05-19 19:12:14 -07:00
2016-05-19 19:12:14 -07:00
2016-05-26 15:35:44 -07:00
2016-05-08 23:46:14 -04:00
2016-02-23 19:59:55 -08:00
2016-03-25 16:37:42 -07:00
2016-05-03 14:59:30 -07:00
2016-04-02 20:23:09 -04:00
2016-04-21 10:47:26 +10:00
2016-05-19 19:12:14 -07:00
2016-05-28 15:42:50 -04:00
2016-02-25 11:27:16 +01:00
2016-05-20 17:58:30 -07:00
2016-04-29 17:37:10 -07:00
2016-05-20 17:58:30 -07:00
2016-03-14 14:55:26 -04:00
2016-05-17 07:28:28 -07:00
2016-03-17 15:09:34 -07:00
2016-05-19 19:12:14 -07:00
2016-03-02 17:13:17 -08:00
2016-06-01 21:13:43 +02:00
2016-05-06 10:42:29 +02:00
2016-05-18 18:55:19 -07:00
2016-03-15 16:55:16 -07:00
2016-03-09 11:58:41 -05:00
2016-04-26 15:47:32 -07:00
2016-01-28 11:58:02 -08:00
2016-05-20 20:57:27 -07:00
2016-05-23 17:04:14 -07:00
2016-05-04 16:55:11 -04:00
2016-02-10 13:19:03 +00:00
2016-04-07 16:53:29 -04:00
2016-04-08 19:46:28 -04:00
2016-04-13 12:02:28 -07:00
2016-05-03 14:32:07 -07:00
2016-05-20 17:58:30 -07:00
2016-04-06 16:14:24 +01:00
2016-02-22 16:10:08 -07:00
2016-02-09 11:21:07 +01:00
2016-03-02 17:01:57 +02:00
2016-03-02 17:01:57 +02:00
2016-03-17 15:09:34 -07:00
2016-05-23 11:48:48 -07:00
2016-05-19 19:12:14 -07:00
2016-02-07 21:36:02 -08:00
2016-02-24 09:09:45 +01:00
2016-03-16 21:11:19 +01:00
2016-01-29 13:31:10 -05:00
2016-03-03 14:42:50 -07:00
2016-05-27 20:09:16 -04:00
2016-05-20 17:58:30 -07:00