Re: ce56a86e2a ("x86/mm: Limit mmap() of /dev/mem to valid physical addresses"): kernel BUG at arch/x86/mm/physaddr.c:79!

From: Sander Eikelenboom
Date: Thu Oct 26 2017 - 04:37:30 EST


On 26/10/17 00:02, Craig Bergstrom wrote:
> Thanks for the notification, my apologies for the breakage. I'll take a
> close look and see if I can figure out what went wrong.
>
> Sander, any chance you can send /proc/iomem and the inputs to the mmap call
> that fail on your affected system?

Hi Craig,

The output from /proc/iomem is simple to get and attached.
The mmap call is probably issued by qemu and will require more digging.

I don't know if there is that much time left for 4.14, since we are at
RC6 already.

--
Sander


>
>
> On Wed, Oct 25, 2017 at 2:50 PM, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx
>> wrote:
>
>> On 10/23/2017 10:44 PM, Fengguang Wu wrote:
>>> Greetings,
>>>
>>> 0day kernel testing robot got the below dmesg and the first bad commit is
>>>
>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>> master
>>>
>>> commit ce56a86e2ade45d052b3228cdfebe913a1ae7381
>>> Author: Craig Bergstrom <craigb@xxxxxxxxxx>
>>> AuthorDate: Thu Oct 19 13:28:56 2017 -0600
>>> Commit: Ingo Molnar <mingo@xxxxxxxxxx>
>>> CommitDate: Fri Oct 20 09:48:00 2017 +0200
>>>
>>> x86/mm: Limit mmap() of /dev/mem to valid physical addresses
>>
>> Also note
>> https://lists.xenproject.org/archives/html/xen-devel/2017-10/msg02935.html
>>
>> -boris
>>
>

00000000-00000fff : Reserved
00001000-00095fff : System RAM
00096000-000963ff : RAM buffer
00096400-000fffff : Reserved
000a0000-000bffff : PCI Bus 0000:00
000c0000-000cfdff : Video ROM
000d0000-000dffff : PCI Bus 0000:00
000d4800-000d4bff : Adapter ROM
000f0000-000fffff : System ROM
00100000-7fffffff : System RAM
01000000-01d2a703 : Kernel code
01d2a704-025450ff : Kernel data
02b3f000-02cc1fff : Kernel bss
c7f90000-c7f9dfff : ACPI Tables
c7f9e000-c7fdffff : ACPI Non-volatile Storage
c7fe0000-c7ffffff : Reserved
c8000000-dfffffff : PCI Bus 0000:00
cfe00000-cfefffff : PCI Bus 0000:0c
cfef8000-cfefbfff : 0000:0c:00.0
cfef8000-cfefbfff : r8169
cfeff000-cfefffff : 0000:0c:00.0
cfeff000-cfefffff : r8169
cff00000-cfffffff : PCI Bus 0000:0d
cfff8000-cfffbfff : 0000:0d:00.0
cfff8000-cfffbfff : r8169
cffff000-cfffffff : 0000:0d:00.0
cffff000-cfffffff : r8169
d0000000-dfffffff : PCI Bus 0000:0f
d0000000-dfffffff : 0000:0f:00.0
d0000000-d0ffffff : vesafb
e0000000-efffffff : PCI MMCONFIG 0000 [bus 00-ff]
e0000000-efffffff : pnp 00:07
f0000000-febfffff : PCI Bus 0000:00
f6000000-f6003fff : Reserved
f6000000-f6003fff : pnp 00:01
fdcf7000-fdcf7fff : 0000:00:12.0
fdcf7000-fdcf7fff : ohci_hcd
fdcf8000-fdcfbfff : 0000:00:14.2
fdcfc000-fdcfcfff : 0000:00:13.0
fdcfc000-fdcfcfff : ohci_hcd
fdcfd000-fdcfdfff : 0000:00:14.5
fdcfd000-fdcfdfff : ohci_hcd
fdcfe000-fdcfefff : 0000:00:16.0
fdcfe000-fdcfefff : ohci_hcd
fdcff000-fdcff3ff : 0000:00:11.0
fdcff000-fdcff3ff : ahci
fdcff400-fdcff4ff : 0000:00:12.2
fdcff400-fdcff4ff : ehci_hcd
fdcff800-fdcff8ff : 0000:00:13.2
fdcff800-fdcff8ff : ehci_hcd
fdcffc00-fdcffcff : 0000:00:16.2
fdcffc00-fdcffcff : ehci_hcd
fde00000-fdefffff : PCI Bus 0000:04
fdef8000-fdef8fff : 0000:04:00.0
fdef9000-fdef9fff : 0000:04:00.1
fdefa000-fdefafff : 0000:04:00.2
fdefb000-fdefbfff : 0000:04:00.3
fdefc000-fdefcfff : 0000:04:00.4
fdefd000-fdefdfff : 0000:04:00.5
fdefe000-fdefefff : 0000:04:00.6
fdeff000-fdefffff : 0000:04:00.7
fdf00000-fe1fffff : PCI Bus 0000:05
fdfe0000-fdffffff : 0000:05:00.0
fe000000-fe1fffff : PCI Bus 0000:06
fe000000-fe0fffff : PCI Bus 0000:07
fe0e0000-fe0effff : 0000:07:00.0
fe0ff800-fe0fffff : 0000:07:00.0
fe0ff800-fe0fffff : ahci
fe100000-fe1fffff : PCI Bus 0000:08
fe1fe000-fe1fffff : 0000:08:00.0
fe200000-fe3fffff : PCI Bus 0000:09
fe200000-fe3fffff : 0000:09:00.0
fe400000-fe4fffff : PCI Bus 0000:0a
fe4f8000-fe4f8fff : 0000:0a:00.0
fe4f9000-fe4f9fff : 0000:0a:00.1
fe4fa000-fe4fafff : 0000:0a:00.2
fe4fb000-fe4fbfff : 0000:0a:00.3
fe4fc000-fe4fcfff : 0000:0a:00.4
fe4fd000-fe4fdfff : 0000:0a:00.5
fe4fe000-fe4fefff : 0000:0a:00.6
fe4ff000-fe4fffff : 0000:0a:00.7
fe500000-fe5fffff : PCI Bus 0000:0b
fe5fe000-fe5fffff : 0000:0b:00.0
fe600000-fe6fffff : PCI Bus 0000:0c
fe6e0000-fe6fffff : 0000:0c:00.0
fe700000-fe7fffff : PCI Bus 0000:0d
fe7e0000-fe7fffff : 0000:0d:00.0
fe800000-fe8fffff : PCI Bus 0000:0e
fe8fe000-fe8fffff : 0000:0e:00.0
fe900000-fe9fffff : PCI Bus 0000:0f
fe9e0000-fe9effff : 0000:0f:00.0
fe9fc000-fe9fffff : 0000:0f:00.1
fe9fc000-fe9fffff : ICH HD audio
fec00000-fec00fff : Reserved
fec00000-fec003ff : IOAPIC 0
fec10000-fec1001f : pnp 00:06
fec20000-fec20fff : Reserved
fec20000-fec203ff : IOAPIC 1
fed00000-fed003ff : HPET 2
fed00000-fed003ff : PNP0103:00
fed80000-fed80fff : pnp 00:06
fee00000-feefffff : Reserved
fee00000-fee00fff : Local APIC
fee00000-fee00fff : pnp 00:05
ffb80000-ffbfffff : pnp 00:06
ffe00000-ffffffff : Reserved
fd00000000-ffffffffff : Reserved