All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/7] 9pfs: fix TOCTUA on concurrent FID-type assignments
@ 2026-12-01 19:38 Christian Schoenebeck
  2026-12-01 19:36 ` [PATCH v2 1/7] hw/9pfs: make FID type assignment atomic across yields Christian Schoenebeck
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Christian Schoenebeck @ 2026-12-01 19:38 UTC (permalink / raw)
  To: qemu-devel, qemu-stable
  Cc: Greg Kurz, Fabiano Rosas, Laurent Vivier, Paolo Bonzini

This series fixes the following issue:
https://gitlab.com/qemu-project/qemu/-/issues/4664
(see patch 1 for a more compact issue description)

The actual fix is only one patch:

  - Patch 1: fix TOCTUA issue by introducing an intermediate, early
    P9_FID_PENDING state

The rest of the patches are test case changes required for covering the
fixed issue:

  - Patch 2: splits the test virtio device's qvirtqueue_kick() into
    two functions (qvirtqueue_enqueue() and qvirtqueue_notify()).

  - Patch 3: adds new test virtio device function qvirtqueue_wait_next_used()
    which allows to wait for the next element made available the device,
    independent of order of appearance.

  - Patch 4: allows 9p test client to schedule several 9p requests
    simultaniously.

  - Patch 5: moves strct P9Hdr from .c to .h file.

  - Patch 6: allows 9p test client to retrieve the next 9p server response,
    independent of order of arrival.

  - Patch 7: finally provides the 9p test case guarding the issue fixed by
    patch 1.

Note: originally I started implementing the test as (non-deterministic)
race-test, but then realized, due to the way the fix applies behaviour, the
test actually degrades to a perfect deterministic 9p protocol check.

  v2: no changes; just resent this series with proper email threading.

Christian Schoenebeck (7):
  hw/9pfs: make FID type assignment atomic across yields
  libqos/virtio: split qvirtqueue_kick into enqueue and notify
  libqos/virtio: add qvirtqueue_wait_next_used()
  tests/9p-client: add ability to schedule requests without notifying
  tests/9p-client: move struct P9Hdr into the client header file
  tests/9p-client: add v9fs_resp_pop_next_hdr()
  tests/9p: add FID type atomicity test cases

 hw/9pfs/9p.c                          | 55 ++++++++++++++++-
 hw/9pfs/9p.h                          | 21 +++++++
 tests/qtest/libqos/virtio-9p-client.c | 89 +++++++++++++++++++++++----
 tests/qtest/libqos/virtio-9p-client.h | 18 ++++++
 tests/qtest/libqos/virtio.c           | 73 +++++++++++++++++++---
 tests/qtest/libqos/virtio.h           |  6 ++
 tests/qtest/virtio-9p-test.c          | 71 +++++++++++++++++++++
 7 files changed, 311 insertions(+), 22 deletions(-)

-- 
2.47.3



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

end of thread, other threads:[~2026-12-01 19:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 19:38 [PATCH v2 0/7] 9pfs: fix TOCTUA on concurrent FID-type assignments Christian Schoenebeck
2026-12-01 19:36 ` [PATCH v2 1/7] hw/9pfs: make FID type assignment atomic across yields Christian Schoenebeck
2026-12-01 19:36 ` [PATCH v2 2/7] libqos/virtio: split qvirtqueue_kick into enqueue and notify Christian Schoenebeck
2026-12-01 19:36 ` [PATCH v2 3/7] libqos/virtio: add qvirtqueue_wait_next_used() Christian Schoenebeck
2026-12-01 19:36 ` [PATCH v2 4/7] tests/9p-client: add ability to schedule requests without notifying Christian Schoenebeck
2026-12-01 19:36 ` [PATCH v2 5/7] tests/9p-client: move struct P9Hdr into the client header file Christian Schoenebeck
2026-12-01 19:36 ` [PATCH v2 6/7] tests/9p-client: add v9fs_resp_pop_next_hdr() Christian Schoenebeck
2026-12-01 19:36 ` [PATCH v2 7/7] tests/9p: add FID type atomicity test cases Christian Schoenebeck

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.