mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
libxl/ACPI: don't hard-code guest page size
We have libxl_ctxt.page_size for this purpose; use it to eliminate a
latent buffer overrun.
Fixes: 14c0d328da ("libxl/acpi: Build ACPI tables for HVMlite guests")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
This commit is contained in:
1 parent
fcf91ce9de
commit
4e0b1adff0
1 file changed
+1
-1
@@ -218,7 +218,7 @@ int libxl__dom_load_acpi(libxl__gc *gc,
|
||||
dom->acpi_modules[0].guest_addr_out = 0x100000 - 64;
|
||||
|
||||
dom->acpi_modules[1].data = (void *)config.infop;
|
||||
dom->acpi_modules[1].length = 4096;
|
||||
dom->acpi_modules[1].length = libxl_ctxt.page_size;
|
||||
dom->acpi_modules[1].guest_addr_out = ACPI_INFO_PHYSICAL_ADDRESS;
|
||||
|
||||
dom->acpi_modules[2].data = libxl_ctxt.buf;
|
||||
|
||||