x86/mm: Skip the hypervisor range when walking PGD
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Thu, 5 Nov 2015 18:56:35 +0000 (13:56 -0500)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 7 Nov 2015 09:39:39 +0000 (10:39 +0100)
commitf4e342c87776884f0309942a3880ca7e835239f9
tree9406165675c8569eb732aa4f9446c9e94a1e8c8a
parent3849e91f571dcb48cf2c8143480c59137d44d6bc
x86/mm: Skip the hypervisor range when walking PGD

The range between 0xffff800000000000 and 0xffff87ffffffffff is reserved
for hypervisor and therefore we should not try to follow PGD's indexes
corresponding to those addresses.

While this has always been a problem, with the new W+X warning
mechanism ptdump_walk_pgd_level_core() can now be called during boot,
causing a PV Xen guest to crash.

[ tglx: Replaced the macro with a readable inline ]

Fixes: e1a58320a38d "x86/mm: Warn on W^X mappings"
Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: xen-devel@lists.xen.org
Link: http://lkml.kernel.org/r/1446749795-27764-1-git-send-email-boris.ostrovsky@oracle.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/mm/dump_pagetables.c