Re: copy_from_user() fixu

Albert D. Cahalan (acahalan@cs.uml.edu)
Tue, 25 Aug 1998 07:05:28 -0400 (EDT)


Richard Gooch writes:
> H. Peter Anvin writes:

>>> You haven't responded to this part. Wrapping *every* call to read(2)
>>> with a signal/setjmp save/restore is a performance killer.
>>> Can you actually be serious that an application/library that tries to
>>> trap bad addresses has to put up with this?
>>
>> Since it's the only way to do it ANYWAY, yes.
>
> No, that's not true. I can depend on EFAULT with other Unices. So, if
> the end result is that Linux takes away EFAULT, the *best* I can do is
> to do #ifdef __linux__ and save/restore around pseudo-syscalls.

No, the *best* you can do is leave your code just as it is.
The app is supposed to get hit by that signal, not shielded from it.
Apps cause signal 11 in libc all the time. Those apps are buggy,
and libc is not expected to catch the bad pointers. Why would you
catch them if libc won't?

-
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