From: Disha Goel <disgoel@linux.ibm.com>
To: fstests@vger.kernel.org
Cc: ojaswin@linux.ibm.com, Disha Goel <disgoel@linux.ibm.com>
Subject: [PATCH] generic/735: improve test by incorporating extra hints
Date: Tue, 19 Mar 2024 16:46:13 +0530 [thread overview]
Message-ID: <20240319111613.11029-1-disgoel@linux.ibm.com> (raw)
On power systems with 64k block size (where default page size is 64k) we
encountered a kernel oops due to an integer overflow issue when writing
near the last logical block of a file. The allocator could allocate a
range where the end exceeds the maximum supported logical block
(UINT32_MAX), leading to a subsequent BUG_ON. This issue has been
addressed in the upstream kernel with commit 2dcf5fde6dff
("ext4: prevent the normalized size from exceeding EXT_MAX_BLOCKS").
==================================================
kernel BUG at fs/ext4/mballoc.c:4448!
Oops: Exception in kernel mode, sig: 5 [#1]
CPU: 8 PID: 2880554 Comm: xfs_io
NIP ext4_mb_use_inode_pa+0x110/0x160 [ext4]
LR ext4_mb_use_inode_pa+0xac/0x160 [ext4]
Call Trace:
ext4_mb_new_inode_pa+0x134/0x3a0 [ext4]
ext4_mb_try_best_found+0x158/0x280 [ext4]
ext4_mb_regular_allocator+0x16c/0x940 [ext4]
ext4_mb_new_blocks+0x610/0x960 [ext4]
ext4_ext_map_blocks+0x858/0xa90 [ext4]
ext4_map_blocks+0x218/0x800 [ext4]
ext4_iomap_alloc+0x10c/0x260 [ext4]
ext4_iomap_begin+0xfc/0x1f0 [ext4]
iomap_iter+0xf0/0x190
__iomap_dio_rw+0x208/0x690
iomap_dio_rw+0x20/0x80
ext4_dio_write_iter+0x210/0x4d0 [ext4]
vfs_write+0x364/0x4e0
sys_pwrite64+0xd4/0x120
system_call_exception+0x164/0x310
system_call_vectored_common+0xe8/0x278
==================================================
This test has been extended to provide a hint about the relevant fix
in case of failure.
Signed-off-by: Disha Goel <disgoel@linux.ibm.com>
---
tests/generic/735 | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/tests/generic/735 b/tests/generic/735
index 75b23d5e..0ba111a6 100755
--- a/tests/generic/735
+++ b/tests/generic/735
@@ -6,16 +6,19 @@
#
# Append writes to a file with logical block numbers close to 0xffffffff
# and observe if a kernel crash is caused by ext4_lblk_t overflow triggering
-# BUG_ON at ext4_mb_new_inode_pa(). This is a regression test for commit
-# bc056e7163ac ("ext4: fix BUG in ext4_mb_new_inode_pa() due to overflow")
-#
+# BUG_ON at ext4_mb_new_inode_pa(). This is a regression test for
+# commit bc056e7163ac ("ext4: fix BUG in ext4_mb_new_inode_pa() due to overflow")
+# commit 2dcf5fde6dff ("ext4: prevent the normalized size from exceeding EXT_MAX_BLOCKS")
+
. ./common/preamble
. ./common/populate
_begin_fstest auto quick insert prealloc
# real QA test starts here
-[[ "$FSTYP" =~ ext[0-9]+ ]] && _fixed_by_kernel_commit bc056e7163ac \
- "ext4: fix BUG in ext4_mb_new_inode_pa() due to overflow"
+if [[ "$FSTYP" =~ ext[0-9]+ ]]; then
+ _fixed_by_kernel_commit bc056e7163ac "ext4: fix BUG in ext4_mb_new_inode_pa() due to overflow"
+ _fixed_by_kernel_commit 2dcf5fde6dff "ext4: prevent the normalized size from exceeding EXT_MAX_BLOCKS"
+fi
_require_odirect
_require_xfs_io_command "falloc"
--
2.39.1
next reply other threads:[~2024-03-19 11:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-19 11:16 Disha Goel [this message]
2024-03-29 5:52 ` [PATCH] generic/735: improve test by incorporating extra hints Disha Goel
2024-03-30 6:54 ` Zorro Lang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240319111613.11029-1-disgoel@linux.ibm.com \
--to=disgoel@linux.ibm.com \
--cc=fstests@vger.kernel.org \
--cc=ojaswin@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).