From: bot+bpf-ci@kernel.org
To: donggeunyoo.kernel@gmail.com,ast@kernel.org,andrii@kernel.org,catalin.marinas@arm.com,daniel@iogearbox.net,eddyz87@gmail.com,emil@etsalapatis.com,ihor.solodrai@linux.dev,jolsa@kernel.org,memxor@gmail.com,mark.rutland@arm.com,martin.lau@linux.dev,puranjay@kernel.org,shuah@kernel.org,song@kernel.org,will@kernel.org,xukuohai@huaweicloud.com,yonghong.song@linux.dev
Cc: bpf@vger.kernel.org,linux-arm-kernel@lists.infradead.org,linux-kernel@vger.kernel.org,linux-kselftest@vger.kernel.org,xukuohai@huawei.com,donggeunyoo.kernel@gmail.com,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 2/2] selftests/bpf: cover the exception callback using its own BPF stack
Date: Fri, 4 Sep 2026 08:09:36 +0000 (UTC) [thread overview]
Message-ID: <6aec8f5c91db3edfd8becf6f41bcb33fda2cbea1bb894888cbcdab4579b0f086@mail.kernel.org> (raw)
In-Reply-To: <20260904070210.4163193-3-donggeunyoo.kernel@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1996 bytes --]
> diff --git a/tools/testing/selftests/bpf/progs/exceptions.c b/tools/testing/selftests/bpf/progs/exceptions.c
> index c8d716fbd4191..cac4e082139a7 100644
> --- a/tools/testing/selftests/bpf/progs/exceptions.c
> +++ b/tools/testing/selftests/bpf/progs/exceptions.c
> @@ -212,6 +212,35 @@ int exception_throw_subprog(struct __sk_buff *ctx)
> return 0;
> }
>
> +__u64 exception_cb_stack_src = 0x1234;
> +
> +/* The address handed to the helper has to be this callback's own stack
> + * slot, not one from a frame that is already gone.
> + */
> +__noinline int exception_cb_stack(u64 cookie)
> +{
> + volatile __u64 val = 0xdead;
> +
> + bpf_probe_read_kernel((void *)&val, sizeof(val), &exception_cb_stack_src);
> + return val;
> +}
> +
> +/* Throws from a subprogram that has a stack of its own. */
> +__noinline static int throwing_subprog_stack(struct __sk_buff *ctx)
> +{
> + volatile __u64 pad[4] = {};
This isn't a bug, but would 'u64' fit the surrounding declarations in this
file a little better than '__u64' for the three new locals/globals?
Looking at the rest of progs/exceptions.c, every other scalar declaration
uses the short kernel spelling: 'static __noinline int static_func(u64 i)',
'__noinline int exception_cb_mod(u64 cookie)', 'volatile u64 cookie = c;',
and 'u64 time = bpf_ktime_get_ns();'. The new code at lines 215, 222, and
231 is the only place in the file that switches to the '__u64' spelling,
and it sits directly next to 'exception_cb_stack(u64 cookie)' which uses
the other form in the same signature.
> +
> + bpf_throw(pad[0]);
> + return 0;
> +}
> +
> +SEC("tc")
> +__exception_cb(exception_cb_stack)
> +int exception_throw_subprog_stack_cb(struct __sk_buff *ctx)
> +{
> + return throwing_subprog_stack(ctx);
> +}
> +
---
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/33848479344
next prev parent reply other threads:[~2026-09-04 8:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-04 7:02 [PATCH bpf 0/2] bpf, arm64: fix the exception callback's frame pointer Donggeun Yoo
2026-09-04 7:02 ` [PATCH bpf 1/2] bpf, arm64: set up the frame pointer for the exception callback Donggeun Yoo
2026-09-04 7:02 ` [PATCH bpf 2/2] selftests/bpf: cover the exception callback using its own BPF stack Donggeun Yoo
2026-09-04 8:09 ` bot+bpf-ci [this message]
2026-09-04 9:27 ` Donggeun Yoo
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=6aec8f5c91db3edfd8becf6f41bcb33fda2cbea1bb894888cbcdab4579b0f086@mail.kernel.org \
--to=bot+bpf-ci@kernel.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=catalin.marinas@arm.com \
--cc=daniel@iogearbox.net \
--cc=donggeunyoo.kernel@gmail.com \
--cc=eddyz87@gmail.com \
--cc=emil@etsalapatis.com \
--cc=ihor.solodrai@linux.dev \
--cc=jolsa@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=martin.lau@kernel.org \
--cc=martin.lau@linux.dev \
--cc=mason@kernel.org \
--cc=memxor@gmail.com \
--cc=puranjay@kernel.org \
--cc=shuah@kernel.org \
--cc=song@kernel.org \
--cc=will@kernel.org \
--cc=xukuohai@huawei.com \
--cc=xukuohai@huaweicloud.com \
--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