USB reset fails when using a LimeSDR Mini on FreeBSD
Jan Behrens
jbe-mlist at magnetkern.de
Thu Jul 2 08:47:45 UTC 2020
On Thu, 2 Jul 2020 10:41:42 +0200
Hans Petter Selasky <hps at selasky.org> wrote:
> On 2020-07-02 10:35, Jan Behrens wrote:
> > Thus Linux definitely behaves differently here. My question is: Can
> > and/or should FreeBSD be fixed to allow libusb_reset_device() as a user
> > or should a driver library be fixed to not use that call.
>
> This is an architectural problem. USB devices may have interfaces with
> independent drivers attached. If one USB interface driver is running as
> root and another USB interface driver is running as non-root, it doesn't
> make sense that the non-root device driver should be able to affect the
> root-one.
But wouldn't both drivers require access to the entries in /dev ?
Thus not every user could mess with any USB device, or do I get it
wrong?
> Your LimeSDR device appears to be very simple, having just one
> USB device driver attaching to it. Just imagine some web-page trying to
> reset your USB device, just because it can! Yes, USB is also exposed to
> firefox nowadays :-)
My webbrowser runs as different user than the programs that get access
to emit radio emissions on my behalf.
>
> What we could do is to add a sysctl which controls the behaviour for
> this specific case. Would that be of any use to you?
You mean allowing users to reset USB devices? Only those which the
users have access to on the /dev filesystem? Or all devices?
>
> --HPS
>
Regards,
Jan
More information about the freebsd-usb
mailing list