Messages in this thread | | | Date | Tue, 25 Aug 1998 20:28:32 +1200 | From | Chris Wedgwood <> | Subject | Re: 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
| |