Re: [PATCH v3 22/22] fsdep/9p: fix -Werror=maybe-uninitialized false-positive

2024-09-30 Thread Christian Schoenebeck via
On Monday, September 30, 2024 10:14:57 AM CEST Marc-André Lureau wrote: > From: Marc-André Lureau > > ../fsdev/9p-iov-marshal.c:93:23: error: ‘val’ may be used uninitialized > [-Werror=maybe-uninitialized] > and similar > > Signed-off-by: Marc-André Lureau > --- > fsdev/9p-iov-marshal.c | 6 +

Re: [PULL 16/17] virtio-9p: remove virtfs-proxy-helper

2024-09-11 Thread Christian Schoenebeck via
On Wednesday, September 11, 2024 2:33:41 PM CEST Paolo Bonzini wrote: > It has been deprecated since 8.1; remove it and suggest using permission > mapping > or virtiofsd. > > Signed-off-by: Paolo Bonzini > --- Just wondering Paolo, you received Greg's and my emails on this patch? /Christian

Re: [PATCH] virtio-9p: remove virtfs-proxy-helper

2024-09-10 Thread Christian Schoenebeck via
On Tuesday, September 10, 2024 11:16:55 AM CEST Christian Schoenebeck wrote: > On Thursday, September 5, 2024 10:22:59 AM CEST Paolo Bonzini wrote: > > It has been deprecated since 8.1; remove it and suggest using permission > > mapping > > or virtiofsd. > > virtfs-proxy-helper is just one compon

Re: [PATCH] virtio-9p: remove virtfs-proxy-helper

2024-09-10 Thread Christian Schoenebeck via
On Thursday, September 5, 2024 10:22:59 AM CEST Paolo Bonzini wrote: > It has been deprecated since 8.1; remove it and suggest using permission > mapping > or virtiofsd. virtfs-proxy-helper is just one component and (implementation detail) being removed. So I would change the commit log to: 9p

Re: [PATCH v2] build-sys: error when slirp is not found and not disabled

2022-10-06 Thread Christian Schoenebeck via
On Donnerstag, 6. Oktober 2022 12:26:50 CEST Daniel P. Berrangé wrote: > On Thu, Oct 06, 2022 at 12:12:07PM +0200, Christian Schoenebeck wrote: > > On Donnerstag, 6. Oktober 2022 11:39:02 CEST Daniel P. Berrangé wrote: > > > On Thu, Oct 06, 2022 at 12:33:22PM +0400, marcandre.lur...@redhat.com wro

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

2022-04-29 Thread Christian Schoenebeck via
On Freitag, 29. April 2022 13:28:39 CEST Bin Meng wrote: > On Fri, Apr 29, 2022 at 7:16 PM 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 > > different on the two systems. >

[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 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. Signed-off-by: Christian Schoenebe

[PULL 06/19] 9p: darwin: Move XATTR_SIZE_MAX->P9_XATTR_SIZE_MAX

2022-03-04 Thread Christian Schoenebeck via
From: Keno Fischer Signed-off-by: Keno Fischer Signed-off-by: Michael Roitzsch Because XATTR_SIZE_MAX is not defined on Darwin, create a cross-platform P9_XATTR_SIZE_MAX instead. [Will Cohen: - Adjust coding style - Lower XATTR_SIZE_MAX to 64k - Add explanatory conte

Re: [PATCH v10 0/8] hmp, qmp: Add commands to introspect virtio devices

2021-12-06 Thread Christian Schoenebeck via
On Montag, 6. Dezember 2021 17:09:45 CET Jonah Palmer wrote: > On 12/6/21 08:50, Christian Schoenebeck wrote: > > On Montag, 6. Dezember 2021 13:43:18 CET Jonah Palmer wrote: > >> This series introduces new QMP/HMP commands to dump the status of a > >> virtio device at different levels. > >> > >>

Re: [PATCH v10 0/8] hmp, qmp: Add commands to introspect virtio devices

2021-12-06 Thread Christian Schoenebeck via
On Montag, 6. Dezember 2021 13:43:18 CET Jonah Palmer wrote: > This series introduces new QMP/HMP commands to dump the status of a > virtio device at different levels. > > [Jonah: Rebasing previous patchset from Nov. 10 (v9). Original patches > are by Laurent Vivier from May 2020. > > Rebase fr

Re: [PATCH] fuzz: Add virtio-9p configurations for fuzzing

2021-01-15 Thread Christian Schoenebeck via
On Freitag, 15. Januar 2021 13:23:08 CET Greg Kurz wrote: > On Thu, 14 Jan 2021 17:17:48 -0500 > > Alexander Bulekov wrote: > > Signed-off-by: Alexander Bulekov > > --- > > No changelog at all ? Yeah, that's indeed quite short. :) > > tests/qtest/fuzz/generic_fuzz_configs.h | 12

Re: virtfs-proxy-helper fails due to bogus libattr test

2021-01-12 Thread Christian Schoenebeck via
On Dienstag, 12. Januar 2021 10:51:10 CET Olaf Hering wrote: > Depending on the build environment, the meson test to find a suitable > libattr fails. Something appends -O0 to CFLAGS. > > I see no "-O0" in qemu.git. This is a regression, it worked in > 553032db17440f8de011390e5a1cfddd13751b0b. > >

Re: [PATCH] 9pfs/proxy: Check return value of proxy_marshal()

2021-01-11 Thread Christian Schoenebeck via
On Montag, 11. Januar 2021 10:49:56 CET Greg Kurz wrote: > This should always successfully write exactly two 32-bit integers. > Make it clear with an assert(), like v9fs_receive_status() and > v9fs_receive_response() already do when unmarshalling the same > header. > > Fixes: Coverity CID 1438968

Re: [PATCH v2] ui/cocoa: Fix openFile: deprecation on Big Sur

2021-01-09 Thread Christian Schoenebeck via
On Samstag, 9. Januar 2021 00:13:36 CET BALATON Zoltan wrote: > On Sat, 9 Jan 2021, Roman Bolshakov wrote: > > On Fri, Jan 08, 2021 at 03:00:07PM +, Peter Maydell wrote: > >> On Fri, 8 Jan 2021 at 13:50, Peter Maydell wrote: > >>> On Sat, 2 Jan 2021 at 15:14, Roman Bolshakov wrote: > u

Re: [Qemu-devel] [PATCH v7 0/3] 9p: Fix file ID collisions

2019-09-24 Thread Christian Schoenebeck via
On Montag, 23. September 2019 18:50:12 CEST Greg Kurz wrote: > > > > If yes, and since that would mean I was the only person ever having > > > > tested > > > > the actual fix, shouldn't --multidevs=remap|forbid better be marked as > > > > experimental (docs and runtime warning) for now? Maybe that

git format.from (was: 9p: Fix file ID collisions)

2019-09-24 Thread Christian Schoenebeck via
On Dienstag, 24. September 2019 00:24:15 CEST Jeff King wrote: > > On the other hand, considering the already existing --from argument and > > "format.from" config option: > > https://git-scm.com/docs/git-config#Documentation/git-config.txt-formatfro > > m > > > > Wouldn't it make sense to just dr

Re: [Qemu-devel] [PATCH v7 0/3] 9p: Fix file ID collisions

2019-09-23 Thread Christian Schoenebeck via
On Montag, 23. September 2019 16:46:53 CEST Greg Kurz wrote: > > > > > I'll do some > > > > > more manual testing and issue a PR when I'm confident enough. > > > > > > > > That would be highly appreciated! So far I am the only one ever having > > > > tested this patch set at all! > > > > > > Just

Re: [Qemu-devel] [PATCH v7 0/3] 9p: Fix file ID collisions

2019-09-23 Thread Christian Schoenebeck via
On Montag, 23. September 2019 14:56:11 CEST Greg Kurz wrote: > On Mon, 23 Sep 2019 11:50:46 +0200 > > Christian Schoenebeck wrote: > > On Freitag, 13. September 2019 19:01:57 CEST Greg Kurz wrote: > > > So I did some changes in 1/3 and pushed everything to 9p-next. > > > > I've reviewed your cha

Re: [Qemu-devel] [PATCH v6 0/4] 9p: Fix file ID collisions

2019-09-23 Thread Christian Schoenebeck via
On Donnerstag, 5. September 2019 14:59:31 CEST Greg Kurz wrote: > On Thu, 05 Sep 2019 14:25:13 +0200 > > Christian Schoenebeck wrote: > > On Mittwoch, 4. September 2019 15:02:30 CEST Christian Schoenebeck wrote: > > > > > Well, mailman is handling this correctly. It replaces the "From:" > > > > >

Re: [Qemu-devel] [PATCH v6 0/4] 9p: Fix file ID collisions

2019-09-23 Thread Christian Schoenebeck via
On Montag, 9. September 2019 16:25:12 CEST Jeff King wrote: > On Mon, Sep 09, 2019 at 09:05:45AM -0500, Eric Blake wrote: > > > But as you can already read from the manual, the overall behaviour of > > > git > > > regarding a separate "From:" line in the email body was intended solely > > > for > >

Re: [Qemu-devel] [PATCH v7 0/3] 9p: Fix file ID collisions

2019-09-23 Thread Christian Schoenebeck via
On Freitag, 13. September 2019 19:01:57 CEST Greg Kurz wrote: > So I did some changes in 1/3 and pushed everything to 9p-next. I've reviewed your changes. Some notes: Patch 1: https://github.com/gkurz/qemu/commit/9295011c5a961603959b966c8aa6ad9840fe6db2 * Typo 1: error_append_hint(&loc

Re: [Qemu-devel] [PATCH v6 0/4] 9p: Fix file ID collisions

2019-09-05 Thread Christian Schoenebeck via Qemu-devel
On Mittwoch, 4. September 2019 15:02:30 CEST Christian Schoenebeck wrote: > > > Well, mailman is handling this correctly. It replaces the "From:" field > > > with a placeholder and instead adds my actual email address as > > > "Reply-To:" field. That's the common way to handle this on mailing > > >

[Qemu-devel] [PATCH v7 2/3] 9p: stat_to_qid: implement slow path

2019-09-05 Thread Christian Schoenebeck via Qemu-devel
From: Christian Schoenebeck stat_to_qid attempts via qid_path_prefixmap to map unique files (which are identified by 64 bit inode nr and 32 bit device id) to a 64 QID path value. However this implementation makes some assumptions about inode number generation on the host. If qid_path_prefixmap f

[Qemu-devel] [PATCH v7 0/3] 9p: Fix file ID collisions

2019-09-05 Thread Christian Schoenebeck via Qemu-devel
This is v7 of a proposed patch set for fixing file ID collisions with 9pfs. v6->v7: * Rebased to https://github.com/gkurz/qemu/commits/9p-next (SHA1 7fc4c49e91). * Be pedantic and abort with error on wrong value for new command line argument 'multidevs'. * Adjusted patches to qemu

[Qemu-devel] [PATCH v7 3/3] 9p: Use variable length suffixes for inode remapping

2019-09-05 Thread Christian Schoenebeck via Qemu-devel
From: Christian Schoenebeck Use variable length suffixes for inode remapping instead of the fixed 16 bit size prefixes before. With this change the inode numbers on guest will typically be much smaller (e.g. around >2^1 .. >2^7 instead of >2^48 with the previous fixed size inode remapping. Addit

[Qemu-devel] [PATCH v7 1/3] 9p: Added virtfs option 'multidevs=remap|forbid|warn'

2019-09-05 Thread Christian Schoenebeck via Qemu-devel
From: Christian Schoenebeck 'warn' (default): Only log an error message (once) on host if more than one device is shared by same export, except of that just ignore this config error though. This is the default behaviour for not breaking existing installations implying that they really know what t

Re: [Qemu-devel] [PATCH v6 0/4] 9p: Fix file ID collisions

2019-09-04 Thread Christian Schoenebeck via Qemu-devel
On Dienstag, 3. September 2019 21:38:15 CEST Eric Blake wrote: > On 9/2/19 5:29 PM, Christian Schoenebeck via Qemu-devel wrote: > >>>>> === OUTPUT BEGIN === > >>>>> 1/4 Checking commit bb69de63f788 (9p: Treat multiple devices on one > >>>>>

Re: [Qemu-devel] [PATCH v6 0/4] 9p: Fix file ID collisions

2019-09-02 Thread Christian Schoenebeck via Qemu-devel
s to have some coding style problems. See output below > > > > for > > > > > > more information: > > [snip] > > > > > > === OUTPUT BEGIN === > > > > 1/4 Checking commit bb69de63f788 (9p: Treat multiple devices on one > > > &g

Re: [Qemu-devel] [PATCH v6 2/4] 9p: Added virtfs option 'multidevs=remap|forbid|warn'

2019-09-02 Thread Christian Schoenebeck via Qemu-devel
On Montag, 2. September 2019 13:49:34 CEST Greg Kurz wrote: > On Sun, 01 Sep 2019 20:56:16 +0200 > > Christian Schoenebeck wrote: > > On Freitag, 30. August 2019 14:22:38 CEST Greg Kurz wrote: > > > Some more comments below. > > > > [snip] > > > > > > diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c >

Re: [Qemu-devel] [PATCH v6 2/4] 9p: Added virtfs option 'multidevs=remap|forbid|warn'

2019-09-02 Thread Christian Schoenebeck via Qemu-devel
On Montag, 2. September 2019 12:16:26 CEST Greg Kurz wrote: > > > > @@ -571,22 +572,109 @@ static void coroutine_fn virtfs_reset(V9fsPDU > > > > *pdu) > > > > > > > > P9_STAT_MODE_NAMED_PIPE | \ > > > > P9_STAT_MODE_SOCKET) > > >

Re: [Qemu-devel] [PATCH v5 3/5] 9p: Added virtfs option 'remap_inodes'

2019-09-01 Thread Christian Schoenebeck via Qemu-devel
On Freitag, 30. August 2019 13:48:27 CEST Greg Kurz wrote: > > > diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c > > > index 8cc65c2c67..39c6c2a894 100644 > > > --- a/hw/9pfs/9p.c > > > +++ b/hw/9pfs/9p.c > > > > [snip] > > > > > @@ -1940,6 +2041,19 @@ static int coroutine_fn v9fs_do_readdir(V9fsPDU > >

Re: [Qemu-devel] [PATCH v6 0/4] 9p: Fix file ID collisions

2019-09-01 Thread Christian Schoenebeck via Qemu-devel
gt; > > > This series seems to have some coding style problems. See output below for > > more information: [snip] > > > > === OUTPUT BEGIN === > > 1/4 Checking commit bb69de63f788 (9p: Treat multiple devices on one export > > as an error) ERROR: Author ema

Re: [Qemu-devel] [PATCH v6 2/4] 9p: Added virtfs option 'multidevs=remap|forbid|warn'

2019-09-01 Thread Christian Schoenebeck via Qemu-devel
On Freitag, 30. August 2019 14:22:38 CEST Greg Kurz wrote: > Some more comments below. [snip] > > diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c > > index 8cc65c2c67..c96ea51116 100644 > > --- a/hw/9pfs/9p.c > > +++ b/hw/9pfs/9p.c > > @@ -25,6 +25,7 @@ > > > > #include "trace.h" > > #include "migratio

Re: [Qemu-devel] [PATCH v6 2/4] 9p: Added virtfs option 'multidevs=remap|forbid|warn'

2019-09-01 Thread Christian Schoenebeck via Qemu-devel
On Donnerstag, 29. August 2019 18:55:28 CEST Greg Kurz wrote: > > diff --git a/fsdev/qemu-fsdev-opts.c b/fsdev/qemu-fsdev-opts.c > > index 7c31af..07a18c6e48 100644 > > --- a/fsdev/qemu-fsdev-opts.c > > +++ b/fsdev/qemu-fsdev-opts.c > > @@ -31,7 +31,9 @@ static QemuOptsList qemu_fsdev_opts = {

Re: [Qemu-devel] [PATCH v6 1/4] 9p: Treat multiple devices on one export as an error

2019-09-01 Thread Christian Schoenebeck via Qemu-devel
On Donnerstag, 29. August 2019 18:27:30 CEST Greg Kurz wrote: > > diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c > > index 586a6dccba..8cc65c2c67 100644 > > --- a/hw/9pfs/9p.c > > +++ b/hw/9pfs/9p.c > > @@ -572,10 +572,18 @@ static void coroutine_fn virtfs_reset(V9fsPDU *pdu) > > > >

[Qemu-devel] [PATCH v6 4/4] 9p: Use variable length suffixes for inode remapping

2019-08-22 Thread Christian Schoenebeck via Qemu-devel
Use variable length suffixes for inode remapping instead of the fixed 16 bit size prefixes before. With this change the inode numbers on guest will typically be much smaller (e.g. around >2^1 .. >2^7 instead of >2^48 with the previous fixed size inode remapping. Additionally this solution is more

[Qemu-devel] [PATCH v6 0/4] 9p: Fix file ID collisions

2019-08-22 Thread Christian Schoenebeck via Qemu-devel
This is v6 of a proposed patch set for fixing file ID collisions with 9pfs. v5->v6: * Rebased to https://github.com/gkurz/qemu/commits/9p-next (SHA1 177fd3b6a8). * Replaced previous boolean option 'remap_inodes' by tertiary option 'multidevs=remap|forbid|warn', where 'warn' is the ne

[Qemu-devel] [PATCH v6 1/4] 9p: Treat multiple devices on one export as an error

2019-08-22 Thread Christian Schoenebeck via Qemu-devel
The QID path should uniquely identify a file. However, the inode of a file is currently used as the QID path, which on its own only uniquely identifies files within a device. Here we track the device hosting the 9pfs share, in order to prevent security issues with QID path collisions from other dev

[Qemu-devel] [PATCH v6 3/4] 9p: stat_to_qid: implement slow path

2019-08-22 Thread Christian Schoenebeck via Qemu-devel
stat_to_qid attempts via qid_path_prefixmap to map unique files (which are identified by 64 bit inode nr and 32 bit device id) to a 64 QID path value. However this implementation makes some assumptions about inode number generation on the host. If qid_path_prefixmap fails, we still have 48 bits av

[Qemu-devel] [PATCH v6 2/4] 9p: Added virtfs option 'multidevs=remap|forbid|warn'

2019-08-22 Thread Christian Schoenebeck via Qemu-devel
'warn' (default): Only log an error message (once) on host if more than one device is shared by same export, except of that just ignore this config error though. This is the default behaviour for not breaking existing installations implying that they really know what they are doing. 'forbid': Like

Re: [Qemu-devel] [PATCH v5 3/5] 9p: Added virtfs option 'remap_inodes'

2019-07-06 Thread Christian Schoenebeck via Qemu-devel
On Mittwoch, 3. Juli 2019 13:13:26 CEST Christian Schoenebeck wrote: > To support multiple devices on the 9p share, and avoid > qid path collisions we take the device id as input [snip] > - Fixed v9fs_do_readdir() having exposed info outside >export root with '..' entry. [snip] > diff

[Qemu-devel] [PATCH v5 5/5] 9p: Use variable length suffixes for inode remapping

2019-07-03 Thread Christian Schoenebeck via Qemu-devel
Use variable length suffixes for inode remapping instead of the fixed 16 bit size prefixes before. With this change the inode numbers on guest will typically be much smaller (e.g. around >2^1 .. >2^7 instead of >2^48 with the previous fixed size inode remapping. Additionally this solution is more

[Qemu-devel] [PATCH v5 2/5] 9p: Treat multiple devices on one export as an error

2019-07-03 Thread Christian Schoenebeck via Qemu-devel
The QID path should uniquely identify a file. However, the inode of a file is currently used as the QID path, which on its own only uniquely identifies files within a device. Here we track the device hosting the 9pfs share, in order to prevent security issues with QID path collisions from other dev

[Qemu-devel] [PATCH v5 3/5] 9p: Added virtfs option 'remap_inodes'

2019-07-03 Thread Christian Schoenebeck via Qemu-devel
To support multiple devices on the 9p share, and avoid qid path collisions we take the device id as input to generate a unique QID path. The lowest 48 bits of the path will be set equal to the file inode, and the top bits will be uniquely assigned based on the top 16 bits of the inode and the devic

[Qemu-devel] [PATCH v5 1/5] 9p: unsigned type for type, version, path

2019-07-03 Thread Christian Schoenebeck via Qemu-devel
There is no need for signedness on these QID fields for 9p. Signed-off-by: Antonios Motakis [CS: - Also make QID type unsigned. - Adjust donttouch_stat() to new types. - Adjust trace-events to new types. ] Signed-off-by: Christian Schoenebeck --- fsdev/9p-marshal.h | 6 +++--- hw/9

[Qemu-devel] [PATCH v5 4/5] 9p: stat_to_qid: implement slow path

2019-07-03 Thread Christian Schoenebeck via Qemu-devel
stat_to_qid attempts via qid_path_prefixmap to map unique files (which are identified by 64 bit inode nr and 32 bit device id) to a 64 QID path value. However this implementation makes some assumptions about inode number generation on the host. If qid_path_prefixmap fails, we still have 48 bits av

[Qemu-devel] [PATCH v5 0/5] 9p: Fix file ID collisions

2019-07-03 Thread Christian Schoenebeck via Qemu-devel
This is v5 of a proposed patch set for fixing file ID collisions with 9pfs. v4->v5: All Patches: * Added details to individual commit logs of what has been changed exactly by me on top of Antonios' original 4 patches. Patch 1: * Fixed format specifiers in hw/9pfs/trace-events. P

Re: [Qemu-devel] [PATCH v4 5/5] 9p: Use variable length suffixes for inode remapping

2019-06-29 Thread Christian Schoenebeck via Qemu-devel
On Freitag, 28. Juni 2019 16:56:15 CEST Christian Schoenebeck via Qemu-devel > > > + */ > > > +#define EXP_GOLOMB_K0 > > > + > > > +# if !EXP_GOLOMB_K > > > + > > > +/** @brief Exponential Golomb algorithm limited to the case k=0. > &g

Re: [Qemu-devel] [PATCH v4 3/5] 9p: Added virtfs option "remap_inodes"

2019-06-29 Thread Christian Schoenebeck via Qemu-devel
On Freitag, 28. Juni 2019 16:23:08 CEST Greg Kurz wrote: > > > This feature applies to all backends IIUC. We don't really care for the > > > synth backend since it generates non-colliding inode numbers by design, > > > but the proxy backend has the same issue as local. So... > > > > Yeah, I was no

Re: [Qemu-devel] [PATCH v4 5/5] 9p: Use variable length suffixes for inode remapping

2019-06-28 Thread Christian Schoenebeck via Qemu-devel
On Freitag, 28. Juni 2019 13:50:15 CEST Greg Kurz wrote: > > And with k=5 they would look like: > > > > Index Dec/Bin -> Generated Suffix Bin > > 1 [1] -> [01] (6 bits) > > 2 [10] -> [11] (6 bits) > > 3 [11] -> [010001] (6 bits) > > 4 [100] -> [110001] (6 bits) > > 5 [101] -> [001001] (6 b

Re: [Qemu-devel] [PATCH v4 3/5] 9p: Added virtfs option "remap_inodes"

2019-06-28 Thread Christian Schoenebeck via Qemu-devel
On Freitag, 28. Juni 2019 12:09:31 CEST Greg Kurz wrote: > On Wed, 26 Jun 2019 20:42:13 +0200 > > Christian Schoenebeck via Qemu-devel wrote: > > To support multiple devices on the 9p share, and avoid > > qid path collisions we take the device id as input > > to gene

Re: [Qemu-devel] [PATCH v4 4/5] 9p: stat_to_qid: implement slow path

2019-06-28 Thread Christian Schoenebeck via Qemu-devel
On Freitag, 28. Juni 2019 12:21:20 CEST Greg Kurz wrote: > > +static int qid_path_fullmap(V9fsPDU *pdu, const struct stat *stbuf, > > +uint64_t *path) > > +{ > > +QpfEntry lookup = { > > +.dev = stbuf->st_dev, > > +.ino = stbuf->st_ino > > +}, *va

Re: [Qemu-devel] [PATCH v4 2/5] 9p: Treat multiple devices on one export as an error

2019-06-28 Thread Christian Schoenebeck via Qemu-devel
On Donnerstag, 27. Juni 2019 19:26:22 CEST Greg Kurz wrote: > On Wed, 26 Jun 2019 20:30:41 +0200 > > Christian Schoenebeck via Qemu-devel wrote: > > The QID path should uniquely identify a file. However, the > > inode of a file is currently used as the QID path, whic

Re: [Qemu-devel] [PATCH v4 1/5] 9p: unsigned type for type, version, path

2019-06-28 Thread Christian Schoenebeck via Qemu-devel
On Donnerstag, 27. Juni 2019 18:12:03 CEST Greg Kurz wrote: > On Wed, 26 Jun 2019 20:25:55 +0200 > Christian Schoenebeck via Qemu-devel wrote: > > There is no need for signedness on these QID fields for 9p. > > > > Signed-off-by: Antonios Motakis > > You shoul

[Qemu-devel] [PATCH v4 0/5] 9p: Fix file ID collisions

2019-06-26 Thread Christian Schoenebeck via Qemu-devel
This is v4 of a proposed patch set for fixing file ID collisions with 9pfs. v3->v4: * Rebased to latest git master head. * Splitted Antonios' patch set to its original 4 individual patches. (was merged previously as only 1 patch). * Addressed discussed issues directly on Antonios' pat

[Qemu-devel] [PATCH v4 4/5] 9p: stat_to_qid: implement slow path

2019-06-26 Thread Christian Schoenebeck via Qemu-devel
stat_to_qid attempts via qid_path_prefixmap to map unique files (which are identified by 64 bit inode nr and 32 bit device id) to a 64 QID path value. However this implementation makes some assumptions about inode number generation on the host. If qid_path_prefixmap fails, we still have 48 bits av

[Qemu-devel] [PATCH v4 3/5] 9p: Added virtfs option "remap_inodes"

2019-06-26 Thread Christian Schoenebeck via Qemu-devel
To support multiple devices on the 9p share, and avoid qid path collisions we take the device id as input to generate a unique QID path. The lowest 48 bits of the path will be set equal to the file inode, and the top bits will be uniquely assigned based on the top 16 bits of the inode and the devic

[Qemu-devel] [PATCH v4 5/5] 9p: Use variable length suffixes for inode remapping

2019-06-26 Thread Christian Schoenebeck via Qemu-devel
Use variable length suffixes for inode remapping instead of the fixed 16 bit size prefixes before. With this change the inode numbers on guest will typically be much smaller (e.g. around >2^1 .. >2^7 instead of >2^48 with the previous fixed size inode remapping. Additionally this solution should b

[Qemu-devel] [PATCH v4 2/5] 9p: Treat multiple devices on one export as an error

2019-06-26 Thread Christian Schoenebeck via Qemu-devel
The QID path should uniquely identify a file. However, the inode of a file is currently used as the QID path, which on its own only uniquely identifies wiles within a device. Here we track the device hosting the 9pfs share, in order to prevent security issues with QID path collisions from other dev

[Qemu-devel] [PATCH v4 1/5] 9p: unsigned type for type, version, path

2019-06-26 Thread Christian Schoenebeck via Qemu-devel
There is no need for signedness on these QID fields for 9p. Signed-off-by: Antonios Motakis Signed-off-by: Christian Schoenebeck --- fsdev/9p-marshal.h | 6 +++--- hw/9pfs/9p.c | 6 +++--- hw/9pfs/trace-events | 14 +++--- 3 files changed, 13 insertions(+), 13 deletions(-)

Re: [Qemu-devel] [libvirt patch] qemu: adds support for virtfs 9p argument 'vii'

2019-06-03 Thread Christian Schoenebeck via Qemu-devel
On Montag, 3. Juni 2019 08:57:15 CEST Greg Kurz wrote: > > Ok, I will extend Antonios' patch to log that error on host. I thought > > about limiting that error message to once per session (for not flooding > > the logs), but it is probably not worth it, so if you don't veto then I > > will just log

Re: [Qemu-devel] [libvirt patch] qemu: adds support for virtfs 9p argument 'vii'

2019-05-22 Thread Christian Schoenebeck via Qemu-devel
On Montag, 20. Mai 2019 16:05:09 CEST Greg Kurz wrote: > Hi Christian, Hi Greg, > On the other hand, I'm afraid that having a functional solution won't > motivate people to come up with a new spec... Anyway, I agree that the > data corruption/loss issues must be prevented, ie, the 9p server shoul

Re: [Qemu-devel] [libvirt patch] qemu: adds support for virtfs 9p argument 'vii'

2019-05-17 Thread Christian Schoenebeck via Qemu-devel
On Freitag, 17. Mai 2019 16:47:46 CEST Greg Kurz wrote: > Potentially yes if another approach is satisfying enough, as I wouldn't > want to over-engineer too much around this 9p imposed limitation. The > right thing to do would be to come up with a new version of the protocol > with variable sized

Re: [Qemu-devel] [libvirt patch] qemu: adds support for virtfs 9p argument 'vii'

2019-05-17 Thread Christian Schoenebeck via Qemu-devel
On Freitag, 17. Mai 2019 14:30:29 CEST Greg Kurz wrote: > Then, we come to the bulk problem: how to handle the case where we > have multiple devices involved in a directory we want to share ? > Antonios's proposal is a clever way to address the collisions, but > your work proves it isn't enough...

Re: [Qemu-devel] [libvirt patch] qemu: adds support for virtfs 9p argument 'vii'

2019-05-17 Thread Christian Schoenebeck via Qemu-devel
On Dienstag, 7. Mai 2019 18:16:08 CEST Christian Schoenebeck wrote: > Here are the archive links for latest v3 patch set [5(+1) patches total]: > > [PATCH v3 0/5] 9p: Fix file ID collisions: > https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg01143.html > > [PATCH v3 1/5] 9p: mitigates mos

Re: [Qemu-devel] [libvirt patch] qemu: adds support for virtfs 9p argument 'vii'

2019-05-07 Thread Christian Schoenebeck via Qemu-devel
On Dienstag, 7. Mai 2019 17:42:39 CEST Greg Kurz wrote: > > Sorry that I caused a bit of confusion, You were actually commenting > > mostly on v2 of the patch set, where my email client replaced the message > > IDs and hence screwed threading. > > > > This is v3 that I sent yesterday and which has

Re: [Qemu-devel] [libvirt patch] qemu: adds support for virtfs 9p argument 'vii'

2019-05-07 Thread Christian Schoenebeck via Qemu-devel
On Dienstag, 7. Mai 2019 13:57:56 CEST Daniel P. Berrangé wrote: > > ... > > > > > > > > > > > > > > > > > > > > > > > > > > > > Like with the vii qemu virtfs command line argument, the order of the > > "importan

Re: [Qemu-devel] [PATCH v3 1/5] 9p: mitigates most QID path collisions

2019-05-07 Thread Christian Schoenebeck via Qemu-devel
On Dienstag, 7. Mai 2019 13:42:47 CEST Daniel P. Berrangé wrote: > > This first patch here is an updated version of Antonios Motakis' > > original 4-patch set (using fixed length 16 bit prefixes), merged to one > > patch: > > > > https://lists.gnu.org/archive/html/qemu-devel/2018-02/msg02283.html

Re: [Qemu-devel] [libvirt patch] qemu: adds support for virtfs 9p argument 'vii'

2019-05-07 Thread Christian Schoenebeck via Qemu-devel
On Dienstag, 7. Mai 2019 11:55:56 CEST Greg Kurz wrote: > > support the 'vii' feature of patch 5, which introduces the XML config > > What is patch 5 ?!? What is 'vii' ? I am a bit lost here... Hi Greg, Sorry that I caused a bit of confusion, You were actually commenting mostly on v2 of the pat

[Qemu-devel] [libvirt patch] qemu: adds support for virtfs 9p argument 'vii'

2019-05-06 Thread Christian Schoenebeck via Qemu-devel
This is the counter part patch against latest libvirt git master head to support the 'vii' feature of patch 5, which introduces the XML config XML tag "important" on libvirt side. To stick with the previous example mentioned with patch 5, likewise libvirt XML configuration might then look like thi

[Qemu-devel] [PATCH v3 0/5] 9p: Fix file ID collisions

2019-05-06 Thread Christian Schoenebeck via Qemu-devel
This is v3 of a proposed patch set for fixing file ID collisions with 9pfs. That's it from my side for now regarding this overall issue. I am waiting for your comments on this patch set before doing anything else. Patch 1 to 4 are identical to the previous version. New patch 5 adds an optional q

[Qemu-devel] [PATCH v3 3/5] 9p: persistency of QID path beyond reboots / suspensions

2019-05-06 Thread Christian Schoenebeck via Qemu-devel
This patch aims to keep QID path identical beyond the scope of reboots and guest suspensions. With the 1st patch alone the QID path of the same files might change after reboots / suspensions, since 9p would restart with empty qpp_table and the resulting QID path depends on the precise sequence of f

[Qemu-devel] [PATCH v3 1/5] 9p: mitigates most QID path collisions

2019-05-06 Thread Christian Schoenebeck via Qemu-devel
This first patch here is an updated version of Antonios Motakis' original 4-patch set (using fixed length 16 bit prefixes), merged to one patch: https://lists.gnu.org/archive/html/qemu-devel/2018-02/msg02283.html * Updated to latest git master, specifically to new qht interface. * Merged the ori

[Qemu-devel] [PATCH v3 4/5] 9p: use variable length suffixes for inode mapping

2019-05-06 Thread Christian Schoenebeck via Qemu-devel
This patch introduces variable length suffixes for being used for inode mapping instead of the fixed 16 bit size prefixes of patch 1. With this patch the inode numbers on guest will typically be much smaller (e.g. around >2^1 .. >2^7 instead of >2^48 with patch 1). I preserved both solutions in th

[Qemu-devel] [PATCH v3 2/5] 9P: trivial cleanup of QID path collision mitigation

2019-05-06 Thread Christian Schoenebeck via Qemu-devel
Addresses trivial changes regarding the previous patch as requested on the mailing list a while ago. * Removed unneccessary parantheses: https://lists.gnu.org/archive/html/qemu-devel/2018-02/msg02661.html * Removed unneccessary g_malloc() result checks: https://lists.gnu.org/archive/html/qemu

[Qemu-devel] [PATCH v3 5/5] 9p: adds virtfs 'vii' device parameter

2019-05-06 Thread Christian Schoenebeck via Qemu-devel
This patch adds an optional qemu device parameter "vii" (very important inode[s]), which accepts a colon separated list of pathes relative below the 9p export root, which shall be given the smallest inode suffix (and hence largest possible inode namespace on guest) according to the given order. Tha

[Qemu-devel] [PATCH v2 4/4] 9p: use variable length suffixes for inode mapping

2019-05-03 Thread Christian Schoenebeck via Qemu-devel
This patch introduces variable length suffixes for being used for inode mapping instead of the fixed 16 bit size prefixes of patch 1. With this patch the inode numbers on guest will typically be much smaller (e.g. around >2^1 .. >2^7 instead of >2^48 with patch 1). I preserved both solutions in th

[Qemu-devel] [PATCH v2 3/4] 9p: persistency of QID path beyond reboots / suspensions

2019-05-03 Thread Christian Schoenebeck via Qemu-devel
This patch aims to keep QID path identical beyond the scope of reboots and guest suspensions. With the 1st patch alone the QID path of the same files might change after reboots / suspensions, since 9p would restart with empty qpp_table and the resulting QID path depends on the precise sequence of f

[Qemu-devel] [PATCH v2 2/4] 9P: trivial cleanup of QID path collision mitigation

2019-05-03 Thread Christian Schoenebeck via Qemu-devel
Addresses trivial changes regarding the previous patch as requested on the mailing list a while ago. * Removed unneccessary parantheses: https://lists.gnu.org/archive/html/qemu-devel/2018-02/msg02661.html * Removed unneccessary g_malloc() result checks: https://lists.gnu.org/archive/html/qemu

[Qemu-devel] [PATCH v2 0/4] 9p: Fix file ID collisions

2019-05-03 Thread Christian Schoenebeck via Qemu-devel
Hi! This is v2 of a proposed patch set for fixing file ID collisions with 9pfs. Patch 1 to 3 are identical to the previous version. New in this v2 is patch 4 which introduces variable length suffixes for inode mapping instead of fixed length prefixes. Also: patch 4 disables file ID persistency a

[Qemu-devel] [PATCH v2 1/4] 9p: mitigates most QID path collisions

2019-05-03 Thread Christian Schoenebeck via Qemu-devel
This first patch here is an updated version of Antonios Motakis' original 4-patch set, merged to one patch: https://lists.gnu.org/archive/html/qemu-devel/2018-02/msg02283.html * Updated to latest git master, specifically to new qht interface. * Merged the original 4 patches to this single patch.

Re: [Qemu-devel] virtfs/9p duplicate inodes

2019-04-23 Thread Christian Schoenebeck via Qemu-devel
On Dienstag, 23. April 2019 13:44:42 CEST Greg Kurz wrote: > Hi Christian, > > Sorry for the late response. I'm quite busy on other topics these days... Absolutely no problem. We probably all share the same fate of constant work load on endless battle fields popping up everywhere. :-) > > I int

[Qemu-devel] [PATCH 3/3] 9p: persistency of QID path beyond reboots / suspensions

2019-04-23 Thread Christian Schoenebeck via Qemu-devel
This patch aims to keep QID path identical beyond the scope of reboots and guest suspensions. With the 1st patch alone the QID path of the same files might change after reboots / suspensions, since 9p would restart with empty qpp_table and the resulting QID path depends on the precise sequence of f

[Qemu-devel] [PATCH 2/3] 9P: trivial cleanup of QID path collision mitigation

2019-04-23 Thread Christian Schoenebeck via Qemu-devel
Addresses trivial changes regarding the previous patch as requested on the mailing list a while ago. * Removed unneccessary parantheses: https://lists.gnu.org/archive/html/qemu-devel/2018-02/msg02661.html * Removed unneccessary g_malloc() result checks: https://lists.gnu.org/archive/html/qemu

[Qemu-devel] [PATCH 1/3] 9p: mitigates most QID path collisions

2019-04-23 Thread Christian Schoenebeck via Qemu-devel
I am attempting to revive Antonios Motakis' effort to fix the current file ID collisions with 9p. My patch set does not fix all the concerns you had with his original patch set, especially if there is still some (very rare) case of QID path collision the affected files are still visible on guest. H

Re: [Qemu-devel] virtfs/9p duplicate inodes

2019-04-20 Thread Christian Schoenebeck via Qemu-devel
On Samstag, 30. März 2019 21:01:28 CEST Christian Schoenebeck wrote: > On Samstag, 30. März 2019 17:47:51 CET Greg Kurz wrote: > > Maybe have a look at this tentative to fix QID collisions: > > > > https://lists.gnu.org/archive/html/qemu-devel/2018-02/msg02283.html [snip] > Question: so far I just

Re: [Qemu-devel] virtfs/9p duplicate inodes

2019-03-30 Thread Christian Schoenebeck via Qemu-devel
On Samstag, 30. März 2019 17:47:51 CET Greg Kurz wrote: > Maybe have a look at this tentative to fix QID collisions: > > https://lists.gnu.org/archive/html/qemu-devel/2018-02/msg02283.html Interesting! My idea would have been different, based on my presumption that the amount of devices on a 9p

[Qemu-devel] virtfs/9p duplicate inodes

2019-03-30 Thread Christian Schoenebeck via Qemu-devel
Hi list, currently the 9p implementation in qemu causes inode number collisions on guest OS level if the directory exported by 9p consists on host level of more than one file system being mounted inside that exported directory tree; which leads to severe misbehaviours on guest side with all kin