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:	Fri, 11 Nov 2011 16:31:48 +0100
From:	Joerg Roedel <joro@...tes.org>
To:	"Eric W. Biederman" <ebiederm@...ssion.com>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] x86 amd_gart_64: Verify we can perform the
	remapping requested

On Mon, Oct 24, 2011 at 12:07:36PM +0200, Joerg Roedel wrote:
> On Mon, Oct 17, 2011 at 02:20:15PM -0700, Eric W. Biederman wrote:
> > 
> > Recently I had a driver try with a peculiar 2G dma memory limit.
> > The driver failed in weird and strange ways because the GART remapping
> > apperture had been allocated above 2G where the driver cound not reach,
> > and no error was reported when the mappings were setup.
> > 
> > Implement gart_dma_supported to test for this problem case and to return
> > and error if we can not support the remapping.
> 
> You do basically the same as for swiotlb, so it must be good :)

Okay, thinking more about this, I am not so sure anymore it is a really
good idea to fix it this way. It basically signals the driver that DMA
is not possible with the device if the aperture does not fit into
the dma_mask. But DMA within the ZONE_DMA might still work, no?

So I think the right way to fix it is to return a dma-mapping error if
and only if the address needs to be remapped by the aperture (of swiotlb or
gart).

This still allows the driver to use GFP_DMA allocations.


	Joerg

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