Messages in this thread | | | Subject | Re: copy_from_user() fix | From | Andi Kleen <> | Date | 25 Aug 1998 15:58:42 +0200 |
| |
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
| |