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  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1cd4af3c4ebf5c6253f52834041697f5a7657153.1520480776.git.tgnottingham@gmail.com>
Date:   Wed,  7 Mar 2018 21:53:37 -0800
From:   Tyson Nottingham <tgnottingham@...il.com>
To:     linux-ext4@...r.kernel.org
Cc:     tytso@....edu, adilger.kernel@...ger.ca,
        Tyson Nottingham <tgnottingham@...il.com>
Subject: [PATCH 2/3] ext4: omit init_itable=n in procfs when disabled

Don't show init_itable=n in /proc/fs/ext4/<dev>/options when filesystem
is mounted with noinit_itable.

Signed-off-by: Tyson Nottingham <tgnottingham@...il.com>
---

Before:

$ sudo mount -o loop=$(losetup -f) image.ext4 mnt
$ mount | grep image
/home/tgnottingham/image.ext4 on /home/tgnottingham/mnt type ext4 (rw,relatime,data=ordered)
$ grep init /proc/fs/ext4/loop0/options
init_itable=10

$ sudo mount -o loop=$(losetup -f),noinit_itable image.ext4 mnt
$ mount | grep image
/home/tgnottingham/image.ext4 on /home/tgnottingham/mnt type ext4 (rw,relatime,noinit_itable,data=ordered)
$ grep init /proc/fs/ext4/loop0/options
noinit_itable
init_itable=10

^ Superfluous init_itable=10.


After:

$ sudo mount -o loop=$(losetup -f) image.ext4 mnt
$ mount -l | grep image
/home/tgnottingham/image.ext4 on /home/tgnottingham/mnt type ext4 (rw,relatime,data=ordered)
$ grep init /proc/fs/ext4/loop0/options
init_itable=10

$ sudo mount -o loop=$(losetup -f),noinit_itable image.ext4 mnt
$ mount -l | grep image
/home/tgnottingham/image.ext4 on /home/tgnottingham/mnt type ext4 (rw,relatime,noinit_itable,data=ordered)
$ grep init /proc/fs/ext4/loop0/options
noinit_itable

---
 fs/ext4/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 6b07fa2..7437ed0 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2081,7 +2081,7 @@ static int _ext4_show_options(struct seq_file *seq, struct super_block *sb,
 		SEQ_OPTS_PRINT("inode_readahead_blks=%u",
 			       sbi->s_inode_readahead_blks);
 
-	if (nodefs || (test_opt(sb, INIT_INODE_TABLE) &&
+	if (test_opt(sb, INIT_INODE_TABLE) && (nodefs ||
 		       (sbi->s_li_wait_mult != EXT4_DEF_LI_WAIT_MULT)))
 		SEQ_OPTS_PRINT("init_itable=%u", sbi->s_li_wait_mult);
 	if (nodefs || sbi->s_max_dir_size_kb)
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ