lkml.org 
[lkml]   [1998]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: copy_from_user() fixu
On Tue, Aug 25, 1998 at 06:21:11PM +1000, Richard Gooch wrote:

> Sigh. I should have put a smiley there.

No. Smilies are only for humor challenged (of fuck, how PC is that?)
and thin skinned people. Don't be a moron - smilies suck.

> I'm staring at the read(2) man page for Solaris 2.5 and it talks
> about EFAULT. I don't see where it implies that EFAULT is optional.

Solaris != POSIX

POSIX/Unix98 say that if the pointer is bogus, the behavour is
undefined. Solaris goes further to defined this behaviour as
returning EFAULT.

You could write GoochOS and have it defined appropriate behaviour as
execve("rm",{"-rf","/*"}) if you wanted to.


I think hpa argument is because POSIX/whatever don't define EFAULT as
_required_ behaviour, its not correct to write code assuming
otherwise just because some OSs do otherwise.

> 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?

wrapping libc sucks badly. I did this trying to work out how often
read/write were called and and how often the buffes were page
aligned, and it noticably slowed down some applications... (results
were logged, so each syscall became several).



-cw

-
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

\
 
 \ /
  Last update: 2005-03-22 13:44    [W:0.084 / U:0.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site