linux/arch/xtensa/include/uapi/asm
Aleksa Sarai 54ebbfb160 tty: add TIOCGPTPEER ioctl
When opening the slave end of a PTY, it is not possible for userspace to
safely ensure that /dev/pts/$num is actually a slave (in cases where the
mount namespace in which devpts was mounted is controlled by an
untrusted process). In addition, there are several unresolvable
race conditions if userspace were to attempt to detect attacks through
stat(2) and other similar methods [in addition it is not clear how
userspace could detect attacks involving FUSE].

Resolve this by providing an interface for userpace to safely open the
"peer" end of a PTY file descriptor by using the dentry cached by
devpts. Since it is not possible to have an open master PTY without
having its slave exposed in /dev/pts this interface is safe. This
interface currently does not provide a way to get the master pty (since
it is not clear whether such an interface is safe or even useful).

Cc: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Valentin Rothberg <vrothberg@suse.com>
Signed-off-by: Aleksa Sarai <asarai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-09 12:27:54 +02:00
..
auxvec.h
byteorder.h
ioctls.h tty: add TIOCGPTPEER ioctl 2017-06-09 12:27:54 +02:00
ipcbuf.h
Kbuild uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
mman.h x86/pkeys: Allocation/free syscalls 2016-09-09 13:02:27 +02:00
msgbuf.h
param.h
poll.h
posix_types.h
ptrace.h xtensa: move internal ptrace definitions from uapi/asm to asm 2017-05-01 07:00:10 -07:00
sembuf.h
setup.h
shmbuf.h
sigcontext.h
signal.h xtensa: pull signal definitions from signal-defs.h 2013-02-23 19:12:52 -08:00
socket.h New getsockopt option to get socket cookie 2017-04-08 08:07:01 -07:00
sockios.h
stat.h
swab.h
termbits.h
types.h xtensa: add alternative kernel memory layouts 2016-07-24 06:33:58 +03:00
unistd.h xtensa: wire up statx system call 2017-03-31 16:26:21 -07:00