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-prev] [day] [month] [year] [list]
Date:	Thu, 24 Jul 2014 01:18:36 +0900
From:	Akinobu Mita <akinobu.mita@...il.com>
To:	Jeff Moyer <jmoyer@...hat.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Jens Axboe <axboe@...nel.dk>,
	Alexander Viro <viro@...iv.linux.org.uk>,
	linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH] block_dev: implement readpages() to optimize sequential read

2014-07-18 8:14 GMT+09:00 Akinobu Mita <akinobu.mita@...il.com>:
> 2014-07-18 3:31 GMT+09:00 Jeff Moyer <jmoyer@...hat.com>:
>> Akinobu Mita <akinobu.mita@...il.com> writes:
>>
>>> Sequential read from a block device is expected to be equal or faster
>>> than from the file on a filesystem.  But it is not correct due to the
>>> lack of effective readpages() in the address space operations for
>>> block device.
>>
>> Ah, a trip down memory lane.  ;-)  Here's a thread showing issues with
>> the last time this was proposed (by me, incidentally):
>>
>> https://lkml.org/lkml/2009/6/2/480
>>
>> At the very least, we need to see numbers on a real device, and see it
>> booted on something with >4k page size before taking this back in.
>
> Thanks for the information.  First, I'll try to reproduce the >4k page
> size issue with qemu with the architecture which can support 64k page.

I can reproduce the issue which attempts to access beyond end of
device, and it turns out that this can be reproducible on 4K page
system, too.

This problem only happens when reading a partition which is being
mounted by the filesystem at the same time.  The filesystem sets
the blocksize to a multiple of the logical block size by set_blocksize()
while it is mounted.  If the end of the partition is not aligned on
the new blocksize, reading the end of the partition causes access
beyond end of device.

So this patch is incomplete, and some guard check code is required in
mpage_readpages() or altenative solution is needed.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ