summaryrefslogtreecommitdiffstats
path: root/Kconfig
diff options
context:
space:
mode:
authorJiong Wang2018-05-02 22:17:19 +0200
committerDaniel Borkmann2018-05-04 11:58:36 +0200
commit4cb3d99c84ccbf728ff0e381c7c9815c3fa2bd5e (patch)
treed6a6c3f464d0a9588f678b61dca9b9d81e670263 /Kconfig
parentbpf: centre subprog information fields (diff)
downloadkernel-qcow2-linux-4cb3d99c84ccbf728ff0e381c7c9815c3fa2bd5e.tar.gz
kernel-qcow2-linux-4cb3d99c84ccbf728ff0e381c7c9815c3fa2bd5e.tar.xz
kernel-qcow2-linux-4cb3d99c84ccbf728ff0e381c7c9815c3fa2bd5e.zip
bpf: add faked "ending" subprog
There are quite a few code snippet like the following in verifier: subprog_start = 0; if (env->subprog_cnt == cur_subprog + 1) subprog_end = insn_cnt; else subprog_end = env->subprog_info[cur_subprog + 1].start; The reason is there is no marker in subprog_info array to tell the end of it. We could resolve this issue by introducing a faked "ending" subprog. The special "ending" subprog is with "insn_cnt" as start offset, so it is serving as the end mark whenever we iterate over all subprogs. Signed-off-by: Jiong Wang <jiong.wang@netronome.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'Kconfig')
0 files changed, 0 insertions, 0 deletions