Subject: Re: bizarre copyout bug(?)
To: None <wojtek@3miasto.net>
From: Darren Reed <darrenr@reed.wattle.id.au>
List: tech-kern
Date: 05/14/2001 11:12:24
In some email I received from wojtek@3miasto.net, sie wrote:
> > due to a copyout glitch.
> > 
> > It seems that copyout() can fail even when passed a zero length, if the
> > userland pointer is pointing into kernel space.  At least on the sparc.
> 
> i think it's correct behavior.

A version of copy{in,out}() which applied the correct behaviour depending
on whether it noticed a poiinter was kernel or user space might be useful.
This has the advantage of when and if we get to a point where the kernel is
repsonsible for those code paths being used, as well as user programs, that
we don't need to check for special conditions and call bcopy specifically.

Darren