From: Ihor Solodrai <ihor.solodrai@linux.dev>
To: Leo Yan <leo.yan@arm.com>, Quentin Monnet <qmo@kernel.org>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
Eduard Zingerman <eddyz87@gmail.com>, Song Liu <song@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>,
Stanislav Fomichev <sdf@fomichev.me>, Hao Luo <haoluo@google.com>,
Jiri Olsa <jolsa@kernel.org>, Shuah Khan <shuah@kernel.org>,
Lorenz Bauer <lmb@isovalent.com>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <nick.desaulniers+lkml@gmail.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Ian Rogers <irogers@google.com>,
James Clark <james.clark@linaro.org>, Kees Cook <kees@kernel.org>,
bpf@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org, llvm@lists.linux.dev
Subject: Re: [PATCH bpf-next v2 6/8] selftests/bpf: Initialize operation name before use
Date: Fri, 12 Jun 2026 18:11:26 -0700 [thread overview]
Message-ID: <d1ea947e-f54c-468f-8e26-7bac59b1d6e9@linux.dev> (raw)
In-Reply-To: <20260602-tools_build_fix_zero_init_bpf_only-v2-6-c76e5250ea1c@arm.com>
On 6/2/26 7:47 AM, Leo Yan wrote:
> ASAN reports stack-buffer-overflow due to the uninitialized op_name.
>
> Initialize it to fix the issue.
>
> Fixes: 054b6c7866c7 ("selftests/bpf: Add verifier log tests for BPF_BTF_LOAD command")
> Signed-off-by: Leo Yan <leo.yan@arm.com>
> ---
> tools/testing/selftests/bpf/prog_tests/verifier_log.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/testing/selftests/bpf/prog_tests/verifier_log.c b/tools/testing/selftests/bpf/prog_tests/verifier_log.c
> index c01c0114af1b7476d27885ce380d90400a4bdc89..4542bb586d723b8fda2faf8261066f16102c60c0 100644
> --- a/tools/testing/selftests/bpf/prog_tests/verifier_log.c
> +++ b/tools/testing/selftests/bpf/prog_tests/verifier_log.c
> @@ -317,6 +317,7 @@ static void verif_btf_log_subtest(bool bad_btf)
> res = load_btf(&opts, true);
> ASSERT_EQ(res, -ENOSPC, "half_log_fd");
> ASSERT_EQ(strlen(logs.buf), 24, "log_fixed_25");
> + strscpy(op_name, "log_fixed", sizeof(op_name));
Acked-by: Ihor Solodrai <ihor.solodrai@linux.dev>
> ASSERT_STRNEQ(logs.buf, logs.reference, 24, op_name);
>
> /* validate rolling verifier log logic: try all variations of log buf
>
next prev parent reply other threads:[~2026-06-13 1:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-02 14:47 [PATCH bpf-next v2 0/8] tools build: bpf: Append EXTRA_CFLAGS and HOST_EXTRACFLAGS Leo Yan
2026-06-02 14:47 ` [PATCH bpf-next v2 1/8] bpftool: Pass host flags to bootstrap libbpf Leo Yan
2026-06-03 9:21 ` Quentin Monnet
2026-06-02 14:47 ` [PATCH bpf-next v2 2/8] bpftool: Avoid adding EXTRA_CFLAGS to HOST_CFLAGS Leo Yan
2026-06-02 14:47 ` [PATCH bpf-next v2 3/8] bpftool: Append extra host flags Leo Yan
2026-06-02 14:47 ` [PATCH bpf-next v2 4/8] libbpf: Initialize CFLAGS before including Makefile.include Leo Yan
2026-06-02 14:47 ` [PATCH bpf-next v2 5/8] tools/bpf: build: Append extra cflags Leo Yan
2026-06-13 1:09 ` Ihor Solodrai
2026-06-02 14:47 ` [PATCH bpf-next v2 6/8] selftests/bpf: Initialize operation name before use Leo Yan
2026-06-13 1:11 ` Ihor Solodrai [this message]
2026-06-02 14:47 ` [PATCH bpf-next v2 7/8] selftests/bpf: Use common CFLAGS for urandom_read Leo Yan
2026-06-02 15:32 ` bot+bpf-ci
2026-06-02 14:47 ` [PATCH bpf-next v2 8/8] selftests/bpf: Avoid static LLVM linking for cross builds Leo Yan
2026-06-15 0:40 ` [PATCH bpf-next v2 0/8] tools build: bpf: Append EXTRA_CFLAGS and HOST_EXTRACFLAGS patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d1ea947e-f54c-468f-8e26-7bac59b1d6e9@linux.dev \
--to=ihor.solodrai@linux.dev \
--cc=acme@kernel.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=haoluo@google.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=justinstitt@google.com \
--cc=kees@kernel.org \
--cc=kpsingh@kernel.org \
--cc=leo.yan@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=lmb@isovalent.com \
--cc=martin.lau@linux.dev \
--cc=morbo@google.com \
--cc=namhyung@kernel.org \
--cc=nathan@kernel.org \
--cc=nick.desaulniers+lkml@gmail.com \
--cc=qmo@kernel.org \
--cc=sdf@fomichev.me \
--cc=shuah@kernel.org \
--cc=song@kernel.org \
--cc=yonghong.song@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®