From: Jiri Olsa <jolsa@redhat.com>
To: Andrii Nakryiko <andriin@fb.com>
Cc: Jiri Olsa <jolsa@kernel.org>, Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
Yonghong Song <yhs@fb.com>, Martin Lau <kafai@fb.com>
Subject: Re: [PATCH] bpftool: Try to read btf as raw data if elf read fails
Date: Mon, 21 Oct 2019 15:54:28 +0200 [thread overview]
Message-ID: <20191021135428.GB32718@krava> (raw)
In-Reply-To: <d8620b04-346a-11eb-000f-34d0f9f0cd51@fb.com>
On Fri, Oct 18, 2019 at 04:48:25PM +0000, Andrii Nakryiko wrote:
> On 10/18/19 3:34 AM, Jiri Olsa wrote:
> > The bpftool interface stays the same, but now it's possible
> > to run it over BTF raw data, like:
>
> Oh, great, I had similar patch laying around for a while, never got to
> cleaning it up, though, so thanks for picking this up!
>
> >
> > $ bpftool btf dump file /sys/kernel/btf/vmlinux
> > libbpf: failed to get EHDR from /sys/kernel/btf/vmlinux
>
> We should implement this so that we don't get an extra log output with
> errors. I've been thinking about checking first few bytes of the file.
> If that matches BTF_MAGIC, then try to parse it as raw BTF, otherwise
> parse as ELF w/ BTF. Does it make sense?
ok, sounds good
jirka
next prev parent reply other threads:[~2019-10-21 13:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-18 10:34 [PATCH] bpftool: Try to read btf as raw data if elf read fails Jiri Olsa
2019-10-18 16:48 ` Andrii Nakryiko
2019-10-18 20:04 ` Yonghong Song
2019-10-21 13:55 ` Jiri Olsa
2019-10-21 13:54 ` Jiri Olsa [this message]
2019-10-18 22:39 ` Jakub Kicinski
2019-10-21 14:02 ` Jiri Olsa
2019-10-21 23:16 ` Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191021135428.GB32718@krava \
--to=jolsa@redhat.com \
--cc=andriin@fb.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=jolsa@kernel.org \
--cc=kafai@fb.com \
--cc=netdev@vger.kernel.org \
--cc=yhs@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).