From: bot+bpf-ci@kernel.org
To: yangtiezhu@loongson.cn,ast@kernel.org,daniel@iogearbox.net,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
Cc: loongarch@lists.linux.dev,bpf@vger.kernel.org,linux-kernel@vger.kernel.org,ast@kernel.org,andrii@kernel.org,daniel@iogearbox.net,martin.lau@kernel.org,eddyz87@gmail.com,yonghong.song@linux.dev,clm@meta.com,ihor.solodrai@linux.dev
Subject: Re: [PATCH bpf-next v1] selftests/bpf: Add test for indirect struct_ops trampoline
Date: Fri, 28 Aug 2026 05:29:03 +0000 (UTC) [thread overview]
Message-ID: <1a893cf993fc45d0da27fa066e413e8ca8afb226edb7d6aaed0a1ae4f4ec8642@mail.kernel.org> (raw)
In-Reply-To: <20260828042715.16546-1-yangtiezhu@loongson.cn>
[-- Attachment #1: Type: text/plain, Size: 3214 bytes --]
> diff --git a/tools/testing/selftests/bpf/prog_tests/test_struct_ops_trampoline.c b/tools/testing/selftests/bpf/prog_tests/test_struct_ops_trampoline.c
> new file mode 100644
> index 0000000000000..5a21aedd02fc5
> --- /dev/null
> +++ b/tools/testing/selftests/bpf/prog_tests/test_struct_ops_trampoline.c
> @@ -0,0 +1,41 @@
> +// SPDX-License-Identifier: GPL-2.0
> +#include <test_progs.h>
> +#include "struct_ops_trampoline.skel.h"
A subsystem pattern flags this as potentially concerning: the new
standalone prog_tests file plus a new progs file are added to cover a
9-argument struct_ops callback whose last argument is stack-passed.
tools/testing/selftests/bpf/progs/struct_ops_arena.c already exercises
this shape via bpf_testmod_ops3.test_arena_stack, whose declaration in
bpf_testmod.h carries the comment "enough leading args to force @ptr onto
the stack on x86 and arm64", and test_arena_stack_cb() already pins the
slot layout with argument checks before using ctx[8]. That test is driven
from prog_tests/test_struct_ops_arena.c in the same directory.
The plausible reason for a separate file is that the arena test is gated
to __x86_64__ || __aarch64__ and needs arena support, which LoongArch and
RISC-V lack.
Could a plain (non-arena) >8-argument member on bpf_testmod_ops3 plus a
new case in test_struct_ops_arena.c or test_struct_ops_multi_args.c have
avoided a new test binary?
[ ... ]
> diff --git a/tools/testing/selftests/bpf/progs/struct_ops_trampoline.c b/tools/testing/selftests/bpf/progs/struct_ops_trampoline.c
> new file mode 100644
> index 0000000000000..b0fc19a2a0c53
> --- /dev/null
> +++ b/tools/testing/selftests/bpf/progs/struct_ops_trampoline.c
> @@ -0,0 +1,24 @@
> +// SPDX-License-Identifier: GPL-2.0
> +#include <vmlinux.h>
> +#include <bpf/bpf_tracing.h>
> +#include "../test_kmods/bpf_testmod.h"
> +#include "bpf_misc.h"
This isn't a bug, but could the bpf_misc.h include be dropped? The
program has no __failure/__success/__msg/__retval/__sink/__arch_*
annotation, unlike progs/struct_ops_multi_args.c which includes the same
header and does use __failure __msg(...).
[ ... ]
> diff --git a/tools/testing/selftests/bpf/test_kmods/bpf_testmod.c b/tools/testing/selftests/bpf/test_kmods/bpf_testmod.c
> index 850cf4f830c48..be96bbc1b7c04 100644
> --- a/tools/testing/selftests/bpf/test_kmods/bpf_testmod.c
> +++ b/tools/testing/selftests/bpf/test_kmods/bpf_testmod.c
> @@ -589,6 +589,9 @@ noinline int bpf_testmod_trampoline_count_test(void)
> return 0;
> }
>
> +struct bpf_testmod_ops;
> +static struct bpf_testmod_ops *st_ops_trampoline;
This isn't a bug, but does the struct bpf_testmod_ops forward declaration
add anything here? bpf_testmod.c already includes "bpf_testmod.h" at the
top, which defines the struct completely, and the dereference below at
st_ops_trampoline->test_trampoline requires the complete type. The
neighbouring static struct bpf_testmod_ops3 *st_ops3 carries no such
forward declaration.
[ ... ]
---
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/33142391368
prev parent reply other threads:[~2026-08-28 5:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-28 4:27 Tiezhu Yang
2026-08-28 5:29 ` bot+bpf-ci [this message]
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=1a893cf993fc45d0da27fa066e413e8ca8afb226edb7d6aaed0a1ae4f4ec8642@mail.kernel.org \
--to=bot+bpf-ci@kernel.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=clm@meta.com \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=emil@etsalapatis.com \
--cc=ihor.solodrai@linux.dev \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=martin.lau@kernel.org \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=song@kernel.org \
--cc=yangtiezhu@loongson.cn \
--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®