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: <CANn89i+6HRUtHchZ9s94ORw=B+CZ2KSU6--M6Tszsb6F0M2Sdg@mail.gmail.com>
Date: Mon, 24 Feb 2025 14:34:35 +0100
From: Eric Dumazet <edumazet@...gle.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>, LKML <linux-kernel@...r.kernel.org>, 
	Anna-Maria Behnsen <anna-maria@...utronix.de>, Frederic Weisbecker <frederic@...nel.org>, 
	Benjamin Segall <bsegall@...gle.com>, Andrey Vagin <avagin@...nvz.org>, 
	Pavel Tikhomirov <ptikhomirov@...tuozzo.com>
Subject: Re: [patch 06/11] posix-timers: Make signal_struct::next_posix_timer_id
 an atomic_t

On Mon, Feb 24, 2025 at 2:20 PM Peter Zijlstra <peterz@...radead.org> wrote:
>
> On Mon, Feb 24, 2025 at 11:15:32AM +0100, Thomas Gleixner wrote:
>
> > +             unsigned int id = (atomic_inc_return(&sig->next_posix_timer_id) - 1) & INT_MAX;
>
> How about:
>
>         unsigned int id = atomic_fetch_inc(&sig->next_posix_timer_id) & INT_MAX;

NIce, it seems few calls in net trees could use this as well.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ