sys-apps/systemd: allow @mount syscalls for systemd-udevd.service

In Flatcar we are using modprobe helpers that run depmod in temporary
overlay. systemd-udevd.service may try to load drivers for some block
devices (e.g. ZFS), which ends up calling our helpers, which invoke
mount command. The mount syscalls are forbidden by the default
systemd-udevd syscall filter.

Signed-off-by: Daniel Zatovic <daniel.zatovic@gmail.com>
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
This commit is contained in:
Daniel Zatovic 2025-10-09 16:09:29 +02:00 committed by James Le Cuirot
parent 7d0fd9092c
commit 17d292252a
No known key found for this signature in database
GPG Key ID: 1226415D00DD3137
4 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1 @@
- Fixed the loading of kernel modules from system extensions via udev (e.g. at boot time).

View File

@ -11,3 +11,16 @@ After=ensure-sysext.service
EOF
popd
}
cros_post_src_install_udev() {
insinto "$(systemd_get_systemunitdir)/systemd-udevd.service.d"
newins - flatcar.conf <<EOF
# In Flatcar we are using modprobe helpers that run depmod in temporary
# overlay. systemd-udevd.service may try to load drivers for some block devices
# (e.g. ZFS), which ends up calling our helpers, which invoke mount command.
# The mount syscalls are forbidden by the default systemd-udevd syscall filter.
[Service]
SystemCallFilter=@mount
EOF
}