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: <2f68bb03-60b6-44d6-b9cd-d21ef20a4a68@suse.com>
Date:   Tue, 4 Aug 2020 07:34:28 +0200
From:   Jürgen Groß <jgross@...e.com>
To:     Stefano Stabellini <sstabellini@...nel.org>,
        boris.ostrovsky@...cle.com, konrad.wilk@...cle.com
Cc:     xen-devel@...ts.xenproject.org, linux-kernel@...r.kernel.org,
        hch@...radead.org,
        Stefano Stabellini <stefano.stabellini@...inx.com>
Subject: Re: [PATCH v3 09/11] swiotlb-xen: introduce phys_to_dma/dma_to_phys
 translations

On 11.07.20 00:34, Stefano Stabellini wrote:
> From: Stefano Stabellini <stefano.stabellini@...inx.com>
> 
> With some devices physical addresses are different than dma addresses.
> To be able to deal with these cases, we need to call phys_to_dma on
> physical addresses (including machine addresses in Xen terminology)
> before returning them from xen_swiotlb_alloc_coherent and
> xen_swiotlb_map_page.
> 
> We also need to convert dma addresses back to physical addresses using
> dma_to_phys in xen_swiotlb_free_coherent and xen_swiotlb_unmap_page if
> we want to do any operations on them.
> 
> Call dma_to_phys in is_xen_swiotlb_buffer.
> Introduce xen_phys_to_dma and call phys_to_dma in its implementation.
> Introduce xen_dma_to_phys and call dma_to_phys in its implementation.
> Call xen_phys_to_dma/xen_dma_to_phys instead of
> xen_phys_to_bus/xen_bus_to_phys through swiotlb-xen.c.
> 
> Everything is taken care of by these changes except for
> xen_swiotlb_alloc_coherent and xen_swiotlb_free_coherent, which need a
> few explicit phys_to_dma/dma_to_phys calls.
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@...inx.com>
> Tested-by: Corey Minyard <cminyard@...sta.com>
> Tested-by: Roman Shaposhnik <roman@...eda.com>

Reviewed-by: Juergen Gross <jgross@...e.com>


Juergen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ