aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/verifier
diff options
context:
space:
mode:
authorPaul Chaignon <paul.chaignon@orange.com>2019-03-20 13:58:27 +0100
committerAlexei Starovoitov <ast@kernel.org>2019-03-26 13:02:16 -0700
commit927cb78177ae3773d0d27404566a93cb8e88890c (patch)
tree468b520b36506fade213dc64431cf18cf10c6cc5 /tools/testing/selftests/bpf/verifier
parentbpf: fix use after free in bpf_evict_inode (diff)
downloadlinux-dev-927cb78177ae3773d0d27404566a93cb8e88890c.tar.xz
linux-dev-927cb78177ae3773d0d27404566a93cb8e88890c.zip
bpf: remove incorrect 'verifier bug' warning
The BPF verifier checks the maximum number of call stack frames twice, first in the main CFG traversal (do_check) and then in a subsequent traversal (check_max_stack_depth). If the second check fails, it logs a 'verifier bug' warning and errors out, as the number of call stack frames should have been verified already. However, the second check may fail without indicating a verifier bug: if the excessive function calls reside in dead code, the main CFG traversal may not visit them; the subsequent traversal visits all instructions, including dead code. This case raises the question of how invalid dead code should be treated. This patch implements the conservative option and rejects such code. Signed-off-by: Paul Chaignon <paul.chaignon@orange.com> Tested-by: Xiao Han <xiao.han@orange.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/verifier')
0 files changed, 0 insertions, 0 deletions