Re: AUDIT of 2.5.15 copy_to/from_user

Arnaldo Carvalho de Melo
2002-05-19T04:56:45Z

Heads up: I'm finishing a bk changeset for intermezzo, will be submitting
to Linus in some minutes.

- Arnaldo

Em Sun, May 19, 2002 at 02:18:53PM +1000, Rusty Russell escreveu:
> The following uses seem to be incorrect: copy_from_user and
> copy_to_user return the number of bytes NOT copied on failure, not
> -EFAULT.
>
> You can CC: fixups to trivial at rustcorp.com.au.
>
> (I didn't look for cases where the Torvalds/McVoy philosophy says we
> should be returning a partial result on EFAULT: that's more complex).
>
> Thanks,
> Rusty.
> ================
> Some cases are endemic: whole subsystems or drivers where the author
> obviously thought copy_from_user follows the kernel conventions:
>
> Whole Subsystems:
> fs/intermezzo/*.c

<SNIP>