[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFwvwtFCH2THn1LirOpMsZ57pnNi61nXQfQ6NBgakdXpTQ@mail.gmail.com>
Date: Wed, 23 Aug 2017 19:01:10 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: Stefan Lippers-Hollmann <s.l-h@....de>,
Christian Brauner <christian.brauner@...onical.com>,
Christian Brauner <christian.brauner@...ntu.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"Serge E. Hallyn" <serge@...lyn.com>,
Al Viro <viro@...iv.linux.org.uk>,
Thorsten Leemhuis <regressions@...mhuis.info>
Subject: Re: [PATCH 0/1] devpts: use dynamic_dname() to generate proc name
On Wed, Aug 23, 2017 at 6:49 PM, Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
> Argh. And it's *not* fairly straightforward, because the
> tty_operations "ioctl()" function pointer only gets 'struct tty *'.
>
> So in the TIOCGPTPEER path, we don't actually have access to the file
> pointer of the fd we're doing the ioctl on.
>
> And that's where the 'struct path' to the 'ptmx' node is - which we
> need to then look up the 'pts' directory.
>
> How very annoying. I think that's why we did it all at ptmx_open()
> time, because then we had all the information.
Anyway, the revert is pushed out. So we're back to the old behavior
that gives the wrong pathname in /proc.
And I think I can handle the lack of a 'struct file *' to the ioctl
operations by just special-casing TIOCGPTPEER directly in tty_ioctl()
itself.
That's where we handle "generic" tty ioctls, and doing pty stuff there
is kind of wrong, but pty's are special.
But I think I'll leave it for tomorrow. So Eric, if you feel like
looking at this, I'd appreciate it.
Linus
Powered by blists - more mailing lists