kernel_optimize_test/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
..
bash-completion
Documentation
.gitignore
btf_dumper.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2020-01-23 08:10:16 +01:00
btf.c bpftool: Print function linkage in BTF dump 2020-01-24 11:09:56 +01:00
cfg.c
cfg.h
cgroup.c
common.c
feature.c bpftool: Remove redundant "HAVE" prefix from the large INSN limit check 2020-02-04 00:04:06 +01:00
gen.c
jit_disasm.c
json_writer.c
json_writer.h
main.c
main.h
Makefile
map_perf_ring.c
map.c
net.c
netlink_dumper.c
netlink_dumper.h
perf.c
prog.c bpftool: Don't crash on missing xlated program instructions 2020-02-07 22:29:45 +01:00
tracelog.c
xlated_dumper.c
xlated_dumper.h