From: Christian Schoenebeck <qemu_oss@crudebyte.com>
To: qemu-devel@nongnu.org
Cc: qemu-stable@nongnu.org, Greg Kurz <groug@kaod.org>,
Fabiano Rosas <farosas@suse.de>,
Laurent Vivier <lvivier@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH 0/7] 9pfs: fix TOCTUA on concurrent FID-type assignments
Date: Tue, 01 Dec 2026 20:14:31 +0100 [thread overview]
Message-ID: <13018757.O9o76ZdvQC@weasel> (raw)
In-Reply-To: <E1xYTB9-00000000oV7-1jBw@kylie.crudebyte.com>
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(-)
prev parent reply other threads:[~2026-12-01 19:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
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=13018757.O9o76ZdvQC@weasel \
--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.