1. 27 1月, 2017 1 次提交
  2. 23 6月, 2016 1 次提交
  3. 04 5月, 2016 1 次提交
  4. 16 4月, 2016 1 次提交
  5. 14 4月, 2016 1 次提交
  6. 06 3月, 2016 1 次提交
    • R
      usb: devio: Add ioctl to disallow detaching kernel USB drivers. · d883f52e
      Reilly Grant 提交于
      The new USBDEVFS_DROP_PRIVILEGES ioctl allows a process to voluntarily
      relinquish the ability to issue other ioctls that may interfere with
      other processes and drivers that have claimed an interface on the
      device.
      
      This commit also includes a simple utility to be able to test the
      ioctl, located at Documentation/usb/usbdevfs-drop-permissions.c
      
      Example (with qemu-kvm's input device):
      
          $ lsusb
          ...
          Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd
      
          $ usb-devices
          ...
          C:  #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=100mA
          I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=02 Driver=usbhid
      
          $ sudo ./usbdevfs-drop-permissions /dev/bus/usb/001/002
          OK: privileges dropped!
          Available options:
          [0] Exit now
          [1] Reset device. Should fail if device is in use
          [2] Claim 4 interfaces. Should succeed where not in use
          [3] Narrow interface permission mask
          Which option shall I run?: 1
          ERROR: USBDEVFS_RESET failed! (1 - Operation not permitted)
          Which test shall I run next?: 2
          ERROR claiming if 0 (1 - Operation not permitted)
          ERROR claiming if 1 (1 - Operation not permitted)
          ERROR claiming if 2 (1 - Operation not permitted)
          ERROR claiming if 3 (1 - Operation not permitted)
          Which test shall I run next?: 0
      
      After unbinding usbhid:
      
          $ usb-devices
          ...
          I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=02 Driver=(none)
      
          $ sudo ./usbdevfs-drop-permissions /dev/bus/usb/001/002
          ...
          Which option shall I run?: 2
          OK: claimed if 0
          ERROR claiming if 1 (1 - Operation not permitted)
          ERROR claiming if 2 (1 - Operation not permitted)
          ERROR claiming if 3 (1 - Operation not permitted)
          Which test shall I run next?: 1
          OK: USBDEVFS_RESET succeeded
          Which test shall I run next?: 0
      
      After unbinding usbhid and restricting the mask:
      
          $ sudo ./usbdevfs-drop-permissions /dev/bus/usb/001/002
          ...
          Which option shall I run?: 3
          Insert new mask: 0
          OK: privileges dropped!
          Which test shall I run next?: 2
          ERROR claiming if 0 (1 - Operation not permitted)
          ERROR claiming if 1 (1 - Operation not permitted)
          ERROR claiming if 2 (1 - Operation not permitted)
          ERROR claiming if 3 (1 - Operation not permitted)
      Signed-off-by: NReilly Grant <reillyg@chromium.org>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NEmilio López <emilio.lopez@collabora.co.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d883f52e
  7. 04 3月, 2016 2 次提交
  8. 24 12月, 2015 1 次提交
  9. 17 12月, 2015 1 次提交
  10. 15 12月, 2015 1 次提交
  11. 02 12月, 2015 1 次提交
    • L
      usb: core: lpm: fix usb3_hardware_lpm sysfs node · bf5ce5bf
      Lu Baolu 提交于
      Commit 655fe4ef ("usbcore: add sysfs support to xHCI usb3
      hardware LPM") introduced usb3_hardware_lpm sysfs node. This
      doesn't show the correct status of USB3 U1 and U2 LPM status.
      
      This patch fixes this by replacing usb3_hardware_lpm with two
      nodes, usb3_hardware_lpm_u1 (for U1) and usb3_hardware_lpm_u2
      (for U2), and recording the U1/U2 LPM status in right places.
      
      This patch should be back-ported to kernels as old as 4.3,
      that contains Commit 655fe4ef ("usbcore: add sysfs support
      to xHCI usb3 hardware LPM").
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NLu Baolu <baolu.lu@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bf5ce5bf
  12. 23 9月, 2015 1 次提交
  13. 19 8月, 2015 1 次提交
  14. 15 8月, 2015 1 次提交
  15. 31 7月, 2015 1 次提交
  16. 23 7月, 2015 1 次提交
  17. 08 5月, 2015 1 次提交
    • A
      usb: gadget: rndis: remove the limit of available rndis connections · d6d22922
      Andrzej Pietrasiewicz 提交于
      RNDIS function has a limitation on the number of allowed instances.
      So far it has been RNDIS_MAX_CONFIGS, which happens to be one.
      In order to eliminate this kind of arbitrary limitation we should not
      preallocate a predefined (RNDIS_MAX_CONFIGS) array of struct rndis_params
      instances but instead allow allocating them on demand.
      
      This patch allocates struct rndis_params on demand in rndis_register().
      Coversly, the structure is free()'d in rndis_deregister().
      If CONFIG_USB_GADGET_DEBUG_FILES is set, the proc files are created which
      is the same behaviour as before, but the moment of creation is delayed
      until struct rndis_params is actually allocated.
      
      rnids_init() and rndis_exit() have nothing to do, so they are eliminated.
      Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      d6d22922
  18. 07 5月, 2015 1 次提交
  19. 28 4月, 2015 1 次提交
  20. 18 3月, 2015 1 次提交
  21. 11 3月, 2015 1 次提交
  22. 13 1月, 2015 18 次提交