On Thu, Mar 16, 2000 at 11:48:17AM -0500, John Wilson wrote:
> Anyway as I said in my original message, I've already got the driver
> more or less working (well, readl() seems to be returning what should be
> "impossible" values some of the time) by using a driver-owned buffer which
> the user job mmaps into a window. But I consider that a kludge. I'm a big
> fan of doing what I actually *mean* whenever possible, rather than living
> with some twisted hack that happens to work *most* of the time, so I'd prefer
> to simulate the effect of doing DMA into the user's buffer, by *really* doing
> DMA into the user's buffer!
That is a perfectly reasonable way to approach the problem. IMO, the
alternative is a hack: for each page in the user space buffer, you need
to fault it into RAM, or more likely, fault it into existence. Then you
need to lock it into RAM and reserve each page. For the vmalloc'd
solution, you just need to reserve each page.
It also isn't riddled with potential security holes. Imagine DMA'ing
into the C library.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to email@example.com
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Thu Mar 23 2000 - 21:00:19 EST