lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 16 Jun 2020 16:21:23 -0400
From:   Masayoshi Mizuma <msys.mizuma@...il.com>
To:     "Theodore Ts'o" <tytso@....edu>,
        Andreas Dilger <adilger.kernel@...ger.ca>,
        Alexander Viro <viro@...iv.linux.org.uk>
Cc:     Masayoshi Mizuma <msys.mizuma@...il.com>,
        Masayoshi Mizuma <m.mizuma@...fujitsu.com>,
        linux-ext4@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: [PATCH] fs: i_version mntopt gets visible through /proc/mounts

From: Masayoshi Mizuma <m.mizuma@...fujitsu.com>

/proc/mounts doesn't show 'i_version' even if iversion
mount option is set to XFS.

iversion mount option is a VFS option, not ext4 specific option.
Move the handler to show_sb_opts() so that /proc/mounts can show
'i_version' on not only ext4 but also the other filesystem.

Signed-off-by: Masayoshi Mizuma <m.mizuma@...fujitsu.com>
---
 fs/ext4/super.c     | 2 --
 fs/proc_namespace.c | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index a29e8ea1a7ab..879289de1818 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2325,8 +2325,6 @@ static int _ext4_show_options(struct seq_file *seq, struct super_block *sb,
 		SEQ_OPTS_PRINT("min_batch_time=%u", sbi->s_min_batch_time);
 	if (nodefs || sbi->s_max_batch_time != EXT4_DEF_MAX_BATCH_TIME)
 		SEQ_OPTS_PRINT("max_batch_time=%u", sbi->s_max_batch_time);
-	if (sb->s_flags & SB_I_VERSION)
-		SEQ_OPTS_PUTS("i_version");
 	if (nodefs || sbi->s_stripe)
 		SEQ_OPTS_PRINT("stripe=%lu", sbi->s_stripe);
 	if (nodefs || EXT4_MOUNT_DATA_FLAGS &
diff --git a/fs/proc_namespace.c b/fs/proc_namespace.c
index 3059a9394c2d..848c4afaef05 100644
--- a/fs/proc_namespace.c
+++ b/fs/proc_namespace.c
@@ -49,6 +49,7 @@ static int show_sb_opts(struct seq_file *m, struct super_block *sb)
 		{ SB_DIRSYNC, ",dirsync" },
 		{ SB_MANDLOCK, ",mand" },
 		{ SB_LAZYTIME, ",lazytime" },
+		{ SB_I_VERSION, ",i_version" },
 		{ 0, NULL }
 	};
 	const struct proc_fs_opts *fs_infop;
-- 
2.18.4

Powered by blists - more mailing lists