Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: interface authorization: Documentation part

This part adds the documentation for the interface authorization.

Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Stefan Koch and committed by
Greg Kroah-Hartman
7f59c150 310d2b41

+51
+20
Documentation/ABI/testing/sysfs-bus-usb
··· 1 + What: /sys/bus/usb/devices/INTERFACE/authorized 2 + Date: August 2015 3 + Description: 4 + This allows to authorize (1) or deauthorize (0) 5 + individual interfaces instead a whole device 6 + in contrast to the device authorization. 7 + If a deauthorized interface will be authorized 8 + so the driver probing must be triggered manually 9 + by writing INTERFACE to /sys/bus/usb/drivers_probe 10 + This allows to avoid side-effects with drivers 11 + that need multiple interfaces. 12 + A deauthorized interface cannot be probed or claimed. 13 + 14 + What: /sys/bus/usb/devices/usbX/interface_authorized_default 15 + Date: August 2015 16 + Description: 17 + This is used as value that determines if interfaces 18 + would be authorized by default. 19 + The value can be 1 or 0. It's by default 1. 20 + 1 21 What: /sys/bus/usb/device/.../authorized 2 22 Date: July 2008 3 23 KernelVersion: 2.6.26
+31
Documentation/usb/authorization.txt
··· 90 90 can fake descriptors and device info. Don't trust that. You are 91 91 welcome. 92 92 93 + 94 + Interface authorization 95 + ----------------------- 96 + There is a similar approach to allow or deny specific USB interfaces. 97 + That allows to block only a subset of an USB device. 98 + 99 + Authorize an interface: 100 + $ echo 1 > /sys/bus/usb/devices/INTERFACE/authorized 101 + 102 + Deauthorize an interface: 103 + $ echo 0 > /sys/bus/usb/devices/INTERFACE/authorized 104 + 105 + The default value for new interfaces 106 + on a particular USB bus can be changed, too. 107 + 108 + Allow interfaces per default: 109 + $ echo 1 > /sys/bus/usb/devices/usbX/interface_authorized_default 110 + 111 + Deny interfaces per default: 112 + $ echo 0 > /sys/bus/usb/devices/usbX/interface_authorized_default 113 + 114 + Per default the interface_authorized_default bit is 1. 115 + So all interfaces would authorized per default. 116 + 117 + Note: 118 + If a deauthorized interface will be authorized so the driver probing must 119 + be triggered manually by writing INTERFACE to /sys/bus/usb/drivers_probe 120 + 121 + For drivers that need multiple interfaces all needed interfaces should be 122 + authroized first. After that the drivers should be probed. 123 + This avoids side effects.