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

From: Petr Vandrovec
Date: Thu Jan 06 2005 - 13:28:57 EST


On Thu, Jan 06, 2005 at 06:53:42PM +0100, Andi Kleen wrote:
> [cc list trimmed]
> >
> > * floppy: it is actually different from examples above, as FDRAWCMD command is
> > supported by 32->64 layer, but it is supported incorrectly. Due to this all above
> > started, as we had to make application aware of kernel it runs on, as FDRAWCMD on 32bit
> > kernel returns 80 byte structure, while 104 byte on 64bit kernel, and you do not now
> > which one you'll get until you call this ioctl... And once we had code in place,
> > it was reused for USB and later for ppdev & serial.
>
> Did you submit a patch for that? If not you should.

I hoped that floppies will die before... FDRAWCMD receives array
of floppy_raw_cmd structures, and to find how many of these structures
you have to peek into every of them to find whether there is next one or
not, and structures itself contain pointers to other memory... I'll code up
something during weekend.

> > So we added simple wrapper to vmmon which just gets {64bit-ioctl-number, 64bit-arg-argument}
> > and passes it down to 64bit sys_ioctl:
>
> The magic 64bit interface isn't a very good interface, don't expect
> that to be supported in the future.

With per-file compat_ioctl ipx ioctls (using SIOCPRIVATE+X range) could
be made to work too, so only thing left for me is USB.
Petr Vandrovec

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