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
..
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
acpi-stub.c Include qmp-commands.h exactly where needed 2018-02-09 13:52:10 +01:00
acpi-x86-stub.c acpi: move PC stubs out of stubs/ 2019-12-17 19:33:50 +01:00
acpi_interface.c acpi: extend ACPI interface to provide send_event hook 2016-06-07 15:36:54 +03:00
aml-build.c acpi: Add i2c serial bus CRS handling 2019-09-20 14:08:10 -05:00
bios-linker-loader.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
core.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
cpu.c acpi: cpuhp: add CPHP_GET_CPU_ID_CMD command 2020-01-22 00:23:07 -05:00
cpu_hotplug.c hw/acpi/cpu_hotplug: Include "hw/pci/pci.h" 2020-03-09 15:59:31 +01: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: Fix SSIF ACPI handling to use the right CRS 2019-09-20 14:08:10 -05:00
ipmi.c ipmi: Fix SSIF ACPI handling to use the right CRS 2019-09-20 14:08:10 -05:00
memory_hotplug.c hw/acpi: Do not create memory hotplug method when handler is not defined 2019-10-05 17:12:08 -04:00
nvdimm.c misc: Replace zero-length arrays with flexible array member (automatic) 2020-03-16 22:07:42 +01:00
pci.c acpi: pci: use build_append_foo() API to construct MCFG 2019-05-29 18:00:57 -04:00
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 Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
tpm.c acpi: add ACPI memory clear interface 2019-01-17 21:10:57 -05:00
trace-events acpi: cpuhp: introduce 'Command data 2' field 2020-01-22 00:23:07 -05:00
utils.c hw/acpi: extract acpi_add_rom_blob() 2019-06-16 16:16:52 -04:00
vmgenid.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00