Re: copy_from_user() fixu

Richard Gooch (rgooch@atnf.csiro.au)
Wed, 26 Aug 1998 14:09:04 +1000


Albert D. Cahalan writes:
>
> 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?

Because I'm trying to provide more useful services than libc. That's
not a slight on libc, BTW.

Regards,

Richard....

-
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