x86_64 and ioctls from 32 bit userland
Hi, a question about x86_64 and ioctls coming in from 32-bit userland.
I found this document describing 32-bit ioctls on 64 bit archs,
http://shorterlink.com/?47B2OV
but, it is from July of 2002, so I'm not sure it's up to date. Should I look somewhere else?
Also, if my userland process passes in an ioctl data structure and that data structure in turn contains ontains a 32 bit pointer to another data buffer within that process' address space the kernel needs to copy in/oot, how can that be handled? Can it be handled?
Thanks,
-- steve
__________________________________
Do you Yahoo!?
Yahoo! Domains – Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer
Quoted 14 lines · Stephen Cameron
Hi, a question about
x86_64and ioctls coming in from 32-bit userland.I found this document describing 32-bit ioctls on 64 bit archs,
http://shorterlink.com/?47B2OV
but, it is from July of 2002, so I'm not sure it's up to date. Should I look somewhere else?Also, if my userland process passes in an ioctl data structure and that data structure in turn contains ontains a 32 bit pointer to another data buffer within that process' address space the kernel needs to copy in/oot, how can that be handled? Can it be handled?
Quoted 3 lines
Thanks,
-- steve
Yes. The user-mode 32-bit pointer within a structure is no different than passing a 32-bit user-mode pointer as the third parameter to an ioctl(fd, WHAT, ptr).
Cheers,
Dick Johnson
Penguin : Linux version 2.4.26 on an i686 machine (5570.56 BogoMips).
Note 96.31% of all statistics are fiction.
Quoted 1 line · --- "Richard B. Johnson
On Fri, 21 May 2004, Stephen Cameron wrote:
[...]
Quoted 5 lines
Yes. The user-mode 32-bit pointer within a structure is no different than passing a 32-bit user-mode pointer as the third parameter to an
ioctl(fd, WHAT, ptr).
Thanks, I've got it working now.
-- steve
__________________________________
Do you Yahoo!?
Yahoo! Domains – Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer