Re: copy_mount_options()

David S. Miller
2004-08-20T23:52:06Z

On Sat, 21 Aug 2004 09:18:33 +1000
Anton Blanchard <anton@samba.org> wrote:

> I too hate that interface, Im continually getting it wrong. It would be
> nice to remove the possibility of having similar such subtle bugs.

I agree.

There used to be clever code that would truncate the pipe write
and stuff like that, and TCP even used to do something similar
at one point. But I go look now and neither of them do that
any more.

It would even make the kernel smaller because all of these silly:

return copy_*_user(...) ? -EFAULT : 0;

would just expand to a direct use of the return value.

So many arch user copy routines would have enormous amounts
of complexity removed, and I saw this quite well when doing
the sparc64 stuff I did yesterday.