Date: Thu, 2 Jul 2020 10:47:43 +0200 From: Jan Behrens <jbe-mlist@magnetkern.de> To: Hans Petter Selasky <hps@selasky.org> Cc: "freebsd-usb@FreeBSD.org" <freebsd-usb@freebsd.org> Subject: Re: USB reset fails when using a LimeSDR Mini on FreeBSD Message-ID: <20200702104743.223e98c325806025704703f2@magnetkern.de> In-Reply-To: <97c8fd11-9200-dff7-4c68-b0b80cc44871@selasky.org> References: <20200625121052.e9f7e7cbeb68fad264ec80a9@magnetkern.de> <20200625200849.6af81489a80c2f97d4f89ee6@magnetkern.de> <CAM8r67AE1K9AK%2BaL4RCn6_BWajvzKO7K99bYZMdH0mr-HQdyGw@mail.gmail.com> <20200625224522.44d6584465cb6e20d17be320@magnetkern.de> <0ec3e5a3-7f31-d1cd-6862-6066c431aa80@selasky.org> <20200626135151.e5542cf97fad213c4ad661f2@magnetkern.de> <5c0729f9-9e98-52f7-a5cb-6c5dfd2287a3@selasky.org> <20200626172851.872f3a08fa6e632666683230@magnetkern.de> <CAM8r67AF%2BfGiqBr9A0863Za_zR-fG1FxGfNAqEvvafW=wTRmyQ@mail.gmail.com> <20200627144419.f14371695d9b62ea99106c4a@magnetkern.de> <CAM8r67DTKdj0%2BhkOegjBj-ywzWFq2CnS2sQed0mibSUeGp6HSQ@mail.gmail.com> <20200627173604.7f7b7777140e66dbad812fc7@magnetkern.de> <CAM8r67DqZzje=JnrT_R3d6Uo_NxjvGsvpydd1NOTrJHU2jHzQA@mail.gmail.com> <20200627180420.4b8012fb@ernst.home> <20200702103523.adb0566bcc7b6e354905a8a5@magnetkern.de> <97c8fd11-9200-dff7-4c68-b0b80cc44871@selasky.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2 Jul 2020 10:41:42 +0200 Hans Petter Selasky <hps@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200702104743.223e98c325806025704703f2>