1. 21 Jan, 2020 8 commits
  2. 20 Jan, 2020 2 commits
  3. 16 Jan, 2020 22 commits
  4. 10 Jan, 2020 2 commits
    • YueHaibing's avatar
      scsi: lpfc: Make lpfc_defer_acc_rsp static · fdb827e4
      YueHaibing authored
      Fix sparse warning:
      
      drivers/scsi/lpfc/lpfc_nportdisc.c:344:1: warning:
       symbol 'lpfc_defer_acc_rsp' was not declared. Should it be static?
      
      Link: https://lore.kernel.org/r/20200107014956.41748-1-yuehaibing@huawei.comReported-by: default avatarHulk Robot <hulkci@huawei.com>
      Reviewed-by: default avatarJames Smart <james.smart@broadcom.com>
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      fdb827e4
    • Martin K. Petersen's avatar
      Merge tag 'block-ioctl-cleanup-5.6' into 5.6/scsi-queue · 1c46a2cf
      Martin K. Petersen authored
      Pull compat_ioctl cleanup from Arnd. Here's his description:
      
      This series concludes the work I did for linux-5.5 on the compat_ioctl()
      cleanup, killing off fs/compat_ioctl.c and block/compat_ioctl.c by moving
      everything into drivers.
      
      Overall this would be a reduction both in complexity and line count, but
      as I'm also adding documentation the overall number of lines increases
      in the end.
      
      My plan was originally to keep the SCSI and block parts separate.
      This did not work easily because of interdependencies: I cannot
      do the final SCSI cleanup in a good way without first addressing the
      CDROM ioctls, so this is one series that I hope could be merged through
      either the block or the scsi git trees, or possibly both if you can
      pull in the same branch.
      
      The series comes in these steps:
      
      1. clean up the sg v3 interface as suggested by Linus. I have
         talked about this with Doug Gilbert as well, and he would
         rebase his sg v4 patches on top of "compat: scsi: sg: fix v3
         compat read/write interface"
      
      2. Actually moving handlers out of block/compat_ioctl.c and
         block/scsi_ioctl.c into drivers, mixed in with cleanup
         patches
      
      3. Document how to do this right. I keep getting asked about this,
         and it helps to point to some documentation file.
      
      The branch is based on another one that fixes a couple of bugs found
      during the creation of this series.
      
      Changes since v3:
        https://lore.kernel.org/lkml/20200102145552.1853992-1-arnd@arndb.de/
      
      - Move sr_compat_ioctl fixup to correct patch (Ben Hutchings)
      - Add Reviewed-by tags
      
      Changes since v2:
        https://lore.kernel.org/lkml/20191217221708.3730997-1-arnd@arndb.de/
      
      - Rebase to v5.5-rc4, which contains the earlier bugfixes
      - Fix sr_block_compat_ioctl() error handling bug found by
        Ben Hutchings
      - Fix idecd_locked_compat_ioctl() compat_ptr() bug
      - Don't try to handle HDIO_DRIVE_TASKFILE in drivers/ide
      - More documentation improvements
      
      Changes since v1:
        https://lore.kernel.org/lkml/20191211204306.1207817-1-arnd@arndb.de/
      
      - move out the bugfixes into a branch for itself
      - clean up scsi sg driver further as suggested by Christoph Hellwig
      - avoid some ifdefs by moving compat_ptr() out of asm/compat.h
      - split out the blkdev_compat_ptr_ioctl function; bug spotted by
        Ben Hutchings
      - Improve formatting of documentation
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      1c46a2cf
  5. 03 Jan, 2020 6 commits
    • Arnd Bergmann's avatar
      Documentation: document ioctl interfaces better · 8ce156de
      Arnd Bergmann authored
      Documentation/process/botching-up-ioctls.rst was orignally written as
      a blog post for DRM driver writers, so it it misses some points while
      going into a lot of detail on others.
      
      Try to provide a replacement that addresses typical issues across a wider
      range of subsystems, and follows the style of the core-api documentation
      better.
      
      Many improvements to the document are suggested by Ben Hutchings
      <ben.hutchings@codethink.co.uk>, Jonathan Corbet <corbet@lwn.net> and
      Geert Uytterhoeven <geert@linux-m68k.org>.
      Reviewed-by: default avatarBen Hutchings <ben.hutchings@codethink.co.uk>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      8ce156de
    • Arnd Bergmann's avatar
      compat_ioctl: simplify up block/ioctl.c · 9b81648c
      Arnd Bergmann authored
      Having separate implementations of blkdev_ioctl() often leads to these
      getting out of sync, despite the comment at the top.
      
      Since most of the ioctl commands are compatible, and we try very hard
      not to add any new incompatible ones, move all the common bits into a
      shared function and leave only the ones that are historically different
      in separate functions for native/compat mode.
      
      To deal with the compat_ptr() conversion, pass both the integer
      argument and the pointer argument into the new blkdev_common_ioctl()
      and make sure to always use the correct one of these.
      
      blkdev_ioctl() is now only kept as a separate exported interfact
      for drivers/char/raw.c, which lacks a compat_ioctl variant.
      We should probably either move raw.c to staging if there are no
      more users, or export blkdev_compat_ioctl() as well.
      Reviewed-by: default avatarBen Hutchings <ben.hutchings@codethink.co.uk>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      9b81648c
    • Arnd Bergmann's avatar
      compat_ioctl: block: simplify compat_blkpg_ioctl() · 5fb889f5
      Arnd Bergmann authored
      There is no need to go through a compat_alloc_user_space()
      copy any more, just wrap the function in a small helper that
      works the same way for native and compat mode.
      Reviewed-by: default avatarBen Hutchings <ben.hutchings@codethink.co.uk>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      5fb889f5
    • Arnd Bergmann's avatar
      compat_ioctl: block: move blkdev_compat_ioctl() into ioctl.c · bdc1ddad
      Arnd Bergmann authored
      Having both in the same file allows a number of simplifications
      to the compat path, and makes it more likely that changes to
      the native path get applied to the compat version as well.
      Reviewed-by: default avatarBen Hutchings <ben.hutchings@codethink.co.uk>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      bdc1ddad
    • Arnd Bergmann's avatar
      compat_ioctl: move HDIO ioctl handling into drivers/ide · 1df23c6f
      Arnd Bergmann authored
      Most of the HDIO ioctls are only used by the obsolete drivers/ide
      subsystem, these can be handled by changing ide_cmd_ioctl() to be aware
      of compat mode and doing the correct transformations in place and using
      it as both native and compat handlers for all drivers.
      
      The SCSI drivers implementing the same commands are already doing
      this in the drivers, so the compat_blkdev_driver_ioctl() function
      is no longer needed now.
      
      The BLKSECTSET and HDIO_GETGEO_BIG ioctls are not implemented
      in any driver any more and no longer need any conversion.
      Reviewed-by: default avatarBen Hutchings <ben.hutchings@codethink.co.uk>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      1df23c6f
    • Arnd Bergmann's avatar
      compat_ioctl: scsi: handle HDIO commands from drivers · 75c0b0e1
      Arnd Bergmann authored
      The ata_sas_scsi_ioctl() function implements a number of HDIO_* commands
      for SCSI devices, it is used by all libata drivers as well as a few
      drivers that support SAS attached SATA drives.
      
      The only command that is not safe for compat ioctls here is
      HDIO_GET_32BIT. Change the implementation to check for in_compat_syscall()
      in order to do both cases correctly, and change all callers to use it
      as both native and compat callback pointers, including the indirect
      callers through sas_ioctl and ata_scsi_ioctl.
      Reviewed-by: default avatarBen Hutchings <ben.hutchings@codethink.co.uk>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      75c0b0e1