On 25.11.2024 18:04, Anthony PERARD wrote: > On Mon, Nov 25, 2024 at 04:15:49PM +0100, Jan Beulich wrote: >> First instroduce a manifest constant, to avoid open-coding 64 in several >> places. Then use this constant to bound the allocation. >> >> Signed-off-by: Jan Beulich <[email protected]> > > Hopefully, `struct acpi_20_rsdp` isn't going to be bigger that 64, but > it would probably not work well anyway seen how `config.rsdp` is used > here. > > Reviewed-by: Anthony PERARD <[email protected]>
Thanks. >> --- >> Similarly bounding the info "page" allocation would be nice, but would >> require knowing libacpi's struct acpi_info size here. > > Or register the allocation size in `config`, so acpi_build_tables() can > check if there's enough space. Something like `config.info_size`. That would feel kind of backwards. It should be libacpi to specify the size it needs, yet that won't work as libacpi is the consumer of the config struct. We could of course add acpi_get_info_size() to libacpi, for libxl to use. Jan
