On Tue, Apr 26, 2022 at 09:14:04AM +0200, Oliver Neukum wrote: > > > On 26.04.22 04:27, Peter Hutterer wrote: > > > > chiming in here: the hidraw ioctl is independent (as already mentioned) > > but it's basically the same approach and/or intent. The hidraw revoke ioctl is > > "the evdev revoke, but for hidraw", this one is "the evdev revoke, but for > > usb". Not very creative, but at least we can point to prior art and say "this > > seems to be useful" :) > > > > The primary focus of all this are joystick devices (unless I missed some other > > grand plans Bastien had that I'm not aware of), that should put things in > > context a bit. > > > Hi, > > taking the advantages as a given, I must still ask, why this, if it is > so useful, > should be implemented for each subsystem separately. I cannot help but > say that this should go into the VFS. Yes, but, it's not so simple. Many people have asked for revoke() to be added as a syscall like is in the BSDs, but the BSDs only allow that for a very small subset of file descriptor types, and doing it in a generic fashion seems very difficult (I tried a few years ago and gave up, but my knowledge of the vfs layer is minimal.) However doing it as a per-device/subsystem ioctl also seems crazy so perhaps we do just implement it at the vfs layer and let whatever device/filesystem type that wants to support it, hook up to it. That would make it much easier over time to implement in a way that works for everyone and is easier to understand from userspace. thanks, greg k-h