[PATCH v2 0/2] usb: gadgetfs: support delegation of GET_DESCRIPTOR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch series adds support for delegation of GET_DESCRIPTOR requests
from GadgetFS to user mode driver. This will allow deeper testing of USB
hosts using GadgetFS, since it allows a user mode driver to control the
responses to to GET_DESCRIPTOR requests, and respond with malformed
descriptors.

Enabling this feature will break compatibility, since GadgetFS will not
handle GET_DESCRIPTOR requests, although every user-mode driver so far
expects it to.

So we add three protection mechanisms to avoid this:

- enabling this feature will only be possible by enabling
  USB_GADGETFS_ALLOW_DELEGATE_DESCRIPTOR in Kconfig, which depends
  enabling EXPERT as well.
- even when enabled in Kconfig, delegation will be disabled until an
  appropriate ioctl on the control endpoint file descriptor is issued.
- enabling this feature is done per file descriptor. if a user enables
  this feature and then close and re-open the control endpoint file,
  the feature will be disabled until the ioctl will be issued on the new
  file descriptor.

-- 
Binyamin Sharet,
Cisco, STARE-C


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux