lkml.org 
[lkml]   [1998]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: copy_from_user() fix
From
Date
In article <Pine.LNX.3.91.980825124415.18851E-100000@toaster.roan.co.uk>,
Mike Jagdis <mike@roan.co.uk> writes:
> On Tue, 25 Aug 1998, Jamie Lokier wrote:
>> I bet no applications at all currently check for EFAULT from system
>> calls, unless they're really weird and are doing it to behave _as if_
>> they'd received SIGSEGV. Actually I bet they don't bother because every
>> syscall would need to be wrapped. I'm theorising that this could screw
>> up Wine in some unusual but valid cases.

> I'll take your money. You prove that there are *no* applications
> that check for EFAULT and I'll pay up. Otherwise you pay up. Just
> one condition - we set a time limit :-).

I would bet there are more programs that don't check for EFAULT in
non critical calls, but would fail badly if they got a SIGSEGV. Now
these programs are buggy sure, but I see no good reason to break them.
It would be a serious ABI/API change at least.

Evidence: I look at a lot of strace listing, and EFAULT is not too
uncommon.

On the other other hand SIGSEGV instead of EFAULT is handy to debug
newly writen programs, so it would be nice as a optional feature. One
possible way to do that is to make "syscall_error" a weak symbol, then
everybody could LD_PRELOAD or link a special module that does the
raise(SIGSEGV) if needed. Disadvantage: I think(not sure) more weak symbols
in shared libraries slow the program startup down.

-Andi


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