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: <b770230f-7721-461b-a9f8-b482284c4a94@redhat.com>
Date: Tue, 13 Aug 2024 16:23:54 -0400
From: Waiman Long <longman@...hat.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: cl@...two.org, Catalin Marinas <catalin.marinas@....com>,
 Will Deacon <will@...nel.org>, Peter Zijlstra <peterz@...radead.org>,
 Ingo Molnar <mingo@...hat.com>, Boqun Feng <boqun.feng@...il.com>,
 linux-mm@...ck.org, linux-kernel@...r.kernel.org,
 linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH RFC] Avoid memory barrier in read_seqcount() through load
 acquire


On 8/13/24 16:01, Linus Torvalds wrote:
> On Tue, 13 Aug 2024 at 12:58, Waiman Long <longman@...hat.com> wrote:
>> Sorry for the confusion. What you said above is actually the reason that
>> I ask this question. In the same way, smp_rmb()/wmb() is available for
>> all arches. I am actually asking if it should be a flag that indicates
>> the arch's preference to use acquire/release over rmb/wmb.
> I think that if an arch says it has native acquire/release, we should
> basically assume that it's the better model.
>
> I mean, we could certainly use "PREFERS" instead of "HAS", but is
> there any real reason to do that?
>
> Do we suddenly expect that people would make a CPU that has native
> acquire/release, and it would somehow then prefer a full read barrier?

ARCH_HAS_ACQUIRE_RELEASE is fine, but the help text for this Kconfig option should clarify this preference as both the ARCH_HAS_ACQUIRE_RELEASE and the !ARCH_HAS_ACQUIRE_RELEASE code are valid.

Cheers,
Longman


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ