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>] [day] [month] [year] [list]
Date:	Thu, 12 May 2016 18:22:50 +0200
From:	Marcus Huewe <suse-tux@....de>
To:	tytso@....edu
Cc:	linux-ext4@...r.kernel.org
Subject: [PATCH 2/2] mke2fs: fix filesystem size calculation, if an offset is
 specified

If a filesystem size is explicitly specified, it should be used without
subtracting the offset.

Signed-off-by: Marcus Huewe <suse-tux@....de>
---
 misc/mke2fs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index dd5bb35..e0a98e7 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -1874,6 +1874,8 @@ profile_error:
 		flags |= VERBOSE_CREATE;
 	if (fs_blocks_count == 0)
 		flags |= NO_SIZE;
+	else
+		explicit_fssize = 1;
 	if (!check_plausibility(device_name, flags, &is_device) && !force)
 		proceed_question(proceed_delay);
 
@@ -1881,7 +1883,6 @@ profile_error:
 
 	/* Determine the size of the device (if possible) */
 	if (noaction && fs_blocks_count) {
-		explicit_fssize = 1;
 		dev_size = fs_blocks_count;
 		retval = 0;
 	} else
-- 
2.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ