qemu-e2k/hw/acpi
Igor Mammedov a3ec4bb7e5 acpi: pcihp: fix left shift undefined behavior in acpi_pcihp_eject_slot()
Coverity spots subj in following guest triggered code path
  pci_write(, data = 0) -> acpi_pcihp_eject_slot(,slots = 0)
     uinst32_t slot = ctz32(slots)
     ...
     ... = ~(1U << slot)
where 'slot' value is 32 in case 'slots' bitmap is empty.
'slots' is a bitmap and empty one shouldn't  do anything
so return early doing nothing if resulted slot value is
not valid (i.e. not in 0-31 range)

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20200326135624.32464-1-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2020-03-29 09:52:13 -04:00
..
acpi_interface.c
acpi-stub.c
acpi-x86-stub.c acpi: move PC stubs out of stubs/ 2019-12-17 19:33:50 +01:00
aml-build.c
bios-linker-loader.c
core.c
cpu_hotplug.c hw/acpi/cpu_hotplug: Include "hw/pci/pci.h" 2020-03-09 15:59:31 +01:00
cpu.c acpi: cpuhp: add CPHP_GET_CPU_ID_CMD command 2020-01-22 00:23:07 -05:00
generic_event_device.c * Register qdev properties as class properties (Marc-André) 2020-01-27 09:44:04 +00:00
hmat.c hmat acpi: Build Memory Side Cache Information Structure(s) 2020-01-05 07:03:03 -05:00
hmat.h hmat acpi: Build Memory Proximity Domain Attributes Structure(s) 2020-01-05 07:03:03 -05:00
ich9.c qom/object: Use common get/set uint helpers 2020-03-16 23:02:24 +01:00
ipmi-stub.c
ipmi.c
Kconfig hmat acpi: Build Memory Proximity Domain Attributes Structure(s) 2020-01-05 07:03:03 -05:00
Makefile.objs hmat acpi: Build Memory Proximity Domain Attributes Structure(s) 2020-01-05 07:03:03 -05:00
memory_hotplug.c
nvdimm.c misc: Replace zero-length arrays with flexible array member (automatic) 2020-03-16 22:07:42 +01:00
pci.c
pcihp.c acpi: pcihp: fix left shift undefined behavior in acpi_pcihp_eject_slot() 2020-03-29 09:52:13 -04:00
piix4.c qom/object: enable setter for uint types 2020-03-16 23:02:23 +01:00
tco.c
tpm.c
trace-events acpi: cpuhp: introduce 'Command data 2' field 2020-01-22 00:23:07 -05:00
utils.c
vmgenid.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00