summaryrefslogtreecommitdiffstats
path: root/tools/bpf/bpftool/cfg.h
Commit message (Collapse)AuthorAgeFilesLines
* tools: bpftool: detect sub-programs from the eBPF sequenceJiong Wang2018-03-011-0/+43
This patch detect all sub-programs from the eBPF sequence and keep the information in the new CFG data structure. The detection algorithm is basically the same as the one in verifier except we need to use insn->off instead of insn->imm to get the pc-relative call offset. Because verifier has modified insn->off/insn->imm during finishing the verification. Also, we don't need to do some sanity checks as verifier has done them. Signed-off-by: Jiong Wang <jiong.wang@netronome.com> Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
OpenPOWER on IntegriCloud