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: <Z8gLIne1nDPa1yp3@grain>
Date: Wed, 5 Mar 2025 11:28:18 +0300
From: Cyrill Gorcunov <gorcunov@...il.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
	Anna-Maria Behnsen <anna-maria@...utronix.de>,
	Frederic Weisbecker <frederic@...nel.org>,
	Benjamin Segall <bsegall@...gle.com>,
	Eric Dumazet <edumazet@...gle.com>,
	Andrey Vagin <avagin@...nvz.org>,
	Pavel Tikhomirov <ptikhomirov@...tuozzo.com>,
	Peter Zijlstra <peterz@...radead.org>
Subject: Re: [patch V2 10/17] posix-timers: Make
 signal_struct::next_posix_timer_id an atomic_t

On Wed, Mar 05, 2025 at 08:31:21AM +0100, Thomas Gleixner wrote:
...
> 
> The traversal does not RMW the timer itself, it unmangles the signal
> pointer for comparison in posix_timer_hashed(). posix_timer_by_id() does
> straight comparisons. So both only read.

No, I mean that we read the value then allocate a temp value with 0 bit
excluded implicitly, so it is not a straight read, but whatever.

> Sure, we can mangle timer ID instead of the signal pointer, but the
> outcome is pretty much the same. The only difference is in
> posix_timer_hashed(), which must detect a taken timer ID independent of
> the timers valid state to prevent collisions.

Bah, I managed to miss that we need to lookup for not yet fully initialized
timers as well, and indeed it makes no much difference which exactly field
to mangle. Thanks a huge for explanations, Thomas!

	Cyrill

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ