Re: ioctl cleanups: enable sg_io and serial stuff to be shared

Arnd Bergmann
2003-05-08T23:27:23Z

On Friday 09 May 2003 01:03, Pavel Machek wrote:

> > Suggest something sane like defining a macro such as
> > "compat_task(tsk)" that can be tested by various bits of
> > code.
>
> That makes more sense. Unfortunately, that means that case "okay, it
> is compatible" can not be told from "we did not bother to check
> compat_task()". :-(. Nor do I see a transition phase.

You still need to list them as COMPATIBLE_IOCTL() or call
register_ioctl32_conversion(IOCTLNO, 0) when the ioctl has been
made compatible. Unless we are sure that every single ioctl
has been made compatible (probably never), the default must
be to call sys_ioctl from compat_sys_ioctl only if the number
is explicitly listed. This should solve both problems you
mentioned.

One minor remaining problem is that if multiple files contain
handlers for the same ioctl number, they have to be converted
at the same time because the number can not both be compatible
and incompatible at the same time.