[lkml]   [2000]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: DMA to user space
    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
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:57    [W:0.026 / U:0.984 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site