Re: copy_from_user() fix
H. Peter Anvin (hpa@transmeta.com)
23 Aug 1998 12:44:34 GMT
Followup to: <k2u334hv5g.fsf@zero.aec.at>
By author: Andi Kleen <ak@muc.de>
In newsgroup: linux.dev.kernel
>
> > Linus,
>
> > I've reimplemented the fix according to Richard's suggestions.
>
> Wouldn't it be better to do the zeroing out of line? EFAULT isn't a
> path worth optimizing for, and doing it with inline code in .fixup for
> every copy bloats the kernel a lot. I think it would be better to just put a
> call to a common zero function into .fixup.
>
> As some data: my current kernel contains about 215 __copy_*_user() calls,
> if you only add 30 bytes per call then that is about 6KB alone.
>
> -Andi
>
Also, I still maintain there should be a mode to raise SIGSEGV
whenever a system call returns EFAULT. Not doing so breaks the system
call/library routine transparency, and lets bugs go uncaught.
-hpa
--
PGP: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD 1E DF FE 69 EE 35 BD 74
See http://www.zytor.com/~hpa/ for web page and full PGP public key
I am Bahá'í -- ask me about it or see http://www.bahai.org/
"To love another person is to see the face of God." -- Les Misérables
-
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