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]
Date:   Wed, 14 Jul 2021 13:25:30 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Juri Lelli <juri.lelli@...hat.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Daniel Bristot de Oliveira <bristot@...hat.com>,
        Will Deacon <will@...nel.org>,
        Waiman Long <longman@...hat.com>,
        Boqun Feng <boqun.feng@...il.com>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Davidlohr Bueso <dave@...olabs.net>
Subject: Re: [patch 27/50] locking/spinlock: Provide RT variant

On Tue, Jul 13, 2021 at 05:11:21PM +0200, Thomas Gleixner wrote:

> + * - Non RT spin/rw_locks disable preemption and evtl. interrupts.
> + *   Disabling preemption has the side effect of disabling migration and
> + *   preventing RCU grace periods.
> + *
> + *   The RT substitutions explicitly disable migration and take
> + *   rcu_read_lock() across the lock held section.

> +static __always_inline void __rt_spin_lock(spinlock_t *lock)
> +{
> +	rtlock_lock(&lock->lock);
> +	rcu_read_lock();
> +	migrate_disable();
> +}

One notable difference is that regular spinlocks disable preemption (and
hence imply the other things) *before* they acquire the lock, while this
thing does the implied semantics *after* it acquires the lock.

The difference is of course that the acquisition period is not covered
and I don't think anybody actually relies on that, nor do I readily see
how one could.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ