[systemd-devel] WebUSB

Lars Knudsen larsgk at gmail.com
Fri Jan 20 12:18:12 UTC 2017


On Fri, Jan 20, 2017 at 1:11 PM, Greg KH <gregkh at linuxfoundation.org> wrote:

> On Fri, Jan 20, 2017 at 12:55:20PM +0100, Lars Knudsen wrote:
> > On Fri, Jan 20, 2017 at 12:05 PM, Greg KH <gregkh at linuxfoundation.org>
> wrote:
> >     >  - so if we can make a rule that consistently detects USB devices
> with a
> >     WebUSB
> >     > interface defined, we should get this in as a standard rule.
> >
> >     Sure, feel free to write the helper binary that will do this.
> >
> > Cool, I am still wondering if we could do it with a script.  Do you have
> an
> > example of a binary for udev?
> > (I am assuming it's a source for a plugin to be shipped with and
> callable by
> > udev?)
>
> Yes, you could do it with a script, just look at the interface
> information in sysfs, it all should be exported there properly.  If not,
> please let me know.
>
> >     > Is it possible to give access on an interface level - or would it
> always
> >     have
> >     > to be the full device?
> >
> >     How would you provide userspace access to only one USB interface on
> >     Linux?
> >
> > The full device should be fine if it has a WebUSB interface (even in a
> > composite scenario)
>
> Really?  You want to allow someone "raw" access to a composite device
> just because of one specific interface?
>

Ideally, I would only allow the browsers running in user space and only the
WebUSB interface.
- but would that even be possible on Linux? (now/future).

We should remember that devices with a WebUSB interface included were
*made* for user access (what else would be the point?).

Also: We *do* need a 'blanket' solution for these as manufactures can't
always wait for the next time all planets align
and e.g. Ubuntu chooses to upgrade the rules.  Just fyi, last time I was in
similar discussions in the smae lists, it took
some years for it to land in Ubuntu:
https://medium.com/@larsgk/web-enabling-legacy-devices-dc3ecb9400ed#.7l1hztlmi




> Yeah, it's a pain, and a side affect of the libusb api :(
>
> thanks,
>
> greg k-h
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20170120/6979fd47/attachment.html>


More information about the systemd-devel mailing list