lkml.org 
[lkml]   [2014]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectMemory trample when using /dev/mem
Hi there,

Recently, I run a little testcase about using mmap to check
some physical address.What I found was that the different task can
read and write the same physical address at the same time.

For example,
I make proc1 to access 0x20000000, read and write "512" to
that address every 2 seconds. Meanwhile,I make proc2 to access
0x200000000, read and write "1024" to that address every 1 seconds.
The output is a mess, though it needs not be worry on this case,
but what about the proc1 and proc2 are both driver, and they mmap to the
same physical address?

As there are many drivers using /dev/mem and we can not
make sure that the different task will not trample on
each others memory.Shall we add some printk to help locating the problem
when error happened?


Thanks,
Hu Keping



\
 
 \ /
  Last update: 2014-10-11 11:21    [W:0.028 / U:0.960 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site