[PATCH v4 0/6] 9pfs: macOS host fixes

2022-04-27 Thread Christian Schoenebeck
Use fchmodat(AT_SYMLINK_NOFOLLOW_ANY) instead of chmod(). [patch 2] Christian Schoenebeck (6): 9pfs: fix qemu_mknodat(S_IFREG) on macOS 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS 9pfs: fix wrong encoding of rdev field in Rgetattr on macOS 9pfs: fix wrong errno being sent to Linux client on ma

Re: [PATCH v2 2/5] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-27 Thread Christian Schoenebeck
On Mittwoch, 27. April 2022 19:37:39 CEST Greg Kurz wrote: > On Wed, 27 Apr 2022 18:18:31 +0200 > > Christian Schoenebeck wrote: > > On Mittwoch, 27. April 2022 15:31:42 CEST Greg Kurz wrote: > > > On Wed, 27 Apr 2022 14:32:53 +0200 > > > > > > Christi

Re: [PATCH v2 2/5] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-27 Thread Christian Schoenebeck
On Mittwoch, 27. April 2022 19:12:15 CEST Will Cohen wrote: > On Wed, Apr 27, 2022 at 12:18 PM Christian Schoenebeck < > > qemu_...@crudebyte.com> wrote: > > On Mittwoch, 27. April 2022 15:31:42 CEST Greg Kurz wrote: > > > On Wed, 27 Apr 2022 14:32:53 +0200 >

Re: [PATCH v2 2/5] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-27 Thread Christian Schoenebeck
On Mittwoch, 27. April 2022 15:31:42 CEST Greg Kurz wrote: > On Wed, 27 Apr 2022 14:32:53 +0200 > > Christian Schoenebeck wrote: > > On Mittwoch, 27. April 2022 12:18:10 CEST Greg Kurz wrote: > > > On Wed, 27 Apr 2022 11:27:28 +0900 > > > > > > Akihiko

Re: [PATCH v2 2/5] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-27 Thread Christian Schoenebeck
In general, if you care about a higher degree of security, I'd always recommend to use security_model=mapped in the first place. > This brings up a new problem I hadn't realized before : the > fchmodat_nofollow() implementation in 9p-local.c is really > a linux only thing to cope with AT_SYMLINK_NOFOLLOW not being > supported with fchmodat(). It looks that this should move to > 9p-util-linux.c and a proper version should be added for macOS > in 9p-util-darwin.c Like already agreed on the other thread, yes, that makes sense. But I think this can be handled with a follow-up, separate from this series. Best regards, Christian Schoenebeck

Re: [PATCH] 9pfs: local: Do not follow symlink in _nofollow

2022-04-27 Thread Christian Schoenebeck
On Mittwoch, 27. April 2022 12:21:51 CEST Greg Kurz wrote: > On Wed, 27 Apr 2022 10:46:31 +0200 > > Christian Schoenebeck wrote: > > On Mittwoch, 27. April 2022 04:45:45 CEST Akihiko Odaki wrote: > > > Signed-off-by: Akihiko Odaki > > > --- > > > >

Re: [PATCH] 9pfs: local: Do not follow symlink in _nofollow

2022-04-27 Thread Christian Schoenebeck
On Mittwoch, 27. April 2022 04:45:45 CEST Akihiko Odaki wrote: > Signed-off-by: Akihiko Odaki > --- > hw/9pfs/9p-local.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c > index d42ce6d8b82..def8afdb4d6 100644 > --- a/hw/9pfs/9p-loc

[PATCH v3 2/6] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-25 Thread Christian Schoenebeck
mknod() on macOS does not support creating sockets, so divert to call sequence socket(), bind() and chmod() respectively if S_IFSOCK was passed with mode argument. Link: https://lore.kernel.org/qemu-devel/17933734.zYzKuhC07K@silver/ Signed-off-by: Christian Schoenebeck Reviewed-by: Will Cohen

[PATCH v3 4/6] 9pfs: fix wrong errno being sent to Linux client on macOS host

2022-04-25 Thread Christian Schoenebeck
ned ENOATTR==93 when client tried to retrieve POSIX ACL xattrs, because errno 93 is defined as EPROTONOSUPPORT==93 on Linux, so Linux client believed that xattrs were not supported by filesystem on host in general. Signed-off-by: Christian Schoenebeck Link: https://lore.kernel.org/qemu-devel/202

[PATCH v3 6/6] 9pfs: fix qemu_mknodat() to always return -1 on error on macOS host

2022-04-25 Thread Christian Schoenebeck via
qemu_mknodat() is expected to behave according to its POSIX API, and therefore should always return exactly -1 on any error, and errno should be set for the actual error code. Signed-off-by: Christian Schoenebeck --- hw/9pfs/9p-util-darwin.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

[PATCH v3 5/6] 9pfs: fix removing non-existent POSIX ACL xattr on macOS host

2022-04-25 Thread Christian Schoenebeck
least by qemu/xattr.h), it is safe to fix this issue by simply comparing against ENOATTR instead of ENODATA. This patch fixes e.g. a command on Linux guest like: cp --preserve=mode old new Signed-off-by: Christian Schoenebeck Link: https://lore.kernel.org/qemu-devel/2866993.yOYK24bMf6@silver

[PATCH v3 1/6] 9pfs: fix qemu_mknodat(S_IFREG) on macOS

2022-04-25 Thread Christian Schoenebeck
hC07K@silver/ Signed-off-by: Christian Schoenebeck Reviewed-by: Will Cohen Reviewed-by: Greg Kurz --- hw/9pfs/9p-util-darwin.c | 9 + 1 file changed, 9 insertions(+) diff --git a/hw/9pfs/9p-util-darwin.c b/hw/9pfs/9p-util-darwin.c index bec0253474..e24d09763a 100644 --- a/hw/9pfs/9p-ut

[PATCH v3 3/6] 9pfs: fix wrong encoding of rdev field in Rgetattr on macOS

2022-04-25 Thread Christian Schoenebeck
7;Tgettattr' is exclusive to protocol version 9p2000.L, it should be fair to assume that 'rdev' field is assumed to be in Linux dev_t format by client as well. Signed-off-by: Christian Schoenebeck Link: https://lore.kernel.org/qemu-devel/20220421093056.5ab1e7e

[PATCH v3 0/6] 9pfs: macOS host fixes

2022-04-25 Thread Christian Schoenebeck
cit check whether filename fits into addr.sun_path. [patch 2] * s/close/close_preserve_errno/ [patch 2] * Fix qemu_mknodat() from having returned a negative result != -1 on error and not having set errno. [NEW patch 6] Christian Schoenebeck (6): 9pfs: fix qemu_mknodat(S_IFREG) on ma

Re: [PATCH v2 2/5] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-24 Thread Christian Schoenebeck
On Samstag, 23. April 2022 06:33:50 CEST Akihiko Odaki wrote: > On 2022/04/22 23:06, Christian Schoenebeck wrote: > > On Freitag, 22. April 2022 04:43:40 CEST Akihiko Odaki wrote: > >> On 2022/04/22 0:07, Christian Schoenebeck wrote: > >>> mknod() on macOS does no

[RFC PATCH] 9p: case-insensitive host filesystems

2022-04-22 Thread Christian Schoenebeck
Now that 9p support for macOS hosts just landed in QEMU 7.0 and with support for Windows hosts on the horizon [1], the question is how to deal with case- insensitive host filesystems, which are very common on those two systems? I made some tests, e.g. trying to setup a 9p root fs Linux installati

Re: [PATCH v2 2/5] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-22 Thread Christian Schoenebeck
On Freitag, 22. April 2022 04:43:40 CEST Akihiko Odaki wrote: > On 2022/04/22 0:07, Christian Schoenebeck wrote: > > mknod() on macOS does not support creating sockets, so divert to > > call sequence socket(), bind() and chmod() respectively if S_IFSOCK > > was pass

Re: [PATCH v2 2/5] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-21 Thread Christian Schoenebeck
On Donnerstag, 21. April 2022 18:36:31 CEST Greg Kurz wrote: > On Thu, 21 Apr 2022 17:07:43 +0200 > > Christian Schoenebeck wrote: > > mknod() on macOS does not support creating sockets, so divert to > > call sequence socket(), bind() and chmod() respectively if S_IFSOCK >

[PATCH v2 2/5] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-21 Thread Christian Schoenebeck
mknod() on macOS does not support creating sockets, so divert to call sequence socket(), bind() and chmod() respectively if S_IFSOCK was passed with mode argument. Link: https://lore.kernel.org/qemu-devel/17933734.zYzKuhC07K@silver/ Signed-off-by: Christian Schoenebeck Reviewed-by: Will Cohen

[PATCH v2 5/5] 9pfs: fix removing non-existent POSIX ACL xattr on macOS host

2022-04-21 Thread Christian Schoenebeck
least by qemu/xattr.h), it is safe to fix this issue by simply comparing against ENOATTR instead of ENODATA. This patch fixes e.g. a command on Linux guest like: cp --preserve=mode old new Signed-off-by: Christian Schoenebeck Link: https://lore.kernel.org/qemu-devel/2866993.yOYK24bMf6@silver

[PATCH v2 4/5] 9pfs: fix wrong errno being sent to Linux client on macOS host

2022-04-21 Thread Christian Schoenebeck
ned ENOATTR==93 when client tried to retrieve POSIX ACL xattrs, because errno 93 is defined as EPROTONOSUPPORT==93 on Linux, so Linux client believed that xattrs were not supported by filesystem on host in general. Signed-off-by: Christian Schoenebeck Link: https://lore.kernel.org/qemu-devel/202

[PATCH v2 3/5] 9pfs: fix wrong encoding of rdev field in Rgetattr on macOS

2022-04-21 Thread Christian Schoenebeck
7;Tgettattr' is exclusive to protocol version 9p2000.L, it should be fair to assume that 'rdev' field is assumed to be in Linux dev_t format by client as well. Signed-off-by: Christian Schoenebeck Link: https://lore.kernel.org/qemu-devel/20220421093056.5ab1e7e

[PATCH v2 0/5] 9pfs: macOS host fixes

2022-04-21 Thread Christian Schoenebeck
ke it clear from the commit log that not having translated errnos before actually violated 9p2000.L protocol. [patch 4] * Simply compare against ENOATTR only, instead of comparing against both ENOATTR and ENODATA and describe in commit log and in-code comment why that is fine. [patch 5]

[PATCH v2 1/5] 9pfs: fix qemu_mknodat(S_IFREG) on macOS

2022-04-21 Thread Christian Schoenebeck
hC07K@silver/ Signed-off-by: Christian Schoenebeck Reviewed-by: Will Cohen --- hw/9pfs/9p-util-darwin.c | 9 + 1 file changed, 9 insertions(+) diff --git a/hw/9pfs/9p-util-darwin.c b/hw/9pfs/9p-util-darwin.c index bec0253474..e24d09763a 100644 --- a/hw/9pfs/9p-util-darwin.c +++ b/hw/9

Re: [PATCH 5/5] 9pfs: fix removing non-existent POSIX ACL xattr on macOS host

2022-04-21 Thread Christian Schoenebeck
On Donnerstag, 21. April 2022 14:26:37 CEST Greg Kurz wrote: > On Thu, 21 Apr 2022 12:55:24 +0200 > > Christian Schoenebeck wrote: > > On Donnerstag, 21. April 2022 10:26:11 CEST Greg Kurz wrote: > > > On Tue, 19 Apr 2022 13:43:30 +0200 > > > > > >

Re: [PATCH 4/5] 9pfs: fix wrong errno being sent to Linux client on macOS host

2022-04-21 Thread Christian Schoenebeck
On Donnerstag, 21. April 2022 13:46:26 CEST Greg Kurz wrote: > On Thu, 21 Apr 2022 13:13:08 +0200 > > Christian Schoenebeck wrote: > > On Donnerstag, 21. April 2022 12:48:35 CEST Greg Kurz wrote: > > > On Tue, 19 Apr 2022 13:41:59 +0200 > > > > > > C

Re: [PATCH 4/5] 9pfs: fix wrong errno being sent to Linux client on macOS host

2022-04-21 Thread Christian Schoenebeck
On Donnerstag, 21. April 2022 12:48:35 CEST Greg Kurz wrote: > On Tue, 19 Apr 2022 13:41:59 +0200 > > Christian Schoenebeck wrote: > > Linux and macOS only share some errno definitions with equal macro > > name and value. In fact most mappings for errno are completely >

Re: [PATCH 5/5] 9pfs: fix removing non-existent POSIX ACL xattr on macOS host

2022-04-21 Thread Christian Schoenebeck
On Donnerstag, 21. April 2022 10:26:11 CEST Greg Kurz wrote: > On Tue, 19 Apr 2022 13:43:30 +0200 > > Christian Schoenebeck wrote: > > When mapped POSIX ACL is used, we are ignoring errors when trying > > to remove a POSIX ACL xattr that does not exist. On Linux hosts we >

Re: [PATCH 3/5] 9pfs: fix wrong encoding of rdev field in Rgetattr on macOS

2022-04-21 Thread Christian Schoenebeck
On Donnerstag, 21. April 2022 09:30:56 CEST Greg Kurz wrote: > On Tue, 19 Apr 2022 13:41:15 +0200 > > Christian Schoenebeck wrote: > > The 'rdev' field in 9p reponse 'Rgetattr' is of type dev_t, > > which is actually a system dependant type and therefor

Re: [PATCH 2/5] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-20 Thread Christian Schoenebeck
On Mittwoch, 20. April 2022 14:10:44 CEST Greg Kurz wrote: > On Tue, 19 Apr 2022 13:41:03 +0200 > > Christian Schoenebeck wrote: > > mknod() on macOS does not support creating sockets, so divert to > > call sequence socket(), bind() and chmod() respectively if S_IFSOCK >

Re: [PATCH 2/5] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-20 Thread Christian Schoenebeck
On Mittwoch, 20. April 2022 11:09:46 CEST Greg Kurz wrote: > On Tue, 19 Apr 2022 13:41:03 +0200 > > Christian Schoenebeck wrote: > > mknod() on macOS does not support creating sockets, so divert to > > call sequence socket(), bind() and chmod() respectively if S_IFSOCK >

Re: [PATCH 1/5] 9pfs: fix qemu_mknodat(S_IFREG) on macOS

2022-04-20 Thread Christian Schoenebeck
On Mittwoch, 20. April 2022 10:40:05 CEST Greg Kurz wrote: > On Wed, 20 Apr 2022 11:03:52 +0900 > > Akihiko Odaki wrote: > > On 2022/04/19 20:40, Christian Schoenebeck wrote: > > > mknod() on macOS does not support creating regular files, so > > > divert to o

Re: [RFC PATCH 0/4] 9pfs: Add 9pfs support for Windows host

2022-04-19 Thread Christian Schoenebeck
That file is the controller portion of 9p server and must remain fs-agnostic. Such kind of issue should rather be addressed on fs driver level (e.g. 9p-local.c, 9p-util-windows.c). I.e. don't do it like this: [1] https://lore.kernel.org/all/20211122004913.20052-1-wwco...@gmail.com/T/#m734f405973768e43ce3ed7550bd21809abb25813 Best regards, Christian Schoenebeck

[PATCH 5/5] 9pfs: fix removing non-existent POSIX ACL xattr on macOS host

2022-04-19 Thread Christian Schoenebeck
like: cp --preserve=mode old new Signed-off-by: Christian Schoenebeck --- hw/9pfs/9p-posix-acl.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/9pfs/9p-posix-acl.c b/hw/9pfs/9p-posix-acl.c index eadae270dd..2bf155f941 100644 --- a/hw/9pfs/9p-posix-acl.c +++ b/hw

[PATCH 4/5] 9pfs: fix wrong errno being sent to Linux client on macOS host

2022-04-19 Thread Christian Schoenebeck
successfully, because macOS returned ENOATTR==93 when client tried to retrieve POSIX ACL xattrs, because errno 93 is defined as EPROTONOSUPPORT==93 on Linux, so Linux client believed that xattrs were not supported by filesystem on host in general. Signed-off-by: Christian Schoenebeck --- hw/9pfs/9p.c

[PATCH 0/5] 9pfs: macOS host fixes

2022-04-19 Thread Christian Schoenebeck
A bunch of fixes for recently added (QEMU 7.0) 9p support on macOS hosts. Note: there are still issues to address with case-insensitive file systems on macOS hosts. But I'll send a separate RFC on that issue. Christian Schoenebeck (5): 9pfs: fix qemu_mknodat(S_IFREG) on macOS 9pfs

[PATCH 3/5] 9pfs: fix wrong encoding of rdev field in Rgetattr on macOS

2022-04-19 Thread Christian Schoenebeck
7;Tgettattr' is exclusive to protocol version 9p2000.L, it should be fair to assume that 'rdev' field is assumed to be in Linux dev_t format by client as well. Signed-off-by: Christian Schoenebeck --- hw/9pfs/9p.c | 37 - 1 file changed, 36 inser

[PATCH 2/5] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-19 Thread Christian Schoenebeck
mknod() on macOS does not support creating sockets, so divert to call sequence socket(), bind() and chmod() respectively if S_IFSOCK was passed with mode argument. Link: https://lore.kernel.org/qemu-devel/17933734.zYzKuhC07K@silver/ Signed-off-by: Christian Schoenebeck --- hw/9pfs/9p-util

[PATCH 1/5] 9pfs: fix qemu_mknodat(S_IFREG) on macOS

2022-04-19 Thread Christian Schoenebeck
hC07K@silver/ Signed-off-by: Christian Schoenebeck --- hw/9pfs/9p-util-darwin.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/9pfs/9p-util-darwin.c b/hw/9pfs/9p-util-darwin.c index bec0253474..53e0625501 100644 --- a/hw/9pfs/9p-util-darwin.c +++ b/hw/9pfs/9p-util-darwin.c @@

Re: [RFC PATCH 0/4] 9pfs: Add 9pfs support for Windows host

2022-04-18 Thread Christian Schoenebeck
On Montag, 18. April 2022 11:07:33 CEST Mark Cave-Ayland wrote: > On 17/04/2022 13:55, Christian Schoenebeck wrote: > > On Donnerstag, 14. April 2022 19:25:04 CEST Shi, Guohuai wrote: > >>> -Original Message- > >>> From: Christian Schoenebeck > >&

Re: [PATCH 24/26] 9p: add missing coroutine_fn annotations

2022-04-18 Thread Christian Schoenebeck
On Freitag, 15. April 2022 15:18:58 CEST Paolo Bonzini wrote: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau > Acked-by: Greg Kurz > Signed-off-by: Paolo Bonzini > --- I would have expected more been missing, anyway ... Reviewed-by: Christian Schoeneb

Re: [RFC PATCH 0/4] 9pfs: Add 9pfs support for Windows host

2022-04-17 Thread Christian Schoenebeck
On Donnerstag, 14. April 2022 19:25:04 CEST Shi, Guohuai wrote: > > -Original Message- > > From: Christian Schoenebeck > > Sent: 2022年4月14日 19:24 > > To: qemu-devel@nongnu.org; Shi, Guohuai > > Cc: Bin Meng ; Greg Kurz > > Subject: Re: [RFC PATCH 0/4

Re: [RFC PATCH 0/4] 9pfs: Add 9pfs support for Windows host

2022-04-14 Thread Christian Schoenebeck
s a fileystem on Windows that supports ADS. [4] https://en.wikipedia.org/wiki/NTFS#Alternate_data_stream_(ADS) Best regards, Christian Schoenebeck

Re: [RFC PATCH 0/4] 9pfs: Add 9pfs support for Windows host

2022-04-12 Thread Christian Schoenebeck
On Freitag, 8. April 2022 19:10:09 CEST Bin Meng wrote: > At present there is no Windows support for 9p file system. > This series adds initial Windows support for 9p file system. Nice! > Only 'local' file system driver backend is supported. security_model > should be 'none' due to limitations on

Re: [PATCH v9 09/11] 9p: darwin: Implement compatibility for mknodat

2022-04-12 Thread Christian Schoenebeck
On Freitag, 8. April 2022 17:00:59 CEST Greg Kurz wrote: > On Fri, 08 Apr 2022 15:52:25 +0200 > > Christian Schoenebeck wrote: > > On Sonntag, 27. Februar 2022 23:35:20 CEST Will Cohen wrote: > > > From: Keno Fischer > > > > > > Darwin does n

Re: [PATCH v9 09/11] 9p: darwin: Implement compatibility for mknodat

2022-04-08 Thread Christian Schoenebeck
On Sonntag, 27. Februar 2022 23:35:20 CEST Will Cohen wrote: > From: Keno Fischer > > Darwin does not support mknodat. However, to avoid race conditions > with later setting the permissions, we must avoid using mknod on > the full path instead. We could try to fchdir, but that would cause > probl

Re: [PATCH v2] 9p: move P9_XATTR_SIZE_MAX from 9p.h to 9p.c

2022-04-01 Thread Christian Schoenebeck
st always be the first include line in any .c file. > > > > Understood, apologies -- if there's other changes for a v3 I can resubmit > > accordingly, but if this otherwise looks okay then I would be fine with a > > QEMU maintainer adjusting the header placement as needed when preparing > > for > > submission to the main tree. > > Makes sense. I'm currently assembling a pull req with some misc fixes for > 7.0 ... if Christian & Greg do not have any other patches pending right now, > I could throw this in, with the osdep.h location fixed. > > Thomas That would be appreciated, nothing else for 7.0 at this point. Thanks Thomas! Best regards, Christian Schoenebeck

Re: [PATCH] 9p: move limits.h include from 9p.c to 9p.h

2022-03-31 Thread Christian Schoenebeck
On Donnerstag, 31. März 2022 15:19:24 CEST Will Cohen wrote: > On Thu, Mar 31, 2022 at 7:07 AM Christian Schoenebeck < > > qemu_...@crudebyte.com> wrote: > > On Donnerstag, 31. März 2022 10:03:35 CEST Peter Maydell wrote: > > > On Wed, 30 Mar 2022 at 22:55, Will Coh

Re: [PATCH] 9p: move limits.h include from 9p.c to 9p.h

2022-03-31 Thread Christian Schoenebeck
his host system #endif was to ensure that whoever adds support for another 9p host system in future, to check what's the limit on that host system, i.e. it might even be <64k. So I wouldn't just blindly use a default value here for all systems. Best regards, Christian Schoenebeck

Re: [PATCH] 9p: move limits.h include from 9p.c to 9p.h

2022-03-31 Thread Christian Schoenebeck
On Mittwoch, 30. März 2022 23:17:02 CEST Will Cohen wrote: > On Wed, Mar 30, 2022 at 4:24 PM Philippe Mathieu-Daudé < > > philippe.mathieu.da...@gmail.com> wrote: > > Hi, > > > > On 30/3/22 20:19, Will Cohen wrote: > > > As noted by https://gitlab.com/qemu-project/qemu/-/issues/950, within > > >

Re: [PATCH v4 0/7] 9pfs: fix 'Twalk' protocol violation

2022-03-29 Thread Christian Schoenebeck
On Dienstag, 15. März 2022 11:10:25 CEST Christian Schoenebeck wrote: > Currently the implementation of 'Twalk' does not behave exactly as specified > by the 9p2000 protocol specification. Actual fix is patch 5; see the > description of that patch for details of what this ove

Re: [PATCH] gitattributes: Cover Objective-C source files

2022-03-18 Thread Christian Schoenebeck
On Donnerstag, 17. März 2022 14:03:26 CET Philippe Mathieu-Daudé wrote: > From: Philippe Mathieu-Daudé > > See comments in commit 29cf16db23 ("buildsys: Help git-diff > adding .gitattributes config file") for details. > > Signed-off-by: Philippe Mathieu-Daudé &

Re: [PATCH] 9pfs: fix inode sequencing in 'synth' driver

2022-03-16 Thread Christian Schoenebeck
On Mittwoch, 16. März 2022 12:10:43 CET Greg Kurz wrote: > On Mon, 14 Mar 2022 19:58:11 +0100 > > Christian Schoenebeck wrote: > > The 'synth' driver's root node and the 'synth' driver's first > > subdirectory node falsely share the same inode

[PATCH v4 7/7] tests/9pfs: check fid being unaffected in fs_walk_2nd_nonexistent

2022-03-15 Thread Christian Schoenebeck
' request should return an 'Rlerror' response by 9p server with error code ENOENT as that fid is basically invalid. And as we are at it, also check that the QID returned by 'Twalk' is not identical to the root node's QID. Signed-off-by: Christian Schoenebeck --- tests/qtest

[PATCH v4 6/7] tests/9pfs: guard recent 'Twalk' behaviour fix

2022-03-15 Thread Christian Schoenebeck
he 1st path component is valid, whereas the 2nd path component transmitted to server does not exist. The expected behaviour is that 9p server would respond by sending a 'Rwalk' response with exactly 1 QID (instead of 'Rlerror' response). Signed-off-by: Christian Schoenebeck Reviewe

[PATCH v4 4/7] 9pfs: refactor 'name_idx' -> 'nwalked' in v9fs_walk()

2022-03-15 Thread Christian Schoenebeck
The local variable 'name_idx' is used in two loops in function v9fs_walk(). Let the first loop use its own variable 'nwalked' instead, which we will use in subsequent patch as the number of (requested) path components successfully walked by background I/O thread. Sign

[PATCH v4 3/7] tests/9pfs: compare QIDs in fs_walk_none() test

2022-03-15 Thread Christian Schoenebeck
Extend previously added fs_walk_none() test by comparing the QID of the root fid with the QID of the cloned fid. They should be equal. Signed-off-by: Christian Schoenebeck --- tests/qtest/virtio-9p-test.c | 87 1 file changed, 87 insertions(+) diff --git a

[PATCH v4 5/7] 9pfs: fix 'Twalk' to only send error if no component walked

2022-03-15 Thread Christian Schoenebeck
already existing variable 'err' only reflects the last error. Despite QIDs being delivered to client in a more relaxed way now, it is important to note though that fid still must remain unaffected if any error occurred. Signed-off-by: Christian Schoenebeck --- hw/9pfs/9p.c | 43

[PATCH v4 2/7] tests/9pfs: Twalk with nwname=0

2022-03-15 Thread Christian Schoenebeck
Send Twalk request with nwname=0. In this case no QIDs should be returned by 9p server; this is equivalent to walking to dot. Signed-off-by: Christian Schoenebeck Reviewed-by: Greg Kurz --- tests/qtest/virtio-9p-test.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a

[PATCH v4 1/7] tests/9pfs: walk to non-existent dir

2022-03-15 Thread Christian Schoenebeck
Expect ENOENT Rlerror response when trying to walk to a non-existent directory. Signed-off-by: Christian Schoenebeck Reviewed-by: Greg Kurz Based-on: --- tests/qtest/virtio-9p-test.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/tests/qtest/virtio-9p

[PATCH v4 0/7] 9pfs: fix 'Twalk' protocol violation

2022-03-15 Thread Christian Schoenebeck
t by sending a subsequent 'Tgetattr' request. [patch 7] Christian Schoenebeck (7): tests/9pfs: walk to non-existent dir tests/9pfs: Twalk with nwname=0 tests/9pfs: compare QIDs in fs_walk_none() test 9pfs: refactor 'name_idx' -> 'nwalked' in v9fs_walk()

Re: [PATCH] MAINTAINERS: Volunteer to maintain Darwin-based hosts support

2022-03-14 Thread Christian Schoenebeck
+++ b/MAINTAINERS > @@ -548,6 +548,12 @@ F: include/*/*win32* > X: qga/*win32* > F: qemu.nsi > > +Darwin (macOS, iOS) Right now that's macOS only, so it should be: Darwin (macOS) Except of that: Reviewed-by: Christian Schoenebeck Thanks! Best regards, Christian Schoen

Re: [PATCH 3/3] Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Christian Schoenebeck
floats? I guess I leave that > to the JACK experts... That's correct. JACK does not use interleaved audio format, it uses separate buffers for each audio channel. For the audio stuff of this patch: Reviewed-by: Christian Schoenebeck Best regards, Christian Schoenebeck

Re: [PATCH 2/3] 9pfs: Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Christian Schoenebeck
On Montag, 14. März 2022 19:46:59 CET Philippe Mathieu-Daudé wrote: > Hi Christian, Hi Philippe, > On 14/3/22 17:42, Christian Schoenebeck wrote: > > On Montag, 14. März 2022 17:01:07 CET Markus Armbruster wrote: > >> g_new(T, n) is neater than g_malloc(sizeof(T) * n). It&#

[PATCH] 9pfs: fix inode sequencing in 'synth' driver

2022-03-14 Thread Christian Schoenebeck
QIDs (which are derived by 9p server from driver's inode numbers). Fix this issue by using prefix-increment instead of postfix-increment operator while generating new inode numbers for subdirectories and files. Link: https://lore.kernel.org/qemu-devel/3859307.hTDP4D0zbi@silver/ Signed-off

Re: [PATCH 2/3] 9pfs: Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Christian Schoenebeck
> 1 warning generated. > > Harmless, because QppEntry is larger than QpfEntry. Fix to allocate a > QpfEntry instead. > > Cc: Greg Kurz > Cc: Christian Schoenebeck > Signed-off-by: Markus Armbruster > --- Reviewed-by: Christian Schoenebeck >

Re: [PATCH v3 7/7] tests/9pfs: check fid being unaffected in fs_walk_2nd_nonexistent

2022-03-13 Thread Christian Schoenebeck
On Sonntag, 13. März 2022 11:27:56 CET Christian Schoenebeck wrote: > On Sonntag, 13. März 2022 10:28:32 CET Christian Schoenebeck wrote: > > Extend previously added test case by checking that fid is unaffected > > by 'Twalk' request (i.e. when 2nd path component of reque

Re: [PATCH v3 7/7] tests/9pfs: check fid being unaffected in fs_walk_2nd_nonexistent

2022-03-13 Thread Christian Schoenebeck
On Sonntag, 13. März 2022 10:28:32 CET Christian Schoenebeck wrote: > Extend previously added test case by checking that fid is unaffected > by 'Twalk' request (i.e. when 2nd path component of request being > invalid). Do that by comparing the QID of root fid with QID of walked

[PATCH v3 6/7] tests/9pfs: guard recent 'Twalk' behaviour fix

2022-03-13 Thread Christian Schoenebeck
he 1st path component is valid, whereas the 2nd path component transmitted to server does not exist. The expected behaviour is that 9p server would respond by sending a 'Rwalk' response with exactly 1 QID (instead of 'Rlerror' response). Signed-off-by: Christian Schoenebeck Reviewe

[PATCH v3 4/7] 9pfs: refactor 'name_idx' -> 'nwalked' in v9fs_walk()

2022-03-13 Thread Christian Schoenebeck
The local variable 'name_idx' is used in two loops in function v9fs_walk(). Let the first loop use its own variable 'nwalked' instead, which we will use in subsequent patch as the number of (requested) path components successfully walked by background I/O thread. Sign

[PATCH v3 7/7] tests/9pfs: check fid being unaffected in fs_walk_2nd_nonexistent

2022-03-13 Thread Christian Schoenebeck
Extend previously added test case by checking that fid is unaffected by 'Twalk' request (i.e. when 2nd path component of request being invalid). Do that by comparing the QID of root fid with QID of walked fid; they should be identical. Signed-off-by: Christian Schoenebeck --- tests/qt

[PATCH v3 1/7] tests/9pfs: walk to non-existent dir

2022-03-13 Thread Christian Schoenebeck
Expect ENOENT Rlerror response when trying to walk to a non-existent directory. Signed-off-by: Christian Schoenebeck Reviewed-by: Greg Kurz --- tests/qtest/virtio-9p-test.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/tests/qtest/virtio-9p-test.c b/tests

[PATCH v3 5/7] 9pfs: fix 'Twalk' to only send error if no component walked

2022-03-13 Thread Christian Schoenebeck
already existing variable 'err' only reflects the last error. Despite QIDs being delivered to client in a more relaxed way now, it is important to note though that fid still must remain unaffected if any error occurred. Signed-off-by: Christian Schoenebeck --- hw/9pfs/9p.c | 43

[PATCH v3 3/7] tests/9pfs: compare QIDs in fs_walk_none() test

2022-03-13 Thread Christian Schoenebeck
Extend previously added fs_walk_none() test by comparing the QID of the root fid with the QID of the cloned fid. They should be equal. Signed-off-by: Christian Schoenebeck --- tests/qtest/virtio-9p-test.c | 87 1 file changed, 87 insertions(+) diff --git a

[PATCH v3 2/7] tests/9pfs: Twalk with nwname=0

2022-03-13 Thread Christian Schoenebeck
Send Twalk request with nwname=0. In this case no QIDs should be returned by 9p server; this is equivalent to walking to dot. Signed-off-by: Christian Schoenebeck Reviewed-by: Greg Kurz --- tests/qtest/virtio-9p-test.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a

[PATCH v3 0/7] 9pfs: fix 'Twalk' protocol violation

2022-03-13 Thread Christian Schoenebeck
ke patch 5 better readable. All the other patches are just additional test cases for guarding 'Twalk' behaviour. v2 -> v3: * Use 'any_err |= err = ...' at all occurrences to make v9fs_walk() function less error prone, which also reduces lines of code. [patch 5] Christ

Re: [PATCH v2 5/7] 9pfs: fix 'Twalk' to only send error if no component walked

2022-03-13 Thread Christian Schoenebeck
On Samstag, 12. März 2022 12:06:47 CET Christian Schoenebeck wrote: > Current implementation of 'Twalk' request handling always sends an 'Rerror' > response if any error occured. The 9p2000 protocol spec says though: > > " > If the first element ca

Re: MAINTAINERS: macOS host support (was: MAINTAINERS: take edk2)

2022-03-12 Thread Christian Schoenebeck
On Freitag, 11. März 2022 10:26:47 CET Daniel P. Berrangé wrote: > On Fri, Mar 11, 2022 at 10:13:24AM +0100, Christian Schoenebeck wrote: > > On Donnerstag, 10. März 2022 12:40:06 CET Philippe Mathieu-Daudé wrote: > > > +Stefan for overall project resources. > > > >

[PATCH v2 2/7] tests/9pfs: Twalk with nwname=0

2022-03-12 Thread Christian Schoenebeck
Send Twalk request with nwname=0. In this case no QIDs should be returned by 9p server; this is equivalent to walking to dot. Signed-off-by: Christian Schoenebeck Reviewed-by: Greg Kurz --- tests/qtest/virtio-9p-test.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a

[PATCH v2 6/7] tests/9pfs: guard recent 'Twalk' behaviour fix

2022-03-12 Thread Christian Schoenebeck
he 1st path component is valid, whereas the 2nd path component transmitted to server does not exist. The expected behaviour is that 9p server would respond by sending a 'Rwalk' response with exactly 1 QID (instead of 'Rlerror' response). Signed-off-by: Christian Schoenebeck Reviewe

[PATCH v2 3/7] tests/9pfs: compare QIDs in fs_walk_none() test

2022-03-12 Thread Christian Schoenebeck
Extend previously added fs_walk_none() test by comparing the QID of the root fid with the QID of the cloned fid. They should be equal. Signed-off-by: Christian Schoenebeck --- tests/qtest/virtio-9p-test.c | 87 1 file changed, 87 insertions(+) diff --git a

[PATCH v2 4/7] 9pfs: refactor 'name_idx' -> 'nwalked' in v9fs_walk()

2022-03-12 Thread Christian Schoenebeck via
The local variable 'name_idx' is used in two loops in function v9fs_walk(). Let the first loop use its own variable 'nwalked' instead, which we will use in subsequent patch as the number of (requested) path components successfully walked by background I/O thread. Sign

[PATCH v2 5/7] 9pfs: fix 'Twalk' to only send error if no component walked

2022-03-12 Thread Christian Schoenebeck
already existing variable 'err' only reflects the last error. Despite QIDs being delivered to client in a more relaxed way now, it is important to note though that fid still must remain unaffected if any error occurred. Signed-off-by: Christian Schoenebeck --- hw/9pfs/9p.c | 29 ++

[PATCH v2 0/7] 9pfs: fix 'Twalk' protocol violation

2022-03-12 Thread Christian Schoenebeck
English wording 'says' in commit log. [patch 6] * Ensure fid unaffected in fs_walk_2nd_nonexistent(). [NEW patch 7] Christian Schoenebeck (7): tests/9pfs: walk to non-existent dir tests/9pfs: Twalk with nwname=0 tests/9pfs: compare QIDs in fs_walk_none() test 9pfs: refactor &

[PATCH v2 1/7] tests/9pfs: walk to non-existent dir

2022-03-12 Thread Christian Schoenebeck
Expect ENOENT Rlerror response when trying to walk to a non-existent directory. Signed-off-by: Christian Schoenebeck Reviewed-by: Greg Kurz --- tests/qtest/virtio-9p-test.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/tests/qtest/virtio-9p-test.c b/tests

[PATCH v2 7/7] tests/9pfs: check fid being unaffected in fs_walk_2nd_nonexistent

2022-03-12 Thread Christian Schoenebeck
Extend previously added test case by checking that fid is unaffected by 'Twalk' request (i.e. when 2nd path component of request being invalid). Do that by comparing the QID of root fid with QID of walked fid; they should be identical. Signed-off-by: Christian Schoenebeck --- tests/qt

Re: [PATCH 5/6] 9pfs: fix 'Twalk' to only send error if no component walked

2022-03-11 Thread Christian Schoenebeck
On Freitag, 11. März 2022 18:08:38 CET Greg Kurz wrote: > On Fri, 11 Mar 2022 17:44:54 +0100 > > Christian Schoenebeck wrote: > > On Freitag, 11. März 2022 17:35:41 CET Greg Kurz wrote: > > > On Thu, 10 Mar 2022 10:13:33 +0100 > > > > > > Christian

Re: [PATCH 3/6] tests/9pfs: compare QIDs in fs_walk_none() test

2022-03-11 Thread Christian Schoenebeck
On Freitag, 11. März 2022 18:02:36 CET Greg Kurz wrote: > On Fri, 11 Mar 2022 17:39:56 +0100 > > Christian Schoenebeck wrote: > > On Freitag, 11. März 2022 17:11:24 CET Greg Kurz wrote: > > > On Thu, 10 Mar 2022 10:04:50 +0100 > > > > > > Christian

Re: [PATCH 5/6] 9pfs: fix 'Twalk' to only send error if no component walked

2022-03-11 Thread Christian Schoenebeck
On Freitag, 11. März 2022 17:35:41 CET Greg Kurz wrote: > On Thu, 10 Mar 2022 10:13:33 +0100 > > Christian Schoenebeck wrote: > > On Mittwoch, 9. März 2022 18:57:39 CET Christian Schoenebeck wrote: > > > Current implementation of 'Twalk' request hand

Re: [PATCH 3/6] tests/9pfs: compare QIDs in fs_walk_none() test

2022-03-11 Thread Christian Schoenebeck
On Freitag, 11. März 2022 17:11:24 CET Greg Kurz wrote: > On Thu, 10 Mar 2022 10:04:50 +0100 > > Christian Schoenebeck wrote: > > On Mittwoch, 9. März 2022 15:49:04 CET Christian Schoenebeck wrote: > > > Extend previously added fs_walk_none() test by comparing the QID &g

Re: [PATCH 2/6] tests/9pfs: Twalk with nwname=0

2022-03-11 Thread Christian Schoenebeck
On Freitag, 11. März 2022 12:41:32 CET Greg Kurz wrote: > On Thu, 10 Mar 2022 09:57:25 +0100 > > Christian Schoenebeck wrote: > > On Mittwoch, 9. März 2022 14:24:24 CET Christian Schoenebeck wrote: > > > Send Twalk request with nwname=0. In this case no QIDs should > &

Re: [PATCH 6/6] tests/9pfs: guard recent 'Twalk' behaviour fix

2022-03-11 Thread Christian Schoenebeck
On Mittwoch, 9. März 2022 19:21:18 CET Christian Schoenebeck wrote: > Previous 9p patch fixed 'Twalk' request handling, which was previously not > behaving as specified by the 9p2000 protocol spec. This patch adds a new > test case which guards the new 'Twalk' beh

Re: MAINTAINERS: macOS host support (was: MAINTAINERS: take edk2)

2022-03-11 Thread Christian Schoenebeck
On Donnerstag, 10. März 2022 12:40:06 CET Philippe Mathieu-Daudé wrote: > +Stefan for overall project resources. > > On 10/3/22 12:07, Daniel P. Berrangé wrote: > > On Thu, Mar 10, 2022 at 12:00:35PM +0100, Christian Schoenebeck wrote: > >> On Mittwoch, 9. März 20

Re: MAINTAINERS: macOS host support (was: MAINTAINERS: take edk2)

2022-03-10 Thread Christian Schoenebeck
On Mittwoch, 9. März 2022 12:44:16 CET Daniel P. Berrangé wrote: > On Wed, Mar 09, 2022 at 11:40:42AM +0100, Christian Schoenebeck wrote: > > On Mittwoch, 9. März 2022 11:05:02 CET Philippe Mathieu-Daudé wrote: > > > Not sure what you have in mind. I'm totally new to the m

Re: [PATCH 5/6] 9pfs: fix 'Twalk' to only send error if no component walked

2022-03-10 Thread Christian Schoenebeck
On Mittwoch, 9. März 2022 18:57:39 CET Christian Schoenebeck wrote: > Current implementation of 'Twalk' request handling always sends an 'Rerror' > response if any error occured. The 9p2000 protocol spec sais though: > > " > If the first element ca

Re: [PATCH 4/6] 9pfs: refactor 'name_idx' -> 'nvalid' in v9fs_walk()

2022-03-10 Thread Christian Schoenebeck
On Mittwoch, 9. März 2022 18:12:17 CET Christian Schoenebeck wrote: > The local variable 'name_idx' is used in two loops in function v9fs_walk(). > Let the first loop use its own variable 'nvalid' instead, which we will use > in subsequent patches as the number o

Re: [PATCH 3/6] tests/9pfs: compare QIDs in fs_walk_none() test

2022-03-10 Thread Christian Schoenebeck
On Mittwoch, 9. März 2022 15:49:04 CET Christian Schoenebeck wrote: > Extend previously added fs_walk_none() test by comparing the QID > of the root fid with the QID of the cloned fid. They should be > equal. > > Signed-off-by: Christian Schoenebeck > --- > tests/qtest/

Re: [PATCH 2/6] tests/9pfs: Twalk with nwname=0

2022-03-10 Thread Christian Schoenebeck
On Mittwoch, 9. März 2022 14:24:24 CET Christian Schoenebeck wrote: > Send Twalk request with nwname=0. In this case no QIDs should > be returned by 9p server; this is equivalent to walking to dot. > > Signed-off-by: Christian Schoenebeck > --- > tests/qtest/vir

[PATCH 4/6] 9pfs: refactor 'name_idx' -> 'nvalid' in v9fs_walk()

2022-03-09 Thread Christian Schoenebeck
read. Signed-off-by: Christian Schoenebeck --- hw/9pfs/9p.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index a6d6b3f835..6cdc566866 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -1764,7 +1764,7 @@ static bool same_stat_id(const s

[PATCH 5/6] 9pfs: fix 'Twalk' to only send error if no component walked

2022-03-09 Thread Christian Schoenebeck
already existing variable 'err' only reflects the last error. Despite QIDs being delivered to client in a more relaxed way now, it is important to note though that fid still must remain uneffacted if any error occurred. Signed-off-by: Christian Schoenebeck --- hw/9pfs/9p.c | 29 ++

<    1   2   3   4   5   6   7   8   9   10   >