compat_ioctl: move more drivers to compat_ptr_ioctl
authorArnd Bergmann <arnd@arndb.de>
Tue, 11 Sep 2018 19:59:08 +0000 (21:59 +0200)
committerArnd Bergmann <arnd@arndb.de>
Wed, 23 Oct 2019 15:23:44 +0000 (17:23 +0200)
commit1832f2d8ff69138aa70d3cb3b4ea3c2058e73aea
tree30b09f4bffa551b8d387395e13e563972e904257
parent407e9ef72476e64937ebec44cc835e03a25fb408
compat_ioctl: move more drivers to compat_ptr_ioctl

The .ioctl and .compat_ioctl file operations have the same prototype so
they can both point to the same function, which works great almost all
the time when all the commands are compatible.

One exception is the s390 architecture, where a compat pointer is only
31 bit wide, and converting it into a 64-bit pointer requires calling
compat_ptr(). Most drivers here will never run in s390, but since we now
have a generic helper for it, it's easy enough to use it consistently.

I double-checked all these drivers to ensure that all ioctl arguments
are used as pointers or are ignored, but are not interpreted as integer
values.

Acked-by: Jason Gunthorpe <jgg@mellanox.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: David Sterba <dsterba@suse.com>
Acked-by: Darren Hart (VMware) <dvhart@infradead.org>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
33 files changed:
drivers/android/binder.c
drivers/crypto/qat/qat_common/adf_ctl_drv.c
drivers/dma-buf/dma-buf.c
drivers/dma-buf/sw_sync.c
drivers/dma-buf/sync_file.c
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
drivers/hid/hidraw.c
drivers/iio/industrialio-core.c
drivers/infiniband/core/uverbs_main.c
drivers/media/rc/lirc_dev.c
drivers/misc/vmw_vmci/vmci_host.c
drivers/nvdimm/bus.c
drivers/nvme/host/core.c
drivers/pci/switch/switchtec.c
drivers/platform/x86/wmi.c
drivers/rpmsg/rpmsg_char.c
drivers/sbus/char/display7seg.c
drivers/sbus/char/envctrl.c
drivers/scsi/3w-xxxx.c
drivers/scsi/cxlflash/main.c
drivers/scsi/esas2r/esas2r_main.c
drivers/scsi/pmcraid.c
drivers/staging/android/ion/ion.c
drivers/staging/vme/devices/vme_user.c
drivers/tee/tee_core.c
drivers/usb/class/cdc-wdm.c
drivers/usb/class/usbtmc.c
drivers/virt/fsl_hypervisor.c
fs/btrfs/super.c
fs/fuse/dev.c
fs/notify/fanotify/fanotify_user.c
fs/userfaultfd.c
net/rfkill/core.c