aboutsummaryrefslogtreecommitdiffstats
path: root/tools/bpf/bpftool/prog.c
diff options
context:
space:
mode:
authorJiong Wang <[email protected]>2018-03-02 02:01:18 +0000
committerAlexei Starovoitov <[email protected]>2018-03-02 02:29:48 +0000
commit80331752e990e3f13df1c1d45496424d8eccc29b (patch)
treedb1ddf7b1a0bbc1fb377c9e1f192d3ad192d298f /tools/bpf/bpftool/prog.c
parenttools: bpftool: factor out xlated dump related code into separate file (diff)
downloadkernel-80331752e990e3f13df1c1d45496424d8eccc29b.tar.gz
kernel-80331752e990e3f13df1c1d45496424d8eccc29b.zip
tools: bpftool: detect sub-programs from the eBPF sequence
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 <[email protected]> Acked-by: Jakub Kicinski <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/bpf/bpftool/prog.c')
0 files changed, 0 insertions, 0 deletions