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, 15 Sep 2022 14:37:57 +0200
From:   "Arnd Bergmann" <arnd@...db.de>
To:     "Parav Pandit" <parav@...dia.com>, stern@...land.harvard.edu,
        parri.andrea@...il.com, "Will Deacon" <will@...nel.org>,
        "Peter Zijlstra" <peterz@...radead.org>, boqun.feng@...il.com,
        "Nicholas Piggin" <npiggin@...il.com>, dhowells@...hat.com,
        j.alglave@....ac.uk, luc.maranget@...ia.fr,
        "Paul E. McKenney" <paulmck@...nel.org>, akiyks@...il.com,
        dlustig@...dia.com, joel@...lfernandes.org,
        "Jonathan Corbet" <corbet@....net>, linux-kernel@...r.kernel.org,
        Linux-Arch <linux-arch@...r.kernel.org>,
        linux-doc@...r.kernel.org
Subject: Re: [PATCH] locking/memory-barriers.txt: Improve documentation for writel()
 usage

On Thu, Sep 15, 2022, at 7:01 AM, Parav Pandit wrote:
> The cited commit [1] describes that when using writel(), explcit wmb()
> is not needed. However, it should have said that dma_wmb() is not
> needed.

Are you sure? As I understand it, the dma_wmb() only serializes
a set of memory accesses, but does not serialized against an MMIO
access, which depending on the CPU architecture may require a
different type of barrier.

E.g. on arm, writel() uses __iowmb(), which like wmb() is defined
as "dsb(x); arm_heavy_mb();", while dma_wmb() is a "dmb(oshst)".

     Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ