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] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 01 Oct 2021 18:50:55 +0100
From:   Valentin Schneider <valentin.schneider@....com>
To:     Frederic Weisbecker <frederic@...nel.org>,
        "Paul E . McKenney" <paulmck@...nel.org>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Frederic Weisbecker <frederic@...nel.org>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Peter Zijlstra <peterz@...radead.org>,
        Uladzislau Rezki <urezki@...il.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Boqun Feng <boqun.feng@...il.com>,
        Neeraj Upadhyay <neeraju@...eaurora.org>,
        Josh Triplett <josh@...htriplett.org>,
        Joel Fernandes <joel@...lfernandes.org>, rcu@...r.kernel.org
Subject: Re: [PATCH 07/11] rcu/nocb: Use appropriate rcu_nocb_lock_irqsave()

On 30/09/21 00:10, Frederic Weisbecker wrote:
> Instead of hardcoding IRQ save and nocb lock, use the consolidated
> API.
>
> Signed-off-by: Frederic Weisbecker <frederic@...nel.org>
> Cc: Valentin Schneider <valentin.schneider@....com>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> Cc: Josh Triplett <josh@...htriplett.org>
> Cc: Joel Fernandes <joel@...lfernandes.org>
> Cc: Boqun Feng <boqun.feng@...il.com>
> Cc: Neeraj Upadhyay <neeraju@...eaurora.org>
> Cc: Uladzislau Rezki <urezki@...il.com>
> Cc: Thomas Gleixner <tglx@...utronix.de>

Just one comment nit below.

Reviewed-by: Valentin Schneider <valentin.schneider@....com>

> ---
>  kernel/rcu/tree.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index b1fc6e498d90..1971a4e15e96 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -2492,8 +2492,7 @@ static void rcu_do_batch(struct rcu_data *rdp)

While at it:

-	 * Extract the list of ready callbacks, disabling to prevent
+-	 * Extract the list of ready callbacks, disabling IRQs to prevent

>        * races with call_rcu() from interrupt handlers.  Leave the
>        * callback counts, as rcu_barrier() needs to be conservative.
>        */
> -	local_irq_save(flags);
> -	rcu_nocb_lock(rdp);
> +	rcu_nocb_lock_irqsave(rdp, flags);
>       WARN_ON_ONCE(cpu_is_offline(smp_processor_id()));
>       pending = rcu_segcblist_n_cbs(&rdp->cblist);
>       div = READ_ONCE(rcu_divisor);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ