Skip to content

Commit

Permalink
libxl/ACPI: don't hard-code guest page size
Browse files Browse the repository at this point in the history
We have libxl_ctxt.page_size for this purpose; use it to eliminate a
latent buffer overrun.

Fixes: 14c0d32 ("libxl/acpi: Build ACPI tables for HVMlite guests")
Signed-off-by: Jan Beulich <[email protected]>
Reviewed-by: Anthony PERARD <[email protected]>
  • Loading branch information
jbeulich committed Nov 26, 2024
1 parent fcf91ce commit 4e0b1ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/libs/light/libxl_x86_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4e0b1ad

Please sign in to comment.