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, 5 May 2015 18:50:17 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Steven Rostedt <rostedt@...dmis.org>
cc:	Mike Galbraith <umgwanakikbuti@...il.com>,
	Ronny Meeus <ronny.meeus@...il.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH] sched: Handle priority boosted tasks proper in
 setscheduler()

On Tue, 5 May 2015, Steven Rostedt wrote:
> On Tue, 5 May 2015 18:31:20 +0200 (CEST)
> Thomas Gleixner <tglx@...utronix.de> wrote:
> 
> > On Tue, 5 May 2015, Steven Rostedt wrote:
> > > I got pulled onto other things so I never finished it, but one thing
> > > that worried me about this fix is this:
> > > 
> > > 	T1 - FIFO policy (prio = 10)
> > > 	  lock(rtmutex);
> > > 
> > > 	T2 (prio = 20)
> > > 	  lock(rtmutex)
> > > 	    boost T1 (prio = 20)
> > > 
> > >         TI (prio = 20)
> > > 	  sys_sched_setscheduler(prio = 30)
> > > 	  TI (prio = 30)
> > > 
> > > 	T1 (prio = 30)
> > > 	  sys_sched_setscheduler(SCHED_OTHER)
> > > 	  new_effective_prio = 20, oldprio = 30
> > > 
> > > Before the code stopped at the rt_mutex_check_prio(), but now it
> > > continues. Will having the policy change cause problems here?
> > 
> > No, because it stays effective in the FIFO domain.
> > 
> 
> Ah, the policy passed in isn't used, so we are safe. But, but I also
> found that we still call __setscheduler(), which does:
> 
> 	p->prio = normal_prio();
> 
> Isn't that going to null out the boosting?

Crap. Yes, I missed that. So __setscheduler() assumes that there is no
boosting going on. So we need:

   p->prio = effective_prio(p);

there instead.

Thanks,

	tglx


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ