Re: copy_from_user() fixu

H. Peter Anvin (hpa@transmeta.com)
Mon, 24 Aug 1998 16:38:47 -0700 (PDT)


> > >
> > > ??? What's wrong with EFAULT?
> >
> > It usually goes undetected.
>
> Yeah, but only by buggy programmes. I trap for error codes in all my
> code: I don't want a SEGV, I want to handle it gracefully. You could
> just as well say when malloc(3) fails, send a SEGV, since "some"
> applications will ignore the failure case.
> Besides, EFAULT is the standard for Unix. Surely SEGV is non-Posix?
>

No, it's not. EFAULT is non-POSIX: it exposes the difference between
system calls and library functions.

EFAULT is triggered by the same thing as SIGSEGV; the distinction is
artificial.

-hpa

-
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.altern.org/andrebalsa/doc/lkml-faq.html