On Tue, 2004-03-02 at 23:15, Geert Uytterhoeven wrote:
On Tue, 2 Mar 2004, Kars de Jong wrote:
quoted
Which reminds me: drivers/video/fbmem.c at least seems to treat the
return value of ioremap() as a virtual address, since it calls
copy_{to,from}_user on it directly...
You're right. And the trouble there is that you can't easily find out which
ioremap() variant was used...
And... it's illegal to call copy_to/from_user on the return of
ioremap anyway. Not only for semantic reasons, but also for practical
reasons, for example, ioremap returns non cacheable space on PPC,
and copy_to/from_user uses "cache hints" to speed up the copy.
Ben.
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click