]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: verifier (add branch/goto checks)
authorAlexei Starovoitov <ast@plumgrid.com>
Fri, 26 Sep 2014 07:17:05 +0000 (00:17 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Sep 2014 19:05:15 +0000 (15:05 -0400)
commitcde3c87167db6bb7b092b8b163f5e3d65c844018
tree0abd11c01180004027ec187475ab48db9ac054d5
parent2aadee160a844db06e72a070bf939152052de8ac
bpf: verifier (add branch/goto checks)

check that control flow graph of eBPF program is a directed acyclic graph

check_cfg() does:
- detect loops
- detect unreachable instructions
- check that program terminates with BPF_EXIT insn
- check that all branches are within program boundary

Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
kernel/bpf/verifier.c