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>] [day] [month] [year] [list]
Date:   Tue, 03 Aug 2021 11:10:48 +0200
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Hillf Danton <hdanton@...a.com>
Cc:     LKML <linux-kernel@...r.kernel.org>
Subject: Re: [patch 30/63] locking/spinlock: Provide RT variant

On Tue, Aug 03 2021 at 14:32, Hillf Danton wrote:
> On Fri, 30 Jul 2021 15:50:37 +0200
>> + *   The RT substitutions explicitly disable migration and take
>> + *   rcu_read_lock() across the lock held section.
>> + */
>
> My stupid question is how it works in scenarios like spinlock chain
>
> 	spin_lock(&foo->lock);
> 	spin_lock(&bar->lock);
> 	do something for foo and bar;
> 	spin_unlock(&bar->lock);
> 	spin_unlock(&foo->lock);
>
> with rcu read lock held across the lock protected section because rcu
> lock has preempt disabled and that will disallow scheduling while acquiring
> the inner lock.

If CONFIG_PREEMPT_RCU=y rcu_read_lock() does not disable
preemption. This is even true for !RT kernels with CONFIG_PREEMPT=y

Thanks,

        tglx


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ