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]
Date:   Sun, 08 Sep 2019 08:27:00 +0200
From:   Federico Vaga <federico.vaga@...a.pv.it>
To:     Jonathan Corbet <corbet@....net>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
        linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org
Subject: Re: [PATCH v2] doc:lock: remove reference to clever use of read-write lock

Ignore this, the commit message is incorrect. I am sending a V3

On Saturday, September 7, 2019 12:48:41 PM CEST Federico Vaga wrote:
> Remove the clever example about read-write lock because these type of
> lock is not reccomended anymore (according to the very same document).
> So there is no reason to teach cleaver things that people should not do.
> 
> (and by the way there was a little typo)
> 
> Signed-off-by: Federico Vaga <federico.vaga@...a.pv.it>
> ---
>  Documentation/locking/spinlocks.rst | 12 ------------
>  1 file changed, 12 deletions(-)
> 
> diff --git a/Documentation/locking/spinlocks.rst
> b/Documentation/locking/spinlocks.rst index e93ec6645238..66e3792f8a36
> 100644
> --- a/Documentation/locking/spinlocks.rst
> +++ b/Documentation/locking/spinlocks.rst
> @@ -139,18 +139,6 @@ on other CPU's, because an interrupt on another CPU
> doesn't interrupt the CPU that holds the lock, so the lock-holder can
> continue and eventually releases the lock).
> 
> -Note that you can be clever with read-write locks and interrupts. For
> -example, if you know that the interrupt only ever gets a read-lock, then
> -you can use a non-irq version of read locks everywhere - because they
> -don't block on each other (and thus there is no dead-lock wrt interrupts.
> -But when you do the write-lock, you have to use the irq-safe version.
> -
> -For an example of being clever with rw-locks, see the "waitqueue_lock"
> -handling in kernel/sched/core.c - nothing ever _changes_ a wait-queue from
> -within an interrupt, they only read the queue in order to know whom to
> -wake up. So read-locks are safe (which is good: they are very common
> -indeed), while write-locks need to protect themselves against interrupts.
> -
>  		Linus
> 
>  ----




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ