Re: AUDIT: copy_from_user is a deathtrap.

Rusty Russell
2002-05-19T02:08:13Z

In message <Pine.LNX.4.44.0205180910570.26742-100000@home.transmeta.com> you wr
ite:
>
>
> On 18 May 2002, Andi Kleen wrote:
> >
> > Are you sure they even exist ?
>
> Oh, like read() or write() for regular files? Yup, they exist.

Huh? No, you ask for 2000 bytes into a buffer that can only take 1000
bytes without hitting an unmapped page, returning EFAULT or giving a
SIGSEGV is perfectly acceptable.

As a coder, I'd *really* prefer that to hiding the bug!

There's only one case which really actually cares for a valid reason:
the hack in copying mount options.

Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.