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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 28 Jul 2009 10:04:59 -0400
From:	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	Frederic Weisbecker <fweisbec@...il.com>,
	prasad@...ux.vnet.ibm.com, Ingo Molnar <mingo@...e.hu>,
	LKML <linux-kernel@...r.kernel.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Mike Galbraith <efault@....de>,
	Paul Mackerras <paulus@...ba.org>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Lai Jiangshan <laijs@...fujitsu.com>,
	Anton Blanchard <anton@...ba.org>,
	Li Zefan <lizf@...fujitsu.com>,
	Zhaolei <zhaolei@...fujitsu.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Alan Stern <stern@...land.harvard.edu>
Subject: Re: [RFC][PATCH 5/5] perfcounter: Add support for kernel hardware
	breakpoints

* Peter Zijlstra (a.p.zijlstra@...llo.nl) wrote:
> On Tue, 2009-07-28 at 03:03 +0200, Frederic Weisbecker wrote:
> > > Thirdly, we can multiplex perf counters beyond their hardware maximum,
> > > something you simply cannot do for a debug interface.
> > 
> > 
> > Again, I'm stuck in what you mean by multiplexing here :-)
> 
> If you'd create say 16 breakpoint counters, we'd RR them over the 4
> available hardware breakpoints (or less when others are taken by someone
> else).
> 
> Since its all statistics anyway, we can simply scale the event counts up
> by the time-share they received.
> 

Although hw breakpoint and performance counters could be multiplexed to
be used in RR for profiling, I fear using these for tracing does not
necessarily fit well with these statistical artefacts.

Therefore I'd recommend leaving such bp RR as a feature separate from
a low-level breakpoint API, because it seem only useful to profilers.

I think we all have our very precise use-case in mind, and this is what
makes discussion so difficult. So, for my point of view (tracing), I'd
like to be able to set performance counters and breakpoints both
monitoring userspace and kernel. The userspace breakpoints would be
exchanged when a different process is scheduled.

I see 2 complementary ways to collect data into the trace:

- triggering an interrupt each X hardware events, trace this interrupt.
- reading the performance counter value at tracepoints identifying
  execution context change (e.g. system call entry/exit, interrupt
  entry/exit...)

As you see, none of these 2 ways to gather trace data allow statistical
RR. Therefore, having this feature in the low-level API does not seem to
make sense for tracing.

So if other use-cases could be explained, maybe we can factor out the
common interfaces.

Thanks,

Mathieu

-- 
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
--
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