sys_ioctl export consolidation
Quoted 6 lines · Christoph Hellwig
Should ioctl32 handlers in drivers really call
sys_ioctl? Callingsys_ioctlmakes sense for ioctls that are supported by a broad range of drivers, but in that case the ioctl32 translation should be in the core compat code.Drivers using
register_ioctl32_conversionshould rather call their own ioctl handlers directly if you ask me.
I think it is better to call sys_ioctl always from the wrappers and only convert the arguments. This way you are guaranteed to not get subtle differences in behaviour. This gives a clear layering. Otherwise driver writers have to do this ad-hoc and only chaos can evolve from that.
In addition this is how all the current ioctl handlers work, no need to be different.
-Andi