From: "Eric W. Biederman" <ebiederm@xmission.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org,
Christian Brauner <brauner@kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [RFC] separate the internal mount flags from the rest
Date: Sat, 07 Jun 2025 06:48:40 -0500 [thread overview]
Message-ID: <87sekbg4br.fsf@email.froward.int.ebiederm.org> (raw)
In-Reply-To: <20250603204704.GB299672@ZenIV> (Al Viro's message of "Tue, 3 Jun 2025 21:47:04 +0100")
Al Viro <viro@zeniv.linux.org.uk> writes:
> Currently we use ->mnt_flags for all kinds of things, including
> the ones only fs/{namespace,pnode}.c care about.
>
> That wouldn't be a problem if not for the locking. ->mnt_flags is
> protected by mount_lock. All writers MUST grab that. Having lockless
> readers is unsurprising - after all, for something like noexec we want
> the current state of mount, whatever it happens to be. If userland
> remounts something noexec and that races with execve(2), there's nothing
> to be done - it is a race, but not the kernel one.
In general I don't have a problem.
I see one possible complication I haven't seen mentioned.
Which mnt_flags get exposed to userspace?
I know it was the expectation that MNT_LOCKED would be visible to
userspace, as it's effects are visible to userspace (it isn't just some
accounting thing).
I may just be objecting to the name of the macro MNT_INTERNAL_FLAGS,
and the making of the decision about flags based on the
internal/external state.
Your patch to change make MNT_LOCKED an internal flag in combination
with this proposed change make me wonder about our classification
of flags as internal/external and how much that matters.
Eric
prev parent reply other threads:[~2025-06-07 12:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-03 20:47 [RFC] separate the internal mount flags from the rest Al Viro
2025-06-03 23:17 ` Linus Torvalds
2025-06-04 7:36 ` Christian Brauner
2025-06-07 11:48 ` Eric W. Biederman [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=87sekbg4br.fsf@email.froward.int.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=brauner@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.