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] [thread-next>] [day] [month] [year] [list]
Message-ID: <51C84E94.8020100@linux.vnet.ibm.com>
Date:	Mon, 24 Jun 2013 19:20:12 +0530
From:	Raghavendra K T <raghavendra.kt@...ux.vnet.ibm.com>
To:	LKML <linux-kernel@...r.kernel.org>, Tejun Heo <tj@...nel.org>,
	Andrew Morton <akpm@...l.org>
CC:	Raghavendra K T <raghavendra.kt@...ux.vnet.ibm.com>,
	Jens Axboe <axboe@...nel.dk>,
	Kiyoshi Ueda <k-ueda@...jp.nec.com>,
	Lin Ming <ming.m.lin@...el.com>, Christoph Hellwig <hch@....de>
Subject: Re: [PATCH] block:Remove extra condition in end of disk check

CCing more relevant people (with the help of get_maintainer --git-blame)

On 06/23/2013 10:47 PM, Raghavendra K T wrote:
> From: Raghavendra K T <raghavendra.kt@...ux.vnet.ibm.com>
>
> Since #sector is always positive the reduced condition check
> encompasses maxsector < nr_sectors check.
>
> Signed-off-by: Raghavendra K T <raghavendra.kt@...ux.vnet.ibm.com>
> ---
> An userspace program looping with:
> maxsector - 0-9999
> nr_sector - 0-999
> sector - 0-999 gave 6.4% improvement with new condition though I agree that
> it is not the best way to test it perhaps :)
>
> diff --git a/block/blk-core.c b/block/blk-core.c
> index 33c33bc..4a78583 100644
> --- a/block/blk-core.c
> +++ b/block/blk-core.c
> @@ -1656,7 +1656,7 @@ static inline int bio_check_eod(struct bio *bio, unsigned int nr_sectors)
>   	if (maxsector) {
>   		sector_t sector = bio->bi_sector;
>
> -		if (maxsector < nr_sectors || maxsector - nr_sectors < sector) {
> +		if (maxsector - nr_sectors < sector) {
>   			/*
>   			 * This may well happen - the kernel calls bread()
>   			 * without checking the size of the device, e.g., when
>
>

--
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