Re: sys_ioctl export consolidation

From: Andi Kleen
Date: Fri May 07 2004 - 01:18:48 EST


Christoph Hellwig <hch@xxxxxxxxxxxxx> writes:

> 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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/