Commit 311fc65c9fb9c966bca8e6f3ff8132ce57344ab9 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. I found this bug running the rr test suite. I've attached a test program. Results: [roc@localhost ~]$ gcc -o ~/tmp/test ~/tmp/test.c [roc@localhost ~]$ ~/tmp/test [roc@localhost ~]$ gcc -m32 -o ~/tmp/test ~/tmp/test.c [roc@localhost ~]$ ~/tmp/test TIOCGPTPEER failed: Inappropriate ioctl for device
Created attachment 280475 [details] testcase
This is already fixed on master by commit e21120383f2dce32312f63ffca145ff8a87d41f5.