]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'fix-verifier-warning'
authorAlexei Starovoitov <ast@kernel.org>
Tue, 26 Mar 2019 20:02:16 +0000 (13:02 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 26 Mar 2019 20:02:17 +0000 (13:02 -0700)
commit38f86c69ad15cec2dc3097e2235c6b5f593103aa
treed5a2efc9d6c204c1014fae26e3adc4c617911173
parente7106d11fc0bb3fb22904ba1fbb7a83d5acd6bbb
parent930c87014f21c637278e592d264a7c555ad46715
Merge branch 'fix-verifier-warning'

Paul Chaignon says:

====================
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.
The first patch implements the conservative option and rejects such code;
the second adds a test case.
====================

Signed-off-by: Alexei Starovoitov <ast@kernel.org>