RE: mmap() and ioctl()

2005-04-05 Thread Aleksey Gorelov
>-Original Message- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of Matthew Dharm >Sent: Monday, April 04, 2005 12:20 PM >To: Richard B. Johnson >Cc: Kernel Developer List >Subject: Re: mmap() and ioctl() > [snip] >That's an inter

RE: mmap() and ioctl()

2005-04-05 Thread Aleksey Gorelov
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matthew Dharm Sent: Monday, April 04, 2005 12:20 PM To: Richard B. Johnson Cc: Kernel Developer List Subject: Re: mmap() and ioctl() [snip] That's an interesting concept, and one I'm not familiar

Re: mmap() and ioctl()

2005-04-04 Thread Matthew Dharm
ther process or > an interrupt. In other words, you can't store it somewhere and > access it later in some other context. Right, I've got that part. The plan has been to mmap(), ioctl(), and inside the ioctl do a copy_from_user() into a kernel-context buffer. > >Yeah, that's an odd con

Re: mmap() and ioctl()

2005-04-04 Thread Richard B. Johnson
On Mon, 4 Apr 2005, Matthew Dharm wrote: This probably is a silly question, but Is is possible to open a file, mmap() it into memory, then pass the address of that map via an ioctl() call to the kernel, which will copy_from_user() that data? Yes. A user-mode pointer, passed via ioctl() is

mmap() and ioctl()

2005-04-04 Thread Matthew Dharm
This probably is a silly question, but Is is possible to open a file, mmap() it into memory, then pass the address of that map via an ioctl() call to the kernel, which will copy_from_user() that data? Yeah, that's an odd concept, I know... I could always malloc() some memory, read the file

mmap() and ioctl()

2005-04-04 Thread Matthew Dharm
This probably is a silly question, but Is is possible to open a file, mmap() it into memory, then pass the address of that map via an ioctl() call to the kernel, which will copy_from_user() that data? Yeah, that's an odd concept, I know... I could always malloc() some memory, read the file

Re: mmap() and ioctl()

2005-04-04 Thread Richard B. Johnson
On Mon, 4 Apr 2005, Matthew Dharm wrote: This probably is a silly question, but Is is possible to open a file, mmap() it into memory, then pass the address of that map via an ioctl() call to the kernel, which will copy_from_user() that data? Yes. A user-mode pointer, passed via ioctl() is

Re: mmap() and ioctl()

2005-04-04 Thread Matthew Dharm
and access it later in some other context. Right, I've got that part. The plan has been to mmap(), ioctl(), and inside the ioctl do a copy_from_user() into a kernel-context buffer. Yeah, that's an odd concept, I know... I could always malloc() some memory, read the file in, and then ioctl