Hey, On Mon, 2022-04-25 at 15:23 +0200, Bastien Nocera wrote: > Note that this variant needs to do a few things that the evdev revoke > doesn't need to handle, particular: > - cancelling pending async transfers > - making sure to release claimed interfaces on revoke so they can be > opened by another process/user, as USB interfaces require being > exclusively claimed to be used. This is a first version of the patch, untested as yet (although I at least checked that it compiled...). I wanted to have comments on whether I was on the right path, in terms of coding style, but also that I had plugged all the entry points that would allow a user to communicate with a USB device after revocation. I also have a local patch that allows using BPF to revoke a USB device that's trivial so would need testing before posting. You can find links to Peter's hidraw revocation patches at: https://github.com/systemd/systemd/pull/23140#issue-1210571942 Cheers