aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/bpf_tracing.h
diff options
context:
space:
mode:
authorManu Bretelle <[email protected]>2022-08-01 13:24:09 +0000
committerAndrii Nakryiko <[email protected]>2022-08-04 21:41:13 +0000
commitd55dfe587bc0670f90564a962615723fe7749ab1 (patch)
tree76aa182f0fc5ad10a90b8c74ed9021c1690ac09d /tools/lib/bpf/bpf_tracing.h
parentlibbpf: Initialize err in probe_map_create (diff)
downloadkernel-d55dfe587bc0670f90564a962615723fe7749ab1.tar.gz
kernel-d55dfe587bc0670f90564a962615723fe7749ab1.zip
bpftool: Remove BPF_OBJ_NAME_LEN restriction when looking up bpf program by name
bpftool was limiting the length of names to BPF_OBJ_NAME_LEN in prog_parse fds. Since commit b662000aff84 ("bpftool: Adding support for BTF program names") we can get the full program name from BTF. This patch removes the restriction of name length when running `bpftool prog show name ${name}`. Test: Tested against some internal program names that were longer than `BPF_OBJ_NAME_LEN`, here a redacted example of what was ran to test. # previous behaviour $ sudo bpftool prog show name some_long_program_name Error: can't parse name # with the patch $ sudo ./bpftool prog show name some_long_program_name 123456789: tracing name some_long_program_name tag taghexa gpl .... ... ... ... # too long sudo ./bpftool prog show name $(python3 -c 'print("A"*128)') Error: can't parse name # not too long but no match $ sudo ./bpftool prog show name $(python3 -c 'print("A"*127)') Signed-off-by: Manu Bretelle <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Tested-by: Jiri Olsa <[email protected]> Reviewed-by: Quentin Monnet <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/lib/bpf/bpf_tracing.h')
0 files changed, 0 insertions, 0 deletions