Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1382921

Re: [PATCH 01/16] devpts: Attempting to get it right

From Peter Hurley <peter@hurleysoftware.com>
Newsgroups linux.kernel
Subject Re: [PATCH 01/16] devpts: Attempting to get it right
Date 2016-04-20 02:30 +0200
Message-ID <rpObL-7pt-1@gated-at.bofh.it> (permalink)
References (13 earlier) <rnc0W-43s-9@gated-at.bofh.it> <roeal-5jh-5@gated-at.bofh.it> <roDip-7Yf-7@gated-at.bofh.it> <rpM9Y-5Ru-21@gated-at.bofh.it> <rpNpo-6K7-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 04/19/2016 04:35 PM, Linus Torvalds wrote:
> On Tue, Apr 19, 2016 at 3:06 PM, Eric W. Biederman
> <ebiederm@xmission.com> wrote:
>>
>> I have work inspired by this rolled into my code.  I will post shortly
>> after a little more testing.
> 
> Actually, I have a slightly fixed version in my tree. I've been
> running this on my own machines for a few days, just to verify, along
> with some testing.
> 
> The fixes are some cleanups of the header file (the !UNIX98 section
> that nobody uses was bogus), and fixing "devpts_get_ref()" to get the
> "struct file *" argument too. The current code doesn't need it, but
> the code to actually look up the right pts/ directory from the ptmx
> file open needs it because that's where the path is - passing in just
> the inode isn't sufficient).
> 
> Anyway, I think I'll just merge my branch instead of sending out
> another emailed patch, because I don't think that patch is
> controversial or unsafe. It doesn't actually change any semantics, and
> only does cleanups. If it breaks something due to the rules about
> private_data being different for slave and master side pty's, then the
> old code was broken too - it used to always put a inode pointer in
> there, but they were very different inode pointers.

Yes, the old code was broken. The new code always uses the ptmx inode.
Which is a stopgap measure to prevent the devpts instance from
teardown when the only open filp is /dev/tty.

What I want to do instead (but not for -stable) is bump the inode
reference at controlling tty association instead (either first
qualifying open or ioctl(TIOCSCTTY)). That way it would always be
the slave inode. This method is non-trivial though because it makes
disassociation more complicated.

Regards,
Peter Hurley

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 01/16] devpts: Attempting to get it right Linus Torvalds <torvalds@linux-foundation.org> - 2016-04-16 20:40 +0200
  Does anyone care about a race free ptsname? ebiederm@xmission.com (Eric W. Biederman) - 2016-04-19 21:00 +0200
    Re: Does anyone care about a race free ptsname? "H. Peter Anvin" <hpa@zytor.com> - 2016-04-19 21:30 +0200
      Re: Does anyone care about a race free ptsname? ebiederm@xmission.com (Eric W. Biederman) - 2016-04-19 22:50 +0200
        Re: Does anyone care about a race free ptsname? "H. Peter Anvin" <hpa@zytor.com> - 2016-04-19 23:10 +0200
    Re: Does anyone care about a race free ptsname? "Serge E. Hallyn" <serge@hallyn.com> - 2016-04-19 22:50 +0200
    Re: Does anyone care about a race free ptsname? Linus Torvalds <torvalds@linux-foundation.org> - 2016-04-20 01:30 +0200
      Re: Does anyone care about a race free ptsname? "H. Peter Anvin" <hpa@zytor.com> - 2016-04-20 01:50 +0200
        Re: Does anyone care about a race free ptsname? Linus Torvalds <torvalds@linux-foundation.org> - 2016-04-20 02:20 +0200
        Re: Does anyone care about a race free ptsname? "Serge E. Hallyn" <serge@hallyn.com> - 2016-04-20 03:50 +0200
  Re: [PATCH 01/16] devpts: Attempting to get it right ebiederm@xmission.com (Eric W. Biederman) - 2016-04-20 00:20 +0200
    Re: [PATCH 01/16] devpts: Attempting to get it right Linus Torvalds <torvalds@linux-foundation.org> - 2016-04-20 01:40 +0200
      Re: [PATCH 01/16] devpts: Attempting to get it right Peter Hurley <peter@hurleysoftware.com> - 2016-04-20 02:30 +0200
        Re: [PATCH 01/16] devpts: Attempting to get it right Peter Hurley <peter@hurleysoftware.com> - 2016-04-20 02:50 +0200
      [PATCH] devpts: Make each mount of devpts an independent filesystem. ebiederm@xmission.com (Eric W. Biederman) - 2016-04-20 05:20 +0200
        Re: [PATCH] devpts: Make each mount of devpts an independent  filesystem. Al Viro <viro@ZenIV.linux.org.uk> - 2016-04-20 05:30 +0200
          Re: [PATCH] devpts: Make each mount of devpts an independent filesystem. ebiederm@xmission.com (Eric W. Biederman) - 2016-04-20 06:00 +0200
            Re: [PATCH] devpts: Make each mount of devpts an independent  filesystem. Al Viro <viro@ZenIV.linux.org.uk> - 2016-04-20 06:20 +0200
              Re: [PATCH] devpts: Make each mount of devpts an independent filesystem. ebiederm@xmission.com (Eric W. Biederman) - 2016-04-20 06:40 +0200
        Re: [PATCH] devpts: Make each mount of devpts an independent filesystem. Konstantin Khlebnikov <koct9i@gmail.com> - 2016-04-20 06:40 +0200
          Re: [PATCH] devpts: Make each mount of devpts an independent filesystem. Linus Torvalds <torvalds@linux-foundation.org> - 2016-04-20 07:00 +0200
            Re: [PATCH] devpts: Make each mount of devpts an independent filesystem. ebiederm@xmission.com (Eric W. Biederman) - 2016-04-20 17:10 +0200
              Re: [PATCH] devpts: Make each mount of devpts an independent filesystem. Konstantin Khlebnikov <koct9i@gmail.com> - 2016-04-20 17:40 +0200
                Re: [PATCH] devpts: Make each mount of devpts an independent filesystem. ebiederm@xmission.com (Eric W. Biederman) - 2016-04-20 18:10 +0200
                [PATCH v2] devpts: Make each mount of devpts an independent filesystem. ebiederm@xmission.com (Eric W. Biederman) - 2016-04-20 19:20 +0200

csiph-web