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: <PH0PR12MB5481FE2A85C3492AF645E2FADC5B9@PH0PR12MB5481.namprd12.prod.outlook.com>
Date:   Mon, 3 Oct 2022 05:54:53 +0000
From:   Parav Pandit <parav@...dia.com>
To:     Joel Fernandes <joel@...lfernandes.org>
CC:     "bagasdotme@...il.com" <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>,
        "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 v1] locking/memory-barriers.txt: Improve documentation for
 writel() usage

Hi Joel,

> From: Joel Fernandes <joel@...lfernandes.org>
> Sent: Friday, September 30, 2022 7:41 AM
> 
> Hi,
> 
> > On Sep 29, 2022, at 10:04 PM, Parav Pandit <parav@...dia.com> wrote:
> >
> > The cited commit describes that when using writel(), explcit wmb() is
> > not needed. wmb() is an expensive barrier. writel() uses the needed
> > I/O barrier instead of expensive wmb().
> 
> Because you mentioned it in the commit message, Why not mention in the
> documentation text as well that writel() has the needed I/O barrier in it?
>
It is already documented in [1].
Though [1] is doesn’t describe about using I/O barrier.

To keep [1] and above example in sync, and to address Akira's comment [2], it makes sense to drop I/O barrier from the above example and reword the line as below

"Note that, when using writel(), a prior barrier is not needed".
 
[1] https://elixir.bootlin.com/linux/latest/source/Documentation/memory-barriers.txt#L2559
[2] https://lore.kernel.org/lkml/5db465f3-698f-ebee-a668-1740a705ce9c@gmail.com/
> >
> > Hence update the example to be more accurate that matches the current
> > implementation.
> 
> That would make it more accurate, since accuracy is your goal.
> 
Yes. Above modified text looks more aligned to writeX() doc.
Will send v2.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ