Skip to content
Snippets Groups Projects
Commit 61777f37 authored by Alexei Starovoitov's avatar Alexei Starovoitov
Browse files

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: default avatarAlexei Starovoitov <ast@kernel.org>
parents 1da6c4d9 cabacfbb
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment