Subject: bizarre copyout bug(?)
To: None <tech-kern@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 05/13/2001 19:30:54
I just tracked down a really weird misbehavior, and it turns out to be
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.
Is this as it should be? If so, I'd recommend that copyout(9) be much
more noisy about it, as traditionally bcopy-style routines don't care
what their pointers are when they aren't copying anything. (And if
not, at least one port has a bug to fix. :-)
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B