From: Al Viro <viro@zeniv.linux.org.uk>
To: Christian Brauner <brauner@kernel.org>
Cc: GuangFei Luo <luogf2025@163.com>,
jack@suse.cz, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] mount: fix duplicate mounts using the new mount API
Date: Fri, 31 Oct 2025 18:48:22 +0000 [thread overview]
Message-ID: <20251031184822.GC2441659@ZenIV> (raw)
In-Reply-To: <20251031-gerufen-rotkohl-7d86b0c3dfe2@brauner>
On Fri, Oct 31, 2025 at 01:54:27PM +0100, Christian Brauner wrote:
> > > I agree that it's a regression in mount(8) conversion to new API, but this
> > > is not a fix.
> > Thanks for the review. Perhaps fixing this in |move_mount| isn't the best
> > approach, and I don’t have a good solution yet.
>
> Sorry, no. This restriction never made any sense in the old mount api
> and it certainly has no place in the new mount api. And it has been
> _years_ since the new mount api was released. Any fix is likely to break
> someone else that's already relying on that working.
Not quite... I agree that it makes little sense to do that on syscall level,
but conversion of mount(8) to new API is a different story - that's more recent
than the introduction of new API itself and it does create a regression on
the userland side.
IIRC, the original rationale had been "what if somebody keeps clicking on
something in some kind of filemangler inturdface and gets a pile of overmounts
there?", but however weak that might be, it is an established behaviour of
mount(2), with userland callers of mount(2) expecting that semantics.
Blind conversion to new API has changed userland behaviour. I would argue
that it's a problem on the userland side, and the only question kernel-side
is whether there is something we could provide to simplify the life of those
who do such userland conversions. A move_mount(2) flag, perhaps, defaulting
to what we have move_mount(2) do now?
next prev parent reply other threads:[~2025-10-31 18:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-25 2:49 [PATCH] mount: fix duplicate mounts using the new mount API GuangFei Luo
2025-10-25 3:36 ` Al Viro
2025-10-25 6:02 ` GuangFei Luo
2025-10-31 12:54 ` Christian Brauner
2025-10-31 18:48 ` Al Viro [this message]
2025-11-05 11:54 ` Christian Brauner
2025-10-29 3:06 ` kernel test robot
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=20251031184822.GC2441659@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luogf2025@163.com \
--cc=stable@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).