All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hu Keping <hukeping@huawei.com>
To: <arnd@arndb.de>, <gregkh@linuxfoundation.org>
Cc: <linux-kernel@vger.kernel.org>, <sdu.liu@huawei.com>,
	<wangnan0@huawei.com>, <peifeiyue@huawei.com>
Subject: Memory trample when using /dev/mem
Date: Sat, 11 Oct 2014 16:51:59 +0800	[thread overview]
Message-ID: <5438EFAF.4020303@huawei.com> (raw)

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


             reply	other threads:[~2014-10-11  8:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-11  8:51 Hu Keping [this message]
2014-10-11  9:04 ` Memory trample when using /dev/mem Richard Weinberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5438EFAF.4020303@huawei.com \
    --to=hukeping@huawei.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peifeiyue@huawei.com \
    --cc=sdu.liu@huawei.com \
    --cc=wangnan0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.