From: Matthew Garrett <mjg59@google.com>
To: linux-fsdevel@vger.kernel.org
Cc: Matthew Garrett <mjg59@google.com>,
David Howells <dhowells@redhat.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
stable@vger.kernel.org
Subject: [PATCH] Fix mounting with MS_I_VERSION
Date: Tue, 17 Oct 2017 19:43:42 -0700 [thread overview]
Message-ID: <20171018024342.4328-1-mjg59@google.com> (raw)
commit e462ec50cb5fa ("VFS: Differentiate mount flags (MS_*) from
internal superblock flags") reworked the flags that are passed through
do mount, and in the process dropped MS_I_VERSION. Confusingly, things
continue working if the i_version mount option is used because that's
directly passed to ext4 which interprets it, while iversion is turned
into MS_I_VERSION and dropped on the floor. This breaks IMA and EVM and
my heart.
Signed-off-by: Matthew Garrett <mjg59@google.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: stable@vger.kernel.org
---
fs/namespace.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/namespace.c b/fs/namespace.c
index 3b601f115b6c..d18deb4c410b 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -2825,7 +2825,8 @@ long do_mount(const char *dev_name, const char __user *dir_name,
SB_MANDLOCK |
SB_DIRSYNC |
SB_SILENT |
- SB_POSIXACL);
+ SB_POSIXACL |
+ SB_I_VERSION);
if (flags & MS_REMOUNT)
retval = do_remount(&path, flags, sb_flags, mnt_flags,
--
2.15.0.rc1.287.g2b38de12cc-goog
next reply other threads:[~2017-10-18 2:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-18 2:43 Matthew Garrett [this message]
2017-10-18 2:51 ` [PATCH] Fix mounting with MS_I_VERSION Matthew Garrett
2017-10-18 20:42 ` David Howells
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=20171018024342.4328-1-mjg59@google.com \
--to=mjg59@google.com \
--cc=dhowells@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=stable@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox