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: <20080910234510S.fujita.tomonori@lab.ntt.co.jp>
Date:	Wed, 10 Sep 2008 23:45:34 +0900
From:	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
To:	joro@...tes.org
Cc:	fujita.tomonori@....ntt.co.jp, joerg.roedel@....com,
	linux-kernel@...r.kernel.org, mingo@...e.hu
Subject: Re: [PATCH] x86: avoid unnecessary low zone allocation in AMD
 IOMMU's alloc_coherent

On Wed, 10 Sep 2008 16:38:18 +0200
Joerg Roedel <joro@...tes.org> wrote:

> On Wed, Sep 10, 2008 at 11:24:57PM +0900, FUJITA Tomonori wrote:
> > On Wed, 10 Sep 2008 15:53:47 +0200
> > Joerg Roedel <joerg.roedel@....com> wrote:
> > 
> > > On Wed, Sep 10, 2008 at 10:37:45PM +0900, FUJITA Tomonori wrote:
> > > > On Wed, 10 Sep 2008 15:10:32 +0200
> > > > Joerg Roedel <joerg.roedel@....com> wrote:
> > > > > Can't we simply make the gfp hacks depend on
> > > > > dma_ops->is_phys and avoid further gfp hacks in the hardware iommu
> > > > > implementations?
> > > > 
> > > > I thought about it but adding a new dma_ops->we_don't_want_gfp_flag
> > > > hook doesn't make the code simpler much. Currently, we have the gfp
> > > > setting hack in just one place. It's not bad. Adding such new hook
> > > > means adding more lines than we can remove.
> > > 
> > > The is_phys flas is already in place and its meaning is "the dma_ops
> > > return bus addresses equal to physical addresses". This is exactly the
> > > case when we need the gfp hacks. So I don't see a problem in just
> > > skipping the gfp rewrite if is_phys is zero. I don't see a point in
> > > adding gfp flags in dma_alloc_coherent and remove them again
> > > dma_ops->alloc_coherent code. Specially in this case where we already
> > > know in dma_alloc_coherent if we really need the flag rewrite.
> > 
> > dma_ops->is_phys doesn't work well for GART and Intel IOMMU, that do
> > virtual mappings for some devices and doesn't for some.
> > 
> > We need to a hook that can pass a point to a device to IOMMUs like:
> > 
> > dma_ops->is_phys(struct device *dev)
> > 
> > 
> > Because they need to look at a device to know if they will do virtual
> > mappings or not for it.
> 
> Ok, thats a valid point. I queue your patch with the AMD IOMMU updates
> for 2.6.28. Thanks.

Ingo already has queued it his tree, I think.
--
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