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: <6831b9fe-402f-40a6-84e6-b723dd006b90@redhat.com>
Date: Fri, 12 Sep 2025 17:13:09 -0400
From: Waiman Long <llong@...hat.com>
To: pengdonglin <dolinux.peng@...il.com>, tj@...nel.org, tony.luck@...el.com,
 jani.nikula@...ux.intel.com, ap420073@...il.com, jv@...sburgh.net,
 freude@...ux.ibm.com, bcrl@...ck.org, trondmy@...nel.org, kees@...nel.org
Cc: bigeasy@...utronix.de, linux-kernel@...r.kernel.org,
 linux-rt-devel@...ts.linux.dev, linux-nfs@...r.kernel.org,
 linux-aio@...ck.org, linux-fsdevel@...r.kernel.org,
 linux-security-module@...r.kernel.org, netdev@...r.kernel.org,
 intel-gfx@...ts.freedesktop.org, linux-acpi@...r.kernel.org,
 linux-s390@...r.kernel.org, cgroups@...r.kernel.org,
 pengdonglin <pengdonglin@...omi.com>, "Paul E . McKenney"
 <paulmck@...nel.org>
Subject: Re: [PATCH] rcu: Remove redundant rcu_read_lock/unlock() in spin_lock
 critical sections

On 9/12/25 2:50 AM, pengdonglin wrote:
> From: pengdonglin <pengdonglin@...omi.com>
>
> When CONFIG_PREEMPT_RT is disabled, spin_lock*() operations implicitly
> disable preemption, which provides RCU read-side protection. When
> CONFIG_PREEMPT_RT is enabled, spin_lock*() implementations internally
> manage RCU read-side critical sections.

I have some doubt about your claim that disabling preemption provides 
RCU read-side protection. It is true for some flavors but probably not 
all. I do know that disabling interrupt will provide RCU read-side 
protection. So for spin_lock_irq*() calls, that is valid. I am not sure 
about spin_lock_bh(), maybe it applies there too. we need some RCU 
people to confirm.

When CONFIG_PREEMPT_RT is enabled, rt_spin_lock/unlock() will call 
rcu_read_lock/_unlock() internally. So eliminating explicit 
rcu_read_lock/unlock() in critical sections should be fine.

Cheers,
Longman


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ