Re: AUDIT: copy_from_user is a deathtrap.

Pete Zaitcev
2002-05-17T17:36:51Z

>[...]
> We could do that, or, we could fix the actual problem, which is the
> HUGE FUCKING BEARTRAP WHICH CATCHES EVERY SINGLE NEW PROGRAMMER ON THE
> WAY THROUGH.

It is but one of many crooked interfaces. For example, Linux
has outb() arguments swapped relatively to all other environments.
I think it may be the best to have Corbet to update the O'Reily
book with a chapter of common traps and add a @-comment near
the copy_from_user.

In the interest of full disclosure, I must admit that I used
copy_from_user wrong once, many years ago. The lesson which
I extracted was different though. I decided that I was arrogant
and foolish to program without reading interface specifications
or the code. It did not occur to me to shift the blame onto
copy_from_user creators.

-- Pete