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:	Fri, 27 Mar 2015 20:12:42 +0100
From:	David Hildenbrand <dahi@...ux.vnet.ibm.com>
To:	"Liang, Kan" <kan.liang@...el.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"a.p.zijlstra@...llo.nl" <a.p.zijlstra@...llo.nl>,
	"paulus@...ba.org" <paulus@...ba.org>,
	"mingo@...hat.com" <mingo@...hat.com>,
	"acme@...nel.org" <acme@...nel.org>,
	"acme@...hat.com" <acme@...hat.com>,
	"jolsa@...nel.org" <jolsa@...nel.org>,
	"namhyung@...nel.org" <namhyung@...nel.org>,
	"Hunter, Adrian" <adrian.hunter@...el.com>,
	"ak@...ux.intel.com" <ak@...ux.intel.com>,
	"brueckner@...ux.vnet.ibm.com" <brueckner@...ux.vnet.ibm.com>,
	"schwidefsky@...ibm.com" <schwidefsky@...ibm.com>
Subject: Re: [PATCH v1] perf callchain: fix kernel symbol resolution by
 remembering the cpumode

> 
> 
> > Commit 2e77784bb7d8 ("perf callchain: Move cpumode resolve code to
> > add_callchain_ip") promised "No change in behavior.".
> > 
> > As this commit breaks callchains on s390x (symbols not getting resolved,
> > observed when profiling the kernel), this statement is wrong. The
> > cpumode must be kept when iterating over all ips, otherwise the default
> > (PERF_RECORD_MISC_USER) will be used by error.
> 
> Indeed.
> Besides thread__resolve_callchain_sample, lbr path also need to 
> be patched.

Thanks, I'll include that and send another version.

David

> 
> @@ -1538,6 +1536,7 @@ static int resolve_lbr_callchain_sample
> (struct thread *thread,
>  {
>         struct ip_callchain *chain = sample->callchain;
>         int chain_nr = min(max_stack, (int)chain->nr);
> +       u8 cpumode = PERF_RECORD_MISC_USER;
>         int i, j, err;
>         u64 ip;
> 
> @@ -1584,7 +1583,7 @@ static int resolve_lbr_callchain_sample
> (struct thread *thread,
>                                         ip = lbr_stack->entries[0].to;
>                         }
> 
> -                       err = add_callchain_ip(thread, parent, root_al, false, ip);
> +                      err = add_callchain_ip(thread, parent, root_al, &cpumode, ip);
>                         if (err)
>                                 return (err < 0) ? err : 0;
>                 }
> 
> Thanks,
> Kan
> 

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