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:   Tue, 03 Aug 2021 23:22:05 +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>
Subject: Re: [patch 58/63] futex: Prevent requeue_pi() lock nesting issue on RT

On Tue, Aug 03 2021 at 13:20, Peter Zijlstra wrote:
> On Fri, Jul 30, 2021 at 03:51:05PM +0200, Thomas Gleixner wrote:
>> +	/*
>> +	 * We were woken prior to requeue by a timeout or a signal.
>> +	 * Unqueue the futex_q and determine which it was.
>> +	 */
>> +	plist_del(&q->list, &hb->chain);
>> +	hb_waiters_dec(hb);
>> +
>> +	/* Handle spurious wakeups gracefully */
>> +	ret = -EWOULDBLOCK;
>> +	if (timeout && !timeout->task)
>> +		ret = -ETIMEDOUT;
>> +	else if (signal_pending(current))
>> +		ret = -ERESTARTNOINTR;
>>  	return ret;
>>  }
>
> AFAICT this change is a separate cleanup, possible because the only
> callsite already does that match_futex() test before calling this.

No. It's possible because the state machine guarantees that. The
match_futex() in the calling function is unrelated.

> I think it might be worth splitting out, just to reduce the complexity
> of this patch.

Yes, I did by moving the match_futex() test to the call site as a
preparatory change for this one.

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ