Re: copy_from_user() fix

Jakub Jelinek (jj@sunsite.ms.mff.cuni.cz)
Mon, 24 Aug 1998 22:36:36 +0200 (MET DST)


> It is not. But read again your solution (marked with smiley ;):
>
> You propose to slow down every syscall return by test
> if (retcode == -EFAULT) raise(SIGSEGV).
>
> My argument is that if you do it from within kernel there's no such
> slowdown.
>

A stupid implementation would do that. But if you look at syscall.S on most
platforms, you'll see the fast path is always when syscall does not return
error and when you enter the slow path for error handling, you have to call
errno_location, so one test would not hurt. You can write your own shared
library and put it into your /etc/ld.so.preload...

Cheers,
Jakub
___________________________________________________________________
Jakub Jelinek | jj@sunsite.mff.cuni.cz | http://sunsite.mff.cuni.cz
Administrator of SunSITE Czech Republic, MFF, Charles University
___________________________________________________________________
Ultralinux - first 64bit OS to take full power of the UltraSparc
Linux version 2.1.115 on a sparc64 machine (498.80 BogoMips).
___________________________________________________________________

-
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