LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* x86_64 and ioctls from 32 bit userland
@ 2004-05-21 19:42 Stephen Cameron
  2004-05-21 22:58 ` Richard B. Johnson
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Cameron @ 2004-05-21 19:42 UTC (permalink / raw)
  To: linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 701 bytes --]

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 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: x86_64 and ioctls from 32 bit userland
  2004-05-21 19:42 x86_64 and ioctls from 32 bit userland Stephen Cameron
@ 2004-05-21 22:58 ` Richard B. Johnson
  2004-05-24 16:45   ` Stephen Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: Richard B. Johnson @ 2004-05-21 22:58 UTC (permalink / raw)
  To: Stephen Cameron; +Cc: linux-kernel

On Fri, 21 May 2004, Stephen Cameron wrote:

> 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

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.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: x86_64 and ioctls from 32 bit userland
  2004-05-21 22:58 ` Richard B. Johnson
@ 2004-05-24 16:45   ` Stephen Cameron
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Cameron @ 2004-05-24 16:45 UTC (permalink / raw)
  To: root; +Cc: linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 483 bytes --]


--- "Richard B. Johnson" <root@chaos.analogic.com> wrote:
> On Fri, 21 May 2004, Stephen Cameron wrote:
[...]
> 
> 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 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-05-24 16:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-21 19:42 x86_64 and ioctls from 32 bit userland Stephen Cameron
2004-05-21 22:58 ` Richard B. Johnson
2004-05-24 16:45   ` Stephen Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).