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, 01 Apr 2009 10:13:42 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Paul Mackerras <paulus@...ba.org>
Cc:	Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf_counter: allow and require one-page mmap on
 counting counters

On Wed, 2009-04-01 at 13:32 +1100, Paul Mackerras wrote:
> Peter Zijlstra writes:
> 
> > On Wed, 2009-03-25 at 20:42 +1100, Paul Mackerras wrote:
> > > 
> > > And here's something else that is semi-related: the PAPI guys want a
> > > kind of counter that counts until it overflows, and then sends a
> > > signal to the process and disables itself (and the whole group it's
> > > in).
> > 
> > I tried doing this this evening, and its remarkably hard. Disabling a
> > counter relies on reading the time, and taking ctx->lock and such.
> > Things that are impossible to do in NMI context.
> 
> So, if I have a group where the leader is a hardware counter set to
> use NMIs, and there is a task_clock software counter in the group,
> don't we hit exactly the same issue with reading the time?

Hmm, I think you're right there. Nasty.

> I'd be OK with saying that you can't use stop-and-signal with NMI
> counters.

Right, so let them use regular IRQs, yes, that will work. Let me code
that.

>   There will still be some issues on powerpc because of our
> lazy interrupt disabling scheme, so some work might have to get
> deferred until we soft-enable interrupts, but we have a way to manage
> that.

Hmm, you're saying ppc always uses NMIs, even when !hw_event.nmi?

> On another topic, I noticed that we have a race with perf_counter_read
> where we do the IPI but don't check in __read() on the destination cpu
> that the task we're after is still running on that cpu.  It needs
> checking and retry logic like we have in other places in
> perf_counter.c.

Yep, you're right again. Should we perhaps generalize that whole code
and provide a method vector for the various bits. That way we could
collapse all that code replication.

This TODO list keeps growing :-)

BTW, how's progress with the lazy switching?

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