From: Christian Brauner <brauner@kernel.org>
To: Hongbo Li <lihongbo22@huawei.com>
Cc: viro@zeniv.linux.org.uk, jack@suse.cz, tytso@mit.edu,
adilger.kernel@dilger.ca, lczerner@redhat.com,
cmaiolino@redhat.com, linux-fsdevel@vger.kernel.org,
linux-doc@vger.kernel.org, yi.zhang@huawei.com
Subject: Re: [PATCH v2 0/4] enhance the path resolution capability in fs_parser
Date: Mon, 27 May 2024 17:08:13 +0200 [thread overview]
Message-ID: <20240527-armut-blechnapf-086b9166728e@brauner> (raw)
In-Reply-To: <20240527075854.1260981-1-lihongbo22@huawei.com>
On Mon, May 27, 2024 at 03:58:50PM +0800, Hongbo Li wrote:
> Mount options with path should be parsed into block device or inode. As
> the new mount API provides a serial of parsers, path should also be
> looked up into block device within these parsers, not in each specific
> filesystem.
The problem is that by moving those options into the VFS layer we're
dictating when and with what permissions paths are resolved.
Parsing of parameters via fsconfig(FSCONFIG_SET_*) and superblock
creation via fsconfig(FSCONFIG_CMD_CREAT) can happen in different
contexts.
It's entirely possible that the parameter is set by an unprivileged task
that cannot open the provided path while the task that actually creates
the superblock does have the permission to resolve the path.
It's also legitimate that a filesystem may want to explicitly delay all
path resolution until the superblock is created and not resolve the path
right when it's passed.
That wouldn't be possible anymore after your changes. So this is a more
subtle change than it seems and I'm not sure it's worth it.
prev parent reply other threads:[~2024-05-27 15:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-27 7:58 [PATCH v2 0/4] enhance the path resolution capability in fs_parser Hongbo Li
2024-05-27 7:58 ` [PATCH v2 1/4] fs: add blockdev parser for filesystem mount option Hongbo Li
2024-05-27 7:58 ` [PATCH v2 2/4] fs: add path " Hongbo Li
2024-05-27 14:32 ` Christian Brauner
2024-05-27 16:26 ` Christoph Hellwig
2024-05-27 7:58 ` [PATCH v2 3/4] fs: ext4: support relative path for `journal_path` in " Hongbo Li
2024-05-27 15:39 ` Christian Brauner
2024-05-27 7:58 ` [PATCH v2 4/4] fs: remove fs_lookup_param and its description Hongbo Li
2024-05-27 15:08 ` Christian Brauner [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=20240527-armut-blechnapf-086b9166728e@brauner \
--to=brauner@kernel.org \
--cc=adilger.kernel@dilger.ca \
--cc=cmaiolino@redhat.com \
--cc=jack@suse.cz \
--cc=lczerner@redhat.com \
--cc=lihongbo22@huawei.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
--cc=yi.zhang@huawei.com \
/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