Messages in this thread | | | From | Arnd Bergmann <> | Subject | Re: ioctl cleanups: enable sg_io and serial stuff to be shared | Date | Thu, 8 May 2003 17:23:19 +0200 |
| |
Gerd Knorr wrote:
> ioctl struct size and the ioctl number (which has the size encoded) > should end up being different too. Anyone aware of corner cases where > this isn't going to work?
About half of the ioctls that need special care have fixed numbers instead of using _IOR() etc, see e.g. include/linux/sockios.h, or they get the definition wrong in some way.
The way you do it in your patch could work for many cases, but it won't be enough to eliminate HANDLE_IOCTL(), if that is desired.
Adding fops->compat_ioctl() makes it possible to eventually replace all HANDLE_IOCTL() and keep only COMPATIBLE_IOCTL(), which in turn would become simpler to deal with. If we don't add fops->compat_ioctl(), the ioctl handlers could however look at (current_thread_info()->flags & _TIF_32BIT) to find out if which user data structure they should expect. Is that reliable? Do we already have a macro to do it?
Arnd <>< - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |