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: <20130410110650.GD28828@gmail.com>
Date:	Wed, 10 Apr 2013 13:06:50 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Frederic Weisbecker <fweisbec@...il.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Alessio Igor Bogani <abogani@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Chris Metcalf <cmetcalf@...era.com>,
	Christoph Lameter <cl@...ux.com>,
	Geoff Levand <geoff@...radead.org>,
	Gilad Ben Yossef <gilad@...yossef.com>,
	Hakan Akkan <hakanakkan@...il.com>,
	Li Zhong <zhong@...ux.vnet.ibm.com>,
	Namhyung Kim <namhyung.kim@....com>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Paul Gortmaker <paul.gortmaker@...driver.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Paul Turner <pjt@...gle.com>, Mike Galbraith <efault@....de>
Subject: Re: [PATCH 2/7] sched: Update rq clock on nohz CPU before setting
 fair group shares


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

> On Wed, 2013-04-10 at 12:06 +0200, Ingo Molnar wrote:
> > * Peter Zijlstra <peterz@...radead.org> wrote:
> > 
> > > I think Mike once tried something along the lines of keeping a per rq state that 
> > > got cleared at the end of schedule() but that doesn't catch things like the 
> > > migrate handlers I think.
> > 
> > We'd need a rq->clock.valid debug flag, which is set by a sched-clock update, and 
> > cleared by the end of all scheduler operations, not just schedule().
> > 
> > Then sched_clock() could have a pretty efficient assert in it. Are there bugs that 
> > such an approach would not catch?
> 
> It requires manual iteration of all scheduler operations which is prone
> to 'accidents'.

There's just a handful of high level entry points, right? schedule(), wakeup, 
scheduler tick, maybe notifiers - anything else? Documenting/listing those would 
be nice anyway, near the top of kernel/sched/core.c or so.

The other approach would be to periodically clear the flag from the timer tick. 
That would catch invalid rq->clock use probabilistically.

> I'd clear at the beginning, but that's more or less the same thing.
> 
> We have the .sched.text section but I'm not sure we've been consistent enough 
> with that to be useful. But otherwise we'd be able to clear on section 
> entry/exit or so.

Hm, I'm not sure that can be made to work sanely.

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