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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <cd41b389-6374-4f84-996c-0fe778962a47@efficios.com>
Date: Mon, 7 Oct 2024 10:52:12 -0400
From: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To: Boqun Feng <boqun.feng@...il.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
 Andrew Morton <akpm@...ux-foundation.org>,
 Peter Zijlstra <peterz@...radead.org>, linux-kernel@...r.kernel.org,
 Nicholas Piggin <npiggin@...il.com>, Michael Ellerman <mpe@...erman.id.au>,
 Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
 Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
 "Paul E. McKenney" <paulmck@...nel.org>, Will Deacon <will@...nel.org>,
 Alan Stern <stern@...land.harvard.edu>, John Stultz <jstultz@...gle.com>,
 Neeraj Upadhyay <Neeraj.Upadhyay@....com>,
 Frederic Weisbecker <frederic@...nel.org>,
 Joel Fernandes <joel@...lfernandes.org>,
 Josh Triplett <josh@...htriplett.org>, Uladzislau Rezki <urezki@...il.com>,
 Steven Rostedt <rostedt@...dmis.org>, Lai Jiangshan
 <jiangshanlai@...il.com>, Zqiang <qiang.zhang1211@...il.com>,
 Ingo Molnar <mingo@...hat.com>, Waiman Long <longman@...hat.com>,
 Mark Rutland <mark.rutland@....com>, Thomas Gleixner <tglx@...utronix.de>,
 Vlastimil Babka <vbabka@...e.cz>, maged.michael@...il.com,
 Mateusz Guzik <mjguzik@...il.com>,
 Jonas Oberhauser <jonas.oberhauser@...weicloud.com>, rcu@...r.kernel.org,
 linux-mm@...ck.org, lkmm@...ts.linux.dev
Subject: Re: [RFC PATCH 3/4] hp: Implement Hazard Pointers

On 2024-10-07 15:47, Boqun Feng wrote:
> On Thu, Oct 03, 2024 at 09:30:53AM -0400, Mathieu Desnoyers wrote:
> [...]
>>>> +	/*
>>>> +	 * Use RCU dereference without lockdep checks, because
>>>> +	 * lockdep is not aware of HP guarantees.
>>>> +	 */
>>>> +	addr2 = rcu_access_pointer(*addr_p);	/* Load A */
>>>
>>> Why rcu_access_pointer() instead of READ_ONCE()? Because you want to
>>> mark the head of address dependency?
>>
>> Yes, the intent here is to mark the address dependency and provide
>> a publication guarantee similar to RCU pairing rcu_assign_pointer
>> and rcu_dereference. Do you see any reason why READ_ONCE() would
>> suffice here ?
> 
> READ_ONCE() also provides address dependencies. See the "DEPENDENCY
> RELATIONS: data, addr, and ctrl" section in
> tools/memory-model/Documentation/explanantion.txt.

Fair point, so let's use READ_ONCE() then.

Thanks,

Mathieu

> 
> Regards,
> Boqun
> 
>>
>> Thanks,
>>
>> Mathieu
>>

-- 
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ