Skip to content
Commit 92c6c9b7 authored by Toke Høiland-Jørgensen's avatar Toke Høiland-Jørgensen Committed by Paul Gortmaker
Browse files

bpftool: Don't crash on missing xlated program instructions



commit d95f1e8b upstream.

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: 5b79bcdf ("bpftool: Don't crash on missing jited insns or ksyms")
Fixes: cae73f23 ("bpftool: use bpf_program__get_prog_info_linear() in prog.c:do_dump()")
Signed-off-by: default avatarToke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Reviewed-by: default avatarQuentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/bpf/20200206102906.112551-1-toke@redhat.com


Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent 67aed576
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment