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:	Wed, 27 Nov 2013 15:17:21 +0100
From:	Ingo Molnar <mingo@...nel.org>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Juri Lelli <juri.lelli@...il.com>, tglx@...utronix.de,
	mingo@...hat.com, rostedt@...dmis.org, oleg@...hat.com,
	fweisbec@...il.com, darren@...art.com, johan.eker@...csson.com,
	p.faure@...tech.ch, linux-kernel@...r.kernel.org,
	claudio@...dence.eu.com, michael@...rulasolutions.com,
	fchecconi@...il.com, tommaso.cucinotta@...up.it,
	nicola.manica@...i.unitn.it, luca.abeni@...tn.it,
	dhaval.giani@...il.com, hgu1972@...il.com,
	paulmck@...ux.vnet.ibm.com, raistlin@...ux.it,
	insop.song@...il.com, liming.wang@...driver.com, jkacur@...hat.com,
	harald.gustafsson@...csson.com, vincent.guittot@...aro.org,
	bruce.ashfield@...driver.com,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 02/14] sched: add extended scheduling interface. (new ABI)


* Peter Zijlstra <peterz@...radead.org> wrote:

> On Wed, Nov 27, 2013 at 03:01:43PM +0100, Ingo Molnar wrote:
> > > So the problem I see with this one is that because you're allowed to 
> > > call sched_setparam() or whatever it will be called next on another 
> > > task; a task can very easily fail its sched_getparam() call.
> > > 
> > > Suppose the application is 'old' and only supports a subset of the 
> > > fields; but its wants to get, modify and set its params. This will 
> > > work as long nothing will set anything it doesn't know about.
> > > 
> > > As soon as some external entity -- say a sysad using schedtool -- 
> > > sets a param field it doesn't support the get, modify, set routing 
> > > completely fails.
> > 
> > There are two approaches to this that I can see:
> > 
> > 1)
> > 
> > allow partial information to be returned to user-space, for existing 
> > input parameters. The new fields won't be displayed, but the tool 
> > doesn't know about them anyway so it's OK. The tool can still display 
> > all the other existing parameters.
> 
> But suppose a task simply wants to lower/raise its static (FIFO)
> priority and does:
> 
> sched_getparam(&params);
> params.prio += 1;
> sched_setparam(&params);
> 
> If anything outside of the known param fields was set, we just silently
> lost it, for the setparam() call will fill out 0s for the unprovided
> fields.
> 
> > 2)
> > 
> > Return -ENOSYS if the 'extra' fields are nonzero. In this case the 
> > usual case of old tooling + new kernel will still work just fine, 
> > because old tooling won't set the new fields to any non-default 
> > (nonzero) values. In the 'mixed' case old tooling will not be able to 
> > change/display those fields.
> > 
> > I tend to lean towards #1. What do you think?
> 
> As per the above that can result in silent unexpected behavioural
> changes.
> 
> I'd much rather be explicit and break hard; so 2).
> 
> So mixing new tools (schedtool, chrt etc) and old apps will give pain,
> but at least not silent surprises.

You are right, I concur.

Thanks,

	Ingo
--
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