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: <ZqvIGLQNAtYqjo7u@x1>
Date: Thu, 1 Aug 2024 14:38:32 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Ian Rogers <irogers@...gle.com>
Cc: Namhyung Kim <namhyung@...nel.org>, Song Liu <song@...nel.org>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Jiri Olsa <jolsa@...nel.org>, Kan Liang <kan.liang@...ux.intel.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] perf bpf: Move BPF disassembly routines to separate
 file to avoid clash with capstone bpf headers

On Thu, Aug 01, 2024 at 08:18:23AM -0700, Ian Rogers wrote:
> On Wed, Jul 31, 2024 at 11:51 AM Arnaldo Carvalho de Melo
> <acme@...nel.org> wrote:
> >
> > On Wed, Jul 31, 2024 at 10:07:50AM -0700, Namhyung Kim wrote:
> > > On Wed, Jul 31, 2024 at 8:12 AM Arnaldo Carvalho de Melo
> [snip]
> > > I think this can be gated by LIBBFD and LIBBPF config, but not sure
> > > it can express the both requirements easily.
> >
> > It is possible, but as discussed with Ian in another message, the
> > cheapest way to do it was, I think, like I did, in the end it is just a
> > stub returning an error when those libraries are not linked with perf.
> >
> > When we manage to implement the disassembly of BPF using something other
> > than libbfd we can spend more time in this area, I think.
> 
> Not following this, can you show an example perf command. There is a
> BPF disassembler already in the kernel tree:
> https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/kernel/bpf/disasm.c?h=perf-tools-next
> and in use in bpftool that we use in the perf build.

Well, looking at the files in this patch shows it, here, more precisely:


tools/perf/util/disasm_bpf.c

#else // defined(HAVE_LIBBFD_SUPPORT) && defined(HAVE_LIBBPF_SUPPORT)
int symbol__disassemble_bpf(struct symbol *sym __maybe_unused, struct annotate_args *args __maybe_unused)
{
        return SYMBOL_ANNOTATE_ERRNO__NO_LIBOPCODES_FOR_BPF;
}
#endif // defined(HAVE_LIBBFD_SUPPORT) && defined(HAVE_LIBBPF_SUPPORT)

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ