All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/12] block/export: vhost-user-blk server tests and input validation
@ 2020-12-07 17:20 Stefan Hajnoczi
  2020-12-07 17:20 ` [PATCH v2 01/12] vhost-user-blk: fix blkcfg->num_queues endianness Stefan Hajnoczi
                   ` (12 more replies)
  0 siblings, 13 replies; 26+ messages in thread
From: Stefan Hajnoczi @ 2020-12-07 17:20 UTC (permalink / raw)
  To: qemu-devel
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, qemu-block,
	Peter Maydell, Michael S . Tsirkin, Coiby Xu, Max Reitz,
	Stefan Hajnoczi, Paolo Bonzini, Raphael Norwitz

v2:
 * Add abrt handler that terminates qemu-storage-daemon to
   vhost-user-blk-test. No more orphaned processes on test failure. [Peter]
 * Fix sector number calculation in vhost-user-blk-server.c
 * Introduce VIRTIO_BLK_SECTOR_BITS/SIZE to make code clearer [Max]
 * Fix vhost-user-blk-server.c blk_size double byteswap
 * Fix vhost-user-blk blkcfg->num_queues endianness [Peter]
 * Squashed cleanups into Coiby vhost-user-blk-test commit so the code is
   easier to review

The vhost-user-blk server test was already in Michael Tsirkin's recent vhost
pull request, but was dropped because it exposed vhost-user regressions
(b7c1bd9d7848 and the Based-on tag below). Now that the vhost-user regressions
are fixed we can re-introduce the test case.

This series adds missing input validation that led to a Coverity report. The
virtio-blk read, write, discard, and write zeroes commands need to check
sector/byte ranges and other inputs. This solves the issue Peter Maydell raised
in "[PATCH for-5.2] block/export/vhost-user-blk-server.c: Avoid potential
integer overflow".

Merging just the input validation patches would be possible too, but I prefer
to merge the corresponding tests so the code is exercised by the CI.

Coiby Xu (1):
  test: new qTest case to test the vhost-user-blk-server

Stefan Hajnoczi (11):
  vhost-user-blk: fix blkcfg->num_queues endianness
  libqtest: add qtest_socket_server()
  libqtest: add qtest_kill_qemu()
  libqtest: add qtest_remove_abrt_handler()
  tests/qtest: add multi-queue test case to vhost-user-blk-test
  block/export: fix blk_size double byteswap
  block/export: use VIRTIO_BLK_SECTOR_BITS
  block/export: fix vhost-user-blk export sector number calculation
  block/export: port virtio-blk discard/write zeroes input validation
  vhost-user-blk-test: test discard/write zeroes invalid inputs
  block/export: port virtio-blk read/write range check

 MAINTAINERS                          |   2 +
 tests/qtest/libqos/libqtest.h        |  37 +
 tests/qtest/libqos/vhost-user-blk.h  |  48 ++
 block/export/vhost-user-blk-server.c | 150 +++-
 hw/block/vhost-user-blk.c            |   7 +-
 tests/qtest/libqos/vhost-user-blk.c  | 130 ++++
 tests/qtest/libqtest.c               |  82 ++-
 tests/qtest/vhost-user-blk-test.c    | 983 +++++++++++++++++++++++++++
 tests/qtest/libqos/meson.build       |   1 +
 tests/qtest/meson.build              |   4 +
 10 files changed, 1385 insertions(+), 59 deletions(-)
 create mode 100644 tests/qtest/libqos/vhost-user-blk.h
 create mode 100644 tests/qtest/libqos/vhost-user-blk.c
 create mode 100644 tests/qtest/vhost-user-blk-test.c

-- 
2.28.0


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

end of thread, other threads:[~2021-03-10 16:32 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-07 17:20 [PATCH v2 00/12] block/export: vhost-user-blk server tests and input validation Stefan Hajnoczi
2020-12-07 17:20 ` [PATCH v2 01/12] vhost-user-blk: fix blkcfg->num_queues endianness Stefan Hajnoczi
2021-01-04  4:01   ` Raphael Norwitz
2021-01-20  9:43   ` Michael S. Tsirkin
2020-12-07 17:20 ` [PATCH v2 02/12] libqtest: add qtest_socket_server() Stefan Hajnoczi
2020-12-18 11:29   ` Thomas Huth
2021-01-04 19:23   ` Wainer dos Santos Moschetta
2020-12-07 17:20 ` [PATCH v2 03/12] libqtest: add qtest_kill_qemu() Stefan Hajnoczi
2021-01-04 19:28   ` Wainer dos Santos Moschetta
2020-12-07 17:20 ` [PATCH v2 04/12] libqtest: add qtest_remove_abrt_handler() Stefan Hajnoczi
2021-01-04 21:02   ` Wainer dos Santos Moschetta
2020-12-07 17:20 ` [PATCH v2 05/12] test: new qTest case to test the vhost-user-blk-server Stefan Hajnoczi
2020-12-18 14:56   ` Coiby Xu
2021-02-23 14:40     ` Stefan Hajnoczi
2020-12-07 17:20 ` [PATCH v2 06/12] tests/qtest: add multi-queue test case to vhost-user-blk-test Stefan Hajnoczi
2020-12-07 17:20 ` [PATCH v2 07/12] block/export: fix blk_size double byteswap Stefan Hajnoczi
2020-12-07 17:20 ` [PATCH v2 08/12] block/export: use VIRTIO_BLK_SECTOR_BITS Stefan Hajnoczi
2020-12-07 17:20 ` [PATCH v2 09/12] block/export: fix vhost-user-blk export sector number calculation Stefan Hajnoczi
2020-12-07 17:20 ` [PATCH v2 10/12] block/export: port virtio-blk discard/write zeroes input validation Stefan Hajnoczi
2020-12-07 17:20 ` [PATCH v2 11/12] vhost-user-blk-test: test discard/write zeroes invalid inputs Stefan Hajnoczi
2020-12-07 17:20 ` [PATCH v2 12/12] block/export: port virtio-blk read/write range check Stefan Hajnoczi
2021-02-15 10:41 ` [PATCH v2 00/12] block/export: vhost-user-blk server tests and input validation Kevin Wolf
2021-02-19 22:38   ` Peter Maydell
2021-02-23 11:06     ` Philippe Mathieu-Daudé
2021-03-10 15:51     ` Peter Maydell
2021-03-10 16:26       ` 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.