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: <20131025204642.GB7543@phenom.dumpdata.com>
Date:	Fri, 25 Oct 2013 16:46:42 -0400
From:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
To:	Stefano Stabellini <stefano.stabellini@...citrix.com>
Cc:	xen-devel@...ts.xensource.com, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, Ian.Campbell@...rix.com
Subject: Re: [PATCH v8 13/19] swiotlb-xen: use xen_dma_map/unmap_page,
 xen_dma_sync_single_for_cpu/device

On Thu, Oct 24, 2013 at 02:11:48PM +0100, Stefano Stabellini wrote:
> On Thu, 24 Oct 2013, Stefano Stabellini wrote:
> > On Wed, 23 Oct 2013, Konrad Rzeszutek Wilk wrote:
> > > On Wed, Oct 23, 2013 at 06:20:25PM +0100, Stefano Stabellini wrote:
> > > > On Wed, 23 Oct 2013, Konrad Rzeszutek Wilk wrote:
> > > > > On Thu, Oct 17, 2013 at 06:43:28PM +0100, Stefano Stabellini wrote:
> > > > > > Call xen_dma_map_page, xen_dma_unmap_page, xen_dma_sync_single_for_cpu,
> > > > > > xen_dma_sync_single_for_device from swiotlb-xen to ensure cpu/device
> > > > > > coherency of the pages used for DMA, including the ones belonging to the
> > > > > > swiotlb buffer.
> > > > > 
> > > > > You lost me.
> > > > > 
> > > > > Isn't it the driver's responsibility to do this?
> > > > > 
> > > > > Looking at what 'xen_dma_map_page()' does for x86 it looks to add an extra
> > > > > call - page_to_phys - and we ignore it here.
> > > > 
> > > > map_page on arm calls the right cache flushes needed to communicate with
> > > > the device. Same with unmap_page.
> > > 
> > > If this is flushing the cache then I think it makes more sense to do
> > > that without this fancy 'dma_map_page'.
> > > 
> > > Just call it 'xen_flush_dma_page' and make it a nop on all platforms
> > > except ARM.
> > 
> > I am OK with making it a nop on x86, it makes sense.
> > However I would like to keep it called xen_dma_map_page: after all it
> > corresponds exactly to the native map_page dma_op. It is part of the same
> > "contract".
> 
> for example we can turn xen_dma_map_page into a function that returns
> void, this way we can remove the page_to_phys on x86

Right, the v9 patchset you posted fixes my concern.
--
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