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>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160126014930.GA515@swordfish>
Date:	Tue, 26 Jan 2016 10:49:30 +0900
From:	Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To:	linux-block@...r.kernel.org
Cc:	Minchan Kim <minchan@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Theodore Ts'o <tytso@....edu>, linux-kernel@...r.kernel.org,
	Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
	Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Subject: [4.5.0-rc1/-next] unaligned bio-s

Hello,

With 4.5.0-rc1/linux-next I see unaligned requests passed to zram block
device.

bio->bi_iter.bi_size is expected to be ZRAM_LOGICAL_BLOCK_SIZE (1 << 12) aligned.

un-aligned example:
:: SIZE 130560                      size & (ZRAM_LOGICAL_BLOCK_SIZE - 1)

[ 5695.340294] Call Trace:
[ 5695.340298]  [<ffffffff8123c879>] dump_stack+0x4e/0x79
[ 5695.340302]  [<ffffffff81042b9e>] warn_slowpath_common+0x99/0xb2
[ 5695.340305]  [<ffffffffa0232ba8>] ? zram_make_request+0x155/0x494 [zram]
[ 5695.340307]  [<ffffffff81042c6a>] warn_slowpath_null+0x1a/0x1c
[ 5695.340310]  [<ffffffffa0232ba8>] zram_make_request+0x155/0x494 [zram]
[ 5695.340314]  [<ffffffff812242db>] generic_make_request+0xbd/0x15b
[ 5695.340316]  [<ffffffff8122446e>] submit_bio+0xf5/0x11e
[ 5695.340319]  [<ffffffff810fdaa1>] ? __test_set_page_writeback+0x192/0x1aa
[ 5695.340323]  [<ffffffff811b6ecb>] ext4_io_submit+0x3e/0x52
[ 5695.340325]  [<ffffffff811b70c6>] ext4_bio_write_page+0x1c9/0x2f3
[ 5695.340328]  [<ffffffff811aea05>] mpage_submit_page+0x5f/0x75
[ 5695.340330]  [<ffffffff811aee9a>] mpage_map_and_submit_buffers+0x10f/0x21d
[ 5695.340333]  [<ffffffff811b341e>] ext4_writepages+0xc96/0xe31
[ 5695.340336]  [<ffffffff810ffe85>] do_writepages+0x23/0x2c
[ 5695.340337]  [<ffffffff810ffe85>] ? do_writepages+0x23/0x2c
[ 5695.340339]  [<ffffffff81169c6c>] __writeback_single_inode+0xe2/0x656
[ 5695.340342]  [<ffffffff8116a63c>] writeback_sb_inodes+0x288/0x45e
[ 5695.340344]  [<ffffffff8116a888>] __writeback_inodes_wb+0x76/0xae
[ 5695.340346]  [<ffffffff8116ab15>] wb_writeback+0x1aa/0x496
[ 5695.340349]  [<ffffffff8116b63c>] wb_workfn+0x259/0x56a
[ 5695.340351]  [<ffffffff8116b63c>] ? wb_workfn+0x259/0x56a
[ 5695.340353]  [<ffffffff810843cf>] ? lock_acquire+0x10d/0x1a8
[ 5695.340357]  [<ffffffff81058ce1>] process_one_work+0x29e/0x58b
[ 5695.340359]  [<ffffffff81059e51>] worker_thread+0x291/0x383
[ 5695.340361]  [<ffffffff81059bc0>] ? rescuer_thread+0x2cf/0x2cf
[ 5695.340363]  [<ffffffff8105ecbe>] kthread+0x107/0x10f
[ 5695.340366]  [<ffffffff8105ebb7>] ? kthread_create_on_node+0x1ea/0x1ea
[ 5695.340369]  [<ffffffff8152493f>] ret_from_fork+0x3f/0x70
[ 5695.340371]  [<ffffffff8105ebb7>] ? kthread_create_on_node+0x1ea/0x1ea
[ 5695.340373] ---[ end trace 90ed50ba3553c47d ]---


bio->bi_iter.bi_sector is expected to be ZRAM_SECTOR_PER_LOGICAL_BLOCK (1 << 3)
aligned.

un-aligned example:
:: START 264655                   start & (ZRAM_SECTOR_PER_LOGICAL_BLOCK - 1)

[ 5695.340428] Call Trace:
[ 5695.340430]  [<ffffffff8123c879>] dump_stack+0x4e/0x79
[ 5695.340432]  [<ffffffff81042b9e>] warn_slowpath_common+0x99/0xb2
[ 5695.340435]  [<ffffffffa0232aff>] ? zram_make_request+0xac/0x494 [zram]
[ 5695.340437]  [<ffffffff81042c6a>] warn_slowpath_null+0x1a/0x1c
[ 5695.340440]  [<ffffffffa0232aff>] zram_make_request+0xac/0x494 [zram]
[ 5695.340442]  [<ffffffff812241dc>] ? blk_queue_exit+0xcf/0x111
[ 5695.340444]  [<ffffffff812242db>] generic_make_request+0xbd/0x15b
[ 5695.340446]  [<ffffffff8122446e>] submit_bio+0xf5/0x11e
[ 5695.340448]  [<ffffffff810fdaa1>] ? __test_set_page_writeback+0x192/0x1aa
[ 5695.340450]  [<ffffffff811b6ecb>] ext4_io_submit+0x3e/0x52
[ 5695.340452]  [<ffffffff811b70c6>] ext4_bio_write_page+0x1c9/0x2f3
[ 5695.340455]  [<ffffffff811aea05>] mpage_submit_page+0x5f/0x75
[ 5695.340457]  [<ffffffff811aee9a>] mpage_map_and_submit_buffers+0x10f/0x21d
[ 5695.340459]  [<ffffffff811b341e>] ext4_writepages+0xc96/0xe31
[ 5695.340462]  [<ffffffff810ffe85>] do_writepages+0x23/0x2c
[ 5695.340464]  [<ffffffff810ffe85>] ? do_writepages+0x23/0x2c
[ 5695.340466]  [<ffffffff81169c6c>] __writeback_single_inode+0xe2/0x656
[ 5695.340468]  [<ffffffff8116a63c>] writeback_sb_inodes+0x288/0x45e
[ 5695.340471]  [<ffffffff8116a888>] __writeback_inodes_wb+0x76/0xae
[ 5695.340473]  [<ffffffff8116ab15>] wb_writeback+0x1aa/0x496
[ 5695.340475]  [<ffffffff8116b63c>] wb_workfn+0x259/0x56a
[ 5695.340477]  [<ffffffff8116b63c>] ? wb_workfn+0x259/0x56a
[ 5695.340479]  [<ffffffff810843cf>] ? lock_acquire+0x10d/0x1a8
[ 5695.340481]  [<ffffffff81058ce1>] process_one_work+0x29e/0x58b
[ 5695.340484]  [<ffffffff81059e51>] worker_thread+0x291/0x383
[ 5695.340486]  [<ffffffff81059bc0>] ? rescuer_thread+0x2cf/0x2cf
[ 5695.340487]  [<ffffffff8105ecbe>] kthread+0x107/0x10f
[ 5695.340490]  [<ffffffff8105ebb7>] ? kthread_create_on_node+0x1ea/0x1ea
[ 5695.340492]  [<ffffffff8152493f>] ret_from_fork+0x3f/0x70
[ 5695.340494]  [<ffffffff8105ebb7>] ? kthread_create_on_node+0x1ea/0x1ea
[ 5695.340496] ---[ end trace 90ed50ba3553c47e ]---




dmesg:

...
[ 6228.393546] Buffer I/O error on device zram0, logical block 33050
[ 6228.393549] Buffer I/O error on device zram0, logical block 33051
[ 6228.393551] Buffer I/O error on device zram0, logical block 33052
[ 6228.393553] Buffer I/O error on device zram0, logical block 33053
[ 6228.393555] Buffer I/O error on device zram0, logical block 33054
[ 6228.393557] Buffer I/O error on device zram0, logical block 33055
[ 6228.393559] Buffer I/O error on device zram0, logical block 33056
[ 6228.393561] Buffer I/O error on device zram0, logical block 33057
[ 6228.393563] Buffer I/O error on device zram0, logical block 33058
[ 6228.393565] Buffer I/O error on device zram0, logical block 33059
[ 6228.393921] EXT4-fs warning (device zram0): ext4_end_bio:328: I/O error -5 writing to inode 152 (offset 0 size 2101248 starting block 33561)
[ 6228.394278] EXT4-fs warning (device zram0): ext4_end_bio:328: I/O error -5 writing to inode 152 (offset 0 size 3149824 starting block 33817)
[ 6228.394633] EXT4-fs warning (device zram0): ext4_end_bio:328: I/O error -5 writing to inode 152 (offset 0 size 4198400 starting block 34073)
[ 6228.394990] EXT4-fs warning (device zram0): ext4_end_bio:328: I/O error -5 writing to inode 152 (offset 0 size 5246976 starting block 34329)
[ 6228.395211] EXT4-fs warning (device zram0): ext4_end_bio:328: I/O error -5 writing to inode 152 (offset 0 size 5484544 starting block 34361)
[ 6228.395607] EXT4-fs warning (device zram0): ext4_end_bio:328: I/O error -5 writing to inode 153 (offset 0 size 1052672 starting block 34644)
[ 6228.395811] EXT4-fs warning (device zram0): ext4_end_bio:328: I/O error -5 writing to inode 153 (offset 0 size 1196032 starting block 34676)
[ 6228.397060] EXT4-fs warning (device zram0): ext4_end_bio:328: I/O error -5 writing to inode 154 (offset 0 size 1052672 starting block 34936)
[ 6228.397467] EXT4-fs warning (device zram0): ext4_end_bio:328: I/O error -5 writing to inode 154 (offset 0 size 2101248 starting block 35192)
...



Is this a known issue?


	-ss

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ