usb: core: add option of only authorizing internal devices
authorDmitry Torokhov <dtor@chromium.org>
Sun, 17 Feb 2019 07:21:51 +0000 (23:21 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 Feb 2019 08:27:55 +0000 (09:27 +0100)
commit7bae0432a64aa7569dbd0feb2927fd3ff913901f
tree6af0b4f35bb5eb87326f546a18597c00d06942a2
parentca942a0ed019f98c156cdb3de78b3d76bf381b12
usb: core: add option of only authorizing internal devices

On Chrome OS we want to use USBguard to potentially limit access to USB
devices based on policy. We however to do not want to wait for userspace to
come up before initializing fixed USB devices to not regress our boot
times.

This patch adds option to instruct the kernel to only authorize devices
connected to the internal ports. Previously we could either authorize
all or none (or, by default, we'd only authorize wired devices).

The behavior is controlled via usbcore.authorized_default command line
option.

Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/admin-guide/kernel-parameters.txt
Documentation/usb/authorization.txt
drivers/usb/core/hcd.c
drivers/usb/core/usb.c
include/linux/usb/hcd.h