Searched hist:"80331752 e990e3f13df1c1d45496424d8eccc29b" (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/tools/bpf/bpftool/ |
H A D | cfg.h | 80331752e990e3f13df1c1d45496424d8eccc29b Thu Mar 01 20:01:18 CST 2018 Jiong Wang <jiong.wang@netronome.com> 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 <jiong.wang@netronome.com> Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
|
H A D | cfg.c | 80331752e990e3f13df1c1d45496424d8eccc29b Thu Mar 01 20:01:18 CST 2018 Jiong Wang <jiong.wang@netronome.com> 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 <jiong.wang@netronome.com> Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
|