Re: [PATCH] Allow userspace to request device probing even if defer_all_probes is true

2017-01-04 Thread Matthew Garrett
On Wed, Jan 4, 2017 at 1:42 PM, Greg Kroah-Hartman 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. >

Re: [PATCH] Allow userspace to request device probing even if defer_all_probes is true

2017-01-04 Thread Matthew Garrett
On Wed, Jan 4, 2017 at 2:03 PM, Greg Kroah-Hartman wrote: > On Wed, Jan 04, 2017 at 01:53:45PM -0600, Matthew Garrett wrote: >> If you have two loaded drivers that could bind to the device then the >> order you attempt to bind them in will matter. > > If you have that, you are screwed no matter wh

Re: [PATCH] Allow userspace to request device probing even if defer_all_probes is true

2017-01-04 Thread Greg Kroah-Hartman
On Wed, Jan 04, 2017 at 01:53:45PM -0600, Matthew Garrett wrote: > On Wed, Jan 4, 2017 at 1:42 PM, Greg Kroah-Hartman > 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, s

Re: [PATCH] Allow userspace to request device probing even if defer_all_probes is true

2017-01-04 Thread Greg Kroah-Hartman
On Wed, Jan 04, 2017 at 12:11:49PM -0600, Matthew Garrett wrote: > On Wed, Jan 4, 2017 at 3:13 AM, Greg Kroah-Hartman > wrote: > >> Add a force_probe sysfs node to each device, which if written will > >> trigger a probe even if defer_all_probes is currently true. > > > > Why not just manually trig

Re: [PATCH] Allow userspace to request device probing even if defer_all_probes is true

2017-01-04 Thread Matthew Garrett
On Wed, Jan 4, 2017 at 3:13 AM, Greg Kroah-Hartman wrote: >> Add a force_probe sysfs node to each device, which if written will >> trigger a probe even if defer_all_probes is currently true. > > Why not just manually trigger the bind of the device? I don't > understand the problem here that is be

Re: [PATCH] Allow userspace to request device probing even if defer_all_probes is true

2017-01-04 Thread Greg Kroah-Hartman
On Tue, Jan 03, 2017 at 03:07:20PM -0800, Kees Cook wrote: > From: Matthew Garrett > > Userspace may wish to make a policy decision to allow certain devices > to be attached, such as keyboards. I don't understand what that sentance means. Why wouldn't keyboards be attached? > Add a force_probe

[PATCH] Allow userspace to request device probing even if defer_all_probes is true

2017-01-03 Thread Kees Cook
From: Matthew Garrett Userspace may wish to make a policy decision to allow certain devices to be attached, such as keyboards. Add a force_probe sysfs node to each device, which if written will trigger a probe even if defer_all_probes is currently true. Signed-off-by: Matthew Garrett Signed-off