android_kernel_motorola_sm6225/arch/x86/xen
Kirill A. Shutemov 62075c982b x86/mm: Fix guard hole handling
[ Upstream commit 16877a5570e0c5f4270d5b17f9bab427bcae9514 ]

There is a guard hole at the beginning of the kernel address space, also
used by hypervisors. It occupies 16 PGD entries.

This reserved range is not defined explicitely, it is calculated relative
to other entities: direct mapping and user space ranges.

The calculation got broken by recent changes of the kernel memory layout:
LDT remap range is now mapped before direct mapping and makes the
calculation invalid.

The breakage leads to crash on Xen dom0 boot[1].

Define the reserved range explicitely. It's part of kernel ABI (hypervisors
expect it to be stable) and must not depend on changes in the rest of
kernel memory layout.

[1] https://lists.xenproject.org/archives/html/xen-devel/2018-11/msg03313.html

Fixes: d52888aa2753 ("x86/mm: Move LDT remap out of KASLR region on 5-level paging")
Reported-by: Hans van Kranenburg <hans.van.kranenburg@mendix.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Hans van Kranenburg <hans.van.kranenburg@mendix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Cc: bp@alien8.de
Cc: hpa@zytor.com
Cc: dave.hansen@linux.intel.com
Cc: luto@kernel.org
Cc: peterz@infradead.org
Cc: boris.ostrovsky@oracle.com
Cc: bhe@redhat.com
Cc: linux-mm@kvack.org
Cc: xen-devel@lists.xenproject.org
Link: https://lkml.kernel.org/r/20181130202328.65359-2-kirill.shutemov@linux.intel.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-01-13 09:50:58 +01:00
..
apic.c Merge branch 'WIP.x86/asm' into x86/urgent, because the topic is ready 2018-04-12 09:42:34 +02:00
debugfs.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
debugfs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
efi.c x86/xen/efi: Initialize UEFI secure boot state during dom0 boot 2018-05-14 08:57:46 +02:00
enlighten.c Revert "xen/balloon: Mark unallocated host memory as UNUSABLE" 2018-12-17 09:24:39 +01:00
enlighten_hvm.c x86/xen: Reset VCPU0 info pointer after shared_info remap 2018-05-07 15:03:43 -04:00
enlighten_pv.c x86/xen: enable early use of set_fixmap in 32-bit Xen PV guest 2018-08-20 14:46:26 -04:00
enlighten_pvh.c x86/xen: Fix boot loader version reported for PVH guests 2018-11-13 11:08:19 -08:00
grant-table.c xen: re-introduce support for grant v2 interface 2017-11-06 15:50:17 -05:00
irq.c xen: setup pv irq ops vector earlier 2018-07-13 08:23:27 +02:00
Kconfig x86/xen: Allow XEN_PV and XEN_PVH to be enabled with X86_5LEVEL 2018-02-21 10:19:18 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mmu.c xen: fixes and features for v4-18-rc1 2018-06-08 09:24:54 -07:00
mmu.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mmu_hvm.c x86/gart: Exclude GART aperture from vmcore 2018-01-11 15:09:24 +01:00
mmu_pv.c x86/mm: Fix guard hole handling 2019-01-13 09:50:58 +01:00
multicalls.c xen: don't use privcmd_call() from xen_mc_flush() 2018-08-07 11:37:01 -04:00
multicalls.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
p2m.c xen: Fix {set,clear}_foreign_p2m_mapping on autotranslating guests 2018-02-08 10:40:49 +01:00
pci-swiotlb-xen.c xen-swiotlb: consolidate xen_swiotlb_dma_ops 2017-06-20 11:12:59 +02:00
platform-pci-unplug.c xen/pvh: don't try to unplug emulated devices 2018-11-13 11:08:40 -08:00
pmu.c xen/x86/vpmu: Zero struct pt_regs before calling into sample handling code 2018-09-19 11:26:53 -04:00
pmu.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
setup.c Revert "xen/balloon: Mark unallocated host memory as UNUSABLE" 2018-12-17 09:24:39 +01:00
smp.c x86/xen: Calculate __max_logical_packages on PV domains 2018-02-17 09:40:45 +01:00
smp.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
smp_hvm.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
smp_pv.c x86/xen: Add call of speculative_store_bypass_ht_init() to PV paths 2018-06-21 10:55:52 +02:00
spinlock.c xen: fix xen_qlock_wait() 2018-11-13 11:08:52 -08:00
suspend.c x86/xen: Zero MSR_IA32_SPEC_CTRL before suspend 2018-02-28 16:03:19 +01:00
suspend_hvm.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
suspend_pv.c x86/xen/time: Initialize pv xen time in init_hypervisor_platform() 2018-07-20 00:02:39 +02:00
time.c x86/xen/time: Output xen sched_clock time from 0 2018-07-20 00:02:40 +02:00
trace.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vdso.h
vga.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xen-asm.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xen-asm_32.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xen-asm_64.S x86/xen: Support early interrupts in xen pv guests 2017-11-28 00:28:56 +01:00
xen-head.S xen/pvh: Indicate XENFEAT_linux_rsdp_unrestricted to Xen 2018-04-10 09:22:22 -04:00
xen-ops.h x86/xen: remove unused function xen_auto_xlated_memory_setup() 2018-08-20 14:46:18 -04:00
xen-pvh.S xen/pvh: increase early stack size 2018-11-13 11:08:40 -08:00