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: <20191028113816.GB24055@lst.de>
Date:   Mon, 28 Oct 2019 12:38:16 +0100
From:   "hch@....de" <hch@....de>
To:     Laurentiu Tudor <laurentiu.tudor@....com>
Cc:     Jonathan Lemon <jlemon@...gsvamp.com>, "hch@....de" <hch@....de>,
        "joro@...tes.org" <joro@...tes.org>,
        Ioana Ciocoi Radulescu <ruxandra.radulescu@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Ioana Ciornei <ioana.ciornei@....com>,
        Leo Li <leoyang.li@....com>,
        "robin.murphy@....com" <robin.murphy@....com>,
        Diana Madalina Craciun <diana.craciun@....com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        Madalin Bucur <madalin.bucur@....com>
Subject: Re: [PATCH v2 3/3] dpaa2_eth: use new unmap and sync dma api
 variants

On Mon, Oct 28, 2019 at 10:55:05AM +0000, Laurentiu Tudor wrote:
> >> @@ -85,9 +75,10 @@ static void free_rx_fd(struct dpaa2_eth_priv *priv,
> >>      sgt = vaddr + dpaa2_fd_get_offset(fd);
> >>      for (i = 1; i < DPAA2_ETH_MAX_SG_ENTRIES; i++) {
> >>          addr = dpaa2_sg_get_addr(&sgt[i]);
> >> -        sg_vaddr = dpaa2_iova_to_virt(priv->iommu_domain, addr);
> >> -        dma_unmap_page(dev, addr, DPAA2_ETH_RX_BUF_SIZE,
> >> -                   DMA_BIDIRECTIONAL);
> >> +        sg_vaddr = page_to_virt
> >> +                (dma_unmap_page_desc(dev, addr,
> >> +                            DPAA2_ETH_RX_BUF_SIZE,
> >> +                            DMA_BIDIRECTIONAL));
> > 
> > This is doing virt -> page -> virt.  Why not just have the new
> > function return the VA corresponding to the addr, which would
> > match the other functions?
> 
> I'd really like that as it would get rid of the page_to_virt() calls but 
> it will break the symmetry with the dma_map_page() API. I'll let the 
> maintainers decide.

It would be symmetric with dma_map_single, though.  Maybe we need
both variants?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ