lkml.org 
[lkml]   [2017]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] dev/mem: "memtester -p 0x6c80000000000 10G" cause crash
On 2017/5/2 16:43, Michal Hocko wrote:

> 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.
>

HI Michal,

CONFIG_STRICT_DEVMEM=y, and range_is_allowed() will skip memory, but
0x6c80000000000 is not memory, it is just a invalid address, so it cause
crash.
You mean the user should assure the physical address is valid, right?

Thanks,
Xishi Qiu

>> ...
>> [ 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
>



\
 
 \ /
  Last update: 2017-05-02 10:53    [W:0.113 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site