Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 920194 - app-emulation/virtiofsd: add ~ppc64 keyword
Summary: app-emulation/virtiofsd: add ~ppc64 keyword
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Keywording (show other bugs)
Hardware: PPC64 Linux
: Normal enhancement
Assignee: Michal Prívozník
URL:
Whiteboard:
Keywords: KEYWORDREQ, PullRequest
Depends on:
Blocks:
 
Reported: 2023-12-17 13:56 UTC by Chris Kerr
Modified: 2024-01-28 19:00 UTC (History)
4 users (show)

See Also:
Package list:
app-emulation/virtiofsd ~ppc64
Runtime testing required: ---
nattka: sanity-check+


Attachments
viritiofsd-1.9.0.ebuild (virtiofsd-1.9.0.ebuild,3.15 KB, text/plain)
2024-01-04 00:30 UTC, zin0
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Kerr 2023-12-17 13:56:17 UTC
I built app-emulation/virtiofsd-1.8.0 with FEATURES=test on ppc64le and have done a basic smoke test (started a VM with a virtiofs filesystem, mounted the filesystem in the VM, wrote some files, checked that they appeared on the host).

Reproducible: Always
Comment 1 Chris Kerr 2023-12-17 18:48:56 UTC
Also I guess virtiofsd should be a dependency of app-emulation/libvirt (conditional on a USE flag).
Comment 2 Michal Prívozník 2023-12-17 19:59:44 UTC
Yeah, there is not really anything arch specific in virtiofsd. It can have the same set of KEYWORDS like app-emulation/qemu or app-emulation/libvirt.

And for the dependency of libvirt - technically, virtiofsd can be use with plain qemu, without libvirt. But we can start with libvirt and refine later.
Comment 3 zin0 2024-01-04 00:30:49 UTC
Created attachment 881435 [details]
viritiofsd-1.9.0.ebuild
Comment 4 zin0 2024-01-04 00:32:06 UTC
Sorry to chime in here, but you simply cannot assume for viritofsd to work properly across all arches.

For example, the seccomp filters in virtiofsd are arch specific.

Versions prior to 1.9.0 don't work properly on ppc64le (host/guest), because
of the 'fstatfs64' syscall not beeing allowed.

How to reproduce:   1.  export directory via virtiofsd (start the daemon with
                        '--seccomp log')
                    2.  mount the the filesystem in the VM
                    3.  issue the i.e. the 'df' command in the VM
                    4.  observe the audit messages in your kernel log
                        regarding syscall=253

This Problem goes away when using at least version 1.9.0 (you can try the
attached ebuild)
See https://gitlab.com/virtio-fs/virtiofsd/-/tags

Additionally, virtiofsd doesn't seem to properly handle cross endian
environments:

When running a big endian guest on a little endian host, the virtiofs
filesystems get mounted but are not accessible.

I have, for instance '/var/cache/distiles' exported to a VM:

within the VM i get:

$ mount|grep distfiles
'vfsd-distfiles on /var/cache/distfiles type virtiofs (rw,relatime)'

$ df
'df: /var/cache/distfiles: Connection refused'

$ ls -l /var/cache
'd????????? ? ?       ?         ?            ? distfiles'

As you can see, the permissions / ownerships are completely messed up and they cannot
be altered via chmod / chown.

If both guest and host are little endian this problem doesn't occur.
So far, I haven't tested a big endian host since I don't have access to one.
Comment 5 Michal Prívozník 2024-01-21 08:39:31 UTC
(In reply to zin0 from comment #4)
> Sorry to chime in here, but you simply cannot assume for viritofsd to work
> properly across all arches.
> 

Thank for your investigation. I thought that if Fedora builds virtiofsd for other arches, then it works:

https://koji.fedoraproject.org/koji/buildinfo?buildID=2299016

If it isn't so, let me bump the version and add ~ppc64 just to he new version then. Thanks for chiming in!
Comment 6 Larry the Git Cow gentoo-dev 2024-01-26 07:50:49 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8817d8c3301e3a2e25c272685944d06e8a5ca2a5

commit 8817d8c3301e3a2e25c272685944d06e8a5ca2a5
Author:     Michal Privoznik <michal.privoznik@gmail.com>
AuthorDate: 2023-12-17 18:46:26 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-01-26 07:49:33 +0000

    app-emulation/virtiofsd: Add ~ppc64 KEYWORD
    
    Linked bug shows that virtiofsd works on ppc64 (tested version
    was 1.8.0). Add ~ppc64 keyword to corresponding ebuild and live
    ebuild.
    
    Bug: https://bugs.gentoo.org/920194
    Signed-off-by: Michal Privoznik <michal.privoznik@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 app-emulation/virtiofsd/virtiofsd-1.8.0.ebuild | 2 +-
 app-emulation/virtiofsd/virtiofsd-9999.ebuild  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-26 08:55:54 UTC
(In reply to Larry the Git Cow from comment #6)
> [..]
>     app-emulation/virtiofsd: Add ~ppc64 KEYWORD
> [..]
>  app-emulation/virtiofsd/virtiofsd-1.8.0.ebuild | 2 +-
>  app-emulation/virtiofsd/virtiofsd-9999.ebuild  | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

The comment above says it only works for >=1.9.0, so I'll fix that now.
Comment 8 Larry the Git Cow gentoo-dev 2024-01-26 08:56:59 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e6baed7c7d796891eade62be8f42a509a8132bbb

commit e6baed7c7d796891eade62be8f42a509a8132bbb
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-01-26 08:56:34 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-01-26 08:56:52 +0000

    app-emulation/virtiofsd: fix ~ppc64 kw
    
    <1.9.0 doesn't work.
    
    Bug: https://bugs.gentoo.org/920194
    Signed-off-by: Sam James <sam@gentoo.org>

 app-emulation/virtiofsd/virtiofsd-1.8.0.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-26 08:57:14 UTC
zin0, could you report the cross-endian issues upstream please (and ideally link it here)? thank you
Comment 10 zin0 2024-01-28 19:00:27 UTC
Here's the link to the upstream issue:

https://gitlab.com/virtio-fs/virtiofsd/-/issues/145

Thanks