Re: [discuss] Re: [PATCH] macros to detect existance of unlocked_ioctl and ioctl_compat

From: Andi Kleen
Date: Fri Jan 07 2005 - 07:33:47 EST


> As a quick fix, wouldn't it be easy enough to just mark USBDEVFS_IOCTL as
> COMPATIBLE_IOCTL()? The number is actually different for 32 and 64 bit kernels,
> so a 32 bit application that knows about this could use 64 bit data structures
> and then just call ioctl(fd, USBDEVFS_IOCTL64, data) instead of using a weird
> hack to achieve exactly the same.
> Applications trying to call the 32 bit USBDEVFS_IOCTL would still see -EINVAL
> because there is no wrapper for this.
> Maybe the same can be done for some of the other ioctl calls. It effectively
> means moving part of the compat layer to user space from fs/compat_ioctl.c,
> but it appears that applications are already doing this.

That's too ugly. We would end up with different ABIs.
I don't really want to do that, no.

-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/