linux_dsm_epyc7002/drivers
Chris Wilson 01d3434a56 drm: Don't overwrite user ioctl arg unless requested
Currently, we completely ignore the user when it comes to the in/out
direction of the ioctl argument, as we simply cannot trust userspace.
(For example, they might request a copy of the modified ioctl argument
when the driver is not expecting such and so leak kernel stack.)
However, blindly copying over the target address may also lead to a
spurious EFAULT, and a failure after the ioctl was completed
successfully. This is important in order to avoid an ABI break when
extending an ioctl from IOR to IORW. Similar to how we only copy the
intersection of the kernel arg size and the user arg size, we only want
to copy back the kernel arg data iff both the kernel and userspace
request the copy.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1468335590-21023-1-git-send-email-chris@chris-wilson.co.uk
2016-07-14 10:12:50 +02:00
..
accessibility
acpi
amba
android
ata
atm
auxdisplay
base
bcma
block
bluetooth
bus
cdrom
char drm/i915: Add support for mapping an object page by page 2016-06-13 10:03:54 +01:00
clk
clocksource
connector
cpufreq
cpuidle
crypto
dax
dca
devfreq
dio
dma
dma-buf dma-buf/sync_file: improve Kconfig description for Sync Files 2016-07-13 19:52:08 +05:30
edac
eisa
extcon
firewire
firmware
fmc
fpga
gpio
gpu drm: Don't overwrite user ioctl arg unless requested 2016-07-14 10:12:50 +02:00
hid
hsi
hv
hwmon
hwspinlock
hwtracing
i2c
ide
idle
iio
infiniband
input
iommu
ipack
irqchip
isdn
leds
lguest
lightnvm
macintosh
mailbox
mcb
md
media
memory
memstick
message
mfd
misc
mmc
mtd
net Linux 4.7-rc2 2016-06-09 11:01:49 +10:00
nfc
ntb
nubus
nvdimm
nvme
nvmem
of
oprofile
parisc
parport
pci
pcmcia
perf
phy
pinctrl
platform
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390
sbus
scsi
sfi
sh
sn
soc
spi
spmi
ssb
staging
target
tc
thermal
thunderbolt
tty devpts: Make each mount of devpts an independent filesystem. 2016-06-05 10:36:01 -07:00
uio
usb
uwb
vfio
vhost
video Merge omapdss header refactoring 2016-06-07 12:42:58 +03:00
virt
virtio
vlynq
vme
w1
watchdog
xen
zorro
Kconfig
Makefile