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: <20231206104409.mcNIiNBs@linutronix.de>
Date:   Wed, 6 Dec 2023 11:44:09 +0100
From:   Sebastian Siewior <bigeasy@...utronix.de>
To:     Anna-Maria Behnsen <anna-maria@...utronix.de>
Cc:     linux-kernel@...r.kernel.org,
        Peter Zijlstra <peterz@...radead.org>,
        John Stultz <jstultz@...gle.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Eric Dumazet <edumazet@...gle.com>,
        "Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
        Arjan van de Ven <arjan@...radead.org>,
        "Paul E . McKenney" <paulmck@...nel.org>,
        Frederic Weisbecker <frederic@...nel.org>,
        Rik van Riel <riel@...riel.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Giovanni Gherdovich <ggherdovich@...e.cz>,
        Lukasz Luba <lukasz.luba@....com>,
        "Gautham R . Shenoy" <gautham.shenoy@....com>,
        Srinivas Pandruvada <srinivas.pandruvada@...el.com>,
        K Prateek Nayak <kprateek.nayak@....com>
Subject: Re: [PATCH v9 25/32] timers: Add get next timer interrupt
 functionality for remote CPUs

On 2023-12-01 10:26:47 [+0100], Anna-Maria Behnsen wrote:
> To prepare for the conversion of the NOHZ timer placement to a pull at
> expiry time model it's required to have functionality available getting the
> next timer interrupt on a remote CPU.
> 
> Locking of the timer bases and getting the information for the next timer
> interrupt functionality is split into separate functions. This is required
> to be compliant with lock ordering when the new model is in place.
> 
> Signed-off-by: Anna-Maria Behnsen <anna-maria@...utronix.de>
> Reviewed-by: Frederic Weisbecker <frederic@...nel.org>

Please fold the hunk below, it keeps sparse happy.

------->8---------

diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index 2cff43c103295..00420d8faa042 100644
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -2075,6 +2075,8 @@ void fetch_next_timer_interrupt_remote(unsigned long basej, u64 basem,
  * Unlocks the remote timer bases.
  */
 void timer_unlock_remote_bases(unsigned int cpu)
+	__releases(timer_bases[BASE_LOCAL]->lock)
+	__releases(timer_bases[BASE_GLOBAL]->lock)
 {
 	struct timer_base *base_local, *base_global;
 
@@ -2092,6 +2094,8 @@ void timer_unlock_remote_bases(unsigned int cpu)
  * Locks the remote timer bases.
  */
 void timer_lock_remote_bases(unsigned int cpu)
+	__acquires(timer_bases[BASE_LOCAL]->lock)
+	__acquires(timer_bases[BASE_GLOBAL]->lock)
 {
 	struct timer_base *base_local, *base_global;
 

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ