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: <m1ty6yig24.fsf@fess.ebiederm.org>
Date:	Mon, 24 Oct 2011 08:07:31 -0700
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Cc:	fujita.tomonori@....ntt.co.jp,
	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 1/2] x86 swiotlb: Verify we can perform the remapping requested.

Konrad Rzeszutek Wilk <konrad.wilk@...cle.com> writes:

> On Mon, Oct 17, 2011 at 02:19:18PM -0700, Eric W. Biederman wrote:
>> 
>> Recently I had a driver try with a peculiar 2G dma memory limit.
>> It failed in weird and strange ways because my bounce buffers were
>> being allocated above 2G where the driver could not reach, and
>> no error was reported when the mappings were setup.
>
> OK, so the overflow buffer was used instead.. which presumarily
> also was allocated above the 2G? That seems to point that
> alloc_bootmem_low_pages is not doing its job?

I just looked alloc_bootmem_low_pages allocates memory below
ARCH_ADDRESS_LIMIT which for everything except s390 is 4G.

I know I was mostly using the amd gart driver.  So I may be mistaken
that the swiotlb driver had the same issue.  However my only solution
at the time was to boot with mem=2G.  So I believe the swiotlb did
have this issue.

Mostly the patch was.  Hmm.  That looks stupid not wiring up the
swiotlb address space limit check when someone has already written it.

>> Use the swiotlb_dma_supported to avoid silent problems like this
>> in the future.
>
> Which driver was it that had this limit?

An unmerged driver.  The driver has since been fixed to use it's
hardware in a way that doesn't hit this limit.

At the time that I looked drivers in the kernel with a dma limit
above 16MB and blow 4GB only existed on exotic architectures in
very special cases.

Unfortunately I no longer have access to this hardware to test with.

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