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:	Thu, 2 Apr 2009 20:16:29 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	Paul Mackerras <paulus@...ba.org>,
	Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/6] perf_counter: add more context information


* Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:

> On Thu, 2009-04-02 at 13:36 +0200, Ingo Molnar wrote:
> > * Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:
> > 
> > > Put in counts to tell which ips belong to what context.
> > > 
> > >   -----
> > >    | |  hv
> > >    | --
> > > nr | |  kernel
> > >    | --
> > >    | |  user
> > >   -----
> > 
> > btw., i have an observation about the format:
> > 
> > > -#define MAX_STACK_DEPTH		255
> > > +#define MAX_STACK_DEPTH		254
> > >  
> > >  struct perf_callchain_entry {
> > > -	u64	nr;
> > > +	u32	nr, hv, kernel, user;
> > >  	u64	ip[MAX_STACK_DEPTH];
> > >  };
> > 
> > For the special case of signal notifications, if the signal is 
> > delivered immediately to the same task that raised it (pid=0), the 
> > call chain is actually a still meaningful one: it is the stack that 
> > is below the currently executing signal handler context.
> > 
> > Wouldnt it make sense to record the full stack frame for that 
> > case, to allow walking/unwinding of the stack? Or can user-space 
> > do that just fine, based on its own signal context?
> 
> I think it can do that just fine or even better than we can -- 
> userspace having access to a full dwarf2 unwinder and such.

eventually we'll have one in the kernel too, but yeah, user-space 
can do this better. It will have precise details about the runtime 
environment.

And any async mechanism has no chance to do anything useful with 
stack frame info anyway - that stack frame might be long gone.

> > We are going to hard-code the "call-chain is a series of IPs, 
> > nothing else" model, and i'd like to make sure it's future-proof
> > :)
> 
> I think it should be, function return addresses are the primary 
> piece of information here.

ok - good - just wanted to make sure :)

	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