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-next>] [day] [month] [year] [list]
Message-ID: <493F7852.2040201@gmail.com>
Date:	Wed, 10 Dec 2008 16:05:38 +0800
From:	Peng Tao <bergwolf@...il.com>
To:	ext4 development <linux-ext4@...r.kernel.org>
Subject: [PATCH 3/3][e2fsprogs] tune2fs: Don't allow tune2fs -I if flex_bg
 on


    add force flag to tune2fs -I, because it may cause data corruption
when the
    last inode table block is followed by a in-use data block. If user
really want to
    tune the inode size, they should be warned about this.

    Signed-off-by: Peng Tao <bergwolf@...il.com>

diff --git a/misc/tune2fs.c b/misc/tune2fs.c
index 453a529..1227802 100644
--- a/misc/tune2fs.c
+++ b/misc/tune2fs.c
@@ -107,7 +107,7 @@ static void usage(void)
 		  "[-L volume_label]\n"
 		  "\t[-M last_mounted_dir] [-O [^]feature[,...]]\n"
 		  "\t[-E extended-option[,...]] [-T last_check_time] "
-		  "[-U UUID]\n\t[ -I new_inode_size ] device\n"), program_name);
+		  "[-U UUID]\n\t[ -I new_inode_size ] [-f] device\n"), program_name);
 	exit (1);
 }

@@ -1598,6 +1598,13 @@ retry_open:
 		ext2fs_mark_super_dirty(fs);
 	}
 	if (I_flag) {
+		if (!f_flag) {
+			fputs(_("Enlarging inode size may cause data "
+				"corruption.\nUse with -f at your warranty. "
+				"Abort.\n"), stderr);
+			exit(1);
+		}
+
 		if (mount_flags & EXT2_MF_MOUNTED) {
 			fputs(_("The inode size may only be "
 				"changed when the filesystem is "


Download attachment "signature.asc" of type "application/pgp-signature" (261 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ