]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
xen/arm: setup: Calculate correctly the size of Xen
authorJulien Grall <julien.grall@arm.com>
Wed, 16 Oct 2019 11:12:51 +0000 (12:12 +0100)
committerJulien Grall <julien.grall@arm.com>
Tue, 22 Oct 2019 16:56:22 +0000 (17:56 +0100)
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 <julien.grall@arm.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/setup.c

index 705a917abf763c7c363331be4c4fcab94ad16a1a..51d32106b7e0a8f7c097387ade6ac2d1715268e4 100644 (file)
@@ -819,7 +819,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), false);
+                             (paddr_t)(uintptr_t)(_end - _start), false);
     BUG_ON(!xen_bootmodule);
 
     fdt_size = boot_fdt_info(device_tree_flattened, fdt_paddr);