Hi everyone, This patch introduces a new ioctl, USBDEVFS_DROP_PRIVILEGES, to voluntarily forgo the ability to issue ioctls which may interfere with other users of the USB device.
This feature allows a privileged process (in the case of Chrome OS, permission_broker) to open a USB device node and then drop a number of capabilities that are considered "privileged". These privileges include the ability to reset the device if there are other users (most notably a kernel driver) or to disconnect a kernel driver from the device. The file descriptor can then be passed to an unprivileged process. This is useful for granting a process access to a device with multiple functions. It won't be able to use its access to one function to disrupt or take over control of another function. This patch is currently being used in Chrome OS; I have updated it to be in line with changes in v4.4-rc. Cheers! Emilio Reilly Grant (1): usb: devio: Add ioctl to disallow detaching kernel USB drivers. drivers/usb/core/devio.c | 50 +++++++++++++++++++++++++++++++++++---- include/uapi/linux/usbdevice_fs.h | 1 + 2 files changed, 47 insertions(+), 4 deletions(-) -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-api" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html