From: Andrei Matei <andreimatei1@gmail.com>
Date: Sun, 3 Dec 2023 20:12:48 -0500
Subject: bpf: Minor logging improvement
Patch-mainline: v6.8-rc1
Git-commit: 5bd90cdc65ef9ef5e13c9ff23620079db5c608a0
References: bsc#1220257
X-Info: pulled for context for commit 6b4a64bafd10 "bpf: Fix accesses to uninit stack slots
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
Acked-by: Shung-Hsi Yu <shung-hsi.yu@suse.com>
---
kernel/bpf/verifier.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -6421,8 +6421,8 @@ static int check_stack_access_within_bou
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;