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: Fri, 29 Mar 2024 12:57:35 -0700
From: Namhyung Kim <namhyung@...nel.org>
To: Ian Rogers <irogers@...gle.com>
Cc: Changbin Du <changbin.du@...wei.com>, Arnaldo Carvalho de Melo <acme@...nel.org>, 
	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 0/4] perf annotate: Use libcapstone as a disasssembler

Hi Ian,

On Fri, Mar 29, 2024 at 9:33 AM Ian Rogers <irogers@...gle.com> wrote:
>
> On Thu, Mar 28, 2024 at 4:20 PM Namhyung Kim <namhyung@...nel.org> wrote:
> >
> > Hello,
> >
> > As we've added libcapstone support, it's natural to use it for perf annotate
> > as well.  This change added the capstone support on x86 first.  Other archs
> > can be added later (by someone who can verify it doesn't break things).
> >
> > For now it tries to use capstone (if available) before objdump.  But it
> > doesn't support source file and line number info.  So users should use the
> > objdump (by passing --objdump=PATH option) if they need them.  For example,
> > this command line will keep the existing behavior (i.e. using objdump).
> >
> >   # not to use capstone for disassembly
> >   $ perf annotate --objdump=objdump
> >
> > The capstone uses LLVM objdump style output which is slightly different than
> > the GNU objdump.  But it should not have differences besides that.  I've
> > verified the result of data type profiling and it produced the same output
> > but gave me ~3x speedups.
> >
> > Thanks,
> > Namhyung
>
> I wanted to see what -fsanitize=address would think of libcaptstone
> and no issues,  so:
>
> Tested-by: Ian Rogers <irogers@...gle.com>

Thanks for checking it!

>
> Some thoughts:
>  - it may be worth adding to the commit message in "perf annotate:
> Split out util/disasm.c" that there's no functional change,
>  - we lack perf annotate testing,
>  - it seems capstone should be opt-out rather than opt-in as a library
> dependency (given the performance delta and the objdump interactions
> are at best messy),
>  - if libcapstone could solve our addr2line issues too this would be great :-).

I think addr2line should be handled using libdw.  I'll take a look.

Thanks,
Namhyung

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ