linux_old1/tools/bpf/bpftool
Toke Høiland-Jørgensen d95f1e8b46 bpftool: Don't crash on missing xlated program instructions
Turns out the xlated program instructions can also be missing if
kptr_restrict sysctl is set. This means that the previous fix to check the
jited_prog_insns pointer was insufficient; add another check of the
xlated_prog_insns pointer as well.

Fixes: 5b79bcdf03 ("bpftool: Don't crash on missing jited insns or ksyms")
Fixes: cae73f2339 ("bpftool: use bpf_program__get_prog_info_linear() in prog.c:do_dump()")
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Quentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/bpf/20200206102906.112551-1-toke@redhat.com
2020-02-07 22:29:45 +01:00
..
Documentation bpftool: Use consistent include paths for libbpf 2020-01-20 16:37:45 -08:00
bash-completion bpftool: Add `gen skeleton` BASH completions 2019-12-15 15:58:06 -08:00
.gitignore tools: bpf: account for generated feature/ and libbpf/ directories 2019-08-31 00:38:16 +02:00
Makefile bpftool: Use consistent include paths for libbpf 2020-01-20 16:37:45 -08:00
btf.c bpftool: Print function linkage in BTF dump 2020-01-24 11:09:56 +01:00
btf_dumper.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2020-01-23 08:10:16 +01:00
cfg.c tools: bpftool: teach cfg code about JMP32 2019-01-26 13:33:01 -08:00
cfg.h tools: bpftool: replace Netronome boilerplate with SPDX license headers 2018-12-13 12:08:44 +01:00
cgroup.c bpftool: Use consistent include paths for libbpf 2020-01-20 16:37:45 -08:00
common.c bpftool: Use consistent include paths for libbpf 2020-01-20 16:37:45 -08:00
feature.c bpftool: Remove redundant "HAVE" prefix from the large INSN limit check 2020-02-04 00:04:06 +01:00
gen.c bpftool: Use consistent include paths for libbpf 2020-01-20 16:37:45 -08:00
jit_disasm.c bpftool: Use consistent include paths for libbpf 2020-01-20 16:37:45 -08:00
json_writer.c tools: bpftool: move "__printf()" attributes to header file 2019-08-15 22:06:46 -07:00
json_writer.h tools: bpftool: move "__printf()" attributes to header file 2019-08-15 22:06:46 -07:00
main.c bpftool: Use consistent include paths for libbpf 2020-01-20 16:37:45 -08:00
main.h bpftool: Add skeleton codegen command 2019-12-15 15:58:05 -08:00
map.c bpftool: Use consistent include paths for libbpf 2020-01-20 16:37:45 -08:00
map_perf_ring.c bpftool: Use consistent include paths for libbpf 2020-01-20 16:37:45 -08:00
net.c bpftool: Use consistent include paths for libbpf 2020-01-20 16:37:45 -08:00
netlink_dumper.c bpftool: Use consistent include paths for libbpf 2020-01-20 16:37:45 -08:00
netlink_dumper.h tools: bpftool: dual license all files 2018-12-13 12:08:44 +01:00
perf.c bpftool: Use consistent include paths for libbpf 2020-01-20 16:37:45 -08:00
prog.c bpftool: Don't crash on missing xlated program instructions 2020-02-07 22:29:45 +01:00
tracelog.c tools: bpftool: add an option to prevent auto-mount of bpffs, tracefs 2018-12-18 14:47:17 +01:00
xlated_dumper.c bpftool: Use consistent include paths for libbpf 2020-01-20 16:37:45 -08:00
xlated_dumper.h tools: bpftool: replace Netronome boilerplate with SPDX license headers 2018-12-13 12:08:44 +01:00