qemu-e2k/hw/nvme
Minwoo Im 4f0a4a3d58 hw/nvme: separate 'serial' property for VFs
Currently, when a VF is created, it uses the 'params' object of the PF
as it is. In other words, the 'params.serial' string memory area is also
shared. In this situation, if the VF is removed from the system, the
PF's 'params.serial' object is released with object_finalize() followed
by object_property_del_all() which release the memory for 'serial'
property. If that happens, the next VF created will inherit a serial
from a corrupted memory area.

If this happens, an error will occur when comparing subsys->serial and
n->params.serial in the nvme_subsys_register_ctrl() function.

Cc: qemu-stable@nongnu.org
Fixes: 44c2c09488 ("hw/nvme: Add support for SR-IOV")
Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
2024-03-12 15:48:56 +01:00
..
ctrl.c hw/nvme: separate 'serial' property for VFs 2024-03-12 15:48:56 +01:00
dif.c hw/nvme: fix CRC64 for guard tag 2023-08-08 08:09:38 +02:00
dif.h hw/nvme: 64-bit pi support 2022-03-03 09:30:21 +01:00
Kconfig kconfig: Add NVME to s390x machines 2023-09-12 12:07:16 +02:00
meson.build meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
ns.c hw/nvme: Clean up local variable shadowing in nvme_ns_init() 2023-09-29 10:07:20 +02:00
nvme.h hw/nvme: fix compliance issue wrt. iosqes/iocqes 2023-08-07 12:27:24 +02:00
subsys.c hw/nvme: fix verification of number of ruhis 2023-06-28 11:22:17 +02:00
trace-events hw/nvme: fix compliance issue wrt. iosqes/iocqes 2023-08-07 12:27:24 +02:00
trace.h