From: ChenQi <Qi.Chen@windriver.com>
To: niko.mauno@vaisala.com, openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] util-linux: Add 'no-libmount-mountfd' PACKAGECONFIG option
Date: Mon, 19 Aug 2024 16:35:36 +0800 [thread overview]
Message-ID: <12c36764-97a2-4cd2-830b-e2ba5bebef29@windriver.com> (raw)
In-Reply-To: <20240816140422.1665537-1-niko.mauno@vaisala.com>
I'm a little concerned about this patch because PACKAGECONFIG like this
is likely to sit there forever.
The master branch's kernel version is at least 6.6. So this patch does
not have any effect for master branch, right? If this PACKAGECONFIG is
added, when should we remove it?
Also, if the automatic detection codes determine util-linux could build
with mountfd support, but it fails at runtime, then it sounds like
something to fix for the auto detection codes in
configure.ac/meson.build. So if we really want to improve something,
maybe we should work with the util-linux community to add more checks
about mountfd. Maybe start by filing an issue for util-linux?
Regards,
Qi
On 8/16/24 22:04, Niko Mauno via lists.openembedded.org wrote:
> The 2.39 version of util-linux took new file descriptors based mount
> kernel API into use. In relation to this change, the upstream release
> notes in
> https://github.com/util-linux/util-linux/blob/v2.39/Documentation/releases/v2.39-ReleaseNotes#L14-L21
> mention that
>
> This change is very aggressive to libmount code, but hopefully, it does not introduce regressions in traditional mount(8) behavior.
>
> While testing with a board using a 6.1 version kernel, an initramfs
> rootfs based boot flow contains the error
>
> [FAILED] Failed to start Remount Root and Kernel File Systems.
> See 'systemctl status systemd-remount-fs.service' for details.
>
> on closer inspection:
>
> demoboard ~ # systemctl status -l systemd-remount-fs.service
> x systemd-remount-fs.service - Remount Root and Kernel File Systems
> Loaded: loaded (/usr/lib/systemd/system/systemd-remount-fs.service; enabled-runtime; preset: disabled)
> Active: failed (Result: exit-code) since Wed 2024-08-14 14:53:48 UTC; 1min 22s ago
> Docs: man:systemd-remount-fs.service(8)
> https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
> Process: 76 ExecStart=/usr/lib/systemd/systemd-remount-fs (code=exited, status=1/FAILURE)
> Main PID: 76 (code=exited, status=1/FAILURE)
>
> Aug 14 14:53:48 demoboard systemd-remount-fs[76]: /usr/bin/mount for / exited with exit status 32.
> Aug 14 14:53:48 demoboard systemd-remount-fs[81]: mount: /: mount point not mounted or bad option.
> Aug 14 14:53:48 demoboard systemd-remount-fs[81]: dmesg(1) may have more information after failed mount system call.
> Aug 14 14:53:48 demoboard systemd[1]: systemd-remount-fs.service: Main process exited, code=exited, status=1/FAILURE
> Aug 14 14:53:48 demoboard systemd[1]: systemd-remount-fs.service: Failed with result 'exit-code'.
> Aug 14 14:53:48 demoboard systemd[1]: Failed to start Remount Root and Kernel File Systems.
>
> also consequentially, 'systemctl status' reported:
>
> State: degraded
>
> When issuing 'strace -ff mount -o remount /' the failure occurs at
>
> mount_setattr(3, "", AT_EMPTY_PATH, {attr_set=MOUNT_ATTR_RDONLY|MOUNT_ATTR_NOATIME|MOUNT_ATTR_NODIRATIME, attr_clr=MOUNT_ATTR_NOSUID|MOUNT_ATTR_NODEV|MOUNT_ATTR_NOEXEC|MOUNT_ATTR_NOATIME|MOUNT_ATTR_STRICTATIME|MOUNT_ATTR_NOSYMFOLLOW|0x40, propagation=0 /* MS_??? */, userns_fd=0}, 32) = -1 EINVAL (Invalid argument)
>
> however the failure didn't occur when using qemuarm64 with 6.6 version
> kernel to boot a corresponding initramfs image, in that case the exact
> same call under strace returned 0.
>
> Taking the above findings into consideration, add a new PACKAGECONFIG
> option which allows to conveniently opt-out from prematurely using a
> feature which can cause issues with a bit older kernels.
>
> Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
> ---
> meta/recipes-core/util-linux/util-linux_2.40.1.bb | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/meta/recipes-core/util-linux/util-linux_2.40.1.bb b/meta/recipes-core/util-linux/util-linux_2.40.1.bb
> index a1aab94055..3ecc55f61e 100644
> --- a/meta/recipes-core/util-linux/util-linux_2.40.1.bb
> +++ b/meta/recipes-core/util-linux/util-linux_2.40.1.bb
> @@ -107,6 +107,7 @@ PACKAGECONFIG[cryptsetup] = "--with-cryptsetup,--without-cryptsetup,cryptsetup"
> PACKAGECONFIG[chfn-chsh] = "--enable-chfn-chsh,--disable-chfn-chsh,"
> PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux"
> PACKAGECONFIG[lastlog2] = "--enable-liblastlog2,--disable-liblastlog2,sqlite3"
> +PACKAGECONFIG[no-libmount-mountfd] = "--disable-libmount-mountfd-support"
>
> EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} CPU= CPUOPT= 'OPT=${CFLAGS}'"
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#203466): https://lists.openembedded.org/g/openembedded-core/message/203466
> Mute This Topic: https://lists.openembedded.org/mt/107932364/7304865
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [Qi.Chen@eng.windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
prev parent reply other threads:[~2024-08-19 8:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-16 14:04 [PATCH] util-linux: Add 'no-libmount-mountfd' PACKAGECONFIG option Niko Mauno
2024-08-16 14:24 ` [OE-core] " Alexander Kanavin
2024-08-19 8:23 ` Niko Mauno
2024-08-19 8:35 ` ChenQi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=12c36764-97a2-4cd2-830b-e2ba5bebef29@windriver.com \
--to=qi.chen@windriver.com \
--cc=niko.mauno@vaisala.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox