RE: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

From: Bagalkote, Sreenivas
Date: Fri Oct 21 2005 - 07:33:08 EST


>Jeff Garzik wrote:
>> Do you know where there are some clear guidelines on the use of
>> pointers in a structure passed to an ioctl to lessen (or bypass)
>> 32<->64 compat ioctl thunking?
>
>Its impossible. If you pass pointers, you need to thunk.
>(Not even passing pointers via sysfs can avoid this.)
>Consider running a 32-bit app (with 32-bit pointers and 32-bit
>ABI) on a 64-bit kernel.

The drivers/scsi/megaraid/megaraid_mm.c simply calls regular ioctl
from within the compat_ioctl, though it does copy to and from the
userland pointers. This is done by adding appropriate padding.

Sincerely,
Sreenivas
-
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/