diff options
| author | Alexei Starovoitov <[email protected]> | 2017-11-30 21:31:35 -0800 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2017-12-01 11:25:10 +0100 |
| commit | 12a3cc8424fe1237aaeb982dec4f0914ddd22f3e (patch) | |
| tree | 44ef9edc45e1d70fffe0dbe53afafc09a4b7028b | |
| parent | 51de082570e5374d4578cb159738485ddb0fddfe (diff) | |
bpf: fix stack state printing in verifier log
fix incorrect stack state prints in print_verifier_state()
Fixes: 638f5b90d460 ("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]>
| -rw-r--r-- | kernel/bpf/verifier.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index d4593571c404..71a9429fdbb5 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -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"); |