mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
bpf: fix stack state printing in verifier log
commit12a3cc8424upstream. fix incorrect stack state prints in print_verifier_state() Fixes:638f5b90d4("bpf: reduce verifier memory consumption") Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: John Fastabend <john.fastabend@gmail.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Balbir Singh <sblbir@amzn.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
86e5dd8cce
commit
8561489481
@@ -268,7 +268,7 @@ static void print_verifier_state(struct bpf_verifier_state *state)
|
||||
for (i = 0; i < state->allocated_stack / BPF_REG_SIZE; i++) {
|
||||
if (state->stack[i].slot_type[0] == STACK_SPILL)
|
||||
verbose(" 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("\n");
|
||||
|
||||
Reference in New Issue
Block a user