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
Chris Wedgwood writes:
> On Mon, Aug 24, 1998 at 11:38:58PM -0700, H. Peter Anvin wrote:
>
> > Perhaps, but it breaks the spirit of all these standards (that you
> > can have either a library or kernel implementation).
>
> maybe... I don't know enough about either standard to comment.
>
> I do understand what you are saying about syscall/libc transparency
> and for the most part agree - but I do like getting EFAULT instead of
> a coredump in some applications, mainly because I can write code to
> recover from this more elegantly that a coredump.
>
> And before you say, I shouldn't get EFAULT, wrong. I do get them.
>
> Oh hang, no I don't, I forgot. My code if perfect. Silly me thinking
> I might code the odd error...

Well, being serious here, I have a library that is bug-free, but I
can't depend on application writers to sustain my level of
perfection. So, so help these lesser beings, I trap EFAULT in my
library and yield a more meaningful diagnostic than a mere EFAULT or
SEGV.

> > Someone just pointed out that it really cannot -- you can hack to
> > make it raise the signal, but the signal context will be all wrong.
>
> OK... then if this is necessary for some people, it should be
> per-process with a sysctl setting the value for newly created
> processes (0 - EFAULT, 1 - segfault, 2 - from parent, etc) with a
> default to EFAULT.

Yep. If it has to be done, make it optional and retain the current
behaviour as the default.

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