1. 29 11月, 2021 1 次提交
  2. 29 10月, 2021 1 次提交
  3. 22 10月, 2021 1 次提交
  4. 18 10月, 2021 1 次提交
  5. 25 8月, 2021 1 次提交
  6. 24 8月, 2021 1 次提交
  7. 29 7月, 2021 5 次提交
  8. 01 7月, 2021 1 次提交
  9. 01 6月, 2021 2 次提交
  10. 06 4月, 2021 1 次提交
  11. 05 3月, 2021 1 次提交
  12. 25 1月, 2021 1 次提交
  13. 03 10月, 2020 1 次提交
  14. 15 4月, 2020 1 次提交
  15. 14 4月, 2020 1 次提交
  16. 04 2月, 2020 1 次提交
  17. 03 1月, 2020 2 次提交
    • A
      compat_ioctl: scsi: move ioctl handling into drivers · d320a955
      Arnd Bergmann 提交于
      Each driver calling scsi_ioctl() gets an equivalent compat_ioctl()
      handler that implements the same commands by calling scsi_compat_ioctl().
      
      The scsi_cmd_ioctl() and scsi_cmd_blk_ioctl() functions are compatible
      at this point, so any driver that calls those can do so for both native
      and compat mode, with the argument passed through compat_ptr().
      
      With this, we can remove the entries from fs/compat_ioctl.c.  The new
      code is larger, but should be easier to maintain and keep updated with
      newly added commands.
      Reviewed-by: NBen Hutchings <ben.hutchings@codethink.co.uk>
      Acked-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      d320a955
    • A
      compat: scsi: sg: fix v3 compat read/write interface · 78ed001d
      Arnd Bergmann 提交于
      In the v5.4 merge window, a cleanup patch from Al Viro conflicted
      with my rework of the compat handling for sg.c read(). Linus Torvalds
      did a correct merge but pointed out that the resulting code is still
      unsatisfactory.
      
      I later noticed that the sg_new_read() function still gets the compat
      mode wrong, when the 'count' argument is large enough to pass a
      compat_sg_io_hdr object, but not a nativ sg_io_hdr.
      
      To address both of these, move the definition of compat_sg_io_hdr
      into a scsi/sg.h to make it visible to sg.c and rewrite the logic
      for reading req_pack_id as well as the size check to a simpler
      version that gets the expected results.
      
      Fixes: c35a5cfb ("scsi: sg: sg_read(): simplify reading ->pack_id of userland sg_io_hdr_t")
      Fixes: 98aaaec4 ("compat_ioctl: reimplement SG_IO handling")
      Reviewed-by: NBen Hutchings <ben.hutchings@codethink.co.uk>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      78ed001d
  18. 06 11月, 2019 8 次提交
  19. 23 10月, 2019 2 次提交
    • A
      compat_ioctl: move SG_GET_REQUEST_TABLE handling · fd6c3d5a
      Arnd Bergmann 提交于
      SG_GET_REQUEST_TABLE is now the last ioctl command that needs a conversion
      handler. This is only used in a single file, so the implementation should
      be there.
      
      I'm trying to simplify it in the process, to get rid of
      the compat_alloc_user_space() and extra copy, by adding a
      put_compat_request_table() function instead, which copies the data in
      the right format to user space.
      
      Cc: linux-scsi@vger.kernel.org
      Cc: Doug Gilbert <dgilbert@interlog.com>
      Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      fd6c3d5a
    • A
      compat_ioctl: reimplement SG_IO handling · 98aaaec4
      Arnd Bergmann 提交于
      There are two code locations that implement the SG_IO ioctl: the old
      sg.c driver, and the generic scsi_ioctl helper that is in turn used by
      multiple drivers.
      
      To eradicate the old compat_ioctl conversion handler for the SG_IO
      command, I implement a readable pair of put_sg_io_hdr() /get_sg_io_hdr()
      helper functions that can be used for both compat and native mode,
      and then I call this from both drivers.
      
      For the iovec handling, there is already a compat_import_iovec() function
      that can simply be called in place of import_iovec().
      
      To avoid having to pass the compat/native state through multiple
      indirections, I mark the SG_IO command itself as compatible in
      fs/compat_ioctl.c and use in_compat_syscall() to figure out where
      we are called from.
      
      As a side-effect of this, the sg.c driver now also accepts the 32-bit
      sg_io_hdr format in compat mode using the read/write interface, not
      just ioctl. This should improve compatiblity with old 32-bit binaries,
      but it would break if any application intentionally passes the 64-bit
      data structure in compat mode here.
      
      Steffen Maier helped debug an issue in an earlier version of this patch.
      
      Cc: Steffen Maier <maier@linux.ibm.com>
      Cc: linux-scsi@vger.kernel.org
      Cc: Doug Gilbert <dgilbert@interlog.com>
      Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      98aaaec4
  20. 24 5月, 2019 1 次提交
  21. 21 5月, 2019 1 次提交
  22. 04 1月, 2019 1 次提交
    • L
      Remove 'type' argument from access_ok() function · 96d4f267
      Linus Torvalds 提交于
      Nobody has actually used the type (VERIFY_READ vs VERIFY_WRITE) argument
      of the user address range verification function since we got rid of the
      old racy i386-only code to walk page tables by hand.
      
      It existed because the original 80386 would not honor the write protect
      bit when in kernel mode, so you had to do COW by hand before doing any
      user access.  But we haven't supported that in a long time, and these
      days the 'type' argument is a purely historical artifact.
      
      A discussion about extending 'user_access_begin()' to do the range
      checking resulted this patch, because there is no way we're going to
      move the old VERIFY_xyz interface to that model.  And it's best done at
      the end of the merge window when I've done most of my merges, so let's
      just get this done once and for all.
      
      This patch was mostly done with a sed-script, with manual fix-ups for
      the cases that weren't of the trivial 'access_ok(VERIFY_xyz' form.
      
      There were a couple of notable cases:
      
       - csky still had the old "verify_area()" name as an alias.
      
       - the iter_iov code had magical hardcoded knowledge of the actual
         values of VERIFY_{READ,WRITE} (not that they mattered, since nothing
         really used it)
      
       - microblaze used the type argument for a debug printout
      
      but other than those oddities this should be a total no-op patch.
      
      I tried to fix up all architectures, did fairly extensive grepping for
      access_ok() uses, and the changes are trivial, but I may have missed
      something.  Any missed conversion should be trivially fixable, though.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      96d4f267
  23. 08 11月, 2018 1 次提交
  24. 17 10月, 2018 1 次提交
  25. 13 7月, 2018 2 次提交