From: "Bhavik Sachdev" <b.sachdev1904@gmail.com>
To: "Bhavik Sachdev" <b.sachdev1904@gmail.com>,
"Alexander Viro" <viro@zeniv.linux.org.uk>,
"Christian Brauner" <brauner@kernel.org>
Cc: <linux-fsdevel@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
"Aleksa Sarai" <cyphar@cyphar.com>,
"Pavel Tikhomirov" <ptikhomirov@virtuozzo.com>,
"Jan Kara" <jack@suse.cz>, "John Garry" <john.g.garry@oracle.com>,
"Arnaldo Carvalho de Melo" <acme@redhat.com>,
"Darrick J . Wong" <djwong@kernel.org>,
"Namhyung Kim" <namhyung@kernel.org>,
"Ingo Molnar" <mingo@kernel.org>,
"Andrei Vagin" <avagin@gmail.com>,
"Alexander Mikhalitsyn" <alexander@mihalicyn.com>
Subject: Re: [PATCH v4] statmount: accept fd as a parameter
Date: Wed, 29 Oct 2025 11:03:40 +0530 [thread overview]
Message-ID: <DDUK7IZ56YJW.1UVWZS6GIOPUW@gmail.com> (raw)
In-Reply-To: <20251029052037.506273-2-b.sachdev1904@gmail.com>
On Wed Oct 29, 2025 at 10:47 AM IST, Bhavik Sachdev wrote:
> Changes from v3 [2] to v4:
> * Change the string returned when there is no mountpoint to be
> "[unmounted]" instead of "[detached]".
> * Remove the new DEFINE_FREE put_file and use the one already present in
> include/linux/file.h (fput) [3].
> * Inside listmount consistently pass 0 in flags to copy_mnt_id_req and
> prepare_klistmount()->grab_requested_mnt_ns() and remove flags from the
> prepare_klistmount prototype.
> * If STATMOUNT_BY_FD is set, check for mnt_ns_id && mnt_id to be 0.
What I meant to say is that, we check that mnt_ns_id == 0 and mnt_id ==
0, when STATMOUNT_BY_FD is specified.
>
> Changes from v2 [4] to v3:
> * Rename STATMOUNT_FD flag to STATMOUNT_BY_FD.
> * Fixed UAF bug caused by the reference to fd_mount being bound by scope
> of CLASS(fd_raw, f)(kreq.fd) by using fget_raw instead.
> * Reused @spare parameter in mnt_id_req instead of adding new fields to
> the struct.
>
> Changes from v1 [5] to v2:
> v1 of this patchset, took a different approach and introduced a new
> umount_mnt_ns, to which "unmounted" mounts would be moved to (instead of
> their namespace being NULL) thus allowing them to be still available via
> statmount.
>
> Introducing umount_mnt_ns complicated namespace locking and modified
> performance sensitive code [6] and it was agreed upon that fd-based
> statmount would be better.
>
> [1]: https://github.com/checkpoint-restore/criu/pull/2754
> [2]: https://lore.kernel.org/all/20251024181443.786363-1-b.sachdev1904@gmail.com/
> [3]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/file.h#n97
> [4]: https://lore.kernel.org/linux-fsdevel/20251011124753.1820802-1-b.sachdev1904@gmail.com/
> [5]: https://lore.kernel.org/linux-fsdevel/20251002125422.203598-1-b.sachdev1904@gmail.com/
> [6]: https://lore.kernel.org/linux-fsdevel/7e4d9eb5-6dde-4c59-8ee3-358233f082d0@virtuozzo.com/
prev parent reply other threads:[~2025-10-29 5:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-29 5:17 Bhavik Sachdev
2025-10-29 5:33 ` Bhavik Sachdev [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=DDUK7IZ56YJW.1UVWZS6GIOPUW@gmail.com \
--to=b.sachdev1904@gmail.com \
--cc=acme@redhat.com \
--cc=alexander@mihalicyn.com \
--cc=avagin@gmail.com \
--cc=brauner@kernel.org \
--cc=cyphar@cyphar.com \
--cc=djwong@kernel.org \
--cc=jack@suse.cz \
--cc=john.g.garry@oracle.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=ptikhomirov@virtuozzo.com \
--cc=viro@zeniv.linux.org.uk \
/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
all inboxes | Powered by JetHome®