Skip to contentSkip to conversation

sys_ioctl export consolidation

DISCUSSION Andi Kleen 1 participant 1 message May 7, 2004 2 messages not in the archive

lore
Share & tools
lore

Andi Kleen

author
#2 lore raw
In reply to a message not in the archive
Quoted 6 lines · Christoph Hellwig

Should ioctl32 handlers in drivers really call sys_ioctl? Calling sys_ioctl makes 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_conversion should 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