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: <88db0c1b20fc466f815d0e8382a156dc@IL-EXCH01.marvell.com>
Date:   Mon, 20 Aug 2018 07:02:12 +0000
From:   Yan Markman <ymarkman@...vell.com>
To:     Christoph Hellwig <hch@...radead.org>,
        David Miller <davem@...emloft.net>
CC:     "brian.brooks@...aro.org" <brian.brooks@...aro.org>,
        "antoine.tenart@...tlin.com" <antoine.tenart@...tlin.com>,
        "maxime.chevallier@...tlin.com" <maxime.chevallier@...tlin.com>,
        "Stefan Chulski" <stefanc@...vell.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "bjorn.topel@...el.com" <bjorn.topel@...el.com>,
        "brian.brooks@....com" <brian.brooks@....com>
Subject: RE: [PATCH] net: mvpp2: avoid bouncing buffers

Hi everybody
The MVPP2 code already has DMA's patch taken from OLD Backport and placed by Antoine Tenart.
Please refer the attached 
Best regards
Yan Markman


-----Original Message-----
From: Christoph Hellwig [mailto:hch@...radead.org] 
Sent: Monday, August 20, 2018 9:23 AM
To: David Miller <davem@...emloft.net>
Cc: brian.brooks@...aro.org; antoine.tenart@...tlin.com; maxime.chevallier@...tlin.com; Yan Markman <ymarkman@...vell.com>; Stefan Chulski <stefanc@...vell.com>; netdev@...r.kernel.org; linux-kernel@...r.kernel.org; bjorn.topel@...el.com; brian.brooks@....com
Subject: Re: [PATCH] net: mvpp2: avoid bouncing buffers

On Sun, Aug 19, 2018 at 07:55:05PM -0700, David Miller wrote:
> From: Brian Brooks <brian.brooks@...aro.org>
> Date: Sun, 19 Aug 2018 21:47:30 -0500
> 
> > @@ -5126,6 +5126,12 @@ static int mvpp2_probe(struct platform_device *pdev)
> >  	}
> >  
> >  	if (priv->hw_version == MVPP22) {
> > +		/* Platform code may have set dev->dma_mask to point
> > +		 * to dev->coherent_dma_mask, but we want to ensure
> > +		 * they take different values due to comment below.
> > +		 */
> > +		pdev->dev.dma_mask = &priv->dma_mask;
> 
> The platform code might be doing this exactly because it cannot 
> support different coherent and streaming DMA masks.
> 
> Well, in any case, the platform code is doing it for a reason and 
> overriding this in a "driver" of all places seems totally 
> inappropriate and at best a layering violation.
> 
> I would rather you fix this in a way that involves well defined APIs 
> that set the DMA masks or whatever to the values that you need, rather 
> than going behind the platform code's back and changing the DMA mask 
> pointer like this.

Agreed.  What platform do you see this issue on?

Download attachment "0009-net-mvpp2-fix-the-dma_mask-and-coherent_dma_mask-set.patch" of type "application/octet-stream" (3572 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ