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]
Message-ID: <9A00B0AB-2A15-4374-95FB-AF72CE65E749@amazon.com>
Date:   Mon, 28 Mar 2022 18:59:04 +0000
From:   "Kiselev, Oleg" <okiselev@...zon.com>
To:     linux-ext4 <linux-ext4@...r.kernel.org>
Subject: Issues with resize of `-O bigalloc` filesystem

We are validating the use of `-O bigalloc` functionality and have run into problems with it. 
 
The first issue is an easy to replicate failure when resizing to an unaligned size. 
 
The replication scenario is:
==========
# use a device that is larger than the filesystem we are making
DEV=/dev/vgData/lvData
MNT=/rdsdata 
sudo mkdir ${MNT}
sudo mke2fs -t ext4 -j -O bigalloc -C 16k -L ${MNT} ${DEV} 128M
sudo mount ${DEV} ${MNT}
sudo resize2fs ${DEV} 148486k
=========== 
The target size is deliberately not aligned on a 16K boundary.
 
Here’s what dmesg shows:
[Mar26 04:46] EXT4-fs (dm-1): mounted filesystem with ordered data mode. Opts: (null)
[  +0.006196] ext4 filesystem being mounted at /rdsdata supports timestamps until 2038 (0x7fffffff)
[ +22.173913] EXT4-fs (dm-1): resizing filesystem from 131072 to 148486 blocks
[  +0.015422] ------------[ cut here ]------------
[  +0.003476] kernel BUG at fs/ext4/resize.c:1574!
[  +0.003469] invalid opcode: 0000 [#2] SMP PTI
[  +0.003472] CPU: 1 PID: 23183 Comm: resize2fs Tainted: G      D W         5.10.102-99.473.amzn2.x86_64 #1
[  +0.006824] Hardware name: Amazon EC2 r5b.2xlarge/, BIOS 1.0 10/16/2017
[  +0.004219] RIP: 0010:ext4_setup_next_flex_gd+0x265/0x290 [ext4]
[  +0.003980] Code: 48 8d 54 6d 00 8d 70 01 29 f8 48 c1 e2 04 83 c0 01 48 8d 54 13 d0 48 8b 1c 24 8b 4b 54 01 42 28 d3 e6 89 72 20 e9 6d ff ff ff <0f> 0b 31 ed e9 5e ff ff ff f6 c4 04 74 b1 48 83 ba e8 03 00 00 00
[  +0.011826] RSP: 0018:ffffb8e740213d38 EFLAGS: 00010206
[  +0.003659] RAX: 0000000000000001 RBX: ffff9e6ef22ab800 RCX: 0000000000000004
[  +0.005883] RDX: 0000000000004410 RSI: 0000000000024410 RDI: ffffb8e740213d60
[  +0.005880] RBP: 0000000000024406 R08: 0000000000000441 R09: 0000000000020000
[  +0.005834] R10: ffff9e7927de4f50 R11: 0000000000000042 R12: 0000000000000010
[  +0.005871] R13: 00000001029b05b2 R14: 0000000000000010 R15: ffff9e70f3d299a0
[  +0.005858] FS:  00007f47767c9740(0000) GS:ffff9e7ccdc40000(0000) knlGS:0000000000000000
[  +0.006220] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  +0.003841] CR2: 0000000001d150d8 CR3: 00000001c73d6002 CR4: 00000000007706e0
[  +0.005858] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  +0.005881] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  +0.005883] PKRU: 55555554
[  +0.002693] Call Trace:
[  +0.002611]  ? ext4_flex_group_add+0x29e/0x2d0 [ext4]
[  +0.003620]  ext4_resize_fs+0x416/0x770 [ext4]
[  +0.003400]  __ext4_ioctl+0x61d/0xc80 [ext4]
[  +0.003293]  ? __check_object_size.part.0+0x11f/0x140
[  +0.003599]  ? do_sys_openat2+0x82/0x150
[  +0.003193]  ? kmem_cache_free+0xff/0x410
[  +0.003201]  ext4_ioctl+0x2a/0x40 [ext4]
[  +0.003184]  __x64_sys_ioctl+0x83/0xb0
[  +0.003138]  do_syscall_64+0x33/0x40
[  +0.003035]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[  +0.003590] RIP: 0033:0x7f47760ce887
[  +0.093932] Code: 00 00 90 48 8b 05 f9 05 2c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d c9 05 2c 00 f7 d8 64 89 01 48
[  +0.012000] RSP: 002b:00007ffc8ccebc08 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[  +0.006076] RAX: ffffffffffffffda RBX: 0000000001d0f970 RCX: 00007f47760ce887
[  +0.005924] RDX: 00007ffc8ccebd30 RSI: 0000000040086610 RDI: 0000000000000004
[  +0.005953] RBP: 0000000000000004 R08: 0000000000000001 R09: 0000000000000000
[  +0.005944] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000001d119f0
[  +0.005908] R13: 00007ffc8ccebd30 R14: 0000000001d0e2c0 R15: 0000000000000000
[  +0.005939] Modules linked in: nls_utf8 hfsplus hfs vfat fat isofs cdrom ext2 ext4 crc16 mbcache jbd2 sunrpc dm_mirror dm_region_hash dm_log dm_mod dax crc32_pclmul ghash_clmulni_intel aesni_intel crypto_simd cryptd mousedev glue_helper psmouse button ena crc32c_intel
[  +0.015356] ---[ end trace d5dd608446b8b927 ]---
[  +0.003619] RIP: 0010:ext4_setup_next_flex_gd+0x265/0x290 [ext4]
[  +0.004047] Code: 48 8d 54 6d 00 8d 70 01 29 f8 48 c1 e2 04 83 c0 01 48 8d 54 13 d0 48 8b 1c 24 8b 4b 54 01 42 28 d3 e6 89 72 20 e9 6d ff ff ff <0f> 0b 31 ed e9 5e ff ff ff f6 c4 04 74 b1 48 83 ba e8 03 00 00 00
[  +0.011945] RSP: 0018:ffffb8e74051bd38 EFLAGS: 00010206
[  +0.003670] RAX: 0000000000000001 RBX: ffff9e76b2c75000 RCX: 0000000000000004
[  +0.005951] RDX: 0000000000004410 RSI: 0000000000024410 RDI: ffffb8e74051bd60
[  +0.005924] RBP: 0000000000024406 R08: 0000000000000441 R09: 0000000000020000
[  +0.005942] R10: ffff9e7927de4f50 R11: 0000000000000042 R12: 0000000000000010
[  +0.005908] R13: 0000000102893d71 R14: 0000000000000010 R15: ffff9e70f3d292c0
[  +0.005914] FS:  00007f47767c9740(0000) GS:ffff9e7ccdc40000(0000) knlGS:0000000000000000
[  +0.006298] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  +0.003883] CR2: 0000000001d150d8 CR3: 00000001c73d6002 CR4: 00000000007706e0
[  +0.005906] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  +0.006068] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  +0.005914] PKRU: 55555554
 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ