Re: copy_from_user() fix

Uwe Ohse (uwe@ohse.de)
25 Aug 1998 13:38:11 -0000


In <6rtm8e$9bc$1@palladium.transmeta.com> H. Peter Anvin wrote:

>So, what happens if the libc/kernel interface is changed? You're
>screwed, because your code is broken.

You'll screw up other people, too.

Please tell me another way to check if some memory range if safe
to be written to if this doesn't work anymore:

int fd=open("/dev/zero",O_RDONLY);
...
if (read(fd,mem,size)!=(ssize_t) size)
return -1;
/* ok */
return 0;

Please don't tell me to set up signal handlers, i've done that before
and will not do it again for this purpose. More so inside a library
which is supposed to (a) not crash and (b) be reasonable fast.

I'm actually using this feature in a logging library of mime,
and i will _really_ hate it if this doesn't work anymore.

Regards, Uwe

-
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