Skip to content

compat_ioctl: remove most of fs/compat_ioctl.c

Arnd Bergmann linux-block linux-bluetooth linux-ext4 linux-f2fs-devel linux-fsdevel linux-input linux-nilfs linux-pci linux-ppp linux-raid linux-scsi lkml netdev ocfs2-devel stable 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest43 patches 21 repliesIn review
  2. v529 patches 10 repliesSuperseded

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/43fix compat handling of FICLONERANGE, FIDEDUPERANGE and FS_IOC_FIEMAPfs/compat_ioctl.c+2 -10 replies
2/43FIGETBSZ: fix compatfs/compat_ioctl.c+1 -10 replies
3/43compat: itanic doesn't have onefs/compat_ioctl.c+2 -20 replies
4/43do_vfs_ioctl(): use saner typesfs/ioctl.c+8 -80 replies
5/43compat: move FS_IOC_RESVSP_32 handling to fs/ioctl.cfs/compat_ioctl.c fs/ioctl.c include/linux/falloc.h+49 -350 replies
6/43compat_sys_ioctl(): make parallel to do_vfs_ioctl()fs/compat_ioctl.c+28 -350 replies
7/43ceph: fix compat_ioctl for ceph_dir_operationsfs/ceph/dir.c fs/ceph/file.c fs/ceph/super.h+12 -10 replies
8/43compat_ioctl: drop FIOQSIZE table entryfs/compat_ioctl.c+0 -20 replies
9/43compat_ioctl: add compat_ptr_ioctl()fs/ioctl.c include/linux/fs.h+42 -00 replies
10/43compat_ioctl: move rtc handling into rtc-dev.cdrivers/rtc/dev.c drivers/rtc/rtc-vr41xx.c fs/compat_ioctl.c+22 -5412 replies
11/43compat_ioctl: move drivers to compat_ptr_ioctldrivers/char/ppdev.c drivers/char/tpm/tpm_vtpm_proxy.c drivers/firewire/core-cdev.c +16 more+22 -2485 replies
12/43compat_ioctl: move more drivers to compat_ptr_ioctldrivers/android/binder.c drivers/crypto/qat/qat_common/adf_ctl_drv.c drivers/dma-buf/dma-buf.c +30 more+36 -520 replies
13/43compat_ioctl: use correct compat_ptr() translation in driversdrivers/misc/cxl/flash.c drivers/misc/genwqe/card_dev.c drivers/scsi/megaraid/megaraid_mm.c +1 more+4 -670 replies
14/43compat_ioctl: move tape handling into driversdrivers/ide/ide-tape.c drivers/s390/char/tape_char.c drivers/scsi/st.c +2 more+114 -1150 replies
15/43compat_ioctl: move ATYFB_CLK handling to atyfb driverdrivers/video/fbdev/aty/atyfb_base.c fs/compat_ioctl.c+11 -30 replies
16/43compat_ioctl: move isdn/capi ioctl translation into driverdrivers/isdn/capi/capi.c fs/compat_ioctl.c+31 -172 replies
17/43compat_ioctl: move rfcomm handlers into driverfs/compat_ioctl.c net/bluetooth/rfcomm/sock.c+12 -80 replies
18/43compat_ioctl: move hci_sock handlers into driverfs/compat_ioctl.c net/bluetooth/hci_sock.c+20 -250 replies
19/43compat_ioctl: remove HCIUART handlingfs/compat_ioctl.c+0 -130 replies
20/43compat_ioctl: remove HIDIO translationfs/compat_ioctl.c+0 -170 replies
21/43compat_ioctl: remove translation for sound ioctlsarch/um/drivers/hostaudio_kern.c fs/compat_ioctl.c sound/core/oss/pcm_oss.c +1 more+7 -1580 replies
22/43compat_ioctl: remove IGNORE_IOCTL()fs/compat_ioctl.c+0 -560 replies
23/43compat_ioctl: remove /dev/random commandsdrivers/char/random.c fs/compat_ioctl.c+1 -70 replies
24/43compat_ioctl: remove joystick ioctl translationfs/compat_ioctl.c+0 -70 replies
25/43compat_ioctl: remove PCI ioctl translationfs/compat_ioctl.c+0 -60 replies
26/43compat_ioctl: remove /dev/raw ioctl translationfs/compat_ioctl.c+0 -40 replies
27/43compat_ioctl: remove last RAID handling codefs/compat_ioctl.c+0 -130 replies
28/43compat_ioctl: remove unused convert_in_user macrofs/compat_ioctl.c+0 -70 replies
29/43REPLACE gfs2: add compat_ioctl supportfs/gfs2/file.c+30 -00 replies
29/43gfs2: add compat_ioctl supportfs/gfs2/file.c+30 -00 replies
30/43fs: compat_ioctl: move FITRIM emulation into file systemsfs/compat_ioctl.c fs/ecryptfs/file.c fs/ext4/ioctl.c +5 more+7 -20 replies
31/43compat_ioctl: move WDIOC handling into wdt driversarch/powerpc/platforms/52xx/mpc52xx_gpt.c arch/um/drivers/harddog_kern.c drivers/char/ipmi/ipmi_watchdog.c +58 more+60 -112 replies
32/43compat_ioctl: reimplement SG_IO handlingblock/scsi_ioctl.c drivers/scsi/sg.c fs/compat_ioctl.c +2 more+143 -1590 replies
33/43af_unix: add compat_ioctl supportnet/unix/af_unix.c+19 -00 replies
34/43compat_ioctl: handle SIOCOUTQNSDnet/socket.c+1 -00 replies
35/43compat_ioctl: move SIOCOUTQ out of compat_ioctl.cdrivers/tty/tty_io.c fs/compat_ioctl.c net/socket.c+3 -20 replies
36/43tty: handle compat PPP ioctlsdrivers/tty/tty_io.c+4 -00 replies
37/43compat_ioctl: unify copy-in of ppp filtersdrivers/net/ppp/ppp_generic.c fs/compat_ioctl.c+108 -980 replies
38/43compat_ioctl: move PPPIOCSCOMPRESS to ppp_genericdrivers/net/ppp/ppp_generic.c fs/compat_ioctl.c+38 -470 replies
39/43compat_ioctl: handle PPPIOCGIDLE for 64-bit time_tDocumentation/networking/ppp_generic.txt drivers/net/ppp/ppp_generic.c fs/compat_ioctl.c +2 more+37 -380 replies
40/43compat_ioctl: ppp: move simple commands into ppp_generic.cdrivers/net/ppp/ppp_generic.c fs/compat_ioctl.c+8 -320 replies
41/43compat_ioctl: move SG_GET_REQUEST_TABLE handlingdrivers/scsi/sg.c fs/compat_ioctl.c+36 -610 replies
42/43pktcdvd: add compat_ioctl handlerdrivers/block/pktcdvd.c+25 -00 replies
43/43scsi: sd: enable compat ioctls for sed-opaldrivers/scsi/sd.c+12 -20 replies

Reviews trailers per patch

16 of 44 patches have a Reviewed-by or Acked-by.

PatchAlexandre BelloniMarcel HoltmannTakashi IwaiGreg Kroah-HartmanGuenter RoeckMichael S. TsirkinDavid S. MillerJarkko SakkinenJason GunthorpeJiri KosinaStefan HajnocziCornelia HuckDaniel VetterMauro Carvalho ChehabDavid SterbaDarren Hart (VMware)Jonathan CameronBjorn AnderssonDan WilliamsBob PetersonHeiko CarstensYan, ZhengAl ViroAndrew DonnellanFelipe BalbiBartlomiej ZolnierkiewiczBen Hutchings
1/43
2/43
3/43
4/43
5/43
6/43
7/43R-b
8/43
9/43
10/43A-b R-b
11/43A-b A-b A-b R-b A-b R-b R-b R-b R-b R-b
12/43A-b A-b A-b A-b A-b A-b A-b A-b A-b
13/43A-b A-b A-b A-b
14/43A-b
15/43A-b
16/43
17/43A-b
18/43A-b
19/43
20/43
21/43R-b
22/43
23/43A-b
24/43
25/43
26/43
27/43
28/43
29/43R-b R-b
29/43R-b R-b
30/43
31/43R-b
32/43
33/43
34/43
35/43R-b
36/43R-b
37/43
38/43
39/43
40/43
41/43
42/43
43/43

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 27 reviewers.

Read the v6 thread

Cover letter [PATCH v6 00/43] compat_ioctl: remove most of fs/compat_ioctl.c

As part of the cleanup of some remaining y2038 issues, I came to fs/compat_ioctl.c, which still has a couple of commands that need support for time64_t.

In completely unrelated work, I spent time on cleaning up parts of this file in the past, moving things out into drivers instead.

After Al Viro reviewed an earlier version of this series and did a lot more of that cleanup, I decided to try to completely eliminate the rest of it and move it all into drivers.

This series incorporates some of Al's work and many patches of my own, but in the end stops short of actually removing the last part, which is the scsi ioctl handlers. I have patches for those as well, but they need more testing or possibly a rewrite.

---

Everything in here was posted one or more times already, sending the whole series again for review, I hope to get some input on those patches that have not already been reviewed.

The entire series is also part of linux-next through
https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/commit/?h=y2038

Al Viro (8):
fix compat handling of FICLONERANGE, FIDEDUPERANGE and FS_IOC_FIEMAP
FIGETBSZ: fix compat
compat: itanic doesn't have one
do_vfs_ioctl(): use saner types
compat: move FS_IOC_RESVSP_32 handling to fs/ioctl.c compat_sys_ioctl(): make parallel to do_vfs_ioctl()
compat_ioctl: unify copy-in of ppp filters
compat_ioctl: move PPPIOCSCOMPRESS to ppp_generic

Arnd Bergmann (35):
ceph: fix compat_ioctl for ceph_dir_operations
compat_ioctl: drop FIOQSIZE table entry
compat_ioctl: add compat_ptr_ioctl()
compat_ioctl: move rtc handling into rtc-dev.c
compat_ioctl: move drivers to compat_ptr_ioctl
compat_ioctl: move more drivers to compat_ptr_ioctl
compat_ioctl: use correct compat_ptr() translation in drivers
compat_ioctl: move tape handling into drivers
compat_ioctl: move ATYFB_CLK handling to atyfb driver
compat_ioctl: move isdn/capi ioctl translation into driver
compat_ioctl: move rfcomm handlers into driver
compat_ioctl: move hci_sock handlers into driver
compat_ioctl: remove HCIUART handling
compat_ioctl: remove HIDIO translation
compat_ioctl: remove translation for sound ioctls
compat_ioctl: remove IGNORE_IOCTL()
compat_ioctl: remove /dev/random commands
compat_ioctl: remove joystick ioctl translation
compat_ioctl: remove PCI ioctl translation
compat_ioctl: remove /dev/raw ioctl translation
compat_ioctl: remove last RAID handling code
compat_ioctl: remove unused convert_in_user macro
gfs2: add compat_ioctl support
fs: compat_ioctl: move FITRIM emulation into file systems
compat_ioctl: move WDIOC handling into wdt drivers
compat_ioctl: reimplement SG_IO handling
af_unix: add compat_ioctl support
compat_ioctl: handle SIOCOUTQNSD
compat_ioctl: move SIOCOUTQ out of compat_ioctl.c
tty: handle compat PPP ioctls
compat_ioctl: handle PPPIOCGIDLE for 64-bit time_t
compat_ioctl: ppp: move simple commands into ppp_generic.c
compat_ioctl: move SG_GET_REQUEST_TABLE handling
pktcdvd: add compat_ioctl handler
scsi: sd: enable compat ioctls for sed-opal

 Documentation/networking/ppp_generic.txt    |   2 +
 arch/powerpc/platforms/52xx/mpc52xx_gpt.c   |   1 +
 arch/um/drivers/harddog_kern.c              |   1 +
 arch/um/drivers/hostaudio_kern.c            |   1 +
 block/scsi_ioctl.c                          | 132 ++-
 drivers/android/binder.c                    |   2 +-
 drivers/block/pktcdvd.c                     |  25 +
 drivers/char/ipmi/ipmi_watchdog.c           |   1 +
 drivers/char/ppdev.c                        |  12 +-
 drivers/char/random.c                       |   1 +
 drivers/char/tpm/tpm_vtpm_proxy.c           |  12 +-
 drivers/crypto/qat/qat_common/adf_ctl_drv.c |   2 +-
 drivers/dma-buf/dma-buf.c                   |   4 +-
 drivers/dma-buf/sw_sync.c                   |   2 +-
 drivers/dma-buf/sync_file.c                 |   2 +-
 drivers/firewire/core-cdev.c                |  12 +-
 drivers/gpu/drm/amd/amdkfd/kfd_chardev.c    |   2 +-
 drivers/hid/hidraw.c                        |   4 +-
 drivers/hid/usbhid/hiddev.c                 |  11 +-
 drivers/hwmon/fschmd.c                      |   1 +
 drivers/hwtracing/stm/core.c                |  12 +-
 drivers/ide/ide-tape.c                      |  27 +-
 drivers/iio/industrialio-core.c             |   2 +-
 drivers/infiniband/core/uverbs_main.c       |   4 +-
 drivers/isdn/capi/capi.c                    |  31 +
 drivers/media/rc/lirc_dev.c                 |   4 +-
 drivers/misc/cxl/flash.c                    |   8 +-
 drivers/misc/genwqe/card_dev.c              |  23 +-
 drivers/misc/mei/main.c                     |  22 +-
 drivers/misc/vmw_vmci/vmci_host.c           |   2 +-
 drivers/mtd/ubi/cdev.c                      |  36 +-
 drivers/net/ppp/ppp_generic.c               | 245 ++++--
 drivers/net/tap.c                           |  12 +-
 drivers/nvdimm/bus.c                        |   4 +-
 drivers/nvme/host/core.c                    |   2 +-
 drivers/pci/switch/switchtec.c              |   2 +-
 drivers/platform/x86/wmi.c                  |   2 +-
 drivers/rpmsg/rpmsg_char.c                  |   4 +-
 drivers/rtc/dev.c                           |  13 +-
 drivers/rtc/rtc-ds1374.c                    |   1 +
 drivers/rtc/rtc-vr41xx.c                    |  10 +
 drivers/s390/char/tape_char.c               |  41 +-
 drivers/sbus/char/display7seg.c             |   2 +-
 drivers/sbus/char/envctrl.c                 |   4 +-
 drivers/scsi/3w-xxxx.c                      |   4 +-
 drivers/scsi/cxlflash/main.c                |   2 +-
 drivers/scsi/esas2r/esas2r_main.c           |   2 +-
 drivers/scsi/megaraid/megaraid_mm.c         |  28 +-
 drivers/scsi/pmcraid.c                      |   4 +-
 drivers/scsi/sd.c                           |  14 +-
 drivers/scsi/sg.c                           |  59 +-
 drivers/scsi/st.c                           |  28 +-
 drivers/staging/android/ion/ion.c           |   4 +-
 drivers/staging/pi433/pi433_if.c            |  12 +-
 drivers/staging/vme/devices/vme_user.c      |   2 +-
 drivers/tee/tee_core.c                      |   2 +-
 drivers/tty/tty_io.c                        |   5 +
 drivers/usb/class/cdc-wdm.c                 |   2 +-
 drivers/usb/class/usbtmc.c                  |   4 +-
 drivers/usb/core/devio.c                    |  16 +-
 drivers/usb/gadget/function/f_fs.c          |  12 +-
 drivers/vfio/vfio.c                         |  39 +-
 drivers/vhost/net.c                         |  12 +-
 drivers/vhost/scsi.c                        |  12 +-
 drivers/vhost/test.c                        |  12 +-
 drivers/vhost/vsock.c                       |  12 +-
 drivers/video/fbdev/aty/atyfb_base.c        |  12 +-
 drivers/virt/fsl_hypervisor.c               |   2 +-
 drivers/watchdog/acquirewdt.c               |   1 +
 drivers/watchdog/advantechwdt.c             |   1 +
 drivers/watchdog/alim1535_wdt.c             |   1 +
 drivers/watchdog/alim7101_wdt.c             |   1 +
 drivers/watchdog/ar7_wdt.c                  |   1 +
 drivers/watchdog/at91rm9200_wdt.c           |   1 +
 drivers/watchdog/ath79_wdt.c                |   1 +
 drivers/watchdog/bcm63xx_wdt.c              |   1 +
 drivers/watchdog/cpu5wdt.c                  |   1 +
 drivers/watchdog/eurotechwdt.c              |   1 +
 drivers/watchdog/f71808e_wdt.c              |   1 +
 drivers/watchdog/gef_wdt.c                  |   1 +
 drivers/watchdog/geodewdt.c                 |   1 +
 drivers/watchdog/ib700wdt.c                 |   1 +
 drivers/watchdog/ibmasr.c                   |   1 +
 drivers/watchdog/indydog.c                  |   1 +
 drivers/watchdog/intel_scu_watchdog.c       |   1 +
 drivers/watchdog/iop_wdt.c                  |   1 +
 drivers/watchdog/it8712f_wdt.c              |   1 +
 drivers/watchdog/ixp4xx_wdt.c               |   1 +
 drivers/watchdog/m54xx_wdt.c                |   1 +
 drivers/watchdog/machzwd.c                  |   1 +
 drivers/watchdog/mixcomwd.c                 |   1 +
 drivers/watchdog/mtx-1_wdt.c                |   1 +
 drivers/watchdog/mv64x60_wdt.c              |   1 +
 drivers/watchdog/nv_tco.c                   |   1 +
 drivers/watchdog/pc87413_wdt.c              |   1 +
 drivers/watchdog/pcwd.c                     |   1 +
 drivers/watchdog/pcwd_pci.c                 |   1 +
 drivers/watchdog/pcwd_usb.c                 |   1 +
 drivers/watchdog/pika_wdt.c                 |   1 +
 drivers/watchdog/pnx833x_wdt.c              |   1 +
 drivers/watchdog/rc32434_wdt.c              |   1 +
 drivers/watchdog/rdc321x_wdt.c              |   1 +
 drivers/watchdog/riowd.c                    |   1 +
 drivers/watchdog/sa1100_wdt.c               |   1 +
 drivers/watchdog/sb_wdog.c                  |   1 +
 drivers/watchdog/sbc60xxwdt.c               |   1 +
 drivers/watchdog/sbc7240_wdt.c              |   1 +
 drivers/watchdog/sbc_epx_c3.c               |   1 +
 drivers/watchdog/sbc_fitpc2_wdt.c           |   1 +
 drivers/watchdog/sc1200wdt.c                |   1 +
 drivers/watchdog/sc520_wdt.c                |   1 +
 drivers/watchdog/sch311x_wdt.c              |   1 +
 drivers/watchdog/scx200_wdt.c               |   1 +
 drivers/watchdog/smsc37b787_wdt.c           |   1 +
 drivers/watchdog/w83877f_wdt.c              |   1 +
 drivers/watchdog/w83977f_wdt.c              |   1 +
 drivers/watchdog/wafer5823wdt.c             |   1 +
 drivers/watchdog/watchdog_dev.c             |   1 +
 drivers/watchdog/wdrtas.c                   |   1 +
 drivers/watchdog/wdt.c                      |   1 +
 drivers/watchdog/wdt285.c                   |   1 +
 drivers/watchdog/wdt977.c                   |   1 +
 drivers/watchdog/wdt_pci.c                  |   1 +
 fs/btrfs/super.c                            |   2 +-
 fs/ceph/dir.c                               |   1 +
 fs/ceph/file.c                              |   2 +-
 fs/ceph/super.h                             |   1 +
 fs/compat_ioctl.c                           | 917 +-------------------
 fs/ecryptfs/file.c                          |   1 +
 fs/ext4/ioctl.c                             |   1 +
 fs/f2fs/file.c                              |   1 +
 fs/fat/file.c                               |  13 +-
 fs/fuse/dev.c                               |   2 +-
 fs/gfs2/file.c                              |  30 +
 fs/hpfs/dir.c                               |   1 +
 fs/hpfs/file.c                              |   1 +
 fs/ioctl.c                                  |  80 +-
 fs/nilfs2/ioctl.c                           |   1 +
 fs/notify/fanotify/fanotify_user.c          |   2 +-
 fs/ocfs2/ioctl.c                            |   1 +
 fs/userfaultfd.c                            |   2 +-
 include/linux/blkdev.h                      |   2 +
 include/linux/falloc.h                      |  20 +
 include/linux/fs.h                          |   7 +
 include/linux/mtio.h                        |  60 ++
 include/uapi/linux/ppp-ioctl.h              |   2 +
 include/uapi/linux/ppp_defs.h               |  14 +
 lib/iov_iter.c                              |   1 +
 net/bluetooth/hci_sock.c                    |  21 +-
 net/bluetooth/rfcomm/sock.c                 |  14 +-
 net/rfkill/core.c                           |   2 +-
 net/socket.c                                |   3 +
 net/unix/af_unix.c                          |  19 +
 sound/core/oss/pcm_oss.c                    |   4 +
 sound/oss/dmasound/dmasound_core.c          |   2 +
 155 files changed, 935 insertions(+), 1394 deletions(-)
 create mode 100644 include/linux/mtio.h
Signature · 1 line
2.20.0