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] [day] [month] [year] [list]
Date:	Thu, 15 Mar 2012 18:28:05 -0700
From:	Arun Sharma <asharma@...com>
To:	Stephane Eranian <eranian@...gle.com>
CC:	<linux-kernel@...r.kernel.org>, <peterz@...radead.org>,
	<acme@...hat.com>, <ravitillo@....gov>, <vweaver1@...s.utk.edu>,
	<khandual@...ux.vnet.ibm.com>, <dsahern@...il.com>,
	Ingo Molnar <mingo@...e.hu>,
	Namhyung Kim <namhyung.kim@....com>
Subject: Re: [PATCH] perf: Add branch stack support to perf script

On 3/15/12 1:08 PM, Arun Sharma wrote:

> The samples seem to have the sense of call/return
> inverted. If the original callgraph was a ->  b ->  c
> I get samples like:
>
> from	to
> c	b
> b	a
>
> To restore the normal sense, I'm printing them as:
>
> to =>  from

I debugged this some more and something seems to be wrong with the the 
way the kernel maps PERF_SAMPLE_BRANCH_ANY_CALL to MSR_LBR_SELECT.

perf record -aj any_call,u -F 1 --   sleep 300 &

msr[0x1c8] = 0x1d

perf record -aj any_ret,u -F 1 --   sleep 300 &

msr[0x1c8] = 0x1ad

Stephane: does this give a clue about what may be wrong? It doesn't 
match the kernel code:

static const int nhm_lbr_sel_map[PERF_SAMPLE_BRANCH_MAX] = {
...
[PERF_SAMPLE_BRANCH_ANY_CALL] =
          LBR_REL_CALL | LBR_IND_CALL | LBR_REL_JMP | LBR_IND_JMP | LBR_FAR,
};

It'd be nice to have *_lbr_sel_map[] in the same order as
enum perf_branch_sample_type. Right now, the call and return entries are 
reversed. Which shouldn't matter in theory, since the initializer has an 
explicit index.

I also got a kernel hang running the two perf record lines above 
simultaneously (without the -F 1).

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