integrity of user-space copy

B. James Phillippe (bryan@terran.org)
Fri, 7 May 1999 15:26:51 -0700 (PDT)


Greetings,

When copying data to/from user-space, we know the operation can sleep. And
interrupt driven events (including timers) can interrupt even a
non-sleeping user-space access, right?

So in general practice, what is the preferred method of transferring data
to user-space if that data is operated on by something like a kernel timer?
For instance, if I have a block of data about 32k in size that is
(potentially) manipulated on timer expiration, what is the best way to
safely copy it to user-space intact? Disabling interrupts is not a good
idea because the user-space access might sleep. Should I simply copy the
data first with interrupts disabled, and then do the transfer?

-bp

--
B. James Phillippe		. bryan@terran.org
Software Engineer, WGT Inc.	. http://www.terran.org/~bryan

- 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/