]> git.baikalelectronics.ru Git - kernel.git/commit
bpf/verifier: display non-spill stack slot types in print_verifier_state
authorEdward Cree <ecree@solarflare.com>
Wed, 22 Aug 2018 19:02:44 +0000 (20:02 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 30 Aug 2018 01:52:12 +0000 (18:52 -0700)
commitd069dd6bdff3c9c0e764c4dbead8b129129d0ae8
tree6af86387e67804ce0b375367811af02fb9b04ac3
parentc4370e2d869504263731fd7d813c1b5f7da6f51a
bpf/verifier: display non-spill stack slot types in print_verifier_state

If a stack slot does not hold a spilled register (STACK_SPILL), then each
 of its eight bytes could potentially have a different slot_type.  This
 information can be important for debugging, and previously we either did
 not print anything for the stack slot, or just printed fp-X=0 in the case
 where its first byte was STACK_ZERO.
Instead, print eight characters with either 0 (STACK_ZERO), m (STACK_MISC)
 or ? (STACK_INVALID) for any stack slot which is neither STACK_SPILL nor
 entirely STACK_INVALID.

Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/verifier.c