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]
Date:   Thu, 6 Oct 2022 02:40:19 +0000
From:   Parav Pandit <parav@...dia.com>
To:     Bagas Sanjaya <bagasdotme@...il.com>,
        "arnd@...db.de" <arnd@...db.de>,
        "stern@...land.harvard.edu" <stern@...land.harvard.edu>,
        "parri.andrea@...il.com" <parri.andrea@...il.com>,
        "will@...nel.org" <will@...nel.org>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "boqun.feng@...il.com" <boqun.feng@...il.com>,
        "npiggin@...il.com" <npiggin@...il.com>,
        "dhowells@...hat.com" <dhowells@...hat.com>,
        "j.alglave@....ac.uk" <j.alglave@....ac.uk>,
        "luc.maranget@...ia.fr" <luc.maranget@...ia.fr>,
        "paulmck@...nel.org" <paulmck@...nel.org>,
        "akiyks@...il.com" <akiyks@...il.com>,
        Dan Lustig <dlustig@...dia.com>,
        "joel@...lfernandes.org" <joel@...lfernandes.org>,
        "corbet@....net" <corbet@....net>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
        "linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>
Subject: RE: [PATCH v2] locking/memory-barriers.txt: Improve documentation for
 writel() example


> From: Bagas Sanjaya <bagasdotme@...il.com>
> Sent: Thursday, October 6, 2022 7:31 AM
> 
> On 10/5/22 17:47, Parav Pandit wrote:
> > @@ -1927,10 +1927,12 @@ There are some more advanced barrier
> functions:
> >       before we read the data from the descriptor, and the dma_wmb()
> allows
> >       us to guarantee the data is written to the descriptor before the device
> >       can see it now has ownership.  The dma_mb() implies both a
> dma_rmb() and
> > -     a dma_wmb().  Note that, when using writel(), a prior wmb() is not
> needed
> > -     to guarantee that the cache coherent memory writes have completed
> before
> > -     writing to the MMIO region.  The cheaper writel_relaxed() does not
> provide
> > -     this guarantee and must not be used here.
> > +     a dma_wmb().  Note that, when using writel(), a prior barrier is not
> > +     needed to guarantee that the cache coherent memory writes have
> completed
> > +     before writing to the MMIO region.  The cheaper writel_relaxed() does
> not
> > +     provide this guarantee and must not be used here. Hence, writeX() is
> always
> > +     preferred which inserts needed platform specific barrier before writing
> to
> > +     the specified MMIO region.
> >
> 
> Did you mean that writeX() is write() function family?
Yes.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ