[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAADnVQJ7wMxfLKgQuPYE82dXOi5dO5r77PkZR=+17JpvJoBAVQ@mail.gmail.com>
Date: Wed, 1 Dec 2021 09:50:33 -0800
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Hou Tao <houtao1@...wei.com>
Cc: Alexei Starovoitov <ast@...nel.org>,
Martin KaFai Lau <kafai@...com>, Yonghong Song <yhs@...com>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Network Development <netdev@...r.kernel.org>,
bpf <bpf@...r.kernel.org>
Subject: Re: [PATCH bpf-next v4 1/2] bpf: clean-up bpf_verifier_vlog() for
BPF_LOG_KERNEL log level
On Tue, Nov 30, 2021 at 11:19 PM Hou Tao <houtao1@...wei.com> wrote:
>
> An extra newline will output for bpf_log() with BPF_LOG_KERNEL level
> as shown below:
>
> [ 52.095704] BPF:The function test_3 has 12 arguments. Too many.
> [ 52.095704]
> [ 52.096896] Error in parsing func ptr test_3 in struct bpf_dummy_ops
>
> Now all bpf_log() are ended by newline, but not all btf_verifier_log()
> are ended by newline, so checking whether or not the log message
> has the trailing newline and adding a newline if not.
>
> Also there is no need to calculate the left userspace buffer size
> for kernel log output and to truncate the output by '\0' which
> has already been done by vscnprintf(), so only do these for
> userspace log output.
>
> Signed-off-by: Hou Tao <houtao1@...wei.com>
> Acked-by: Yonghong Song <yhs@...com>
> Acked-by: Martin KaFai Lau <kafai@...com>
Applied this patch. Thanks
Powered by blists - more mailing lists