Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpftool: adding support for BTF program names #2425

Closed
wants to merge 2 commits into from

Conversation

kernel-patches-bot
Copy link

Pull request for series with
subject: bpftool: adding support for BTF program names
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=606387

@kernel-patches-bot
Copy link
Author

Master branch: e80f2a0
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=606387
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: 2a1aff6
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=606387
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: 712d479
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=606387
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: eaa266d
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=606387
version: 1

@kernel-patches-bot
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=606387 expired. Closing PR.

Nobody and others added 2 commits January 19, 2022 02:12
`bpftool prog list` and other bpftool subcommands that show
BPF program names currently get them from bpf_prog_info.name.
That field is limited to 16 (BPF_OBJ_NAME_LEN) chars which leads
to truncated names since many progs have much longer names.

The idea of this change is to improve all bpftool commands that
output prog name so that bpftool uses info from BTF to print
program names if available.

It tries bpf_prog_info.name first and fall back to btf only if
the name is suspected to be truncated (has 15 chars length).

Right now `bpftool p show id <id>` returns capped prog name

<id>: kprobe  name example_cap_cap  tag 712e...
...

With this change it would return

<id>: kprobe  name example_cap_capable  tag 712e...
...

Note, other commands that print prog names (e.g. "bpftool
cgroup tree") are also addressed in this change.

Signed-off-by: Raman Shukhau <ramasha@fb.com>
@kernel-patches-bot
Copy link
Author

Master branch: eaa266d
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=606556
version: 2

@kernel-patches-bot
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=606556 irrelevant now. Closing PR.

@kernel-patches-bot kernel-patches-bot deleted the series/606387=>bpf-next branch January 19, 2022 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant