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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 27 Apr 2022 19:56:50 -0400
From:   Waiman Long <longman@...hat.com>
To:     John Donnelly <John.p.donnelly@...cle.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
        Boqun Feng <boqun.feng@...il.com>
Cc:     linux-kernel@...r.kernel.org, Hillf Danton <hdanton@...a.com>
Subject: Re: [PATCH] locking/rwsem: Allow slowpath writer to ignore handoff
 bit if not set by first waiter

On 4/27/22 19:16, John Donnelly wrote:
> On 4/27/22 12:31 PM, Waiman Long wrote:
>> With commit d257cc8cb8d5 ("locking/rwsem: Make handoff bit handling more
>> consistent"), the writer that sets the handoff bit can be interrupted
>> out without clearing the bit if the wait queue isn't empty. This 
>> disables
>> reader and writer optimistic lock spinning and stealing.
>>
>> Now if a non-first writer in the queue is somehow woken up or first
>> entering the waiting loop, it can't acquire the lock.  This is not
>> the case before that commit as the writer that set the handoff bit
>> will clear it when exiting out via the out_nolock path. This is less
>> efficient as the busy rwsem stays in an unlock state for a longer time.
>>
>> This patch allows a non-first writer to ignore the handoff bit if it
>> is not originally set or initiated by the first waiter.
>>
>> Fixes: d257cc8cb8d5 ("locking/rwsem: Make handoff bit handling more 
>> consistent")
>
> Hi Waiman,
>
> 1. You likely need :
>
> Cc: <stable@...r.kernel.org>
>
> Since d257cc8cb8d5 has been migrated to other LTS threads (5.15.y for 
> sure) .

Since the commit has a fixes tag, the stable will automatically pick it up.

>
> 2. I had posted this earlier:
>
> [PATCH 5.15 1/1] Revert "locking/rwsem: Make handoff bit handling more 
> consistent"
>
> That is likely not needed now.
Right. The patch was created to fix a problem reported by another user. 
So reverting it may not the right move.
>
>
> 3. Please add :
>
> Reported-by: Jorge Lopez <jorge.jo.lopez@...cle.com>
>
> We can likely test this, but I can't give a ETA when that will happen.
>
>
>> Signed-off-by: Waiman Long <longman@...hat.com>
>
> Acked-by: John Donnelly <john.p.donnelly@...cle.com>

Will add the that when I send out the next version.

Cheers,
Longman

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ