linux_dsm_epyc7002/arch/alpha/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
..
a.out.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
auxvec.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
bitsperlong.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
byteorder.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
compiler.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
console.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
errno.h errno.h: remove "NFS" from descriptions in comments 2013-11-13 12:09:12 +09:00
fcntl.h Safer ABI for O_TMPFILE 2013-07-13 13:26:37 +04:00
fpu.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
gentrap.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
ioctl.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
ioctls.h tty: add TIOCGPTPEER ioctl 2017-06-09 12:27:54 +02:00
ipcbuf.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
Kbuild uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
kvm_para.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
mman.h x86/pkeys: Allocation/free syscalls 2016-09-09 13:02:27 +02:00
msgbuf.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
pal.h alpha: Primitive support for CPU power down. 2013-11-16 16:33:15 -08:00
param.h alpha: Force the user-visible HZ to a constant 1024. 2013-07-19 13:54:26 -07:00
poll.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
posix_types.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
ptrace.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
reg.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
regdef.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
resource.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
sembuf.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
setup.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
shmbuf.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
sigcontext.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
siginfo.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
signal.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2012-12-20 18:05:28 -08:00
socket.h New getsockopt option to get socket cookie 2017-04-08 08:07:01 -07:00
sockios.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
stat.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
statfs.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
swab.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
sysinfo.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
termbits.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
termios.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
types.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
unistd.h alpha: Wire up all missing implemented syscalls 2015-05-26 10:01:50 -07:00