<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qemu/qemu.git/fsdev, branch master</title>
<subtitle>QEMU main repository</subtitle>
<id>https://git.rulkc.org/pub/scm/virt/qemu/qemu.git/atom?h=master</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/virt/qemu/qemu.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/virt/qemu/qemu.git/'/>
<updated>2026-06-29T13:10:31+00:00</updated>
<entry>
<title>hw/9pfs: add max_xattr option</title>
<updated>2026-06-29T13:10:31+00:00</updated>
<author>
<name>Christian Schoenebeck</name>
<email>qemu_oss@crudebyte.com</email>
</author>
<published>2026-06-13T14:55:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/virt/qemu/qemu.git/commit/?id=e6116a81f04c48af9530d984d16ef4ed4346e865'/>
<id>urn:sha1:e6116a81f04c48af9530d984d16ef4ed4346e865</id>
<content type='text'>
Previous patch introduced a limit of max. 1024 simultaneous xattr FIDs.

This patch introduces an option "max_attr" that allows to override this
limit, just for the case that some user might run into this limit for
some reason, even if unlikely; or for reducing the limit further down
(e.g. that default limit of 1024 would cap at max. 64 MiB host memory,
at least on Linux hosts where the limit per xattr is 64k).

This new "max_xattr" option can be specified with both -fsdev and
-virtfs command line options, with the "local" and the "synth" fs
drivers.

The previous limit of 1024 is preserved as the default value.

Link: https://lore.kernel.org/qemu-devel/b7631ac0d8dde0629bc7c4f2c4185d9f57b962b4.1781361555.git.qemu_oss@crudebyte.com
Signed-off-by: Christian Schoenebeck &lt;qemu_oss@crudebyte.com&gt;
</content>
</entry>
<entry>
<title>hw/9pfs: add xattr FID limit to prevent memory exhaustion</title>
<updated>2026-06-29T13:10:31+00:00</updated>
<author>
<name>Christian Schoenebeck</name>
<email>qemu_oss@crudebyte.com</email>
</author>
<published>2026-06-13T14:55:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/virt/qemu/qemu.git/commit/?id=693b296b176d1829b10855d9831bd2ad21b2cdcf'/>
<id>urn:sha1:693b296b176d1829b10855d9831bd2ad21b2cdcf</id>
<content type='text'>
Add a limit on the number of simultaneously open xattr FIDs to prevent
host memory exhaustion attacks. Each xattr FID contains a buffer for the
xattr value, and without a limit, a malicious priviliged guest with
direct communication access to 9p server could create a huge number of
xattr FIDs until host memory is eventually exhausted.

Fix this by:

 - add xattr_fid_limit to struct FsContext for the max. amount
 - add xattr_fid_count to struct FsContext for the current amount
 - init xattr_fid_limit with 1024
 - init xattr_fid_count with 0
 - add function xattr_fid_count_inc() to increment the count
 - add function xattr_fid_count_decr() to decrement the count
 - call xattr_fid_count_inc() in Txattrcreate handler
 - call xattr_fid_count_inc() in Txattrwalk handler
 - call xattr_fid_count_decr() when a xattr FID is freed

Additionally:

 - reset the xattr FID counter in virtfs_reset()

When the limit is reached then xattr_fid_count_inc() returns -ENOSPC and
the request handler is aborted on its error path without turning the
FID into an xattr type and without allocating memory for the xattr.

The default value of 1024 was chosen, as (sane usage of) xattr requests
in the 9p protocol are usually very short-lived, and even machines with
128 cores with very high xattr activity should have plenty of head room
without ever hitting this limit.

Fixes: 10b468bdc5 ("virtio-9p: Implement TXATTRCREATE")
Fixes: CVE-2026-8348
Reported-by: Feifan Qian &lt;bea1e@proton.me&gt;
Link: https://lore.kernel.org/qemu-devel/eb3787869745d47234fb662600187bf773e1ef8a.1781361555.git.qemu_oss@crudebyte.com
Signed-off-by: Christian Schoenebeck &lt;qemu_oss@crudebyte.com&gt;
</content>
</entry>
<entry>
<title>hw/9pfs: change V9fsPath.size to size_t and v9fs_path_sprintf() return type</title>
<updated>2026-06-01T09:11:39+00:00</updated>
<author>
<name>Christian Schoenebeck</name>
<email>qemu_oss@crudebyte.com</email>
</author>
<published>2026-05-18T17:35:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/virt/qemu/qemu.git/commit/?id=dbaf84e148b0c8b66dcb47788a6bb13806e401e4'/>
<id>urn:sha1:dbaf84e148b0c8b66dcb47788a6bb13806e401e4</id>
<content type='text'>
- Change V9fsPath.size from uint16_t to size_t to support paths larger
  than 65536 bytes.

- Change v9fs_path_sprintf() return type from void to int to allow error
  reporting.

Link: https://lore.kernel.org/qemu-devel/2d2348d94ff43fbe4cc0aea24fb312c5c15ee809.1779126034.git.qemu_oss@crudebyte.com
Signed-off-by: Christian Schoenebeck &lt;qemu_oss@crudebyte.com&gt;
</content>
</entry>
<entry>
<title>fsdev: Build stubs once</title>
<updated>2026-03-17T18:50:05+00:00</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
<email>philmd@linaro.org</email>
</author>
<published>2026-02-24T16:25:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/virt/qemu/qemu.git/commit/?id=4a425e5f136d66aa65204f3f10e41a88c6cf8f39'/>
<id>urn:sha1:4a425e5f136d66aa65204f3f10e41a88c6cf8f39</id>
<content type='text'>
Move stubs to the global stub_ss[] source set. These files
are now built once for all binaries, instead of one time
per system binary.

Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Reviewed-by: Pierrick Bouvier &lt;pierrick.bouvier@linaro.org&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Message-Id: &lt;20260225035739.42848-11-philmd@linaro.org&gt;
</content>
</entry>
<entry>
<title>block: extract include/qemu/aiocb.h out of include/block/aio.h</title>
<updated>2025-12-27T09:11:12+00:00</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2025-12-03T11:08:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/virt/qemu/qemu.git/commit/?id=ddab0ef12470fe706c6afa2e4479762d786daab4'/>
<id>urn:sha1:ddab0ef12470fe706c6afa2e4479762d786daab4</id>
<content type='text'>
Create a new header corresponding to functions defined in
util/aiocb.c, and include it whenever AIOCBs are used but
AioContext is not.

Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>9pfs: Add FreeBSD support</title>
<updated>2025-09-18T19:21:29+00:00</updated>
<author>
<name>Mark Johnston</name>
<email>markj@freebsd.org</email>
</author>
<published>2025-08-06T17:53:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/virt/qemu/qemu.git/commit/?id=6657f3bb55edba8f068cbc9ac40bb230ea1d7a09'/>
<id>urn:sha1:6657f3bb55edba8f068cbc9ac40bb230ea1d7a09</id>
<content type='text'>
This is largely derived from existing Darwin support.  FreeBSD
apparently has better support for *at() system calls so doesn't require
workarounds for a missing mknodat().  The implementation has a couple of
warts however:
- The extattr(2) system calls don't support anything akin to
  XATTR_CREATE or XATTR_REPLACE, so a racy workaround is implemented.
- Attribute names cannot begin with "user." or "system." on ZFS.
  However FreeBSD's extattr(2) system calls support two dedicated
  namespaces for these two.  So "user." or "system." prefixes are
  trimmed off from attribute names and instead EXTATTR_NAMESPACE_USER or
  EXTATTR_NAMESPACE_SYSTEM are picked and passed to extattr system calls
  accordingly.

The 9pfs tests were verified to pass on the UFS, ZFS and tmpfs
filesystems.

Signed-off-by: Mark Johnston &lt;markj@FreeBSD.org&gt;
Link: https://lore.kernel.org/qemu-devel/aJOWhHB2p-fbueAm@nuc
Signed-off-by: Christian Schoenebeck &lt;qemu_oss@crudebyte.com&gt;
</content>
</entry>
<entry>
<title>fsdev/9p-marshal: move G_GNUC_PRINTF to header</title>
<updated>2025-07-16T12:18:48+00:00</updated>
<author>
<name>Sean Wei</name>
<email>me@sean.taipei</email>
</author>
<published>2025-06-14T02:08:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/virt/qemu/qemu.git/commit/?id=44b540338a3e271866a3d636359bfe6b2edecbb6'/>
<id>urn:sha1:44b540338a3e271866a3d636359bfe6b2edecbb6</id>
<content type='text'>
v9fs_string_sprintf() is annotated with G_GNUC_PRINTF(2, 3) in
9p-marshal.c, but the prototype in fsdev/9p-marshal.h is missing the
attribute, so callers that include only the header do not get format
checking.

Move the annotation to the header and delete the duplicate in the
source file. No behavior change.

Signed-off-by: Sean Wei &lt;me@sean.taipei&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Message-Id: &lt;20250613.qemu.9p.01@sean.taipei&gt;
[CS: fix code style (max. 80 chars per line)]
Signed-off-by: Christian Schoenebeck &lt;qemu_oss@crudebyte.com&gt;
</content>
</entry>
<entry>
<title>9pfs: Introduce futimens file op</title>
<updated>2025-05-05T09:28:29+00:00</updated>
<author>
<name>Greg Kurz</name>
<email>groug@kaod.org</email>
</author>
<published>2025-03-12T15:29:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/virt/qemu/qemu.git/commit/?id=371a269ff8ce561c28e4fa03bb49e4940f990637'/>
<id>urn:sha1:371a269ff8ce561c28e4fa03bb49e4940f990637</id>
<content type='text'>
Add an futimens operation to the fs driver and use if when a fid has
a valid file descriptor. This is required to support more cases where
the client wants to do an action on an unlinked file which it still
has an open file decriptor for.

Only 9P2000.L was considered.

Signed-off-by: Greg Kurz &lt;groug@kaod.org&gt;
Reviewed-by: Christian Schoenebeck &lt;qemu_oss@crudebyte.com&gt;
Message-Id: &lt;20250312152933.383967-5-groug@kaod.org&gt;
Signed-off-by: Christian Schoenebeck &lt;qemu_oss@crudebyte.com&gt;
</content>
</entry>
<entry>
<title>9pfs: Introduce ftruncate file op</title>
<updated>2025-05-05T09:28:29+00:00</updated>
<author>
<name>Greg Kurz</name>
<email>groug@kaod.org</email>
</author>
<published>2025-03-12T15:29:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/virt/qemu/qemu.git/commit/?id=0c798dd52355f3489b29bba0dfd7df0e24cfa1dd'/>
<id>urn:sha1:0c798dd52355f3489b29bba0dfd7df0e24cfa1dd</id>
<content type='text'>
Add an ftruncate operation to the fs driver and use if when a fid has
a valid file descriptor. This is required to support more cases where
the client wants to do an action on an unlinked file which it still
has an open file decriptor for.

Only 9P2000.L was considered.

Signed-off-by: Greg Kurz &lt;groug@kaod.org&gt;
Reviewed-by: Christian Schoenebeck &lt;qemu_oss@crudebyte.com&gt;
Message-Id: &lt;20250312152933.383967-4-groug@kaod.org&gt;
Signed-off-by: Christian Schoenebeck &lt;qemu_oss@crudebyte.com&gt;
</content>
</entry>
<entry>
<title>9pfs: Don't use file descriptors in core code</title>
<updated>2025-05-05T09:28:29+00:00</updated>
<author>
<name>Greg Kurz</name>
<email>groug@kaod.org</email>
</author>
<published>2025-03-12T15:29:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/virt/qemu/qemu.git/commit/?id=f2bb367d2b265c6c0ead1e0d4a8f7c43310b3107'/>
<id>urn:sha1:f2bb367d2b265c6c0ead1e0d4a8f7c43310b3107</id>
<content type='text'>
v9fs_getattr() currently peeks into V9fsFidOpenState to know if a fid
has a valid file descriptor or directory stream. Even though the fields
are accessible, this is an implementation detail of the local backend
that should not be manipulated directly by the server code.

Abstract that with a new has_valid_file_handle() backend operation.

Signed-off-by: Greg Kurz &lt;groug@kaod.org&gt;
Reviewed-by: Christian Schoenebeck &lt;qemu_oss@crudebyte.com&gt;
Message-Id: &lt;20250312152933.383967-3-groug@kaod.org&gt;
Signed-off-by: Christian Schoenebeck &lt;qemu_oss@crudebyte.com&gt;
</content>
</entry>
</feed>
