* [PATCH 0/7] 9pfs: fix TOCTUA on concurrent FID-type assignments
@ 2026-12-01 18:51 Christian Schoenebeck
2026-12-01 19:14 ` Christian Schoenebeck
0 siblings, 1 reply; 2+ messages in thread
From: Christian Schoenebeck @ 2026-12-01 18:51 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, 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.
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] 2+ messages in thread
* Re: [PATCH 0/7] 9pfs: fix TOCTUA on concurrent FID-type assignments
2026-12-01 18:51 [PATCH 0/7] 9pfs: fix TOCTUA on concurrent FID-type assignments Christian Schoenebeck
@ 2026-12-01 19:14 ` Christian Schoenebeck
0 siblings, 0 replies; 2+ messages in thread
From: Christian Schoenebeck @ 2026-12-01 19:14 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Greg Kurz, Fabiano Rosas, Laurent Vivier,
Paolo Bonzini
On Tuesday, 1 December 2026 19:51:04 CET Christian Schoenebeck wrote:
> This series fixes the following issue:
> https://gitlab.com/qemu-project/qemu/-/issues/4664
> (see patch 1 for a more compact issue description)
Oops, I accidentally sent this series without threading. Just ignore it. I'll
resend with proper threading.
Sorry!
/Christian
> 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.
>
> 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(-)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-12-01 19:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 18:51 [PATCH 0/7] 9pfs: fix TOCTUA on concurrent FID-type assignments Christian Schoenebeck
2026-12-01 19:14 ` 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.