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: <CAFULd4afgt7LtqzZ_oFDz4wtMe+TZKGX3E_XpSo2HD5rQEvOjg@mail.gmail.com>
Date: Wed, 20 Nov 2024 16:36:31 +0100
From: Uros Bizjak <ubizjak@...il.com>
To: Alex Elder <elder@...cstar.com>
Cc: linux-xfs@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Chandan Babu R <chandan.babu@...cle.com>, "Darrick J. Wong" <djwong@...nel.org>, 
	Christoph Hellwig <hch@...radead.org>, Dave Chinner <dchinner@...hat.com>
Subject: Re: [PATCH] xfs: Use xchg() in xlog_cil_insert_pcp_aggregate()

On Wed, Nov 20, 2024 at 4:34 PM Alex Elder <elder@...cstar.com> wrote:
>
> On 11/20/24 9:06 AM, Uros Bizjak wrote:
> > try_cmpxchg() loop with constant "new" value can be substituted
> > with just xchg() to atomically get and clear the location.
>
> You're right.  With a constant new value (0), there is no need
> to loop to ensure we get a "stable" update.
>
> Is the READ_ONCE() is still needed?

No, xchg() guarantees atomic access on its own.

Uros.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ