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] [day] [month] [year] [list]
Message-ID: <6420021.rzhE3kJKJP@wuerfel>
Date:	Tue, 29 Mar 2016 21:32:07 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	linux-arm-kernel@...ts.infradead.org,
	Denys Vlasenko <dvlasenk@...hat.com>
Cc:	Konrad Rzeszutek Wilk <konrad@...nel.org>,
	Sinan Kaya <okaya@...eaurora.org>, linux-mips@...ux-mips.org,
	linux-ia64@...r.kernel.org, Fenghua Yu <fenghua.yu@...el.com>,
	Catalin Marinas <catalin.marinas@....com>,
	Will Deacon <will.deacon@....com>,
	Max Filippov <jcmvbkbc@...il.com>,
	Chris Metcalf <cmetcalf@...hip.com>,
	Paul Mackerras <paulus@...ba.org>,
	"H. Peter Anvin" <hpa@...or.com>, Huacai Chen <chenhc@...ote.com>,
	Guan Xuetao <gxt@...c.pku.edu.cn>,
	Stefano Stabellini <stefano.stabellini@...citrix.com>,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	Jisheng Zhang <jszhang@...vell.com>,
	Florian Fainelli <f.fainelli@...il.com>,
	Russell King <linux@....linux.org.uk>,
	Aaro Koskinen <aaro.koskinen@....fi>,
	Michael Ellerman <mpe@...erman.id.au>, timur@...eaurora.org,
	X86 <x86@...nel.org>, Ingo Molnar <mingo@...hat.com>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Guenter Roeck <linux@...ck-us.net>,
	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	Akinobu Mita <akinobu.mita@...il.com>, cov@...eaurora.org,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Valentin Rothberg <valentinrothberg@...il.com>,
	Chris Zankel <chris@...kel.net>,
	Tony Luck <tony.luck@...el.com>, linux-pci@...r.kernel.org,
	linuxppc-dev@...ts.ozlabs.org, Dean Nelson <dnelson@...hat.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Ralf Baechle <ralf@...ux-mips.org>,
	"Suthikulpanit, Suravee" <Suravee.Suthikulpanit@....com>,
	Joe Perches <joe@...ches.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Robin Murphy <robin.murphy@....com>, nwatters@...eaurora.org
Subject: Re: [PATCH 2/3] swiotlb: prefix dma_to_phys and phys_to_dma functions

On Monday 28 March 2016 14:29:29 Konrad Rzeszutek Wilk wrote:
> > diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c
> > index ada00c3..8c0f66b 100644
> > --- a/arch/arm64/mm/dma-mapping.c
> > +++ b/arch/arm64/mm/dma-mapping.c
> > @@ -29,6 +29,14 @@
> >
> >  #include <asm/cacheflush.h>
> >
> > +/*
> > + * If you are building a system without IOMMU, then you are using SWIOTLB
> > + * library. The ARM64 adaptation of this library does not support address
> > + * translation and it assumes that physical address = dma address for such
> > + * a use case. Please don't build a platform that violates this.
> > + */
> 
> Why not just expand the ARM64 part to support address translation?

Because so far all hardware we have is relatively sane. We only
need to implement this if someone accidentally puts their DMA
space at the wrong address.

There is at least one platform that could in theory use this because
their RAM starts at an address that is outside of the reach of 32-bit
devices, and a static IOMMU mapping (created by firmware) could be
used to map the start of RAM into DMA address zero, to avoid having
to use an IOMMU all the time, but it was considered not worth the
effort to implement that.

	Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ