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]
Message-ID: <ZvOkj-USs2PRXxsH@google.com>
Date: Tue, 24 Sep 2024 22:50:07 -0700
From: Namhyung Kim <namhyung@...nel.org>
To: Alexander Monakov <amonakov@...ras.ru>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>,
	Ian Rogers <irogers@...gle.com>,
	Kan Liang <kan.liang@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
	linux-perf-users@...r.kernel.org
Subject: Re: [PATCH 1/2] perf symbol: Set binary_type of dso when loading

Hello,

On Fri, Sep 20, 2024 at 08:04:00PM +0300, Alexander Monakov wrote:
> Hi,
> 
> On Fri, 26 Apr 2024, Namhyung Kim wrote:
> 
> > For the kernel dso, it sets the binary type of dso when loading the
> > symbol table.  But it seems not to do that for user DSOs.  Actually
> > it sets the symtab type only.  It's not clear why we want to maintain
> > the two separately but it uses the binary type info before getting
> > the disassembly.
> > 
> > Let's use the symtab type as binary type too if it's not set.  I think
> > it's ok to set the binary type when it founds a symsrc whether or not
> > it has actual symbols.
> > 
> > Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> 
> Any chance this can be applied and propagated to stable? Annotating
> functions outside of the main executable is broken otherwise (regressed
> since 873a83731f1c ("perf annotate: Skip DSOs not found")).
> 
> Tested-by: Alexander Monakov <amonakov@...ras.ru>

Thanks for the test.  For some reason, it doesn't seem to be merged
while patch 2/2 is.  I'll add this with above information.

Thanks,
Namhyung

> 
> > ---
> >  tools/perf/util/symbol.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
> > index 7772a4d3e66c..63936269ec15 100644
> > --- a/tools/perf/util/symbol.c
> > +++ b/tools/perf/util/symbol.c
> > @@ -1927,6 +1927,9 @@ int dso__load(struct dso *dso, struct map *map)
> >  		if (next_slot) {
> >  			ss_pos++;
> >  
> > +			if (dso__binary_type(dso) == DSO_BINARY_TYPE__NOT_FOUND)
> > +				dso__set_binary_type(dso, symtab_type);
> > +
> >  			if (syms_ss && runtime_ss)
> >  				break;
> >  		} else {
> > 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ