bpf: remove incorrect 'verifier bug' warning
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | bpf: remove incorrect 'verifier bug' warningkernel/ | +3 | 0 replies | |
| 2/2 | selftests/bpf: test case for invalid call stack in dead codetools/ | +38 | 0 replies |
Reviews trailers per patch
None of the 2 patches has a Reviewed-by or Acked-by.
| Patch | Xiao Han |
|---|---|
| 1/2 | T-b |
| 2/2 | T-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH bpf-next 0/2] 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. The first patch implements the conservative option and rejects such code; the second adds a test case.
Paul Chaignon (2):
bpf: remove incorrect 'verifier bug' warning selftests/bpf: test case for invalid call stack in dead code
kernel/bpf/verifier.c | 5 +-- tools/testing/selftests/bpf/verifier/calls.c | 38 ++++++++++++++++++++ 2 files changed, 41 insertions(+), 2 deletions(-)
Signature · 1 line
2.17.1