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]
Message-ID: <CAPhsuW5UgMSrs=rJpZw6nPTqteEZRa=tt3XvWKq4oMk6rLGbrA@mail.gmail.com>
Date: Tue, 21 Jan 2025 10:03:59 -0800
From: Song Liu <song@...nel.org>
To: Ian Rogers <irogers@...gle.com>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>, Peter Zijlstra <peterz@...radead.org>, 
	Ingo Molnar <mingo@...hat.com>, Namhyung Kim <namhyung@...nel.org>, 
	Mark Rutland <mark.rutland@....com>, 
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>, 
	Adrian Hunter <adrian.hunter@...el.com>, Kan Liang <kan.liang@...ux.intel.com>, 
	Aditya Gupta <adityag@...ux.ibm.com>, Athira Rajeev <atrajeev@...ux.vnet.ibm.com>, 
	Charlie Jenkins <charlie@...osinc.com>, James Clark <james.clark@...aro.org>, 
	"Steinar H. Gunderson" <sesse@...gle.com>, Changbin Du <changbin.du@...wei.com>, 
	Ravi Bangoria <ravi.bangoria@....com>, Howard Chu <howardchu95@...il.com>, 
	linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org
Subject: Re: [PATCH v1 1/3] perf build: Remove libbfd support

Hi Ian and Arnaldo,

On Tue, Jan 21, 2025 at 8:52 AM Ian Rogers <irogers@...gle.com> wrote:
>
> On Mon, Jan 13, 2025 at 7:10 AM Arnaldo Carvalho de Melo
> <acme@...nel.org> wrote:
> >
> > On Sat, Jan 11, 2025 at 12:28:49PM -0800, Ian Rogers wrote:
> > > libbfd is license incompatible with perf and building requires the
> > > BUILD_NONDISTRO=1 build flag. Remove the code to simplify the code
> > > base.
> > >
> > > Signed-off-by: Ian Rogers <irogers@...gle.com>
> >
> > > diff --git a/tools/perf/util/disasm_bpf.c b/tools/perf/util/disasm_bpf.c
> > > index 1fee71c79b62..a891a0b909a7 100644
> > > --- a/tools/perf/util/disasm_bpf.c
> > > -
> > > -int symbol__disassemble_bpf(struct symbol *sym, struct annotate_args *args)
> > > -{
> > > -     struct annotation *notes = symbol__annotation(sym);
> >
> > Song,
> >
> >         Have you ever investigated how to reimplement BPF disassemble
> > using some other library than this one?

I am sorry that I somehow missed this thread last week.

I haven't looked into alternatives to libbfd.

Thanks,
Song

>
> I think doing it using libLLVM should be straightforward. I sent out
> this series to make libcapstone and libLLVM loadable using
> dlopen/dlsym:
> https://lore.kernel.org/lkml/20250120173208.344231-1-irogers@google.com/
> See symbol__disassemble_llvm in patch 5:
> https://lore.kernel.org/lkml/20250120173208.344231-6-irogers@google.com/
> the difference is selecting just the BPF disassembler, so don't pass a
> triplet, force it to BPF.
>
> Anyway, one option following that series is to factor libbfd
> dependencies into a bfd.c in tools/perf/util. That way we can try to
> have a common interface for capstone, LLVM, etc. The other is to
> delete it, which is my preference. I can add the BPF disassembler
> support to llvm.c in that series and rebase this series onto it.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ