sst-linux/arch/x86
Juergen Gross 6434af1664 xen: use correct end address of kernel for conflict checking
[ Upstream commit fac1bceeeb04886fc2ee952672e6e6c85ce41dca ]

When running as a Xen PV dom0 the kernel is loaded by the hypervisor
using a different memory map than that of the host. In order to
minimize the required changes in the kernel, the kernel adapts its
memory map to that of the host. In order to do that it is checking
for conflicts of its load address with the host memory map.

Unfortunately the tested memory range does not include the .brk
area, which might result in crashes or memory corruption when this
area does conflict with the memory map of the host.

Fix the test by using the _end label instead of __bss_stop.

Fixes: 808fdb7193 ("xen: check for kernel memory conflicting with memory layout")

Signed-off-by: Juergen Gross <jgross@suse.com>
Tested-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-10-17 15:20:54 +02:00
..
boot x86/boot: Don't add the EFI stub to targets, again 2024-06-21 14:35:53 +02:00
coco x86/tdx: Fix data leak in mmio_read() 2024-09-12 11:10:16 +02:00
configs
crypto
entry x86/bhi: Avoid warning in #DB handler due to BHI mitigation 2024-07-18 13:18:44 +02:00
events perf/x86/intel: Limit the period on Haswell 2024-09-12 11:10:17 +02:00
hyperv
ia32
include x86/fpu: Avoid writing LBR bit to IA32_XSS unless supported 2024-09-12 11:10:18 +02:00
kernel x86/sgx: Fix deadlock in SGX NUMA node search 2024-10-17 15:20:40 +02:00
kvm KVM: SVM: Don't advertise Bus Lock Detect to guest if SVM support is missing 2024-09-12 11:10:16 +02:00
lib x86/kmsan: Fix hook for unaligned accesses 2024-09-12 11:10:19 +02:00
math-emu
mm x86/mm: Switch to new Intel CPU model defines 2024-09-30 16:23:56 +02:00
net
pci x86/pci/xen: Fix PCIBIOS_* return code handling 2024-08-03 08:48:54 +02:00
platform x86/platform/iosf_mbi: Convert PCIBIOS_* return codes to errnos 2024-08-03 08:48:54 +02:00
power
purgatory x86/purgatory: Switch to the position-independent small code model 2024-06-12 11:03:12 +02:00
ras
realmode
tools
um um: Fix the -Wmissing-prototypes warning for get_thread_reg 2024-06-12 11:03:47 +02:00
video
virt/vmx/tdx
xen xen: use correct end address of kernel for conflict checking 2024-10-17 15:20:54 +02:00
.gitignore
Kbuild
Kconfig
Kconfig.assembler
Kconfig.cpu
Kconfig.debug x86/kconfig: Select ARCH_WANT_FRAME_POINTERS again when UNWINDER_FRAME_POINTER=y 2024-06-12 11:03:50 +02:00
Makefile
Makefile_32.cpu
Makefile.um