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: <20090507105530.GB28398@elte.hu>
Date:	Thu, 7 May 2009 12:55:30 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Joerg Roedel <joerg.roedel@....com>
Cc:	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>,
	dwmw2@...radead.org, linux-kernel@...r.kernel.org,
	iommu@...ts.linux-foundation.org, mingo@...hat.com,
	airlied@...ux.ie
Subject: Re: IOMMU and graphics cards


* Joerg Roedel <joerg.roedel@....com> wrote:

> On Thu, May 07, 2009 at 04:47:14PM +0900, FUJITA Tomonori wrote:
> > On Tue, 28 Apr 2009 18:04:48 +0200
> > Joerg Roedel <joerg.roedel@....com> wrote:
> > > 
> > > Yes, it is in effect for other devices. But since its a security feature
> > > it only makes sense if it covers all devices.
> > 
> > For me, IOMMUs are not about security but accessing all memory space
> > (there are still lots of devices that are not capable of 64-bit DMA)
> > but I agree that this workaround is bad.
> 
> Yeah true. Another major reason for having an IOMMU is to enlarge the
> physical address range devices can access.
> 
> > Do you meant that AMD IOMMU code use the bitmap each device to manage
> > address space so enlarging the DMA address space wastes memory?
> 
> Its not only the bitmap. There are also the page tables that would waste
> memory if the aperture in the AMD IOMMU driver is enlarged to, say, 4GB.
> Most devices don't need such a large amount of DMA address space. As I
> found out VT-d does not have this problem because they implemented
> another allocator which can cover all possible memory.
> For the AMD IOMMU I currently implement a kind of a dynamically growing
> bitmap allocator to fix this problem.
> 
> > >  But unless this problem isn't solved the
> > > drivers won't be fixed, I guess.
> > > I guess the DRM code in the kernel may have the same problem with IOMMU
> > > enabled?
> > 
> > Looks like the DRM code uses the DMA API.
> 
> The proprietary drivers make problems so far. For the ATI one I am 
> in contact with the developers to try to fix it. But I can't do 
> anything about the other proprietary driver I am aware of :-(

One option would be to enumerate nvidia vga device memory resources, 
print a nasty warning if they are accessed while not mapped by any 
in-kernel driver (such as Noveau) and then install a workaround for 
their resources and exclude them from IOMMU coverage.

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