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:   Mon, 25 Jan 2021 12:35:07 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Lijun Pan <lijunp213@...il.com>
Cc:     Lijun Pan <ljp@...ux.ibm.com>, netdev@...r.kernel.org
Subject: Re: [PATCH net 2/3] ibmvnic: remove unnecessary rmb() inside
 ibmvnic_poll

On Sun, 24 Jan 2021 22:38:02 -0600 Lijun Pan wrote:
> On Sat, Jan 23, 2021 at 11:11 PM Jakub Kicinski <kuba@...nel.org> wrote:
> > On Thu, 21 Jan 2021 00:17:09 -0600 Lijun Pan wrote:  
> > > rmb() was introduced to load rx_scrq->msgs after calling
> > > pending_scrq(). Now since pending_scrq() itself already
> > > has dma_rmb() at the end of the function, rmb() is
> > > duplicated and can be removed.
> > >
> > > Fixes: ec20f36bb41a ("ibmvnic: Correctly re-enable interrupts in NAPI polling routine")
> > > Signed-off-by: Lijun Pan <ljp@...ux.ibm.com>  
> >
> > rmb() is a stronger barrier than dma_rmb()  
> 
> Yes. I think the weaker dma_rmb() here is enough.
> And I let it reuse the dma_rmb() in the pending_scrq().
> 
> >
> > also again, I don't see how this fixes any bugs  
> 
> I will send to net-next if you are ok with it.

If there is consensus at IBM that the first 2 changes are an
improvement you can drop the Fixes tags and resubmit to net-next.

In patch 3 it looks like the dma_rmb() may indeed be missing so that
one could go to net, but I don't think the dma_wmb() is needed,
especially not where you put it. I think dma_wmb() is only needed
before the device is notified that new buffer was posted, not on
completion.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ