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: <4fa5ec01-ff09-16f3-e1d6-42431036f554@redhat.com>
Date:   Wed, 4 Aug 2021 19:34:42 -0400
From:   Waiman Long <llong@...hat.com>
To:     Thomas Gleixner <tglx@...utronix.de>,
        LKML <linux-kernel@...r.kernel.org>
Cc:     Peter Zijlstra <peterz@...radead.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>,
        Boqun Feng <boqun.feng@...il.com>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Davidlohr Bueso <dave@...olabs.net>
Subject: Re: [patch 30/63] locking/spinlock: Provide RT variant

On 7/30/21 9:50 AM, Thomas Gleixner wrote:
> From: Thomas Gleixner <tglx@...utronix.de>
>
> Provide the actual locking functions which make use of the general and
> spinlock specific rtmutex code.
>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> ---
>   kernel/locking/Makefile      |    1
>   kernel/locking/spinlock_rt.c |  128 +++++++++++++++++++++++++++++++++++++++++++
>   2 files changed, 129 insertions(+)
>   create mode 100644 kernel/locking/spinlock_rt.c
> ---
> --- a/kernel/locking/Makefile
> +++ b/kernel/locking/Makefile
> @@ -25,6 +25,7 @@ obj-$(CONFIG_LOCK_SPIN_ON_OWNER) += osq_
>   obj-$(CONFIG_PROVE_LOCKING) += spinlock.o
>   obj-$(CONFIG_QUEUED_SPINLOCKS) += qspinlock.o
>   obj-$(CONFIG_RT_MUTEXES) += rtmutex_api.o
> +obj-$(CONFIG_PREEMPT_RT) += spinlock_rt.o
>   obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock.o
>   obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock_debug.o
>   obj-$(CONFIG_QUEUED_RWLOCKS) += qrwlock.o
> --- /dev/null
> +++ b/kernel/locking/spinlock_rt.c
> @@ -0,0 +1,128 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * PREEMPT_RT substitution for spin/rw_locks
> + *
> + * spin_lock and rw_lock on RT are based on rtmutex with a few twists to
> + * resemble the non RT semantics
> + *
> + * - Contrary to a plain rtmutex, spin_lock and rw_lock are state
> + *   preserving. The task state is saved before blocking on the underlying
> + *   rtmutex and restored when the lock has been acquired. Regular wakeups
> + *   during that time are redirected to the saved state so no wake up is
> + *   missed.
> + *
> + * - Non RT spin/rw_locks disable preemption and evtl. interrupts.

"evtl."?

Cheers,
Longman

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ