diff mbox series

[bpf-next,1/2] bpf: add missing newline characters in verifier error messages

Message ID 20200728221801.1090349-1-yhs@fb.com
State Accepted
Delegated to: BPF Maintainers
Headers show
Series [bpf-next,1/2] bpf: add missing newline characters in verifier error messages | expand

Commit Message

Yonghong Song July 28, 2020, 10:18 p.m. UTC
Newline characters are added in two verifier error messages,
refactored in Commit afbf21dce668 ("bpf: Support readonly/readwrite
buffers in verifier"). This way, they do not mix with
messages afterwards.

Signed-off-by: Yonghong Song <yhs@fb.com>
---
 kernel/bpf/verifier.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Song Liu July 28, 2020, 11:39 p.m. UTC | #1
On Tue, Jul 28, 2020 at 3:18 PM Yonghong Song <yhs@fb.com> wrote:
>
> Newline characters are added in two verifier error messages,
> refactored in Commit afbf21dce668 ("bpf: Support readonly/readwrite
> buffers in verifier"). This way, they do not mix with
> messages afterwards.
>
> Signed-off-by: Yonghong Song <yhs@fb.com>

Acked-by: Song Liu <songliubraving@fb.com>
Daniel Borkmann July 29, 2020, 10:44 p.m. UTC | #2
On 7/29/20 12:18 AM, Yonghong Song wrote:
> Newline characters are added in two verifier error messages,
> refactored in Commit afbf21dce668 ("bpf: Support readonly/readwrite
> buffers in verifier"). This way, they do not mix with
> messages afterwards.
> 
> Signed-off-by: Yonghong Song <yhs@fb.com>

Both applied, thanks!
diff mbox series

Patch

diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 88bb25d08bf8..b6ccfce3bf4c 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -3069,7 +3069,7 @@  static int __check_buffer_access(struct bpf_verifier_env *env,
 {
 	if (off < 0) {
 		verbose(env,
-			"R%d invalid %s buffer access: off=%d, size=%d",
+			"R%d invalid %s buffer access: off=%d, size=%d\n",
 			regno, buf_info, off, size);
 		return -EACCES;
 	}
@@ -3078,7 +3078,7 @@  static int __check_buffer_access(struct bpf_verifier_env *env,
 
 		tnum_strn(tn_buf, sizeof(tn_buf), reg->var_off);
 		verbose(env,
-			"R%d invalid variable buffer offset: off=%d, var_off=%s",
+			"R%d invalid variable buffer offset: off=%d, var_off=%s\n",
 			regno, off, tn_buf);
 		return -EACCES;
 	}