linux_dsm_epyc7002/include/uapi/linux
David Herrmann c7dc65737c Input: evdev - add EVIOCREVOKE ioctl
If we have multiple sessions on a system, we normally don't want
background sessions to read input events. Otherwise, it could capture
passwords and more entered by the user on the foreground session. This is
a real world problem as the recent XMir development showed:
  http://mjg59.dreamwidth.org/27327.html

We currently rely on sessions to release input devices when being
deactivated. This relies on trust across sessions. But that's not given on
usual systems. We therefore need a way to control which processes have
access to input devices.

With VTs the kernel simply routed them through the active /dev/ttyX. This
is not possible with evdev devices, though. Moreover, we want to avoid
routing input-devices through some dispatcher-daemon in userspace (which
would add some latency).

This patch introduces EVIOCREVOKE. If called on an evdev fd, this revokes
device-access irrecoverably for that *single* open-file. Hence, once you
call EVIOCREVOKE on any dup()ed fd, all fds for that open-file will be
rather useless now (but still valid compared to close()!). This allows us
to pass fds directly to session-processes from a trusted source. The
source keeps a dup()ed fd and revokes access once the session-process is
no longer active.
Compared to the EVIOCMUTE proposal, we can avoid the CAP_SYS_ADMIN
restriction now as there is no way to revive the fd again. Hence, a user
is free to call EVIOCREVOKE themself to kill the fd.

Additionally, this ioctl allows multi-layer access-control (again compared
to EVIOCMUTE which was limited to one layer via CAP_SYS_ADMIN). A middle
layer can simply request a new open-file from the layer above and pass it
to the layer below. Now each layer can call EVIOCREVOKE on the fds to
revoke access for all layers below, at the expense of one fd per layer.

There's already ongoing experimental user-space work which demonstrates
how it can be used:
  http://lists.freedesktop.org/archives/systemd-devel/2013-August/012897.html

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-09-07 12:53:20 -07:00
..
byteorder
caif caif: Remove my bouncing email address. 2013-04-23 13:25:51 -04:00
can
dvb [media] demux.h: Remove duplicated enum 2013-04-08 06:53:15 -03:00
hdlc
hsi
isdn
mmc
netfilter netfilter: nfnetlink_queue: avoid expensive gso segmentation and checksum fixup 2013-04-29 20:09:07 +02:00
netfilter_arp
netfilter_bridge
netfilter_ipv4
netfilter_ipv6 netfilter: fix struct ip6t_frag field description 2013-04-02 12:25:57 +02:00
nfsd
raid UAPI: fix endianness conditionals in linux/raid/md_p.h 2013-03-13 15:21:49 -07:00
spi
sunrpc
tc_act
tc_ematch
usb USB: fix an incorrect table index in comment 2013-04-08 09:08:34 -07:00
wimax
a.out.h
acct.h UAPI: fix endianness conditionals in linux/acct.h 2013-03-13 15:21:48 -07:00
adb.h
adfs_fs.h
affs_hardblocks.h
agpgart.h
aio_abi.h UAPI: fix endianness conditionals in linux/aio_abi.h 2013-03-13 15:21:48 -07:00
apm_bios.h
arcfb.h
atalk.h
atm_eni.h
atm_he.h
atm_idt77105.h
atm_nicstar.h
atm_tcp.h
atm_zatm.h
atm.h
atmapi.h
atmarp.h
atmbr2684.h
atmclip.h
atmdev.h
atmioc.h
atmlec.h
atmmpc.h
atmppp.h
atmsap.h
atmsvc.h
audit.h audit: Make testing for a valid loginuid explicit. 2013-05-07 22:27:15 -04:00
auto_fs4.h
auto_fs.h
auxvec.h powerpc: Add HWCAP2 aux entry 2013-04-26 16:08:16 +10:00
ax25.h
b1lli.h
baycom.h
bfs_fs.h
binfmts.h
blkpg.h
blktrace_api.h
bpqether.h
bsg.h
btrfs.h Btrfs: rescan for qgroups 2013-05-06 15:55:19 -04:00
can.h
capability.h
capi.h
cciss_defs.h
cciss_ioctl.h
cdrom.h
cgroupstats.h
chio.h
cm4000_cs.h
cn_proc.h connector: Added coredumping event to the process connector 2013-03-20 13:23:21 -04:00
coda_psdev.h
coda.h
coff.h
connector.h Drivers: hv: Add a new driver to support host initiated backup 2013-03-15 12:12:36 -07:00
const.h
cramfs_fs.h
cuda.h
cyclades.h
cycx_cfm.h
dcbnl.h
dccp.h
dlm_device.h
dlm_netlink.h
dlm_plock.h
dlm.h
dlmconstants.h
dm-ioctl.h dm ioctl: allow message to return data 2013-03-01 22:45:49 +00:00
dm-log-userspace.h
dn.h
dqblk_xfs.h
edd.h
efs_fs_sb.h
elf-em.h
elf-fdpic.h
elf.h metag: ptrace: Implement NT_METAG_TLS 2013-03-27 14:37:47 +00:00
elfcore.h
errno.h
errqueue.h
ethtool.h
eventpoll.h
fadvise.h
falloc.h
fanotify.h
fb.h
fcntl.h
fd.h
fdreg.h
fib_rules.h
fiemap.h
filter.h filter: add ANC_PAY_OFFSET instruction for loading payload start offset 2013-03-20 13:15:45 -04:00
firewire-cdev.h
firewire-constants.h
flat.h
fs.h mm: make snapshotting pages for stable writes a per-bio operation 2013-04-29 15:54:33 -07:00
fsl_hypervisor.h
fuse.h fuse: add flag to turn on async direct IO 2013-05-01 14:37:21 +02:00
futex.h
gameport.h
gen_stats.h
genetlink.h
gfs2_ondisk.h
gigaset_dev.h
hdlc.h
hdlcdrv.h
hdreg.h
hid.h
hiddev.h
hidraw.h
hpet.h
hw_breakpoint.h
hysdn_if.h
i2c-dev.h
i2c.h
i2o-dev.h
i8k.h
icmp.h
icmpv6.h
if_addr.h
if_addrlabel.h
if_alg.h
if_arcnet.h
if_arp.h
if_bonding.h
if_bridge.h
if_cablemodem.h if_cablemodem.h: Add parenthesis around ioctl macros 2013-05-08 13:13:30 -07:00
if_eql.h
if_ether.h net: add ETH_P_802_3_MIN 2013-03-28 01:20:42 -04:00
if_fc.h
if_fddi.h
if_frad.h
if_hippi.h
if_infiniband.h
if_link.h vxlan: allow choosing destination port per vxlan 2013-04-29 11:53:12 -04:00
if_ltalk.h
if_packet.h packet: if hw/sw ts enabled in rx/tx ring, report which ts we got 2013-04-25 01:22:22 -04:00
if_phonet.h
if_plip.h
if_ppp.h
if_pppol2tp.h
if_pppox.h
if_slip.h
if_team.h
if_tun.h
if_tunnel.h
if_vlan.h
if_x25.h
if.h
igmp.h
in6.h
in_route.h
in.h
inet_diag.h
inotify.h
input.h Input: evdev - add EVIOCREVOKE ioctl 2013-09-07 12:53:20 -07:00
ioctl.h
ip6_tunnel.h
ip_vs.h ipvs: fix sparse warnings for some parameters 2013-04-23 11:43:05 +09:00
ip.h
ipc.h
ipmi_msgdefs.h
ipmi.h ipmi: remove superfluous kernel/userspace explanation 2013-02-27 19:10:21 -08:00
ipsec.h
ipv6_route.h
ipv6.h
ipx.h
irda.h
irqnr.h
isdn_divertif.h
isdn_ppp.h
isdn.h
isdnif.h
iso_fs.h
ivtv.h
ivtvfb.h
ixjuser.h
jffs2.h
joystick.h
Kbuild Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jesse/openvswitch 2013-04-17 13:30:32 -04:00
kd.h
kdev_t.h
kernel-page-flags.h
kernel.h
kernelcapi.h
kexec.h
keyboard.h
keyctl.h
kvm_para.h
kvm.h KVM: PPC: Book3S: Add API for in-kernel XICS emulation 2013-05-02 15:28:36 +02:00
l2tp.h
limits.h
llc.h
loop.h
lp.h
magic.h hostfs: move HOSTFS_SUPER_MAGIC to <linux/magic.h> 2013-05-04 15:48:44 -04:00
major.h
map_to_7segment.h
matroxfb.h
mdio.h
media.h [media] media: add support for decoder as one of media entity types 2013-03-21 14:05:31 -03:00
mei.h
mempolicy.h
meye.h
mii.h
minix_fs.h
mman.h
mmtimer.h
module.h
mqueue.h
mroute6.h
mroute.h
msdos_fs.h fat: mark fs as dirty on mount and clean on umount 2013-02-27 19:10:11 -08:00
msg.h
mtio.h
n_r3964.h
nbd.h nbd: support FLUSH requests 2013-02-27 19:10:22 -08:00
ncp_fs.h
ncp_mount.h
ncp_no.h
ncp.h
neighbour.h vxlan: generalize forwarding tables 2013-03-17 12:23:46 -04:00
net_dropmon.h
net_tstamp.h
net.h
netconf.h
netdevice.h
netfilter_arp.h
netfilter_bridge.h
netfilter_decnet.h
netfilter_ipv4.h
netfilter_ipv6.h
netfilter.h
netlink_diag.h netlink: add RX/TX-ring support to netlink diag 2013-04-19 14:57:58 -04:00
netlink.h netlink: mmaped netlink: ring setup 2013-04-19 14:57:57 -04:00
netrom.h
nfc.h NFC: llcp: Add support in getsockopt for RW, LTO, and MIU remote parameters 2013-04-11 16:28:59 +02:00
nfs2.h
nfs3.h
nfs4_mount.h
nfs4.h
nfs_fs.h
nfs_idmap.h
nfs_mount.h
nfs.h
nfsacl.h
nl80211.h cfg80211: introduce critical protocol indication from user-space 2013-04-22 15:48:00 +02:00
nubus.h
nvram.h
omap3isp.h
omapfb.h
oom.h
openvswitch.h openvswitch: Expose <linux/openvswitch.h> to userspace 2013-03-29 17:54:33 -07:00
packet_diag.h sock_diag: allow to dump bpf filters 2013-04-29 13:21:30 -04:00
param.h
parport.h
patchkey.h
pci_regs.h PCI: Clean up MSI/MSI-X capability #defines 2013-04-23 09:50:30 -06:00
pci.h
perf_event.h perf: Fix comments in PERF_MEM_LVL bitmask 2013-04-08 13:54:24 +02:00
personality.h
pfkeyv2.h
pg.h
phantom.h
phonet.h
pkt_cls.h
pkt_sched.h htb: add HTB_DIRECT_QLEN attribute 2013-03-06 15:40:53 -05:00
pktcdvd.h
pmu.h
poll.h
posix_types.h
ppdev.h
ppp_defs.h
ppp-comp.h
ppp-ioctl.h
pps.h
prctl.h
ptp_clock.h
ptrace.h ptrace: add ability to retrieve signals without removing from a queue (v4) 2013-04-30 17:04:05 -07:00
qnx4_fs.h
qnxtypes.h
quota.h
radeonfb.h
random.h
raw.h
rds.h
reboot.h
reiserfs_fs.h
reiserfs_xattr.h
resource.h
rfkill.h rfkill: Add NFC to the list of supported radios 2013-04-12 16:54:38 +02:00
romfs_fs.h
rose.h
route.h
rtc.h
rtnetlink.h
scc.h
sched.h
screen_info.h
sctp.h net: sctp: introduce uapi header for sctp 2013-04-09 13:19:39 -04:00
sdla.h
seccomp.h
securebits.h
selinux_netlink.h
sem.h
serial_core.h tty/serial: Add support for Altera serial port 2013-03-12 08:53:23 -07:00
serial_reg.h
serial.h
serio.h
shm.h
signal.h
signalfd.h
snmp.h net: Add MIB counters for checksum errors 2013-04-29 15:14:03 -04:00
sock_diag.h
socket.h
sockios.h
som.h
sonet.h
sonypi.h
sound.h
soundcard.h
stat.h
stddef.h
string.h
suspend_ioctls.h
swab.h
synclink.h
sysctl.h
sysinfo.h
taskstats.h
tcp_metrics.h
tcp.h tcp: Remove TCPCT 2013-03-17 14:35:13 -04:00
telephony.h
termios.h
time.h timekeeping: Add CLOCK_TAI clockid 2013-03-22 16:19:59 -07:00
times.h
timex.h
tiocl.h
tipc_config.h
tipc.h
toshiba.h
tty_flags.h
tty.h
types.h
udf_fs_i.h
udp.h
uhid.h
uinput.h
uio.h
ultrasound.h
un.h
unistd.h
unix_diag.h net: fix *_DIAG_MAX constants 2013-03-21 12:36:33 -04:00
usbdevice_fs.h
utime.h
utsname.h
uuid.h
uvcvideo.h
v4l2-common.h
v4l2-controls.h [media] V4L: Add MATRIX option to V4L2_CID_EXPOSURE_METERING control 2013-03-31 10:55:19 -03:00
v4l2-dv-timings.h [media] v4l2-dv-timings.h: add 480i59.94 and 576i50 CEA-861-E timings 2013-04-14 19:56:36 -03:00
v4l2-mediabus.h [media] soc_camera: Add RGB666 & RGB888 formats 2013-04-04 19:40:08 -03:00
v4l2-subdev.h
veth.h
vfio.h VFIO-AER: Vfio-pci driver changes for supporting AER 2013-03-11 09:31:22 -06:00
vhost.h tcm_vhost: header split up 2013-05-02 13:40:15 +03:00
videodev2.h [media] videodev2.h: Remove the unused old V4L1 buffer types 2013-04-25 10:29:14 -03:00
virtio_9p.h
virtio_balloon.h virtio: do not export "u16" and "u64" to userspace 2013-04-02 16:42:58 +10:30
virtio_blk.h
virtio_config.h
virtio_console.h virtio_console: fix uapi header 2013-05-20 10:25:28 +09:30
virtio_ids.h caif_virtio: Introduce caif over virtio 2013-03-20 14:06:06 +10:30
virtio_net.h virtio: don't expose u16 in userspace api 2013-05-05 16:58:01 -04:00
virtio_pci.h
virtio_ring.h
virtio_rng.h
vm_sockets.h VSOCK: Split vm_sockets.h into kernel/uapi 2013-03-08 12:24:48 -05:00
vt.h
wait.h
wanrouter.h
watchdog.h
wimax.h
wireless.h
x25.h
xattr.h hfsplus: add osx.* prefix for handling namespace of Mac OS X extended attributes 2013-02-27 19:10:10 -08:00
xfrm.h xfrm: allow to avoid copying DSCP during encapsulation 2013-03-06 07:02:45 +01:00