lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFwbHVcfHVYrmxHZfwM=K31NL37UcyAOE8ekWKYdcv1Ndw@mail.gmail.com>
Date:	Thu, 2 Jun 2016 11:57:40 -0700
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	"Eric W. Biederman" <ebiederm@...ssion.com>
Cc:	Greg KH <greg@...ah.com>, Peter Hurley <peter@...leysoftware.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	Andy Lutomirski <luto@...capital.net>, security@...ian.org,
	"security@...nel.org" <security@...nel.org>,
	Al Viro <viro@...iv.linux.org.uk>,
	"security@...ntu.com >> security" <security@...ntu.com>,
	Serge Hallyn <serge.hallyn@...ntu.com>,
	Willy Tarreau <w@....eu>,
	Aurelien Jarno <aurelien@...el32.net>,
	One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>,
	Jann Horn <jann@...jh.net>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Jiri Slaby <jslaby@...e.com>,
	Florian Weimer <fw@...eb.enyo.de>,
	Konstantin Khlebnikov <koct9i@...il.com>
Subject: Re: [PATCH tty-next] devpts: Make each mount of devpts an independent filesystem.

On Thu, Jun 2, 2016 at 8:29 AM, Eric W. Biederman <ebiederm@...ssion.com> wrote:
>
> 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.

Ok, this came outside the merge window, but the patches predate it by
a lot, so I'm actually inclined to finally get this all sorted out and
just apply it.

Al, I'm not seeing anything horribly questionable in the path_pts()
function, although I think it should just do lookup_one_len_unlocked()
and follow_mount() instead of open-coding that hashing etc. So I
actually prefer the ptmx_to_pts() function I posted back in April:

  static struct dentry *ptmx_to_pts(struct path *ptmx)
  {
      struct dentry *dev = dget_parent(ptmx->dentry);

      if (dev) {
          struct path path;

          path.dentry = lookup_one_len_unlocked("pts", dev, 3);
          if (path.dentry) {
              path.mnt = mntget(ptmx->mnt);
              follow_mount(&path);
              mntput(path.mnt);
              return path.dentry;
          }
      }
      return NULL;
  }

but I don't care *too* much. Al?

Comments?

               Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ