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, 2 Oct 2014 16:34:55 -0400
From:	Eric Whitney <enwlinux@...il.com>
To:	fstests@...r.kernel.org
Cc:	linux-ext4@...r.kernel.org
Subject: [PATCH] generic/226: improve mkfs and mount error handling

If 226's attempt to make a scratch device fails, it can inadvertently
mount and run on a pre-existing scratch file system.  This can lead to
invalid test results unless the mkfs failure is separately noted in
226.full.

Noted while debugging an ext4 inline data test failure.  Small ext4 file
systems, as used by this test, use small inodes that are incompatible
with inline data.

Signed-off-by: Eric Whitney <enwlinux@...il.com>
---
 tests/generic/226 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/generic/226 b/tests/generic/226
index b98e889..44b60ff 100755
--- a/tests/generic/226
+++ b/tests/generic/226
@@ -43,8 +43,9 @@ rm -f $seqres.full
 
 umount $SCRATCH_DEV 2>/dev/null
 echo "--> mkfs 256m filesystem"
-_scratch_mkfs_sized `expr 256 \* 1024 \* 1024` >> $seqres.full 2>&1
-_scratch_mount
+_scratch_mkfs_sized `expr 256 \* 1024 \* 1024` >> $seqres.full 2>&1 \
+	|| _fail "mkfs failed"
+_scratch_mount >> $seqres.full 2>&1 || _fail "mount failed"
 
 loops=16
 
-- 
1.9.1

--
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