From: Al Viro <viro@zeniv.linux.org.uk>
To: Luis Chamberlain <mcgrof@kernel.org>
Cc: linux-fsdevel@vger.kernel.org, p.raghav@samsung.com,
hch@infradead.org, john.johansen@canonical.com,
dhowells@redhat.com
Subject: Re: [RFC 1/3] apparmor: use SB_* flags for private sb flags
Date: Tue, 10 Jan 2023 23:40:05 +0000 [thread overview]
Message-ID: <Y733Vaq6Nnb9nvDK@ZenIV> (raw)
In-Reply-To: <20230110022554.1186499-2-mcgrof@kernel.org>
On Mon, Jan 09, 2023 at 06:25:52PM -0800, Luis Chamberlain wrote:
> Commit 2ea3ffb7782 ("apparmor: add mount mediation") John Johansen
> added mount mediation support. However just the day before this commit
> David Howells modified the internal sb flags through commit e462ec50cb5
> ("VFS: Differentiate mount flags (MS_*) from internal superblock flags").
>
> Use the modified sb flags to make things clear and avoid further uses
> of the old MS_* flags for superblock internal flags. This will let us
> later remove the MS_* sb internal flags as userspace should not be
> using them.
>
> This commit does not fix anything as the old flags used map to the
> same bitmask, this just tidies things up. I split up the flags to
> make it clearer which ones are for the superblock and used internally.
I don't think that's right. apparmor_sb_mount() gets (almost) raw flags
from mount(2); incidentally, MS_MGC_MSK removal directly above the modified
line is BS since _that_ has already been done by the caller.
Note that the same function explicitly checks for MS_MOVE, etc. in the
same argument.
> @@ -74,7 +74,7 @@ static void audit_mnt_flags(struct audit_buffer *ab, unsigned long flags)
> audit_log_format(ab, ", iversion");
> if (flags & MS_STRICTATIME)
> audit_log_format(ab, ", strictatime");
> - if (flags & MS_NOUSER)
> + if (flags & SB_NOUSER)
> audit_log_format(ab, ", nouser");
> }
Umm... How does one trigger that one?
next prev parent reply other threads:[~2023-01-10 23:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-10 2:25 [RFC 0/3] fs: kill old ms_* flags for internal sb Luis Chamberlain
2023-01-10 2:25 ` [RFC 1/3] apparmor: use SB_* flags for private sb flags Luis Chamberlain
2023-01-10 23:40 ` Al Viro [this message]
2023-01-10 2:25 ` [RFC 2/3] fs: use SB_NOUSER on path_mount() instead of deprecated MS_NOUSER Luis Chamberlain
2023-01-10 23:43 ` Al Viro
2023-01-10 2:25 ` [RFC 3/3] fs: remove old MS_* internal flags for the superblock Luis Chamberlain
2023-01-10 23:54 ` Al Viro
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=Y733Vaq6Nnb9nvDK@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=dhowells@redhat.com \
--cc=hch@infradead.org \
--cc=john.johansen@canonical.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=p.raghav@samsung.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 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.