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: <20160516201109.GD8790@intel.com>
Date:	Tue, 17 May 2016 04:11:09 +0800
From:	Yuyang Du <yuyang.du@...el.com>
To:	Matt Fleming <matt@...eblueprint.co.uk>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
	Byungchul Park <byungchul.park@....com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Luca Abeni <luca.abeni@...tn.it>,
	"Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
	Rik van Riel <riel@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Wanpeng Li <wanpeng.li@...mail.com>,
	Mel Gorman <mgorman@...hsingularity.net>,
	Mike Galbraith <umgwanakikbuti@...il.com>
Subject: Re: [RFC][PATCH 5/5] sched/core: Add debug code to catch missing
 update_rq_clock()

On Mon, May 16, 2016 at 10:46:38AM +0100, Matt Fleming wrote:
> > >  
> > > -	rq->clock_skip_update = 0;
> > > +	/* Clear ACT, preserve everything else */
> > > +	rq->clock_update_flags ^= RQCF_ACT_SKIP;
> > 
> > The comment says "Clear ACT", but this is really xor, and I am not sure
> > this is even what you want.
>  
> Urgh, you're right. I'm not sure what I was thinking when I wrote
> that.

It happens, ;)
 
> > In addition, would it be simpler to do this?
> > 
> > update_rq_clock()
> > 	if (flags & RQCF_ACT_SKIP)
> > 		flags <<= 1; /* effective skip is an update */
> > 		return;
> > 
> > 	flags = RQCF_UPDATED;
> 
> No because if someone calls rq_clock() immediately after __schedule(),
> or even immediately after we clear RQCF_ACT_SKIP in __schedule(), we
> should trigger a warning since the clock has not actually been
> updated.

Well, I don't know how concurrent it can be, but aren't both update
and read synchronized by rq->lock? So I don't understand the latter
case, and the former should be addressed (missing its own update?).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ