From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Dmitry Torokhov <dtor@chromium.org>
Cc: Alan Stern <stern@rowland.harvard.edu>,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH] usb: core: add option of only authorizing internal devices
Date: Fri, 22 Feb 2019 09:27:44 +0100 [thread overview]
Message-ID: <20190222082744.GA6963@kroah.com> (raw)
In-Reply-To: <20190217072151.GA244815@dtor-ws>
On Sat, Feb 16, 2019 at 11:21:51PM -0800, Dmitry Torokhov wrote:
> 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>
> ---
> .../admin-guide/kernel-parameters.txt | 3 +-
> Documentation/usb/authorization.txt | 4 +-
> drivers/usb/core/hcd.c | 51 +++++++++++--------
> drivers/usb/core/usb.c | 33 +++++++++---
> include/linux/usb/hcd.h | 10 ++--
> 5 files changed, 69 insertions(+), 32 deletions(-)
>
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index aefd358a5ca3..4446919089b9 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -4675,7 +4675,8 @@
> usbcore.authorized_default=
> [USB] Default USB device authorization:
> (default -1 = authorized except for wireless USB,
> - 0 = not authorized, 1 = authorized)
> + 0 = not authorized, 1 = authorized, 2 = authorized
> + if device connected to internal port)
Oh nice, another "simple" flag modified over time to be more complex :(
Anyway, that's fine, it's how APIs grow, just grumpy...
This all looks good to me, I'll go queue it up now.
greg k-h
prev parent reply other threads:[~2019-02-22 8:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-17 7:21 [PATCH] usb: core: add option of only authorizing internal devices Dmitry Torokhov
2019-02-22 8:27 ` Greg Kroah-Hartman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190222082744.GA6963@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=dtor@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).