On Wed, Feb 19, 2003 at 01:50:49AM +0000, Alan Cox wrote:
> 
> verify_area performs any checks needed for it to be safe to use the
> _copy forms of copy_*_user.  What that does varies. The normal Linux
> approach is
> 
> verify_area does access_ok which checks the address is a kernel view
> of a user space address. _copy* functions use the MMU to fault any
> illegal access beyond that.
> 
> On some platforms you cant use the mmu so verify_area does more work,
> on others its using stuff like space registers and verify_area is a
> nop.

Thanks for the clarification.

> copy_from_user sorts out the whole thing itself. In general
> __copy_from_user and verify_area isnt a win, except if you do lots of
> small copies to/from the same area, which is often a bad idea anyway.

I think our case is one of the exceptions: we are copying from the user
and verifying the data at the same time (to avoid the user sending
malicious commands to the card's DMA engine which could potentialy
compromise the system integrity and security). The alternative would be
copy the whole thing and the verify but it was agreed that this would
make better use of the cache and so on...

José Fonseca
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com


-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to