OSDN Git Service

bpftool: Fix bug for long instructions in program CFG dumps
authorQuentin Monnet <quentin@isovalent.com>
Wed, 5 Apr 2023 13:21:15 +0000 (14:21 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 6 Apr 2023 04:27:27 +0000 (21:27 -0700)
commit67cf52cdb6c8fa6365d29106555dacf95c9fd374
tree93e32ee4cc379b39b8c7af574183c8477cd05745
parente27f0f1620b693ecf312c21ff8a52affb8a5be08
bpftool: Fix bug for long instructions in program CFG dumps

When dumping the control flow graphs for programs using the 16-byte long
load instruction, we need to skip the second part of this instruction
when looking for the next instruction to process. Otherwise, we end up
printing "BUG_ld_00" from the kernel disassembler in the CFG.

Fixes: efcef17a6d65 ("tools: bpftool: generate .dot graph from CFG information")
Signed-off-by: Quentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/r/20230405132120.59886-3-quentin@isovalent.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/bpf/bpftool/xlated_dumper.c