Re: Address spaces on a i386 - Getting Confused

Richard Gooch (rgooch@atnf.csiro.au)
Tue, 30 Mar 1999 22:26:34 +1000


David Miller writes:
> From: Paul Sargent <Paul.Sargent@3dlabs.com>
> Date: Tue, 30 Mar 1999 13:12:25 +0100
>
> So presumably the other option is to allocate kernel memory and
> then pass a pointer to it back to user space. Is that possible?
>
> The user can't get at it, because it is in kernel space which is
> protected from user accesses. If we allowed that, any user could just
> set his uid to zero and become root :-)
>
> I think unless you are willing to go into the hair the bttv driver
> does, you're going to need to have the device put it into a kernel
> buffer and then copy it into user space.

He should be able to allocate kernel pages and mmap() them to user
space. Then he can DMA into the pages and wake up the user process
when it's done.

Regards,

Richard....

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/