qemu-e2k/hw
Klaus Jensen 9c62f1efa8 hw/block/nvme: fix potential overflow
page_size is a uint32_t, and zasl is a uint8_t, so the expression
`page_size << zasl` is done using 32-bit arithmetic and might overflow.
Since we then compare this against a 64 bit data_size value, Coverity
complains that we might overflow unintentionally. An MDTS/ZASL value in
excess of 4GiB is probably impractical, but it is not entirely
unrealistic, so add a cast such that we handle that case properly.

Fixes: 578d914b26 ("hw/block/nvme: align zoned.zasl with mdts")
Fixes: CID 1450756
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
2021-03-18 12:34:51 +01:00
..
9pfs hw/9pfs/9p-synth: Replaced qemu_mutex_lock with QEMU_LOCK_GUARD 2021-03-16 11:41:49 +01:00
acpi
adc clock: Add ClockEvent parameter to callbacks 2021-03-08 17:20:01 +00:00
alpha
arm hw/arm: Connect PWM fans in NPCM7XX boards 2021-03-12 12:50:36 +00:00
audio
avr hw/avr/arduino: List board schematic links 2021-03-15 00:39:52 +01:00
block hw/block/nvme: fix potential overflow 2021-03-18 12:34:51 +01:00
char hw/char: add goldfish-tty 2021-03-15 21:02:03 +01:00
core -----BEGIN PGP SIGNATURE----- 2021-03-16 10:53:47 +00:00
cpu
cris
display target-arm queue: 2021-03-14 13:18:49 +00:00
dma target-arm queue: 2021-03-10 13:57:31 +00:00
gpio
hppa
hyperv
i2c
i386 dma: Introduce dma_aligned_pow2_mask() 2021-03-12 12:40:10 +00:00
ide sysemu: Let VMChangeStateHandler take boolean 'running' argument 2021-03-09 23:13:57 +01:00
input
intc m68k: add an interrupt controller 2021-03-15 21:02:20 +01:00
ipack
ipmi
isa hw/southbridge: Add missing Kconfig dependency VT82C686 on USB_UHCI 2021-03-15 17:00:59 +01:00
lm32 hw/lm32/Kconfig: Have MILKYMIST select LM32_DEVICES 2021-03-09 22:37:08 +01:00
m68k m68k: add Virtual M68k Machine 2021-03-15 21:03:06 +01:00
mem memory: add a sparse memory device for fuzzing 2021-03-16 14:30:30 -04:00
microblaze
mips hw/mips/gt64xxx: Trace accesses to ISD registers 2021-03-13 20:29:36 +01:00
misc q800 pull request 20210316 2021-03-18 10:05:37 +00:00
moxie
net net: Move NetClientState.info_str to dynamic allocations 2021-03-15 16:41:22 +08:00
nios2
nubus
nvram sysemu: Let VMChangeStateHandler take boolean 'running' argument 2021-03-09 23:13:57 +01:00
openrisc
pci
pci-bridge
pci-host
pcmcia
ppc spapr_iommu: Fix vhost integration regression 2021-03-16 10:06:44 -06:00
rdma pvrdma: wean code off pvrdma_ring.h kernel header 2021-03-15 16:41:22 +08:00
remote
riscv Testing, guest-loader and other misc tweaks 2021-03-11 16:20:58 +00:00
rtc
rx qtest: delete superfluous inclusions of qtest.h 2021-03-09 06:03:53 +01:00
s390x s390x/pci: Add missing initialization for g_autofree variables 2021-03-15 15:47:18 +01:00
scsi sysemu: Let VMChangeStateHandler take boolean 'running' argument 2021-03-09 23:13:57 +01:00
sd
sh4
smbios
sparc
sparc64
ssi hw/ssi: xilinx_spips: Remove DMA related dead codes from zynqmp_spips 2021-03-10 13:54:51 +00:00
timer hw/i8254: fix vmstate load 2021-03-16 14:30:30 -04:00
tpm
tricore tricore: added triboard with tc27x_soc 2021-03-14 14:41:55 +01:00
unicore32
usb usb/storage: clear csw on reset 2021-03-15 17:01:17 +01:00
vfio vfio/migrate: Move switch of dirty tracking into vfio_memory_listener 2021-03-16 10:06:44 -06:00
virtio virtio-net: calculating proper msix vectors on init 2021-03-15 16:41:22 +08:00
watchdog clock: Add ClockEvent parameter to callbacks 2021-03-08 17:20:01 +00:00
xen
xenpv
xtensa
Kconfig semihosting: Move hw/semihosting/ -> semihosting/ 2021-03-10 15:34:12 +00:00
meson.build semihosting: Move hw/semihosting/ -> semihosting/ 2021-03-10 15:34:12 +00:00