lkml.org 
[lkml]   [1998]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: copy_from_user() fix
Richard Henderson writes:
> On Tue, Aug 25, 1998 at 05:20:52PM +1000, Richard Gooch wrote:
> > Didn't someone say Unix98 defines EFAULT? So it looks like we can
> > herdly blow it away.
>
> You don't get off that easy. EFAULT is optional.

And implemented on every Unix system I've come across. And has
performance advantages over raising SEGV (not just in the raising, but
also in the transparent capturing in userspace libraries).

> Syscalls are not required to report EFAULT, or do anything else, as
> invalid input is completely undefined. Naturally it is a
> quality-of-implementation issue that invalid inputs be reported in
> some manor.
>
> SIGSEGV is an appropriate response.

But so is EFAULT. And EFAULT has legitimate advantages.

> And something that I'd like to see as an option in the kernel.
> You'll flush out more errors putting the signalling code there than
> doing it in user space. Plus we'd be better able to accurately
> report the faulting address, which is extremely useful information.

I've already said several times that I have no problem with such an
option. All I am saying is that EFAULT should not be forcefully
removed from Linux.

Regards,

Richard....

-
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.072 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site