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]
Message-ID: <20160615175512.GV30921@twins.programming.kicks-ass.net>
Date:	Wed, 15 Jun 2016 19:55:12 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	mingo@...nel.org, tglx@...utronix.de, juri.lelli@....com,
	xlpang@...hat.com, linux-kernel@...r.kernel.org,
	mathieu.desnoyers@...icios.com, jdesfossez@...icios.com,
	bristot@...hat.com, Ingo Molnar <mingo@...hat.com>
Subject: Re: [RFC][PATCH 3/8] sched/deadline/rtmutex: Dont miss the
 dl_runtime/dl_period update

On Wed, Jun 15, 2016 at 12:30:07PM -0400, Steven Rostedt wrote:

> > +++ b/kernel/locking/rtmutex.c
> > @@ -488,7 +488,7 @@ static int rt_mutex_adjust_prio_chain(st
> >  	 * enabled we continue, but stop the requeueing in the chain
> >  	 * walk.
> >  	 */
> > -	if (waiter->prio == task->prio) {
> > +	if (waiter->prio == task->prio && !dl_task(task)) {
> 
> Isn't task the owner of the lock? 

No, task is blocked on something.

> What happens if the waiter is a
> deadline task?

So the test here is a shortcut to terminate the Pi chain adjust, it says
that if the waiter and task have the same priority, we're done. Further
adjustments will not make a difference.

The problem is that for deadline tasks, prio is a useless number, so
even if they match (all deadline tasks have prio -1) they might still
not actually match.

After the last patch I suppose we could do something like:

	waiter->prio == task->prio && waiter->deadline == task->dl.deadline

In any case, any condition that compares just two 'prio' values is per
definition broken if DL tasks are involved.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ