From: bot+bpf-ci@kernel.org
To: leon.hwang@linux.dev,bpf@vger.kernel.org
Cc: ast@kernel.org,daniel@iogearbox.net,john.fastabend@gmail.com,andrii@kernel.org,eddyz87@gmail.com,memxor@gmail.com,martin.lau@linux.dev,song@kernel.org,yonghong.song@linux.dev,jolsa@kernel.org,emil@etsalapatis.com,ihor.solodrai@linux.dev,rostedt@goodmis.org,mhiramat@kernel.org,mathieu.desnoyers@efficios.com,kpsingh@kernel.org,matt@bobrowski.net,shuah@kernel.org,leon.hwang@linux.dev,linux-kernel@vger.kernel.org,linux-trace-kernel@vger.kernel.org,linux-kselftest@vger.kernel.org,netdev@vger.kernel.org,ast@kernel.org,andrii@kernel.org,daniel@iogearbox.net,martin.lau@kernel.org,eddyz87@gmail.com,yonghong.song@linux.dev,mason@kernel.org,ihor.solodrai@linux.dev
Subject: Re: [PATCH bpf-next v3 7/9] selftests/bpf: Test tracing_multi link_create logs
Date: Mon, 23 Nov 2026 16:04:41 +0000 (UTC) [thread overview]
Message-ID: <d3920bd7ae0cc6a941895e00534e8f8818402a673351894d0bf98639272f7d7e@mail.kernel.org> (raw)
In-Reply-To: <20261123152743.19629-8-leon.hwang@linux.dev>
[-- Attachment #1: Type: text/plain, Size: 2281 bytes --]
> selftests/bpf: Test tracing_multi link_create logs
TL;DR: Test issue: the migrate_disable denylist subtest's skip may not trigger
on !CONFIG_SMP kernels, since the function still exists in BTF, so it could
fail instead of skipping.
> diff --git a/tools/testing/selftests/bpf/prog_tests/tracing_link.c b/tools/testing/selftests/bpf/prog_tests/tracing_link.c
> --- a/tools/testing/selftests/bpf/prog_tests/tracing_link.c
> +++ b/tools/testing/selftests/bpf/prog_tests/tracing_link.c
[ ... ]
> +static void test_multi_log_denylist(void)
> +{
> + const char *msg = "Cannot attach to denylist btf id %u.\n";
> + const char *target = "migrate_disable";
> + struct btf *btf;
> +
> + btf = btf__load_vmlinux_btf();
> + if (!ASSERT_OK_PTR(btf, "btf__load_vmlinux_btf"))
> + return;
> +
> + /* migrate_disable is only in the denylist on SMP kernels. */
> + if (btf__find_by_name_kind(btf, target, BTF_KIND_FUNC) == -ENOENT)
> + test__skip();
> + else
> + test_multi_log_target(btf, "fentry", target, -EINVAL, msg);
Is this skip reachable on a !CONFIG_SMP kernel?
kernel/sched/core.c always builds an out-of-line, exported
migrate_disable() with no CONFIG_SMP guard:
void migrate_disable(void)
{
__migrate_disable();
}
EXPORT_SYMBOL_GPL(migrate_disable);
while the denylist in kernel/bpf/verifier.c adds it only under
CONFIG_SMP:
BTF_SET_START(btf_id_deny)
BTF_ID_UNUSED
#ifdef CONFIG_SMP
BTF_ID(func, ___migrate_enable)
BTF_ID(func, migrate_disable)
BTF_ID(func, migrate_enable)
#endif
So btf__find_by_name_kind() should find migrate_disable even when
CONFIG_SMP=n, and test__skip() would never run.
On such an x86_64 kernel, bpf_check_attach_btf_id_multi() would not deny
the id, the link would be created, and the subtest would fail at
ASSERT_LT(fd, 0, "bpf_link_create") instead of skipping.
Should the skip check the kernel's SMP configuration directly, for
example through a __kconfig extern, or should the comment and skip be
dropped?
> +
> + btf__free(btf);
> +}
[ ... ]
---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md
CI run summary: https://github.com/kernel-patches/bpf/actions/runs/45209424655
next prev parent reply other threads:[~2026-11-23 16:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 15:27 [PATCH bpf-next v3 0/9] bpf: Add log support for tracing link_create Leon Hwang
2026-11-23 15:27 ` [PATCH bpf-next v3 1/9] " Leon Hwang
2026-11-23 15:27 ` [PATCH bpf-next v3 2/9] bpf: Add log support for tracing_multi link_create Leon Hwang
2026-11-23 15:27 ` [PATCH bpf-next v3 3/9] bpf: Add log support for iter link_create Leon Hwang
2026-11-23 15:27 ` [PATCH bpf-next v3 4/9] bpf: Add log support for cgroup prog link_create Leon Hwang
2026-11-23 16:04 ` bot+bpf-ci
2026-11-23 15:27 ` [PATCH bpf-next v3 5/9] libbpf: Add log_opts support for BPF_TRACE_ITER Leon Hwang
2026-11-23 15:27 ` [PATCH bpf-next v3 6/9] selftests/bpf: Test tracing link_create logs Leon Hwang
2026-11-23 15:27 ` [PATCH bpf-next v3 7/9] selftests/bpf: Test tracing_multi " Leon Hwang
2026-11-23 16:04 ` bot+bpf-ci [this message]
2026-11-23 15:27 ` [PATCH bpf-next v3 8/9] selftests/bpf: Verify iter " Leon Hwang
2026-11-23 15:27 ` [PATCH bpf-next v3 9/9] selftests/bpf: Verify cgroup prog " Leon Hwang
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=d3920bd7ae0cc6a941895e00534e8f8818402a673351894d0bf98639272f7d7e@mail.kernel.org \
--to=bot+bpf-ci@kernel.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=emil@etsalapatis.com \
--cc=ihor.solodrai@linux.dev \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=leon.hwang@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=martin.lau@kernel.org \
--cc=martin.lau@linux.dev \
--cc=mason@kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=matt@bobrowski.net \
--cc=memxor@gmail.com \
--cc=mhiramat@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rostedt@goodmis.org \
--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®