Skip to content

Commit

Permalink
bpf: fix stack state printing in verifier log
Browse files Browse the repository at this point in the history
fix incorrect stack state prints in print_verifier_state()

Fixes: 638f5b9 ("bpf: reduce verifier memory consumption")
Signed-off-by: Alexei Starovoitov <[email protected]>
Acked-by: John Fastabend <[email protected]>
Acked-by: Daniel Borkmann <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
  • Loading branch information
4ast authored and borkmann committed Dec 1, 2017
1 parent 51de082 commit 12a3cc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/bpf/verifier.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ static void print_verifier_state(struct bpf_verifier_env *env,
for (i = 0; i < state->allocated_stack / BPF_REG_SIZE; i++) {
if (state->stack[i].slot_type[0] == STACK_SPILL)
verbose(env, " fp%d=%s",
-MAX_BPF_STACK + i * BPF_REG_SIZE,
(-i - 1) * BPF_REG_SIZE,
reg_type_str[state->stack[i].spilled_ptr.type]);
}
verbose(env, "\n");
Expand Down

0 comments on commit 12a3cc8

Please sign in to comment.