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:   Tue, 26 Jun 2018 10:57:59 +0300
From:   Artem Blagodarenko <artem.blagodarenko@...il.com>
To:     linux-ext4@...r.kernel.org
Cc:     adilger.kernel@...ger.ca, alexey.lyashkov@...il.com,
        Andreas Dilger <andreas.dilger@...el.com>
Subject: [PATCH v2] tests: PAGE_SIZE larger than blocksize with hole

From: Andreas Dilger <andreas.dilger@...el.com>

Verify correct operation in the case of writing files with allocated
blocks at the end of the file beyond i_size.  This can happen for
PAGE_SIZE > blocksize, or through fallocate().

The f_eofblocks thest checks quite the same situation, but for broken
file system. This test is about correct file.

Signed-off-by: Andreas Dilger <andreas.dilger@...el.com>
Signed-off-by: Artem Blagodarenko <artem.blagodarenko@...il.com>
---
 tests/f_pgsize_gt_blksize/expect.1 |  7 +++++++
 tests/f_pgsize_gt_blksize/expect.2 |  7 +++++++
 tests/f_pgsize_gt_blksize/name     |  1 +
 tests/f_pgsize_gt_blksize/script   | 18 ++++++++++++++++++
 4 files changed, 33 insertions(+)
 create mode 100644 tests/f_pgsize_gt_blksize/expect.1
 create mode 100644 tests/f_pgsize_gt_blksize/expect.2
 create mode 100644 tests/f_pgsize_gt_blksize/name
 create mode 100644 tests/f_pgsize_gt_blksize/script

diff --git a/tests/f_pgsize_gt_blksize/expect.1 b/tests/f_pgsize_gt_blksize/expect.1
new file mode 100644
index 00000000..c00f5db5
--- /dev/null
+++ b/tests/f_pgsize_gt_blksize/expect.1
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/32 files (0.0% non-contiguous), 40/100 blocks
+Exit status is 0
diff --git a/tests/f_pgsize_gt_blksize/expect.2 b/tests/f_pgsize_gt_blksize/expect.2
new file mode 100644
index 00000000..c00f5db5
--- /dev/null
+++ b/tests/f_pgsize_gt_blksize/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/32 files (0.0% non-contiguous), 40/100 blocks
+Exit status is 0
diff --git a/tests/f_pgsize_gt_blksize/name b/tests/f_pgsize_gt_blksize/name
new file mode 100644
index 00000000..3aa02027
--- /dev/null
+++ b/tests/f_pgsize_gt_blksize/name
@@ -0,0 +1 @@
+PAGE_SIZE larger than blocksize with hole at end
diff --git a/tests/f_pgsize_gt_blksize/script b/tests/f_pgsize_gt_blksize/script
new file mode 100644
index 00000000..34caa672
--- /dev/null
+++ b/tests/f_pgsize_gt_blksize/script
@@ -0,0 +1,18 @@
+SKIP_GUNZIP="true"
+
+touch $TMPFILE
+$MKE2FS -N 32 -F -o Linux -b 1024 $TMPFILE 100 > /dev/null 2>&1 
+
+DATA_FILE=$(mktemp ${TMPDIR:-/tmp}/e2fsprogs-zerodata.XXXXXX)
+dd if=$TEST_BITS of=$DATA_FILE bs=1k count=16 > /dev/null 2>&1
+$DEBUGFS -w $TMPFILE << EOF > /dev/null 2>&1
+write $DATA_FILE foo
+set_inode_field foo size 13000
+q
+EOF
+
+. $cmd_dir/run_e2fsck
+
+rm -f $DATA_FILE
+
+unset DATA_FILE
-- 
2.14.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ