Re: f_ops flag to speed up compatible ioctls in linux kernel

Michael S. Tsirkin
2004-09-01T23:21:53Z

Quoting r. Roland Dreier (roland@topspin.com) "Re: f_ops flag to speed up compatible ioctls in linux kernel":
> Roland> Yes, this is exactly right. One issue raised by this
> Roland> thread is that the ioctl32 compatibility code only allows
> Roland> one compatibility handler per ioctl number. It seems that
> Roland> this creates all sorts of possibilities for mayhem because
> Roland> it makes the ioctl namespace global in scope in some
> Roland> situations. Does anyone have any thoughts on if/how this
> Roland> should be addressed?
>
> Michael> Thats what my original patch attempts to address
> Michael> http://www.uwsg.indiana.edu/hypermail/linux/kernel/0409.0/0025.html
> Michael> What do you think?
>
> That patch seems somewhat orthogonal to the issue I raised. You're
> just fixing the problem for devices that don't use the ioctl32 compat
> layer.
>

No I'm removing the need for ioctls to go through the compat layer.
No compat layer, no problem.

I see the compat layer as a hack to support legacy devices without touching
all of their code.
I dont see why a new driver would use the compat hacks instead of simply
building a 32/64 bit compatible interface, and legacy drivers have the
uniqueness for commands solved one way or another.

So the only interesting problem left is for new char devices.

MST