From: Julien Grall Date: Wed, 16 Oct 2019 11:12:51 +0000 (+0100) Subject: xen/arm: setup: Calculate correctly the size of Xen X-Git-Tag: archive/raspbian/4.11.3+24-g14b62ab3e5-1+rpi1^2~55^2~73 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=8502a2cdcc61542930b25ea3e4261cf4bf3b1a41;p=xen.git xen/arm: setup: Calculate correctly the size of Xen The current size of Xen is computed using _end - _start + 1. However, _end is pointing one past the end of Xen, so the size of Xen is off-by-one. Signed-off-by: Julien Grall Release-acked-by: Juergen Gross Reviewed-by: Stefano Stabellini (cherry picked from commit 08e2059facd78d5ffaf206ba06ac2017c4adeed4) --- diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index ff949f545a..4cb87ac9a3 100644 --- a/xen/arch/arm/setup.c +++ b/xen/arch/arm/setup.c @@ -726,7 +726,7 @@ void __init start_xen(unsigned long boot_phys_offset, /* Register Xen's load address as a boot module. */ xen_bootmodule = add_boot_module(BOOTMOD_XEN, (paddr_t)(uintptr_t)(_start + boot_phys_offset), - (paddr_t)(uintptr_t)(_end - _start + 1), NULL); + (paddr_t)(uintptr_t)(_end - _start), NULL); BUG_ON(!xen_bootmodule); xen_paddr = get_xen_paddr();