]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 09:35:42 +0000 (11:35 +0200)
commit0267ae07e6eb746310cf2ff538acf2ccd8bc786e
treec9318b7900c6da7f554639575dbd9015f9de1e9b
parent2dcf97b4b22819d45b0d3277324d4a8fd8a10f6d
bpftool: Fix bug for long instructions in program CFG dumps

[ Upstream commit 67cf52cdb6c8fa6365d29106555dacf95c9fd374 ]

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: 1782dac4d14f ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/bpf/bpftool/xlated_dumper.c