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: <20080715024424R.fujita.tomonori@lab.ntt.co.jp>
Date:	Tue, 15 Jul 2008 02:45:03 +0900
From:	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
To:	davem@...emloft.net
Cc:	fujita.tomonori@....ntt.co.jp, andi@...stfloor.org,
	mpatocka@...hat.com, sparclinux@...r.kernel.org,
	linux-kernel@...r.kernel.org, jens.axboe@...cle.com
Subject: Re: [SUGGESTION]: drop virtual merge accounting in I/O requests

On Sun, 13 Jul 2008 20:20:35 -0700 (PDT)
David Miller <davem@...emloft.net> wrote:

> From: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
> Date: Mon, 14 Jul 2008 11:19:02 +0900
> 
> > Now IOMMUs don't ignore the max_segment_size. We hit this problem.
> 
> It seems simply that max_segment_size needs to propagate
> down into the block layer VMERGE code so that it can
> act accordingly.

Yeah, I think so. I'll take care of that.

But I think that even with the fix, SPARC64 IOMMU still hits the
problem.

With the VMERGE accounting enabled,

- an IOMMU must merge segments that the block layer expects the IOMMU
to merge.

- an IOMMU must return an error if it can't merge such segments.

But the current SPARC64 IOMMU code doesn't return an error if it can't
merge such segments (as POWER's IOMMU does, as you know).

dma_4u_map_sg() has:

if (segstart != s) {
	/* We cannot merge if:
	 * - allocated dma_addr isn't contiguous to previous allocation
	 */
	if ((dma_addr != dma_next) ||
	    (outs->dma_length + s->length > max_seg_size) ||
	    (is_span_boundary(out_entry, base_shift,
		/* Can't merge: create a new segment */
		segstart = s;
		outcount++;
		outs = sg_next(outs);

So if the IOMMU allocated dma_addr isn't contiguous to previous
allocation, it might not merge segments that the block layer expected
the IOMMU to merge.

We need kinda two phase merging code such as the old SPARC64 IOMMU
code and PARISC IOMMUs though I like the new simple SPARC64 IOMMU
code.
--
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