[PULL 1/2] fsdev/9p-marshal: move G_GNUC_PRINTF to header

2025-07-16 Thread Christian Schoenebeck
source file. No behavior change. Signed-off-by: Sean Wei Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20250613.qemu.9p.01@sean.taipei> [CS: fix code style (max. 80 chars per line)] Signed-off-by: Christian Schoenebeck --- fsdev/9p-marshal.c | 3 +-- fsdev/9p-marshal.h | 3 ++- 2 files c

[PULL 2/2] hw/9pfs: move G_GNUC_PRINTF to header

2025-07-16 Thread Christian Schoenebeck
. No behavior change. Signed-off-by: Sean Wei Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20250613.qemu.9p.02@sean.taipei> [CS: fix code style (max. 80 chars per line)] Signed-off-by: Christian Schoenebeck --- hw/9pfs/9p.c | 3 +-- hw/9pfs/9p.h | 3 ++- 2 files changed, 3 insertions

[PULL 0/2] 9p queue 2025-07-16

2025-07-16 Thread Christian Schoenebeck
The following changes since commit c079d3a31e45093286c65f8ca5350beb3a4404a9: Merge tag 'pull-10.1-rc0-maintainer-140725-1' of https://gitlab.com/stsquad/qemu into staging (2025-07-15 00:12:07 -0400) are available in the Git repository at: https://github.com/cschoenebeck/qemu.git tags/pull-9

Re: [PULL 7/9] tests/9p: add 'Tsetattr' request to test client

2025-07-10 Thread Christian Schoenebeck
On Thursday, July 10, 2025 3:30:22 PM CEST Peter Maydell wrote: > On Mon, 5 May 2025 at 10:54, Christian Schoenebeck > wrote: > > > > Add and implement functions to 9pfs test client for sending a 9p2000.L > > 'Tsetattr' request and receiving its 'Rsetattr&#x

Re: [PATCH 0/2] virtio-9p: move G_GNUC_PRINTF to header

2025-06-20 Thread Christian Schoenebeck
On Saturday, June 14, 2025 4:07:40 AM CEST Sean Wei wrote: > v9fs_string_sprintf() and v9fs_path_sprintf() already have > G_GNUC_PRINTF annotations in their own *.c files, but the > prototypes in the corresponding headers lack them. When another > translation unit includes only the header, -Wforma

Re: [PATCH] alsaaudio: Set try-poll to false by default

2025-05-07 Thread Christian Schoenebeck
On Tuesday, May 6, 2025 4:34:42 PM CEST BALATON Zoltan wrote: > On Tue, 8 Apr 2025, Volker Rümelin wrote: > > Am 08.04.25 um 14:55 schrieb Christian Schoenebeck: > >> On Friday, April 4, 2025 1:34:27 PM CEST BALATON Zoltan wrote: > >>> On Fri, 4 Apr 2025, Christia

[PULL 5/9] 9pfs: Introduce ftruncate file op

2025-05-05 Thread Christian Schoenebeck
-off-by: Greg Kurz Reviewed-by: Christian Schoenebeck Message-Id: <20250312152933.383967-4-gr...@kaod.org> Signed-off-by: Christian Schoenebeck --- fsdev/file-op-9p.h | 2 ++ hw/9pfs/9p-local.c | 9 + hw/9pfs/9p-synth.c | 8 hw/9pfs/9p.c | 6 +- hw/9pfs/

[PULL 8/9] tests/9p: Test `Tsetattr` can truncate unlinked file

2025-05-05 Thread Christian Schoenebeck
From: Greg Kurz Enhance the `use-after-unlink` test with a new check for the case where the client wants to alter the size of an unlinked file for which it still has an active fid. Suggested-by: Christian Schoenebeck Signed-off-by: Greg Kurz Reviewed-by: Christian Schoenebeck Message-Id

[PULL 7/9] tests/9p: add 'Tsetattr' request to test client

2025-05-05 Thread Christian Schoenebeck
Add and implement functions to 9pfs test client for sending a 9p2000.L 'Tsetattr' request and receiving its 'Rsetattr' response counterpart. Signed-off-by: Christian Schoenebeck Signed-off-by: Greg Kurz Message-Id: <20250312152933.383967-6-gr...@kaod.org> --- te

[PULL 9/9] 9pfs: fix 'total_open_fd' decrementation

2025-05-05 Thread Christian Schoenebeck
crementing 'total_open_fd' on a close() error is wrong and would yield in a higher open file descriptor count than actually the case, leading to 9p server reclaiming open file descriptors too soon. Based-on: <20250312152933.383967-7-gr...@kaod.org> Signed-off-by: Christian Schoenebeck Reviewed

[PULL 6/9] 9pfs: Introduce futimens file op

2025-05-05 Thread Christian Schoenebeck
-off-by: Greg Kurz Reviewed-by: Christian Schoenebeck Message-Id: <20250312152933.383967-5-gr...@kaod.org> Signed-off-by: Christian Schoenebeck --- fsdev/file-op-9p.h | 2 ++ hw/9pfs/9p-local.c | 9 + hw/9pfs/9p-synth.c | 8 hw/9pfs/9p-util.h | 1 + hw/9pfs/9p.c

[PULL 0/9] 9p queue 2025-05-05

2025-05-05 Thread Christian Schoenebeck
m (i.e. when running towards host's allowed limit of max. open file descriptors). * Additional fixes on use-after-unlink idiom (i.e. client operations on a file descriptor after file has been removed). -------- Christian Schoenebeck (4):

[PULL 2/9] 9pfs: fix FD leak and reduce latency of v9fs_reclaim_fd()

2025-05-05 Thread Christian Schoenebeck
9fs_co_closedir() inside of v9fs_reclaim_fd() and not performing the v9fs_request_cancelled(pdu) check there. Fixes: 7a46274529c ('hw/9pfs: Add file descriptor reclaim support') Fixes: bccacf6c792 ('hw/9pfs: Implement TFLUSH operation') Signed-off-by: Christian Schoenebeck

[PULL 3/9] 9pfs: local : Introduce local_fid_fd() helper

2025-05-05 Thread Christian Schoenebeck
From: Greg Kurz Factor out duplicated code to a single helper. More users to come. Signed-off-by: Greg Kurz Reviewed-by: Christian Schoenebeck Message-Id: <20250312152933.383967-2-gr...@kaod.org> Signed-off-by: Christian Schoenebeck --- hw/9pfs/9p-local.c | 25 +++---

[PULL 4/9] 9pfs: Don't use file descriptors in core code

2025-05-05 Thread Christian Schoenebeck
. Abstract that with a new has_valid_file_handle() backend operation. Signed-off-by: Greg Kurz Reviewed-by: Christian Schoenebeck Message-Id: <20250312152933.383967-3-gr...@kaod.org> Signed-off-by: Christian Schoenebeck --- fsdev/file-op-9p.h | 1 + hw/9pfs/9p-local.c | 8 hw/9pfs/9p-s

[PULL 1/9] 9pfs: fix concurrent v9fs_reclaim_fd() calls

2025-05-05 Thread Christian Schoenebeck
27;hw/9pfs: Add file descriptor reclaim support') Signed-off-by: Christian Schoenebeck Reviewed-by: Greg Kurz Message-Id: <5c622067efd66dd4ee5eca740dcf263f41db20b2.1741339452.git.qemu_...@crudebyte.com> --- hw/9pfs/9p.c | 10 ++ hw/9pfs/9p.h | 1 + 2 files changed, 11 insertion

Re: [PATCH 08/10] hw/9pfs: Allow using hw/9pfs with emscripten

2025-04-12 Thread Christian Schoenebeck
On Saturday, April 12, 2025 12:21:47 PM CEST Christian Schoenebeck wrote: > On Saturday, April 12, 2025 10:21:47 AM CEST Christian Schoenebeck wrote: > > On Friday, April 11, 2025 12:47:29 PM CEST Kohei Tokunaga wrote: [...] > Let my answer my own question: I just checked the wasi

Re: [PATCH 08/10] hw/9pfs: Allow using hw/9pfs with emscripten

2025-04-12 Thread Christian Schoenebeck
On Saturday, April 12, 2025 10:21:47 AM CEST Christian Schoenebeck wrote: > On Friday, April 11, 2025 12:47:29 PM CEST Kohei Tokunaga wrote: > > Hi Christian, > > > > > > Emscripten's fiber does not support submitting coroutines to other > > > > thread

Re: [PATCH 08/10] hw/9pfs: Allow using hw/9pfs with emscripten

2025-04-12 Thread Christian Schoenebeck
On Friday, April 11, 2025 12:47:29 PM CEST Kohei Tokunaga wrote: > Hi Christian, > > > > Emscripten's fiber does not support submitting coroutines to other > > > threads. So this commit modifies hw/9pfs/coth.h to disable this behavior > > > when compiled with Emscripten. > > > > The lack of being

Re: [PATCH] alsaaudio: Set try-poll to false by default

2025-04-10 Thread Christian Schoenebeck
On Friday, April 4, 2025 1:34:27 PM CEST BALATON Zoltan wrote: > On Fri, 4 Apr 2025, Christian Schoenebeck wrote: > > On Monday, March 31, 2025 3:05:24 PM CEST BALATON Zoltan wrote: > >> On Sun, 23 Mar 2025, Christian Schoenebeck wrote: > >>> On Sunday, March 16, 2025

Re: [PATCH 08/10] hw/9pfs: Allow using hw/9pfs with emscripten

2025-04-10 Thread Christian Schoenebeck
On Monday, April 7, 2025 4:45:59 PM CEST Kohei Tokunaga wrote: > Emscripten's fiber does not support submitting coroutines to other > threads. So this commit modifies hw/9pfs/coth.h to disable this behavior > when compiled with Emscripten. The lack of being able to dispatch a coroutine to a worker

Re: [PATCH] hw/9pfs: add cleanup operation for 9p-synth

2025-04-04 Thread Christian Schoenebeck
On Monday, March 31, 2025 3:52:31 PM CEST Zheng Huang wrote: > Hi, Hi! > This patch adds a cleanup operation for 9p-synth, which fixes a memory > leak bug in synth_init() and other related operations. Which other operations? > All child nodes > of synth_root need to be freed before the entire

Re: [PATCH] alsaaudio: Set try-poll to false by default

2025-04-04 Thread Christian Schoenebeck
On Monday, March 31, 2025 3:05:24 PM CEST BALATON Zoltan wrote: > On Sun, 23 Mar 2025, Christian Schoenebeck wrote: > > On Sunday, March 16, 2025 1:20:46 AM CET BALATON Zoltan wrote: > >> Quoting Volker Rümelin: "try-poll=on tells the ALSA backend to try to > >>

Re: [PATCH] 9pfs: fix 'total_open_fd' decrementation

2025-03-27 Thread Christian Schoenebeck
On Thursday, March 20, 2025 11:59:38 AM CET Greg Kurz wrote: > On Thu, 20 Mar 2025 10:48:11 +0100 > Christian Schoenebeck wrote: > > > On Wednesday, March 19, 2025 7:52:51 PM CET Greg Kurz wrote: > > > On Wed, 19 Mar 2025 13:14:27 +0100 > > > Christian Scho

Re: [PATCH v2] 9pfs: fix 'total_open_fd' decrementation

2025-03-27 Thread Christian Schoenebeck
On Thursday, March 20, 2025 1:16:20 PM CET Christian Schoenebeck wrote: > According to 'man 2 close' errors returned by close() should only be used > for either diagnostic purposes or for catching data loss due to a previous > write error, as an error result of close() usually i

Re: [PATCH] alsaaudio: Set try-poll to false by default

2025-03-23 Thread Christian Schoenebeck
On Sunday, March 16, 2025 1:20:46 AM CET BALATON Zoltan wrote: > Quoting Volker Rümelin: "try-poll=on tells the ALSA backend to try to > use an event loop instead of the audio timer. This works most of the > time. But the poll event handler in the ALSA backend has a bug. For > example, if the guest

Re: [PATCH] 9pfs: fix 'total_open_fd' decrementation

2025-03-20 Thread Christian Schoenebeck
On Wednesday, March 19, 2025 7:52:51 PM CET Greg Kurz wrote: > On Wed, 19 Mar 2025 13:14:27 +0100 > Christian Schoenebeck wrote: > > > On Wednesday, March 19, 2025 11:08:58 AM CET Christian Schoenebeck wrote: > > > According to 'man 2 close' errors retur

[PATCH v2] 9pfs: fix 'total_open_fd' decrementation

2025-03-20 Thread Christian Schoenebeck
crementing 'total_open_fd' on a close() error is wrong and would yield in a higher open file descriptor count than actually the case, leading to 9p server reclaiming open file descriptors too soon. Based-on: <20250312152933.383967-7-gr...@kaod.org> Signed-off-by: Christian Schoenebeck --- V2

Re: [PATCH] 9pfs: fix 'total_open_fd' decrementation

2025-03-19 Thread Christian Schoenebeck
On Wednesday, March 19, 2025 11:08:58 AM CET Christian Schoenebeck wrote: > According to 'man 2 close' errors returned by close() should only be used > for either diagnostic purposes or for catching data loss due to a previous > write error, as an error result of close()

[PATCH] 9pfs: fix 'total_open_fd' decrementation

2025-03-19 Thread Christian Schoenebeck
crementing 'total_open_fd' on a close() error is wrong and would yield in a higher open file descriptor count than actually the case, leading to 9p server reclaiming open file descriptors too soon. Based-on: <20250312152933.383967-7-gr...@kaod.org> Signed-off-by: Christian Schoenebeck

Re: [PATCH v2 0/2] 9pfs: v9fs_reclaim_fd() fixes

2025-03-18 Thread Christian Schoenebeck
On Friday, March 7, 2025 10:24:12 AM CET Christian Schoenebeck wrote: > Three fixes for 9p server's v9fs_reclaim_fd() function: > > * Patch 1 fixes a concurrency issue. > > * Patch 2 fixes a file descriptor leak and optimizes overall latency. On a > test > machin

Re: [PATCH v3 0/6] 9pfs: Fix ftruncate-after-unlink

2025-03-18 Thread Christian Schoenebeck
er : > > creat("./foo", 000) = 3 > ftruncate(3, 100) = 0 > unlink("./foo") = 0 > ftruncate(3, 1000) = 0 > > Cheers, > > -- > Greg > > Christian Schoenebeck (1):

Re: [PATCH v3 6/6] tests/9p: Test `Tsetattr` can truncate unlinked file

2025-03-12 Thread Christian Schoenebeck
On Wednesday, March 12, 2025 4:29:32 PM CET Greg Kurz wrote: > Enhance the `use-after-unlink` test with a new check for the > case where the client wants to alter the size of an unlinked > file for which it still has an active fid. > > Suggested-by: Christian Schoenebeck > S

Re: [PATCH v2 6/6] tests/9p: Test `Tsetattr` can truncate unlinked file

2025-03-12 Thread Christian Schoenebeck
On Wednesday, March 12, 2025 3:25:20 PM CET Greg Kurz wrote: > On Wed, 12 Mar 2025 15:11:41 +0100 > Christian Schoenebeck wrote: > > > On Tuesday, March 11, 2025 6:28:09 PM CET Greg Kurz wrote: > > > Enhance the `use-after-unlink` test with a new check for the > >

Re: [PATCH v2 6/6] tests/9p: Test `Tsetattr` can truncate unlinked file

2025-03-12 Thread Christian Schoenebeck
On Tuesday, March 11, 2025 6:28:09 PM CET Greg Kurz wrote: > Enhance the `use-after-unlink` test with a new check for the > case where the client wants to alter the size of an unlinked > file for which it still has an active fid. > > Suggested-by: Christian Schoenebeck > Signed

Re: [PATCH v2 3/6] 9pfs: Introduce ftruncate file op

2025-03-12 Thread Christian Schoenebeck
an open file decriptor for. > > Only 9P2000.L was considered. > > Reviewed-by: Christian Schoenebeck > Signed-off-by: Greg Kurz > > v2: - moved v9fs_co_ftruncate() near v9fs_co_truncate() in coth.h > - similar change in file-op-9p.h > --- > fsdev/file-

Re: [PATCH v2 2/6] 9pfs: Don't use file descriptors in core code

2025-03-12 Thread Christian Schoenebeck
; +.has_valid_file_handle = synth_has_valid_file_handle, > }; > diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c > index 7cad2bce6209..10363f1a1df8 100644 > --- a/hw/9pfs/9p.c > +++ b/hw/9pfs/9p.c > @@ -1574,6 +1574,11 @@ out_nofid: > pdu_complete(pdu, err); > } > > +static bo

Re: [PATCH v2 1/6] 9pfs: local : Introduce local_fid_fd() helper

2025-03-12 Thread Christian Schoenebeck
On Tuesday, March 11, 2025 6:28:04 PM CET Greg Kurz wrote: > Factor out duplicated code to a single helper. More users to come. > > Signed-off-by: Greg Kurz > > v2: - simplified local_fid_fd() > --- Reviewed-by: Christian Schoenebeck > hw/9pfs/9p-local.c | 23 +++

Re: [PATCH 2/4] 9pfs: Don't use file descriptors in core code

2025-03-11 Thread Christian Schoenebeck
On Tuesday, March 11, 2025 3:03:13 PM CET Greg Kurz wrote: > On Tue, 11 Mar 2025 12:13:06 +0100 > Christian Schoenebeck wrote: > > > On Monday, March 10, 2025 6:10:59 PM CET Greg Kurz wrote: [...] > > Follow-up on previous patch, this could be reduced to: > > >

Re: [PATCH 2/4] 9pfs: Don't use file descriptors in core code

2025-03-11 Thread Christian Schoenebeck
On Monday, March 10, 2025 6:10:59 PM CET Greg Kurz wrote: > 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 ma

Re: [PATCH 4/4] 9pfs: Introduce futimens file op

2025-03-11 Thread Christian Schoenebeck
9fsPDU *pdu, V9fsPath > *path, mode_t, > V9fsStatDotl *v9stat); > int coroutine_fn v9fs_co_ftruncate(V9fsPDU *pdu, V9fsFidState *fidp, > off_t size); > +int coroutine_fn v9fs_co_futimens(V9fsPDU *pdu, V9fsFidState *fidp, > + struct timespec times[2]); > > #endif Same nit as with previous patch: I would group v9fs_co_futimens() and v9fs_co_utimensat() together in this header file for overview reason. Reviewed-by: Christian Schoenebeck /Christian

Re: [PATCH 3/4] 9pfs: Introduce ftruncate file op

2025-03-11 Thread Christian Schoenebeck
sPDU *, V9fsPath > *, > const char *, V9fsPath *); > int coroutine_fn v9fs_co_st_gen(V9fsPDU *pdu, V9fsPath *path, mode_t, > V9fsStatDotl *v9stat); > +int coroutine_fn v9fs_co_ftruncate(V9fsPDU *pdu, V9fsFidState *fidp, > + off_t size); > > #endif Nit: I would move v9fs_co_ftruncate() close to v9fs_co_truncate() to make it easier preserving the overview on this header file. Rest looks fine: Reviewed-by: Christian Schoenebeck /Christian

Re: [PATCH 1/4] 9pfs: local : Introduce local_fid_fd() helper

2025-03-11 Thread Christian Schoenebeck
On Monday, March 10, 2025 6:10:58 PM CET Greg Kurz wrote: > Factor out duplicated code to a single helper. More users to come. > > Signed-off-by: Greg Kurz > --- > hw/9pfs/9p-local.c | 21 +++-- > 1 file changed, 11 insertions(+), 10 deletions(-) > > diff --git a/hw/9pfs/9p-loca

Re: [PATCH 0/4] 9pfs: Fix ftruncate-after-unlink

2025-03-11 Thread Christian Schoenebeck
On Monday, March 10, 2025 6:10:57 PM CET Greg Kurz wrote: > QEMU 9.2 already fixed the long standing limitation of failing fstat() on > unlinked files. This series does something similar for ftruncate(). > > The following program can be straced inside the guest with a shared fs in > passthrough mo

[PATCH] tests/9p: add 'Tsetattr' request to test client

2025-03-11 Thread Christian Schoenebeck
Add and implement functions to 9pfs test client for sending a 9p2000.L 'Tsetattr' request and receiving its 'Rsetattr' response counterpart. Signed-off-by: Christian Schoenebeck --- tests/qtest/libqos/virtio-9p-client.c | 49 +++ tests/qtest/libqo

Re: [PATCH v2 2/2] 9pfs: fix FD leak and reduce latency of v9fs_reclaim_fd()

2025-03-07 Thread Christian Schoenebeck
On Friday, March 7, 2025 10:23:02 AM CET Christian Schoenebeck wrote: > This patch fixes two different bugs in v9fs_reclaim_fd(): > > 1. Reduce latency: > > This function calls v9fs_co_close() and v9fs_co_closedir() in a loop. Each > one of the calls adds two thread hops (betwe

[PATCH v2 0/2] 9pfs: v9fs_reclaim_fd() fixes

2025-03-07 Thread Christian Schoenebeck
tch 2: Decrement global variable total_open_fd on main thread, not on fs driver background thread. - Patch 2: Update commit log about file descriptor leak being fixed. Christian Schoenebeck (2): 9pfs: fix concurrent v9fs_reclaim_fd() calls 9pfs: fix FD leak and reduce latency of v9fs_recla

[PATCH v2 2/2] 9pfs: fix FD leak and reduce latency of v9fs_reclaim_fd()

2025-03-07 Thread Christian Schoenebeck
9fs_co_closedir() inside of v9fs_reclaim_fd() and not performing the v9fs_request_cancelled(pdu) check there. Fixes: 7a46274529c ('hw/9pfs: Add file descriptor reclaim support') Fixes: bccacf6c792 ('hw/9pfs: Implement TFLUSH operation') Signed-off-by: Christian

[PATCH v2 1/2] 9pfs: fix concurrent v9fs_reclaim_fd() calls

2025-03-07 Thread Christian Schoenebeck
27;hw/9pfs: Add file descriptor reclaim support') Signed-off-by: Christian Schoenebeck Reviewed-by: Greg Kurz --- hw/9pfs/9p.c | 10 ++ hw/9pfs/9p.h | 1 + 2 files changed, 11 insertions(+) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index 7cad2bce62..4f9c2dde9c 100644 --- a/hw/9pfs/9p.

Re: [PATCH 2/2] 9pfs: reduce latency of v9fs_reclaim_fd()

2025-03-06 Thread Christian Schoenebeck
On Thursday, March 6, 2025 10:07:56 AM CET Greg Kurz wrote: > On Tue, 4 Mar 2025 16:16:05 +0100 > Christian Schoenebeck wrote: > > > This function calls v9fs_co_close() and v9fs_co_closedir() in a loop. Each > > one of the calls adds two thread hops (between main t

[PATCH 2/2] 9pfs: reduce latency of v9fs_reclaim_fd()

2025-03-04 Thread Christian Schoenebeck
oding what v9fs_co_close() and v9fs_co_closedir() do, executing those and the loop itself altogether in only one background thread block, hence reducing the total amount of thread hops to only two. Signed-off-by: Christian Schoenebeck --- hw/9pfs/9p.c | 26 +- 1 file ch

[PATCH 1/2] 9pfs: fix concurrent v9fs_reclaim_fd() calls

2025-03-04 Thread Christian Schoenebeck
27;hw/9pfs: Add file descriptor reclaim support') Signed-off-by: Christian Schoenebeck --- hw/9pfs/9p.c | 10 ++ hw/9pfs/9p.h | 1 + 2 files changed, 11 insertions(+) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index 7cad2bce62..4f9c2dde9c 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c

[PATCH 0/2] 9pfs: v9fs_reclaim_fd() fixes

2025-03-04 Thread Christian Schoenebeck
Two fixes for 9p server's v9fs_reclaim_fd() function: * Patch 1 fixes a concurrency issue. * Patch 2 optimizes overall latency. On a test machine with ~800,000 FIDs, this reduced execution duration of v9fs_reclaim_fd() from 30ms to 1ms. Christian Schoenebeck (2): 9pfs: fix concu

Re: [PATCH] 9pfs: fix dead code in qemu_open_flags_tostr()

2025-02-11 Thread Christian Schoenebeck
On Tuesday, February 11, 2025 3:47:33 PM CET Peter Maydell wrote: > On Mon, 10 Feb 2025 at 14:40, Christian Schoenebeck > wrote: > > > > Coverity scan complained about expression "|LARGEFILE" to be non reachable > > and the detailed Coverity report cl

Re: [PATCH] 9pfs: fix dead code in qemu_open_flags_tostr()

2025-02-11 Thread Christian Schoenebeck
On Monday, February 10, 2025 4:32:08 PM CET Philippe Mathieu-Daudé wrote: > On 10/2/25 15:33, Christian Schoenebeck wrote: > > Coverity scan complained about expression "|LARGEFILE" to be non reachable > > and the detailed Coverity report claims O_LARGEFILE was zero. I

[PATCH] 9pfs: fix dead code in qemu_open_flags_tostr()

2025-02-10 Thread Christian Schoenebeck
ust whether the macro was defined. Fixes: 9a0dd4b3 Resolves: Coverity CID 1591178 Reported-by: Coverity Scan Signed-off-by: Christian Schoenebeck --- hw/9pfs/9p-util-generic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/9pfs/9p-util-generic.c b/hw/9pfs/9p-util-generic.c index 4c1e9c887d..0

[PULL v2 2/4] 9pfs: make multidevs=remap default

2025-02-07 Thread Christian Schoenebeck
or even just only one device being shared with the same 9p export, expected to be constant Theta(1). The inode numbers emitted to guest also just loose one bit (since 6b6aa8285d) for the 1st device being shared. Signed-off-by: Christian Schoenebec

[PULL v2 4/4] MAINTAINERS: Mark me as reviewer only for 9pfs

2025-02-07 Thread Christian Schoenebeck
From: Greg Kurz I still review 9pfs changes from time to time but I'm definitely not able to do actual maintainer work. Drop my tree on the way as I'll obviously not use it anymore, and it has been left untouched since May 2020. Signed-off-by: Greg Kurz Reviewed-by: Christian S

[PULL v2 3/4] 9pfs: improve v9fs_open() tracing

2025-02-07 Thread Christian Schoenebeck
for both protocol variants, use the already existing conversion functions that convert the mode flags from respective protocol constants to host's native open() numeric flag constants and pass that result to the new string conversion function qemu_open_flags_tostr(). Signed-off-by: Christian S

[PULL v2 0/4] 9p queue 2025-02-06

2025-02-07 Thread Christian Schoenebeck
multidevs=remap default option (instead of multidevs=warn) and update documentation related to this option. * Improve tracing (i.e. usefulness of log output content). ---- Christian Schoenebeck (3): 9pfs: improve v9fs_walk

[PULL v2 1/4] 9pfs: improve v9fs_walk() tracing

2025-02-07 Thread Christian Schoenebeck
alled if tracing of event 'v9fs_walk' is currently enabled. Signed-off-by: Christian Schoenebeck Reviewed-by: Greg Kurz Reviewed-by: Stefan Hajnoczi Message-Id: --- hw/9pfs/9p.c | 36 +++- hw/9pfs/trace-events | 2 +- 2 files changed, 32 insertions(

Re: [PULL 0/7] 9p queue 2025-02-06

2025-02-06 Thread Christian Schoenebeck
On Thursday, February 6, 2025 7:49:07 PM CET Stefan Hajnoczi wrote: > On Thu, Feb 6, 2025 at 11:49 AM Christian Schoenebeck > wrote: > > > > The following changes since commit d922088eb4ba6bc31a99f17b32cf75e59dd306cd: > > > > Merge tag 'ui-pull-request'

[PULL 5/7] tests/9p: add use_dir_after_unlink test

2025-02-06 Thread Christian Schoenebeck
After removing a directory from the filesystem, it should still be possible to operate on the directory if the directory has been opened before. As a first step this new test will verify whether Tgetattr request works on the unlinked directory. Signed-off-by: Christian Schoenebeck Message-Id

[PULL 6/7] tests/9p: extend use_dir_after_unlink test with Treaddir

2025-02-06 Thread Christian Schoenebeck
of to date that would allow a removed directory to have any content (files, links, devices, subdirectories) and POSIX specifies that a directory must be empty when trying to remove it from the file system. Signed-off-by: Christian Schoenebeck Message-Id: --- tests/qtest/virtio-9p-test.c | 3

[PULL 7/7] MAINTAINERS: Mark me as reviewer only for 9pfs

2025-02-06 Thread Christian Schoenebeck
From: Greg Kurz I still review 9pfs changes from time to time but I'm definitely not able to do actual maintainer work. Drop my tree on the way as I'll obviously not use it anymore, and it has been left untouched since May 2020. Signed-off-by: Greg Kurz Reviewed-by: Christian S

[PULL 1/7] 9pfs: improve v9fs_walk() tracing

2025-02-06 Thread Christian Schoenebeck
alled if tracing of event 'v9fs_walk' is currently enabled. Signed-off-by: Christian Schoenebeck Reviewed-by: Greg Kurz Reviewed-by: Stefan Hajnoczi Message-Id: --- hw/9pfs/9p.c | 36 +++- hw/9pfs/trace-events | 2 +- 2 files changed, 32 insertions(

[PULL 3/7] 9pfs: improve v9fs_open() tracing

2025-02-06 Thread Christian Schoenebeck
for both protocol variants, use the already existing conversion functions that convert the mode flags from respective protocol constants to host's native open() numeric flag constants and pass that result to the new string conversion function qemu_open_flags_tostr(). Signed-off-by: Christian S

[PULL 4/7] tests/9p: rename test use_after_unlink -> use_file_after_unlink

2025-02-06 Thread Christian Schoenebeck
To pave the way for adding new test use_dir_after_unlink with subsequent patch, i.e. making it clear that the existing test is just about unlinked files, not unlinked directories. Signed-off-by: Christian Schoenebeck Message-Id: <9d2ca46a58b812ad17ca7bb8a84f12252d3e3832.1736427878.git.qe

[PULL 2/7] 9pfs: make multidevs=remap default

2025-02-06 Thread Christian Schoenebeck
or even just only one device being shared with the same 9p export, expected to be constant Theta(1). The inode numbers emitted to guest also just loose one bit (since 6b6aa8285d) for the 1st device being shared. Signed-off-by: Christian Schoenebec

[PULL 0/7] 9p queue 2025-02-06

2025-02-06 Thread Christian Schoenebeck
ap default option (instead of multidevs=warn) and update documentation related to this option. * Improve tracing (i.e. usefulness of log output content). * Add test cases for accessing a directory after removal. ---- Christian Scho

Re: [PATCH] MAINTAINERS: Mark me as reviewer only for 9pfs

2025-01-30 Thread Christian Schoenebeck
On Wednesday, January 15, 2025 11:08:49 AM CET Greg Kurz wrote: > I still review 9pfs changes from time to time but I'm definitely > not able to do actual maintainer work. Drop my tree on the way > as I'll obviously not use it anymore, and it has been left > untouched since May 2020. > > Signed-of

Re: [PATCH 0/3] tests/9p: add use-dir-after-unlink test

2025-01-30 Thread Christian Schoenebeck
On Thursday, January 9, 2025 2:04:38 PM CET Christian Schoenebeck wrote: > Add a test case that verifies that it is possible to do some basic operations > on a deleted directory if 9p client opened the directory before directory was > removed. > > Unlike the previous open-unlink-

Re: [PATCH v7 1/6] coreaudio: Remove unnecessary explicit casts

2025-01-25 Thread Christian Schoenebeck
On Saturday, January 25, 2025 6:58:30 AM CET Akihiko Odaki wrote: > On 2025/01/24 18:39, Christian Schoenebeck wrote: > > On Friday, January 24, 2025 6:12:04 AM CET Akihiko Odaki wrote: > >> coreaudio had unnecessary explicit casts and they had extra whitespaces > >>

Re: [PATCH v7 2/6] coreaudio: Remove extra whitespaces

2025-01-24 Thread Christian Schoenebeck
ioVoiceOut *core, const char > *fn_name) > +static int coreaudio_buf_unlock(coreaudioVoiceOut *core, const char *fn_name) > { > int err; > > -err = pthread_mutex_unlock (&core->buf_mutex); > +err = pthread_mutex_unlock(&core->buf_mutex); > if

Re: [PATCH v7 3/6] coreaudio: Improve naming

2025-01-24 Thread Christian Schoenebeck
n, start; > > @@ -348,16 +350,16 @@ static OSStatus audioDeviceIOProc( > out += write_len; > } > > -coreaudio_buf_unlock(core, "audioDeviceIOProc"); > +coreaudio_voice_out_buf_unlock(core, "out_device_ioproc"); > return 0; &

Re: [PATCH v7 1/6] coreaudio: Remove unnecessary explicit casts

2025-01-24 Thread Christian Schoenebeck
On Friday, January 24, 2025 6:12:04 AM CET Akihiko Odaki wrote: > coreaudio had unnecessary explicit casts and they had extra whitespaces > around them so remove them. > > Signed-off-by: Akihiko Odaki > --- > audio/coreaudio.m | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > di

Re: [PATCH v4 1/3] coreaudio: Commit the result of init in the end

2025-01-22 Thread Christian Schoenebeck
On Friday, January 17, 2025 7:47:00 AM CET Akihiko Odaki wrote: > init_out_device may only commit some part of the result and leave the > state inconsistent when it encounters a fatal error or the device gets > unplugged during the operation, which is expressed by > kAudioHardwareBadObjectError or

Re: [PATCH v4 3/3] coreaudio: Initialize the buffer for device change

2025-01-22 Thread Christian Schoenebeck
On Friday, January 17, 2025 7:47:02 AM CET Akihiko Odaki wrote: > Reallocate buffers when the active device change as the required buffer > size may differ. > > Signed-off-by: Akihiko Odaki OTOH it also re-allocates the buffer when the size did not change, but Ok. Acked-b

Re: [PATCH v3 1/2] coreaudio: Commit the result of init in the end

2025-01-16 Thread Christian Schoenebeck
On Thursday, January 16, 2025 6:17:46 AM CET Akihiko Odaki wrote: > On 2025/01/16 2:10, Christian Schoenebeck wrote: > > On Wednesday, January 15, 2025 4:37:28 PM CET Akihiko Odaki wrote: > >> On 2025/01/16 0:14, Christian Schoenebeck wrote: > >>> On Wednesday, J

Re: [PATCH v3 1/2] coreaudio: Commit the result of init in the end

2025-01-15 Thread Christian Schoenebeck
On Wednesday, January 15, 2025 4:37:28 PM CET Akihiko Odaki wrote: > On 2025/01/16 0:14, Christian Schoenebeck wrote: > > On Wednesday, January 15, 2025 1:06:55 PM CET Akihiko Odaki wrote: > >> init_out_device may only commit some part of the result and leave the > >>

Re: [PATCH v3 2/2] coreaudio: Initialize the buffer for device change

2025-01-15 Thread Christian Schoenebeck
On Wednesday, January 15, 2025 1:06:56 PM CET Akihiko Odaki wrote: > Reallocate buffers when the active device change as the required buffer > size may differ. > > Signed-off-by: Akihiko Odaki > --- > audio/audio_int.h | 2 ++ > audio/audio.c | 24 ++-- > audio/coreaudio

Re: [PATCH v3 1/2] coreaudio: Commit the result of init in the end

2025-01-15 Thread Christian Schoenebeck
On Wednesday, January 15, 2025 1:06:55 PM CET Akihiko Odaki wrote: > init_out_device may only commit some part of the result and leave the > state inconsistent when it encounters an error. Commit the result in > the end of the function so that it commits the result iff it sees no Typo "if". > err

Re: [PATCH] MAINTAINERS: Mark me as reviewer only for 9pfs

2025-01-15 Thread Christian Schoenebeck
May 2020. > > Signed-off-by: Greg Kurz > --- Even though foreseeable, I still acknowledge your step with regret: Reviewed-by: Christian Schoenebeck Thanks for all your work over the years! I try to continue your work on 9pfs as far as possible. Let's see how this evolves, bei

Re: [PATCH] MAINTAINERS: Update path to coreaudio.m

2025-01-11 Thread Christian Schoenebeck
On Saturday, January 11, 2025 7:42:36 AM CET Akihiko Odaki wrote: > Commit 8b46d7e2dc8e ("audio: Rename coreaudio extension to use > Objective-C compiler") renamed coreaudio.c to coreaudio.m. > > Signed-off-by: Akihiko Odaki > --- Reviewed-by: Christian Schoene

[PATCH 3/3] tests/9p: extend use_dir_after_unlink test with Treaddir

2025-01-09 Thread Christian Schoenebeck
of to date that would allow a removed directory to have any content (files, links, devices, subdirectories) and POSIX specifies that a directory must be empty when trying to remove it from the file system. Signed-off-by: Christian Schoenebeck --- tests/qtest/virtio-9p-test.c | 3 +++ 1 file

[PATCH 0/3] tests/9p: add use-dir-after-unlink test

2025-01-09 Thread Christian Schoenebeck
Add a test case that verifies that it is possible to do some basic operations on a deleted directory if 9p client opened the directory before directory was removed. Unlike the previous open-unlink-fstat idiom: no fix required here. It already works with 9p server. Christian Schoenebeck (3

[PATCH 2/3] tests/9p: add use_dir_after_unlink test

2025-01-09 Thread Christian Schoenebeck
After removing a directory from the filesystem, it should still be possible to operate on the directory if the directory has been opened before. As a first step this new test will verify whether Tgetattr request works on the unlinked directory. Signed-off-by: Christian Schoenebeck --- tests

[PATCH 1/3] tests/9p: rename test use_after_unlink -> use_file_after_unlink

2025-01-09 Thread Christian Schoenebeck
To pave the way for adding new test use_dir_after_unlink with subsequent patch, i.e. making it clear that the existing test is just about unlinked files, not unlinked directories. Signed-off-by: Christian Schoenebeck --- tests/qtest/virtio-9p-test.c | 8 1 file changed, 4 insertions

[PATCH v2] 9pfs: improve v9fs_open() tracing

2025-01-03 Thread Christian Schoenebeck
for both protocol variants, use the already existing conversion functions that convert the mode flags from respective protocol constants to host's native open() numeric flag constants and pass that result to the new string conversion function qemu_open_flags_tostr(). Signed-off-by: Christian Sc

Re: [PATCH] 9pfs: improve v9fs_open() tracing

2025-01-03 Thread Christian Schoenebeck
On Monday, December 30, 2024 10:50:59 AM CET Christian Schoenebeck wrote: > On Monday, December 16, 2024 11:30:09 AM CET Christian Schoenebeck wrote: > > Improve tracing of 9p 'Topen' request type by showing open() flags as > > human-readable text. > > > > E.

Re: [PATCH] 9pfs: improve v9fs_open() tracing

2024-12-30 Thread Christian Schoenebeck
On Monday, December 16, 2024 11:30:09 AM CET Christian Schoenebeck wrote: > Improve tracing of 9p 'Topen' request type by showing open() flags as > human-readable text. > > E.g. trace output: > > v9fs_open tag 0 id 12 fid 2 mode 100352 > > would become: >

[PATCH] 9pfs: make multidevs=remap default

2024-12-22 Thread Christian Schoenebeck
or even just only one device being shared with the same 9p export, expected to be constant Theta(1). The inode numbers emitted to guest also just loose one bit (since 6b6aa8285d) for the 1st device being shared. Signed-off-by: Christian Schoenebeck --- hw/9pfs/9p-local.c | 3 +++ qemu-optio

Re: [PATCH] 9pfs: improve v9fs_open() tracing

2024-12-16 Thread Christian Schoenebeck
On Monday, December 16, 2024 11:30:09 AM CET Christian Schoenebeck wrote: > Improve tracing of 9p 'Topen' request type by showing open() flags as > human-readable text. > > E.g. trace output: > > v9fs_open tag 0 id 12 fid 2 mode 100352 > > would become: >

[PATCH] 9pfs: improve v9fs_open() tracing

2024-12-16 Thread Christian Schoenebeck
for both protocol variants, use the already existing conversion functions that convert the mode flags from respective protocol constants to host's native open() numeric flag constants and pass that result to the new string conversion function qemu_open_flags_tostr(). Signed-off-by: Christian Sch

Re: [PATCH 12/71] hw/9pfs: Constify all Property

2024-12-14 Thread Christian Schoenebeck
On Friday, December 13, 2024 8:06:46 PM CET Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- Reviewed-by: Christian Schoenebeck > hw/9pfs/virtio-9p-device.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/9pfs/virtio-9p-device.

Re: [PATCH v2] 9pfs: improve v9fs_walk() tracing

2024-12-11 Thread Christian Schoenebeck
On Friday, December 6, 2024 4:56:40 PM CET Christian Schoenebeck wrote: > 'Twalk' is the most important request type in the 9p protocol to look out > for when debugging 9p communication. That's because it is the only part > of the 9p protocol which actually deals with h

[PULL for-9.2 0/1] 9p queue 2024-12-10

2024-12-10 Thread Christian Schoenebeck
. Christian Schoenebeck (1): 9pfs: fix regression regarding CVE-2023-2861 hw/9pfs/9p-util.h | 27 +-- 1 file changed, 17 insertions(+), 10 deletions(-)

[PULL for-9.2 1/1] 9pfs: fix regression regarding CVE-2023-2861

2024-12-10 Thread Christian Schoenebeck
_PATH on host, because O_PATH only allows path based operations on the resulting file descriptor and prevents I/O such as read() and write() on that file descriptor. Fixes: f6b0de53fb8 ("9pfs: prevent opening special files (CVE-2023-2861)") Resolves: https://gitlab.com/qemu-project/qemu/-/issu

Re: [PATCH] 9pfs: fix regression regarding CVE-2023-2861

2024-12-10 Thread Christian Schoenebeck
On Tuesday, December 10, 2024 11:11:47 AM CET Peter Maydell wrote: > On Tue, 10 Dec 2024 at 09:57, Christian Schoenebeck > wrote: > > > > On Friday, December 6, 2024 12:20:29 PM CET Christian Schoenebeck wrote: > > > The released fix for this CVE: > > > > &g

Re: [PATCH] 9pfs: fix regression regarding CVE-2023-2861

2024-12-10 Thread Christian Schoenebeck
On Friday, December 6, 2024 12:20:29 PM CET Christian Schoenebeck wrote: > The released fix for this CVE: > > f6b0de53fb8 ("9pfs: prevent opening special files (CVE-2023-2861)") > > caused a regression with security_model=passthrough. When handling a > 'Tmknod

  1   2   3   4   5   6   7   8   9   10   >