qemu-e2k/hw/acpi
Jonathan Cameron 74e2845c5f hmat acpi: Fix out of bounds access due to missing use of indirection
With a numa set up such as

-numa nodeid=0,cpus=0 \
-numa nodeid=1,memdev=mem \
-numa nodeid=2,cpus=1

and appropriate hmat_lb entries the initiator list is correctly
computed and writen to HMAT as 0,2 but then the LB data is accessed
using the node id (here 2), landing outside the entry_list array.

Stash the reverse lookup when writing the initiator list and use
it to get the correct array index index.

Fixes: 4586a2cb83 ("hmat acpi: Build System Locality Latency and Bandwidth Information Structure(s)")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20240307160326.31570-3-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2024-03-12 17:59:46 -04:00
..
acpi_generic_initiator.c hw/acpi: Implement the SRAT GI affinity structure 2024-03-12 17:56:55 -04:00
acpi_interface.c
acpi-cpu-hotplug-stub.c
acpi-mem-hotplug-stub.c
acpi-nvdimm-stub.c
acpi-pci-hotplug-stub.c pcihp: add ACPI PCI hotplug specific is_hotpluggable_bus() callback 2023-03-07 12:39:00 -05:00
acpi-qmp-cmds.c
acpi-stub.c hw/acpi: Dumb down acpi_table_add() stub 2023-02-23 14:10:17 +01:00
acpi-x86-stub.c hw/acpi/acpi_dev_interface: Remove now unused madt_cpu virtual method 2023-10-04 18:15:05 -04:00
aml-build-stub.c
aml-build.c hw/arm/virt-acpi-build.c: Migrate SPCR creation to common location 2024-03-08 15:38:46 +10:00
bios-linker-loader.c
core.c hw/acpi/core: Trace enable and status registers of GPE separately 2023-10-04 18:15:05 -04:00
cpu_hotplug.c hw/acpi/cpu_hotplug: Include 'x86.h' instead of 'pc.h' 2024-02-20 20:34:21 +03:00
cpu.c hw/acpi: Constify VMState 2023-12-29 11:17:30 +11:00
cxl-stub.c
cxl.c hw/cxl: Add QTG _DSM support for ACPI0017 device 2023-10-22 05:18:17 -04:00
erst.c hw/acpi: Constify VMState 2023-12-29 11:17:30 +11:00
generic_event_device.c hw/acpi: Constify VMState 2023-12-29 11:17:30 +11:00
ghes-stub.c
ghes.c
hmat.c hmat acpi: Fix out of bounds access due to missing use of indirection 2024-03-12 17:59:46 -04:00
hmat.h hw/acpi/acpi_dev_interface: Remove now unused #include "hw/boards.h" 2023-10-04 18:15:05 -04:00
ich9_tco.c hw/acpi: Constify VMState 2023-12-29 11:17:30 +11:00
ich9.c hw/acpi: Constify VMState 2023-12-29 11:17:30 +11:00
ipmi-stub.c
ipmi.c
Kconfig
memory_hotplug.c hw/acpi: Constify VMState 2023-12-29 11:17:30 +11:00
meson.build qom: new object to associate device to NUMA node 2024-03-12 17:56:55 -04:00
nvdimm.c hw/other: spelling fixes 2023-09-21 11:31:16 +03:00
pci-bridge-stub.c
pci-bridge.c acpi: pci: move out ACPI PCI hotplug generator from generic slot generator build_append_pci_bus_devices() 2023-03-07 12:39:00 -05:00
pci.c
pcihp.c hw/acpi: Constify VMState 2023-12-29 11:17:30 +11:00
piix4.c hw/acpi: Constify VMState 2023-12-29 11:17:30 +11:00
tpm.c
trace-events hw/acpi/core: Trace enable and status registers of GPE separately 2023-10-04 18:15:05 -04:00
trace.h
utils.c
viot.c
viot.h
vmgenid.c hw/acpi: Constify VMState 2023-12-29 11:17:30 +11:00