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]
Message-ID: <874mtvraop.fsf@sejong.aot.lge.com>
Date:	Wed, 19 Nov 2014 15:01:10 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	"Liang\, Kan" <kan.liang@...el.com>
Cc:	"acme\@kernel.org" <acme@...nel.org>,
	"jolsa\@redhat.com" <jolsa@...hat.com>,
	"a.p.zijlstra\@chello.nl" <a.p.zijlstra@...llo.nl>,
	"eranian\@google.com" <eranian@...gle.com>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>,
	"mingo\@redhat.com" <mingo@...hat.com>,
	"paulus\@samba.org" <paulus@...ba.org>,
	"ak\@linux.intel.com" <ak@...ux.intel.com>
Subject: Re: [PATCH V3 3/3] perf tools: Construct LBR call chain

On Tue, 18 Nov 2014 14:01:06 +0000, Kan Liang wrote:
>> On Fri, 14 Nov 2014 08:44:12 -0500, kan liang wrote:
>> > +		/* LBR only affects the user callchain */
>> > +		if (i != chain_nr) {
>> > +			struct branch_stack *lbr_stack = sample-
>> >branch_stack;
>> > +			int lbr_nr = lbr_stack->nr;
>> > +			/*
>> > +			 * LBR callstack can only get user call chain.
>> > +			 * The mix_chain_nr is kernel call chain
>> > +			 * number plus LBR user call chain number.
>> > +			 * i is kernel call chain number,
>> > +			 * 1 is PERF_CONTEXT_USER,
>> > +			 * lbr_nr + 1 is the user call chain number.
>> > +			 * For details, please refer to the comments
>> > +			 * in callchain__printf
>> > +			 */
>> > +			int mix_chain_nr = i + 1 + lbr_nr + 1;
>> > +
>> > +			if (mix_chain_nr > PERF_MAX_STACK_DEPTH) {
>> > +				pr_warning("corrupted callchain.
>> skipping...\n");
>> > +				return 0;
>> > +			}
>> 
>> I'm not sure whether this is really a corrupted callchain.  If a single chain is
>> greater than the max it should be corrupted, but we're now summing up
>> with other values..
>> 
>> What about checking callchain_nr and lbr_nr separately or mix_nr with
>> 2*max?
>
> The lbr_nr max is 16. I will change it to max+16.

Shouldn't it be 18 (16 + 1 + 1) at least?

Thanks,
Namhyung
--
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