Skip to content

Commit

Permalink
bpf: Minor logging improvement
Browse files Browse the repository at this point in the history
One place where we were logging a register was only logging the variable
part, not also the fixed part.

Signed-off-by: Andrei Matei <andreimatei1@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20231204011248.2040084-1-andreimatei1@gmail.com
  • Loading branch information
Andrei Matei authored and Daniel Borkmann committed Dec 4, 2023
1 parent 9067970 commit 5bd90cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/bpf/verifier.c
Original file line number Diff line number Diff line change
Expand Up @@ -6585,8 +6585,8 @@ static int check_stack_access_within_bounds(
char tn_buf[48];

tnum_strn(tn_buf, sizeof(tn_buf), reg->var_off);
verbose(env, "invalid variable-offset%s stack R%d var_off=%s size=%d\n",
err_extra, regno, tn_buf, access_size);
verbose(env, "invalid variable-offset%s stack R%d var_off=%s off=%d size=%d\n",
err_extra, regno, tn_buf, off, access_size);
}
}
return err;
Expand Down

0 comments on commit 5bd90cd

Please sign in to comment.