From: Christian Schoenebeck <qemu_oss@crudebyte.com>
To: qemu-devel@nongnu.org, qemu-stable@nongnu.org
Cc: Greg Kurz <groug@kaod.org>, Fabiano Rosas <farosas@suse.de>,
Laurent Vivier <lvivier@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: [PATCH v2 0/7] 9pfs: fix TOCTUA on concurrent FID-type assignments
Date: Tue, 1 Dec 2026 20:38:18 +0100 [thread overview]
Message-ID: <cover.1796153898.git.qemu_oss@crudebyte.com> (raw)
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
next reply other threads:[~2026-12-01 19:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 19:38 Christian Schoenebeck [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1796153898.git.qemu_oss@crudebyte.com \
--to=qemu_oss@crudebyte.com \
--cc=farosas@suse.de \
--cc=groug@kaod.org \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.