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: <87fsvm6css.ffs@tglx>
Date:   Fri, 06 Aug 2021 13:19:15 +0200
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Peter Zijlstra <peterz@...radead.org>
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>,
        Mike Galbraith <efault@....de>
Subject: Re: [patch V3 50/64] locking/rtmutex: Extend the rtmutex core to
 support ww_mutex

On Fri, Aug 06 2021 at 13:00, Peter Zijlstra wrote:

> On Thu, Aug 05, 2021 at 05:13:50PM +0200, Thomas Gleixner wrote:
>>  static __always_inline bool __waiter_less(struct rb_node *a, const struct rb_node *b)
>>  {
>> -	return rt_mutex_waiter_less(__node_2_waiter(a), __node_2_waiter(b));
>
> Given ^
>
>> +	struct rt_mutex_waiter *aw = __node_2_waiter(a);
>> +	struct rt_mutex_waiter *bw = __node_2_waiter(b);
>> +
>> +	if (rt_mutex_waiter_less(aw, bw))
>> +		return 1;
>
> We can, with this new build_ww_mutex(), do:
>
> 	if (!build_ww_mutex())
> 		return 0;
>
> here, to preserve the old behaviour.
>
>> +	if (rt_mutex_waiter_less(bw, aw))
>> +		return 0;
>> +
>> +	/* NOTE: relies on waiter->ww_ctx being set before insertion */
>> +	if (build_ww_mutex() && aw->ww_ctx) {
>
> Then it can go away here.

Pretty obvious. Indeed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ