Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: 5b79bcd ("bpftool: Don't crash on missing jited insns or ksyms") Fixes: cae73f2 ("bpftool: use bpf_program__get_prog_info_linear() in prog.c:do_dump()") Signed-off-by: Toke Høiland-Jørgensen <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Reviewed-by: Quentin Monnet <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
- Loading branch information