linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Xishi Qiu <qiuxishi@huawei.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Mel Gorman <mgorman@suse.de>, Vlastimil Babka <vbabka@suse.cz>,
	Joonsoo Kim <js1304@gmail.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Rik van Riel <riel@redhat.com>,
	Shakeel Butt <shakeelb@google.com>, Linux MM <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	zhong jiang <zhongjiang@huawei.com>
Subject: Re: [RFC] dev/mem: "memtester -p 0x6c80000000000 10G" cause crash
Date: Tue, 2 May 2017 10:43:23 +0200	[thread overview]
Message-ID: <20170502084323.GG14593@dhcp22.suse.cz> (raw)
In-Reply-To: <59083C5B.5080204@huawei.com>

On Tue 02-05-17 15:59:23, Xishi Qiu wrote:
> Hi, I use "memtester -p 0x6c80000000000 10G" to test physical address 0x6c80000000000
> Because this physical address is invalid, and valid_mmap_phys_addr_range()
> always return 1, so it causes crash.
> 
> My question is that should the user assure the physical address is valid?

We already seem to be checking range_is_allowed(). What is your
CONFIG_STRICT_DEVMEM setting? The code seems to be rather confusing but
my assumption is that you better know what you are doing when mapping
this file.

> ...
> [ 169.147578] ? panic+0x1f1/0x239
> [ 169.150789] oops_end+0xb8/0xd0
> [ 169.153910] pgtable_bad+0x8a/0x95
> [ 169.157294] __do_page_fault+0x3aa/0x4a0
> [ 169.161194] do_page_fault+0x30/0x80
> [ 169.164750] ? do_syscall_64+0x175/0x180
> [ 169.168649] page_fault+0x28/0x30
> 
> Thanks,
> Xishi Qiu

-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2017-05-02  8:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-02  7:59 Xishi Qiu
2017-05-02  8:43 ` Michal Hocko [this message]
2017-05-02  8:52   ` Xishi Qiu
2017-05-02  9:16     ` Michal Hocko
2017-05-02  9:30       ` Xishi Qiu

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=20170502084323.GG14593@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=js1304@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=qiuxishi@huawei.com \
    --cc=riel@redhat.com \
    --cc=shakeelb@google.com \
    --cc=vbabka@suse.cz \
    --cc=zhongjiang@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox