qemu/hw
Kevin Wolf 75997e182b scsi-disk: Don't silently truncate serial number
Before this commit, scsi-disk accepts a string of arbitrary length for
its "serial" property. However, the value visible on the guest is
actually truncated to 36 characters. This limitation doesn't come from
the SCSI specification, it is an arbitrary limit that was initially
picked as 20 and later bumped to 36 by commit 48b62063.

Similarly, device_id was introduced as a copy of the serial number,
limited to 20 characters, but commit 48b62063 forgot to actually bump
it.

As long as we silently truncate the given string, extending the limit is
actually not a harmless change, but break the guest ABI. This is the
most important reason why commit 48b62063 was really wrong (and it's
also why we can't change device_id to be in sync with the serial number
again and use 36 characters now, it would be another guest ABI
breakage).

In order to avoid future breakage, don't silently truncate the serial
number string any more, but just error out if it would be truncated.

Buglink: https://issues.redhat.com/browse/RHEL-3542
Suggested-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20240604161755.63448-1-kwolf@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-06-08 10:33:38 +02:00
..
9pfs hw/xen: Make XenDevOps structures const 2024-06-04 11:53:43 +02:00
acpi hw/acpi: Remove the deprecated QAPI MEM_UNPLUG_ERROR event 2024-06-04 11:53:43 +02:00
adc
alpha
arm arm/sbsa-ref: move to Neoverse-N2 as default 2024-05-30 13:21:06 +01:00
audio
avr
block virtio-blk: remove SCSI passthrough functionality 2024-06-05 11:01:05 +02:00
char hw: arm: Remove use of tabs in some source files 2024-05-28 14:20:48 +01:00
core machine, hostmem: improve error messages for unsupported features 2024-06-08 10:33:38 +02:00
cpu
cris
cxl
display hw/xen: Register framebuffer backend via xen_backend_init() 2024-06-04 11:53:43 +02:00
dma hw/dma/xlnx_dpdma: Read descriptor into buffer, not into pointer-to-buffer 2024-06-04 11:53:43 +02:00
fsi
gpio hw: arm: Remove use of tabs in some source files 2024-05-28 14:20:48 +01:00
hppa
hyperv
i2c
i386 hw/i386: Add support for loading BIOS using guest_memfd 2024-06-05 11:01:06 +02:00
ide
input hw: arm: Remove use of tabs in some source files 2024-05-28 14:20:48 +01:00
intc hw/intc/riscv_aplic: APLICs should add child earlier than realize 2024-06-03 11:12:11 +10:00
ipack
ipmi
isa
loongarch hw/loongarch/virt: Fix FDT memory node address width 2024-05-23 09:30:41 +08:00
m68k
mem
microblaze
mips
misc * virtio-blk: remove SCSI passthrough functionality 2024-06-05 07:45:23 -07:00
net virtio-net: drop too short packets early 2024-06-04 15:14:26 +08:00
nubus
nvme
nvram
openrisc
pci
pci-bridge
pci-host
pcmcia
ppc hw/acpi: Remove the deprecated QAPI MEM_UNPLUG_ERROR event 2024-06-04 11:53:43 +02:00
remote
riscv hw/riscv/boot.c: Support 64-bit address for initrd 2024-06-03 11:12:11 +10:00
rtc
rx
s390x
scsi scsi-disk: Don't silently truncate serial number 2024-06-08 10:33:38 +02:00
sd
sensor
sh4
smbios
sparc
sparc64
ssi
timer
tpm
tricore
ufs hw/ufs: Add support MCQ of UFSHCI 4.0 2024-06-03 16:20:42 +09:00
usb usb: add config options for the hub and hid devices 2024-06-04 11:53:43 +02:00
vfio
virtio util/hexdump: Remove ascii parameter from qemu_hexdump_line 2024-06-04 10:02:39 +02:00
watchdog
xen hw/xen: Constify xenstore_be::XenDevOps 2024-06-04 11:53:43 +02:00
xenpv hw/xen: Register framebuffer backend via xen_backend_init() 2024-06-04 11:53:43 +02:00
xtensa
Kconfig
meson.build