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]
Date:	Thu, 25 Sep 2008 16:35:31 +0900
From:	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
To:	knikanth@...e.de
Cc:	jens.axboe@...cle.com, linux-kernel@...r.kernel.org,
	linux-scsi@...r.kernel.org, fujita.tomonori@....ntt.co.jp
Subject: Re: [PATCH] BUG: ll_merge_requests_fn() updates
 req->nr_phys_segments wrongly

On Tue, 23 Sep 2008 23:58:02 +0530
Nikanth Karthikesan <knikanth@...e.de> wrote:

> 
> From: Nikanth Karthikesan <knikanth@...e.de>
> 
> ll_merge_requests_fn() decreases the req->nr_phys_segments if 
> blk_phys_contig_segment() returns true, but it is perfectly possible that 
> blk_hw_contig_segment() is false.

Yeah, in fact, blk_hw_contig_segment() is always false on the majority
of architectures (on only PARISC and Alpha, it could be true).

Your patch doesn't look correct. Virtually, the patch always disables
physical merging.


> A new hw_segment implies a new phys_segment. 
> So decrementing nr_phys_segments wrongly here triggers the BUG_ON() in 
> scsi_init_sgtable(), as blk_rq_map_sg() would map 1 phys_segment more than  
> req->nr_phys_segment. This is easily reproducible. Other callers of 
> blk_rq_map_sg() should also be affected by this bug.

I have no idea how BUG_ON() in scsi_init_sgtable() is triggered.

Can you give more information, HBA, IOMMU (if you use), and the values
of req->nr_phys_segment, req->nr_hw_segment, count, etc in in
scsi_init_sgtable() when you hit the bug?


BTW, blk_hw_contig_segment() will be removed for 2.6.28 (virtual
merging account in the block layer will be removed).
--
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