From: Alan Maguire <alan.maguire@oracle.com>
To: Andrii Nakryiko <andrii@kernel.org>
Cc: bpf@vger.kernel.org, netdev@vger.kernel.org, ast@fb.com,
daniel@iogearbox.net, kernel-team@fb.com,
linux-kernel@vger.kernel.org, rafael@kernel.org, jeyu@kernel.org,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH bpf-next 5/5] tools/bpftool: add support for in-kernel and named BTF in `btf show`
Date: Mon, 9 Nov 2020 16:42:58 +0000 (GMT) [thread overview]
Message-ID: <alpine.LRH.2.21.2011091633450.4154@localhost> (raw)
In-Reply-To: <20201106055111.3972047-6-andrii@kernel.org>
On Thu, 5 Nov 2020, Andrii Nakryiko wrote:
> Display vmlinux BTF name and kernel module names when listing available BTFs
> on the system.
>
> In human-readable output mode, module BTFs are reported with "name
> [module-name]", while vmlinux BTF will be reported as "name [vmlinux]".
> Square brackets are added by bpftool and follow kernel convention when
> displaying modules in human-readable text outputs.
>
I had a go at testing this and all looks good, but I was curious
if "bpftool btf dump" is expected to work with module BTF? I see
the various modules in /sys/kernel/btf, but if I run:
# bpftool btf dump file /sys/kernel/btf/ixgbe
Error: failed to load BTF from /sys/kernel/btf/ixgbe: Invalid argument
...while it still works for vmlinux:
# bpftool btf dump file /sys/kernel/btf/vmlinux
[1] INT '(anon)' size=4 bits_offset=0 nr_bits=32 encoding=(none)
[2] INT 'long unsigned int' size=8 bits_offset=0 nr_bits=64
encoding=(none)
...
"bpftool btf show" works for ixgbe:
# bpftool btf show|grep ixgbe
19: name [ixgbe] size 182074B
Is this perhaps not expected to work yet? (I updated pahole
to the latest changes etc and BTF generation seemed to work
fine for modules during kernel build).
For the "bpftool btf show" functionality, feel free to add
Tested-by: Alan Maguire <alan.maguire@oracle.com>
Thanks!
Alan
next prev parent reply other threads:[~2020-11-09 16:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20201106055111.3972047-1-andrii@kernel.org>
[not found] ` <20201106055111.3972047-5-andrii@kernel.org>
2020-11-06 6:43 ` [PATCH bpf-next 4/5] bpf: load and verify kernel module BTFs Greg Kroah-Hartman
2020-11-06 22:17 ` Andrii Nakryiko
[not found] ` <20201106055111.3972047-6-andrii@kernel.org>
2020-11-09 16:42 ` Alan Maguire [this message]
2020-11-09 17:58 ` [PATCH bpf-next 5/5] tools/bpftool: add support for in-kernel and named BTF in `btf show` Andrii Nakryiko
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=alpine.LRH.2.21.2011091633450.4154@localhost \
--to=alan.maguire@oracle.com \
--cc=acme@redhat.com \
--cc=andrii@kernel.org \
--cc=ast@fb.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=gregkh@linuxfoundation.org \
--cc=jeyu@kernel.org \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rafael@kernel.org \
/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).