ci2 starts bisection 2022-12-13 21:18:24.338397436 +0000 UTC m=+11200.133812052 bisecting cause commit starting from 764822972d64e7f3e6792278ecc7a3b3c81087cd building syzkaller on 67be1ae742603edad9c97d30b6ed69f9bbe2ffa8 ensuring issue is reproducible on original commit 764822972d64e7f3e6792278ecc7a3b3c81087cd testing commit 764822972d64e7f3e6792278ecc7a3b3c81087cd gcc compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 301b13495cb4643d0105636a0cf1ae6c2478ec8963f169ab8e33dc7904a5b365 all runs: crashed: WARNING in udf_setsize testing release v6.1 testing commit 830b3c68c1fb1e9176028d02ef86f3cf76aa2476 gcc compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: c875f76d6d4bd4d1175126d401d958990be7d061eb50ac34209f0fd444b65635 all runs: OK # git bisect start 764822972d64e7f3e6792278ecc7a3b3c81087cd 830b3c68c1fb1e9176028d02ef86f3cf76aa2476 Bisecting: 1556 revisions left to test after this (roughly 11 steps) [01f3cbb296a9ad378167c01758c99557b5bc3208] Merge tag 'soc-dt-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc testing commit 01f3cbb296a9ad378167c01758c99557b5bc3208 gcc compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: fa86a79c6962f3b76e4f96c2e0af6f2989b0897607cece3bb362724d2779550d all runs: OK # git bisect good 01f3cbb296a9ad378167c01758c99557b5bc3208 Bisecting: 764 revisions left to test after this (roughly 10 steps) [e2ed78d5d9ca07a2b9d158ebac366170a2d3083d] Merge tag 'linux-kselftest-kunit-next-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest testing commit e2ed78d5d9ca07a2b9d158ebac366170a2d3083d gcc compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 0ea2ea86782f73b54110c570db098bcd9aec3a700f236de39a5be78c8bd4211e all runs: OK # git bisect good e2ed78d5d9ca07a2b9d158ebac366170a2d3083d Bisecting: 376 revisions left to test after this (roughly 9 steps) [6df7cc2268745e91d090830c58689aa7fcbde6f9] Merge tag 'ovl-update-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs testing commit 6df7cc2268745e91d090830c58689aa7fcbde6f9 gcc compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 317343049761bd651feaf7db6a0dbe2d91a0a9ea74c5567324f8e081f558b8ae all runs: OK # git bisect good 6df7cc2268745e91d090830c58689aa7fcbde6f9 Bisecting: 188 revisions left to test after this (roughly 8 steps) [3c4f91e23a87a486426db5e481ed315b1b2640f1] btrfs: pass btrfs_inode to btrfs_delete_subvolume testing commit 3c4f91e23a87a486426db5e481ed315b1b2640f1 gcc compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: a48059b8542a71c2c132f4fde3c37478d5e11c0a55b53bff79b4b1998baa1348 all runs: OK # git bisect good 3c4f91e23a87a486426db5e481ed315b1b2640f1 Bisecting: 111 revisions left to test after this (roughly 7 steps) [97971df811b8854882c0f6c6631e23ab8cdcc44f] Merge tag 'dlm-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm testing commit 97971df811b8854882c0f6c6631e23ab8cdcc44f gcc compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 109bff6e3c95189ca87e8d415d5a26409aaefa35db08bb9cae62fff604c66a0b all runs: crashed: WARNING in udf_setsize # git bisect bad 97971df811b8854882c0f6c6631e23ab8cdcc44f Bisecting: 37 revisions left to test after this (roughly 5 steps) [56c003e4db4adb1d57e599fb4c7d39f9130f9db1] Merge tag 'jfs-6.2' of https://github.com/kleikamp/linux-shaggy testing commit 56c003e4db4adb1d57e599fb4c7d39f9130f9db1 gcc compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 59c57af5004f4cd95d33c17ff193ba9c9543ab7a14b34780309831defd379cfe all runs: crashed: WARNING in udf_setsize # git bisect bad 56c003e4db4adb1d57e599fb4c7d39f9130f9db1 Bisecting: 24 revisions left to test after this (roughly 4 steps) [1f3868f06855c97a4954c99b36f3fc9eb8f60326] udf: Fix extending file within last block testing commit 1f3868f06855c97a4954c99b36f3fc9eb8f60326 gcc compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 38b1b74f94abf4ae2516a49d159d7f80f2d1a47015028b0295827b2110f2a0bd all runs: crashed: WARNING in udf_setsize # git bisect bad 1f3868f06855c97a4954c99b36f3fc9eb8f60326 Bisecting: 6 revisions left to test after this (roughly 3 steps) [36273e5b4e3a934c6d346c8f0b16b97e018094af] udf: remove ->writepage testing commit 36273e5b4e3a934c6d346c8f0b16b97e018094af gcc compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 631604e623c8a2d8e348956342363392de66bd97af3e12ed9755c97ea6ea4c73 all runs: OK # git bisect good 36273e5b4e3a934c6d346c8f0b16b97e018094af Bisecting: 3 revisions left to test after this (roughly 2 steps) [7868f93006ad27c00ecddcc2904118aa705459ca] udf: Increase UDF_MAX_READ_VERSION to 0x0260 testing commit 7868f93006ad27c00ecddcc2904118aa705459ca gcc compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: fe56b4deb5a8da8e4c6fdb2a45a5c317cd1a5fdbd8b0e627c33912d78e4d904e all runs: OK # git bisect good 7868f93006ad27c00ecddcc2904118aa705459ca Bisecting: 1 revision left to test after this (roughly 1 step) [6ad53f0f71c52871202a7bf096feb2c59db33fc5] udf: Do not bother looking for prealloc extents if i_lenExtents matches i_size testing commit 6ad53f0f71c52871202a7bf096feb2c59db33fc5 gcc compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 701a52a2655f35e10fa32fbac7ff6365bb87219a572f26932e2cd14ca6ded4ac all runs: OK # git bisect good 6ad53f0f71c52871202a7bf096feb2c59db33fc5 Bisecting: 0 revisions left to test after this (roughly 0 steps) [16d0556568148bdcaa45d077cac9f8f7077cf70a] udf: Discard preallocation before extending file with a hole testing commit 16d0556568148bdcaa45d077cac9f8f7077cf70a gcc compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 7ac85ae5e26810c1614a326b4796286a249166eb3a20593e2d768fa0ca3e8be3 all runs: crashed: WARNING in udf_setsize # git bisect bad 16d0556568148bdcaa45d077cac9f8f7077cf70a 16d0556568148bdcaa45d077cac9f8f7077cf70a is the first bad commit commit 16d0556568148bdcaa45d077cac9f8f7077cf70a Author: Jan Kara Date: Wed Dec 7 18:17:34 2022 +0100 udf: Discard preallocation before extending file with a hole When extending file with a hole, we tried to preserve existing preallocation for the file. However that is not very useful and complicates code because the previous extent may need to be rounded to block boundary as well (which we forgot to do thus causing data corruption for sequence like: xfs_io -f -c "pwrite 0x75e63 11008" -c "truncate 0x7b24b" \ -c "truncate 0xabaa3" -c "pwrite 0xac70b 22954" \ -c "pwrite 0x93a43 11358" -c "pwrite 0xb8e65 52211" file with 512-byte block size. Just discard preallocation before extending file to simplify things and also fix this data corruption. CC: stable@vger.kernel.org Signed-off-by: Jan Kara fs/udf/inode.c | 46 ++++++++++++++++++---------------------------- 1 file changed, 18 insertions(+), 28 deletions(-) culprit signature: 7ac85ae5e26810c1614a326b4796286a249166eb3a20593e2d768fa0ca3e8be3 parent signature: 701a52a2655f35e10fa32fbac7ff6365bb87219a572f26932e2cd14ca6ded4ac revisions tested: 13, total time: 4h41m35.482959958s (build: 3h11m25.41989172s, test: 1h28m31.922213888s) first bad commit: 16d0556568148bdcaa45d077cac9f8f7077cf70a udf: Discard preallocation before extending file with a hole recipients (to): ["jack@suse.com" "jack@suse.cz" "linux-kernel@vger.kernel.org"] recipients (cc): ["akpm@linux-foundation.org"] crash: WARNING in udf_setsize loop0: detected capacity change from 0 to 2048 UDF-fs: error (device loop0): udf_process_sequence: Primary Volume Descriptor not found! UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2022/11/22 14:59 (1000) ------------[ cut here ]------------ WARNING: CPU: 0 PID: 4162 at fs/udf/inode.c:635 udf_setsize+0xd00/0x12b0 Modules linked in: CPU: 0 PID: 4162 Comm: syz-executor.0 Not tainted 6.1.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 RIP: 0010:udf_extend_file fs/udf/inode.c:634 [inline] RIP: 0010:udf_setsize+0xd00/0x12b0 fs/udf/inode.c:1234 Code: 05 00 00 89 d8 48 8d 65 d8 5b 41 5c 41 5d 41 5e 41 5f 5d c3 89 c3 48 b9 00 00 00 00 00 fc ff df 4c 8b 64 24 20 e9 17 fe ff ff <0f> 0b e9 9e f9 ff ff 44 89 c1 80 e1 07 38 c1 0f 8c ab f3 ff ff 4c RSP: 0018:ffffc9000498fb00 EFLAGS: 00010287 RAX: ffff88807379888a RBX: 0000000000000800 RCX: 0000000000000009 RDX: dffffc0000000000 RSI: 0000000000000004 RDI: 0000000000000001 RBP: ffffc9000498fcd0 R08: dffffc0000000000 R09: ffffed100e6f30f1 R10: ffffed100e6f30f1 R11: 1ffff1100e6f30f0 R12: 0000000000000009 R13: 1ffff1100e6f3111 R14: 0000000000001000 R15: 1ffff92000931f70 FS: 00007f6e560cf700(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020002140 CR3: 000000001c4f6000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: udf_setattr+0x2ac/0x440 fs/udf/file.c:281 notify_change+0x91c/0xbe0 fs/attr.c:420 do_truncate+0x1a3/0x2b0 fs/open.c:65 do_sys_ftruncate+0x230/0x2f0 fs/open.c:193 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f6e5528c0d9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f6e560cf168 EFLAGS: 00000246 ORIG_RAX: 000000000000004d RAX: ffffffffffffffda RBX: 00007f6e553abf80 RCX: 00007f6e5528c0d9 RDX: 0000000000000000 RSI: 00000000000007fb RDI: 0000000000000004 RBP: 00007f6e552e7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc5d4abb6f R14: 00007f6e560cf300 R15: 0000000000022000