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:
Jan Beulich committed 2024-11-26 11:24:56 +01:00
1 parent fcf91ce9de
commit 4e0b1adff0
1 file changed
+1 -1
+1 -1
View File
@@ -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;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.