lkml.org 
[lkml]   [2003]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: ioctl cleanups: enable sg_io and serial stuff to be shared
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.147 / U:0.976 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site