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]
Date:   Wed, 20 Oct 2021 15:23:12 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Claudiu Manoil <claudiu.manoil@....com>,
        Tim Gardner <tim.gardner@...onical.com>
Cc:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "David S. Miller" <davem@...emloft.net>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Po Liu <po.liu@....com>
Subject: Re: [PATCH][linux-next] net: enetc: unmap DMA in enetc_send_cmd()

On Tue, 19 Oct 2021 19:47:17 +0000 Claudiu Manoil wrote:
> > I am curious why you do not need to call dma_sync_single_for_device()
> > before enetc_send_cmd()
> > in order to flush the contents of CPU cache to RAM. Is it because
> > __GFP_DMA marks
> > that page as uncached ? Or is it because of the SOC this runs on ?
> >   
> 
> Not sure how it works like this, but I think dma_alloc_coherent() should have
> been used here instead of the kmalloc + dma_map scheme.

Using dma_alloc_coherent() seems simpler and more correct, 
let's do that instead.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ