Re: [PATCH RESEND (1-3)/4] Add usb interface authorization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 9 Jun 2015, Stefan Koch wrote:

> Am Dienstag, den 09.06.2015, 10:31 -0400 schrieb Alan Stern:
> > On Tue, 9 Jun 2015, Stefan Koch wrote:
> > 
> > > Hi
> > > 
> > > I think whitespaces should be ok now. I have tested now three mail
> > > clients...
> > > 
> > > This patch series enables the interface authorization. The description
> > > is improved now. Is the series correct now?
> > 
> > This patch series is much, much more complicated than necessary.
> > 
> > > The first patch allows to handle the probing of drivers
> > >  manually.
> > 
> > Why do you do that?  It's completely unrelated to the problem of
> > authorizing USB interfaces.
> To prevent drivers from binding.

But you don't care about all drivers in general; you only care about
drivers binding to USB interfaces.  So you should change only the USB 
binding routines, not the routines in drivers/base/bus.c.

> > > And the third patch introduces the usb interface authorization. This is
> > > the main concern of this kernel modification.
> > 
> > This patch also is more complicated than it should be.  Why do you want
> > to unregister and then re-register the interfaces?  All you need to do
> > is unbind drivers and prevent other drivers from binding.
> Do you see a much simplier method to prevent drivers from binding as
> with patch 1?

Yes, and you already included it in your 3/4 patch -- the changes you 
made to usb_probe_interface() and usb_claim_interface().

> Another approach could be to check in bus_probe_device() (bus.c) if the
> bus is "usb" and then use to_usb_interface() or so on and check the intf
> auth status bit.

Again, why bother?  It's silly to check for the usb bus in 
bus_probe_device(), when usb_probe_interface() already _knows_ that the 
bus is usb.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux