Re: copy_from_user() fix

pacman (pacman-kernel@cqc.com)
Wed, 26 Aug 1998 23:41:51 -0500 (EST)


Linus Torvalds writes the following:
>
>I certainly used to dislike EFAULT too, and much preferred SIGSEGV because
>it's what makes more sense. The EFAULT return really is an implementation
[...]
>I'm concerned. And if it's the default, then there isn't much advantage to
>having SIGSEGV at all for system calls - it just complicates the issue to
>have a choice.

The advantage is that a bad pointer is a bug that should be fixed, and
getting a coredump as soon as possible means you have a better chance of
finding where it came from in the gdb backtrace. EFAULT supports the hiding
of bugs, and SIGSEGV supports the fixing of bugs. There's no excuse for
wanting to "handle" a bad pointer. If I screw up bad enough to have a pointer
to nowhere, I would like to have Linux help me get rid of it. And if I'm
running someone else's code, and they screwed up bad enough to have a pointer
to nowhere, I'd like to have Linux kill the damn process right now dammit,
rather than let it live long enough to accidentally rm -rf the wrong thing.

If someone has a list of programs that will break under the SEGV-on-EFAULT
patch, please send it to me so I can make sure I never use them.

-- 
Alan Curry

- 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