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: <20160614194401.GL30921@twins.programming.kicks-ass.net>
Date:	Tue, 14 Jun 2016 21:44:01 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Juri Lelli <juri.lelli@....com>
Cc:	mingo@...nel.org, tglx@...utronix.de, rostedt@...dmis.org,
	xlpang@...hat.com, linux-kernel@...r.kernel.org,
	mathieu.desnoyers@...icios.com, jdesfossez@...icios.com,
	bristot@...hat.com
Subject: Re: [RFC][PATCH 8/8] rtmutex: Fix PI chain order integrity

On Tue, Jun 14, 2016 at 06:39:08PM +0100, Juri Lelli wrote:
> On 07/06/16 21:56, Peter Zijlstra wrote:
> > rt_mutex_waiter::prio is a copy of task_struct::prio which is updated
> > during the PI chain walk, such that the PI chain order isn't messed up
> > by (asynchronous) task state updates.
> > 
> > Currently rt_mutex_waiter_less() uses task state for deadline tasks;
> > this is broken, since the task state can, as said above, change
> > asynchronously, causing the RB tree order to change without actual
> > tree update -> FAIL.
> > 
> > Fix this by also copying the deadline into the rt_mutex_waiter state
> > and updating it along with its prio field.
> > 
> > Ideally we would also force PI chain updates whenever DL tasks update
> > their deadline parameter, but for first approximation this is less
> > broken than it was.
> > 
> 
> The patch looks OK to me. However, I'm failing to see when we can update
> dl.deadline of a waiter asynchronously. Since a waiter is blocked, we
> can't really change his dl.deadline by calling setscheduler on him, as
> the update would operate on dl.dl_deadline. The new values will start to
> be used as soon as it gets unblocked. The situation seems different for
> RT tasks, for which priority change takes effect immediately.
> 
> What am I missing? :-)

Ah, I missed the dl_deadline vs deadline thing. Still, with optimistic
spinning the waiter could hit its throttle/refresh path, right? And then
that would update deadline.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ