[PATCH 0/2] linux-user: implement fsmount(2) series of syscalls

Xinhui Yang posted 2 patches 3 days, 13 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/cover.1779850946.git.cyan@cyano.uk
Maintainers: Laurent Vivier <laurent@vivier.eu>, Helge Deller <deller@gmx.de>, Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
There is a newer version of this series
linux-user/strace.c    | 102 +++++++++++++++++++++++++++++++++++++++++
linux-user/strace.list |  15 ++++++
linux-user/syscall.c   |  77 +++++++++++++++++++++++++++++++
3 files changed, 194 insertions(+)
[PATCH 0/2] linux-user: implement fsmount(2) series of syscalls
Posted by Xinhui Yang 3 days, 13 hours ago
The motivation of the implementation is to make the systemd-nspawn
container to boot guest OSes with systemd v259+, otherwise any systemd
service requires importing credentials will fail, including journald,
D-Bus service and getty. We used to work around this issue by patching
systemd to retry the clone() without CLONE_NEWNS, which is not and can
not be implemented in QEMU user emulation.

mount(8) from util-linux works because it will fallback to the old
mount(2) syscall if fsmount(8) series of syscalls is not available.

Tested good on an x86-64 host, with:

- an AOSC OS mips64r6el guest, which boots successfully with full systemd
  support using systemd-nspawn(1).
- a Gentoo ppc (big endian) guest, which boots successfully with full
  systemd support, using systemd-nspawn(1).

Xinhui Yang (2):
  linux-user: implement fsmount(2) series of syscalls
  linux-user/strace: add fsmount series of syscalls

 linux-user/strace.c    | 102 +++++++++++++++++++++++++++++++++++++++++
 linux-user/strace.list |  15 ++++++
 linux-user/syscall.c   |  77 +++++++++++++++++++++++++++++++
 3 files changed, 194 insertions(+)

-- 
2.52.0
Re: [PATCH 0/2] linux-user: implement fsmount(2) series of syscalls
Posted by Xinhui Yang 3 days, 13 hours ago
My apologies, I made a typo in the destination address of the patches.
The patches were CC'd to the correct mailing list - should I send again?
在 2026/5/27 11:23, Xinhui Yang 写道:
> The motivation of the implementation is to make the systemd-nspawn
> container to boot guest OSes with systemd v259+, otherwise any systemd
> service requires importing credentials will fail, including journald,
> D-Bus service and getty. We used to work around this issue by patching
> systemd to retry the clone() without CLONE_NEWNS, which is not and can
> not be implemented in QEMU user emulation.
> 
> mount(8) from util-linux works because it will fallback to the old
> mount(2) syscall if fsmount(8) series of syscalls is not available.
> 
> Tested good on an x86-64 host, with:
> 
> - an AOSC OS mips64r6el guest, which boots successfully with full systemd
>    support using systemd-nspawn(1).
> - a Gentoo ppc (big endian) guest, which boots successfully with full
>    systemd support, using systemd-nspawn(1).
> 
> Xinhui Yang (2):
>    linux-user: implement fsmount(2) series of syscalls
>    linux-user/strace: add fsmount series of syscalls
> 
>   linux-user/strace.c    | 102 +++++++++++++++++++++++++++++++++++++++++
>   linux-user/strace.list |  15 ++++++
>   linux-user/syscall.c   |  77 +++++++++++++++++++++++++++++++
>   3 files changed, 194 insertions(+)
> 

Xinhui