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:	Mon, 17 Aug 2009 11:35:23 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Paul Mackerras <paulus@...ba.org>
Cc:	Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf_counter: Check task on counter read IPI

On Mon, 2009-08-17 at 19:26 +1000, Paul Mackerras wrote:
> Peter Zijlstra writes:
> 
> > > I don't have an example of an actual failure due to this race, but it
> > > seems obvious that it could occur and we need to guard against it, so
> > > I think this should go in .31.
> > 
> > Hmm, right.
> > 
> > However those other sites have retry loops in the caller, but callers of
> > __perf_counter_read() do not. Granted, I'm not sure what they should
> > retry on exactly, but this patch trades an invalid update to a missing
> > update.
> 
> It relies on the counter sched-out updating ->count for all the
> counters on the task.  We know that the sched-out happened very
> recently, i.e. in the interval between deciding to send the IPI and
> the IPI arriving.  So the counter value should be sufficiently up to
> date.  Ingo pointed this out to me some time ago.
> 
> I tried to address that in the comments and the patch description but
> perhaps I wasn't explicit enough.

Or its still early and I hadn't had my morning juice yet..

Yes, you're right, in case we missed it due to a race with schedule, the
schedule action itself will have indeed updated the count and we're good
again.

So sorry for the confusion,

Acked-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>

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