Re: AUDIT: copy_from_user is a deathtrap.

Larry McVoy
2002-05-19T04:02:30Z

On Sun, May 19, 2002 at 02:01:25PM +1000, Rusty Russell wrote:
> But as we all know, it is harder to remove a feature from Linux, than
> to get the camel book through the eye of a needle (or something).

It's possible that I'm too tired to have grasped this, but if I have,
you're all wet. In all cases, read needs to return the number of bytes
successfully moved. If you ask for N and 1/2 of the way through N you
are going to get a fault, and you return SEGFAULT, now how can I ever
find out that N/2 bytes actually made it out to me? I want to know that.
If you are arguing that return N/2 is wrong, you are incorrect.
--
---
Larry McVoy lm at bitmover.com http://www.bitmover.com/lm