Re: AUDIT: copy_from_user is a deathtrap.

Linus Torvalds
2002-05-21T21:26:33Z

On Tue, 21 May 2002, Pavel Machek wrote:
>
> If you pass bad pointer to memcpy(), you don't expect any reasonable
> return value, right?

Actually, if I pass a bad pointer to memcpy(), and I have a handler for
the SIGSEGV that fixes up the thing, yes, by golly, I _do_ expect memcpy()
to get the right value.

If it doesn't, then the system is BROKEN.

Face it Pavel, you're WRONG. You're so incredibly wrong that this is not
worth even discussing. Linux does it right now, and I won't break that
correct behaviour just because somebody has a incorrect and silly view of
what is readable.

Face it, copy_to/from_user does the RIGHT THING, and stop whining about
it.

Linus