linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg59@coreos.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Kees Cook <keescook@chromium.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	kernel-hardening@lists.openwall.com
Subject: Re: [PATCH] Allow userspace to request device probing even if defer_all_probes is true
Date: Wed, 4 Jan 2017 13:53:45 -0600	[thread overview]
Message-ID: <CAPeXnHtyXVvDGpJeUHsLES2FVVD7r_EWmzPwC6pO=2+W3eo-Kw@mail.gmail.com> (raw)
In-Reply-To: <20170104194214.GB25268@kroah.com>

On Wed, Jan 4, 2017 at 1:42 PM, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> On Wed, Jan 04, 2017 at 12:11:49PM -0600, Matthew Garrett wrote:
>> Userspace doesn't know the order that the kernel will use when
>> attempting to bind drivers, so punting binding out to userspace may
>> result in different behaviour.
>
> How can the order in which drivers are bound result in different
> behavior?

If you have two loaded drivers that could bind to the device then the
order you attempt to bind them in will matter.

>> The kernel already has the code to do this, so we should just reuse
>> it.
>
> That's fine, but I don't understand the problem you are trying to solve,
> please explain better.  What am I missing here?

If you plug in a device while defer_all_probes is true, it won't be
bound - that's the point. But if you have a USB keyboard and unplug it
and plug it, you'd then end up with no keyboard. So you want userspace
to be able to make an appropriate policy decision around which devices
should be bound, and you need a mechanism to allow userspace to
trigger that binding.

  reply	other threads:[~2017-01-04 20:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-03 23:07 [PATCH] Allow userspace to request device probing even if defer_all_probes is true Kees Cook
2017-01-04  9:13 ` Greg Kroah-Hartman
2017-01-04 18:11   ` Matthew Garrett
2017-01-04 19:42     ` Greg Kroah-Hartman
2017-01-04 19:53       ` Matthew Garrett [this message]
2017-01-04 20:03         ` Greg Kroah-Hartman
2017-01-04 20:06           ` Matthew Garrett

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='CAPeXnHtyXVvDGpJeUHsLES2FVVD7r_EWmzPwC6pO=2+W3eo-Kw@mail.gmail.com' \
    --to=mjg59@coreos.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-kernel@vger.kernel.org \
    /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).