diff options
author | Andrey Ignatov <rdna@fb.com> | 2019-04-04 02:22:43 -0400 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-04-05 10:50:08 -0400 |
commit | 1fbd20f8b77b366ea4aeb92ade72daa7f36a7e3b (patch) | |
tree | 91f257572d01b1f53adb0ebf05bd74edf17e7bc5 | |
parent | 07f9196241f8bceef975dd15f894f8ed51425d55 (diff) |
bpf: Add missed newline in verifier verbose log
check_stack_access() that prints verbose log is used in
adjust_ptr_min_max_vals() that prints its own verbose log and now they
stick together, e.g.:
variable stack access var_off=(0xfffffffffffffff0; 0x4) off=-16
size=1R2 stack pointer arithmetic goes out of range, prohibited for
!root
Add missing newline so that log is more readable:
variable stack access var_off=(0xfffffffffffffff0; 0x4) off=-16 size=1
R2 stack pointer arithmetic goes out of range, prohibited for !root
Fixes: f1174f77b50c ("bpf/verifier: rework value tracking")
Signed-off-by: Andrey Ignatov <rdna@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
-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 f2d600199e66..48718e1da16d 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c | |||
@@ -1426,7 +1426,7 @@ static int check_stack_access(struct bpf_verifier_env *env, | |||
1426 | char tn_buf[48]; | 1426 | char tn_buf[48]; |
1427 | 1427 | ||
1428 | tnum_strn(tn_buf, sizeof(tn_buf), reg->var_off); | 1428 | tnum_strn(tn_buf, sizeof(tn_buf), reg->var_off); |
1429 | verbose(env, "variable stack access var_off=%s off=%d size=%d", | 1429 | verbose(env, "variable stack access var_off=%s off=%d size=%d\n", |
1430 | tn_buf, off, size); | 1430 | tn_buf, off, size); |
1431 | return -EACCES; | 1431 | return -EACCES; |
1432 | } | 1432 | } |