All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] virtio-blk: Deprecate silent truncation of serial
@ 2026-10-29 23:09 Kevin Wolf
  2026-10-29 23:09 ` [PATCH v2 1/4] virtio-blk: Implement full NUL padding for GET_ID Kevin Wolf
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Kevin Wolf @ 2026-10-29 23:09 UTC (permalink / raw)
  To: qemu-block; +Cc: kwolf, hreitz, stefanha, mst, devel, qemu-devel

QEMU has allowed the user to specify serials of arbitrary length for
virtio-blk devices, even though the virtio-blk protocol can only
communicate 20 characters of the serial to the guest. This means that a
longer serial number on the command line is silently truncated to 20
characters from the guest perspective.

As a first step to fix this, deprecate the silent truncation and turn it
into a warning; we can later make this a hard error. While touching
GET_ID, let's make it more spec compliant and clean up the internal
state.

Another part is planned that will actually enable users to use longer
serials and additional device identifiers. This will need spec changes
and would take more time than we have until the QEMU 11.2 freeze anyway,
so I'll address this later. For now, the important thing is to get the
deprecation period started.

v2:
- Drop truncation of qdev property for now [Stefan]
- Add test case for exactly 20 characters [Stefan]
- Fix missing guest_free() [Stefan]
- Pass pattern_byte to get_id_request() instead of hardcoding it
  [Stefan]

Kevin Wolf (4):
  virtio-blk: Implement full NUL padding for GET_ID
  virtio-blk-test: Add a basic GET_ID test case
  virtio-blk: Deprecate silent truncation of serial
  virtio-blk-test: Test truncated serial

 docs/about/deprecated.rst     |  13 ++++
 hw/block/virtio-blk.c         |  18 +++--
 tests/qtest/virtio-blk-test.c | 119 ++++++++++++++++++++++++++++++++++
 3 files changed, 146 insertions(+), 4 deletions(-)

-- 
2.56.0



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-11-13 17:18 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-29 23:09 [PATCH v2 0/4] virtio-blk: Deprecate silent truncation of serial Kevin Wolf
2026-10-29 23:09 ` [PATCH v2 1/4] virtio-blk: Implement full NUL padding for GET_ID Kevin Wolf
2026-10-29 23:09 ` [PATCH v2 2/4] virtio-blk-test: Add a basic GET_ID test case Kevin Wolf
2026-10-30 19:30   ` Stefan Hajnoczi
2026-10-29 23:10 ` [PATCH v2 3/4] virtio-blk: Deprecate silent truncation of serial Kevin Wolf
2026-10-29 23:10 ` [PATCH v2 4/4] virtio-blk-test: Test truncated serial Kevin Wolf
2026-10-30 19:30   ` Stefan Hajnoczi
2026-10-30 19:31 ` [PATCH v2 0/4] virtio-blk: Deprecate silent truncation of serial Stefan Hajnoczi
2026-11-09 13:21 ` Christian Borntraeger
2026-11-13 13:31   ` Kevin Wolf
2026-11-13 16:39     ` Christian Borntraeger
2026-11-13 17:17       ` Kevin Wolf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.