[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87won67580.fsf@xmission.com>
Date: Tue, 15 Jan 2019 01:25:03 -0600
From: ebiederm@...ssion.com (Eric W. Biederman)
To: "Robert O'Callahan" <robert@...llahan.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: Regression in 32-bit-compat TIOCGPTPEER ioctl due to 311fc65c9fb9c966bca8e6f3ff8132ce57344ab9
"Robert O'Callahan" <robert@...llahan.org> writes:
> This commit refactored the implementation of TIOCGPTPEER, moving "case
> TIOCGPTPEER" from pty_unix98_ioctl() to tty_ioctl().
> pty_unix98_ioctl() is called by pty_unix98_compat_ioctl(), so before
> the commit, TIOCGPTPEER worked for 32-bit userspace. Unfortunately
> tty_compat_ioctl() does not call tty_ioctl() so after the commit,
> TIOCGPTPEER from 32-bit userspace fails with ENOTTY.
>
> Testcase in https://bugzilla.kernel.org/show_bug.cgi?id=202271.
>
> I found this bug running the rr test suite.
Can you confirm this fixes it for you?
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index bfe9ad85b362..1b0847976b28 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -2815,6 +2815,7 @@ static long tty_compat_ioctl(struct file *file, unsigned int cmd,
case TCXONC:
case TIOCMIWAIT:
case TIOCSERCONFIG:
+ case TIOCGPTPEER:
return tty_ioctl(file, cmd, arg);
}
Thank you,
Eric Biederman
Powered by blists - more mailing lists