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] [day] [month] [year] [list]
Message-ID: <e05f04a5-9792-445f-9c53-3c3a1edfd370@nvidia.com>
Date: Fri, 2 May 2025 11:13:02 -0400
From: Joel Fernandes <joelagnelf@...dia.com>
To: Frederic Weisbecker <frederic@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Boqun Feng <boqun.feng@...il.com>,
 Neeraj Upadhyay <neeraj.upadhyay@....com>,
 "Paul E . McKenney" <paulmck@...nel.org>, Uladzislau Rezki
 <urezki@...il.com>, Zqiang <qiang.zhang1211@...il.com>,
 rcu <rcu@...r.kernel.org>
Subject: Re: [PATCH v2] rcu: Robustify rcu_is_cpu_rrupt_from_idle()



On 4/29/2025 6:08 AM, Frederic Weisbecker wrote:
> RCU relies on the context tracking nesting counter in order to determine
> if it is running in extended quiescent state.
> 
> However the context tracking nesting counter is not completely
> synchronized with the actual context tracking state:
> 
> * The nesting counter is set to 1 or incremented further _after_ the
>   actual state is set to RCU watching.
> 
> * The nesting counter is set to 0 or decremented further _before_ the
>   actual state is set to RCU not watching.
> 
> Therefore it is safe to assume that if ct_nesting() > 0, RCU is
> watching. But if ct_nesting() <= 0, RCU is not watching except for tiny
> windows.
> 
> This hasn't been a problem so far because rcu_is_cpu_rrupt_from_idle()
> has only been called from interrupts. However the code is confusing
> and abuses the role of the context tracking nesting counter while there
> are more accurate indicators available.
> 
> Clarify and robustify accordingly.
> 
> Signed-off-by: Frederic Weisbecker <frederic@...nel.org>
> ---

This seems like an important change but not urgent or fixing a bug, so I will
put it in my rcu/dev branch as well so it is easy for Neeraj to take.

thanks,

 - Joel


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ