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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 21, 2005 at 08:32:25AM -0400, Bagalkote, Sreenivas wrote:
> >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.

Yes.  This is what is meant by "thunk".
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux