From: sashiko-bot@kernel.org
To: "Amery Hung" <ameryhung@gmail.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next v1 08/12] bpf: Check subprog dynptr arguments in the common path
Date: Fri, 25 Sep 2026 21:26:25 +0000 [thread overview]
Message-ID: <20260925212625.DF3451F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260925211256.1834061-9-ameryhung@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] bpf: multi-line comment violates BPF subsystem formatting style
--
commit 45344ee9671457679fb9b5565dcee5c8036d67b0
Author: Amery Hung <ameryhung@gmail.com>
bpf: Check subprog dynptr arguments in the common path
This commit updates the verifier to check subprog and helper/kfunc
dynptr arguments through the common check_func_arg() path. It also modifies
a selftest to ensure both Clang and GCC exercise the intended register-type
mismatch correctly.
> diff --git a/tools/testing/selftests/bpf/progs/dynptr_fail.c b/tools/testing/selftests/bpf/progs/dynptr_fail.c
> index 9418dfe4d7b7f..148cf44173221 100644
> --- a/tools/testing/selftests/bpf/progs/dynptr_fail.c
> +++ b/tools/testing/selftests/bpf/progs/dynptr_fail.c
[ ... ]
> SEC("?raw_tp")
> -__failure __msg("R1 expected pointer to stack or const struct bpf_dynptr")
> +__failure __msg("R1 type=trusted_ptr_ expected=fp, dynptr_ptr")
> int test_dynptr_reg_type(void *ctx)
> {
> - struct task_struct *current = NULL;
> - /* R1 should be holding a PTR_TO_BTF_ID, so this shouldn't be a
> - * reg->type that can be passed to a function accepting a
> - * ARG_PTR_TO_DYNPTR | MEM_RDONLY. process_dynptr_func() should catch
> - * this.
> + struct task_struct *current = bpf_get_current_task_btf();
> + /* R1 holds a PTR_TO_BTF_ID, which cannot be passed to a function
> + * accepting ARG_PTR_TO_DYNPTR | MEM_RDONLY.
[Severity: Low]
This isn't a bug, but the BPF subsystem follows the modern kernel
multi-line comment style where the opening /* must be on its own line.
Should this comment block be updated to match the required formatting?
> */
> global_call_bpf_dynptr((const struct bpf_dynptr *)current);
> return 0;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260925211256.1834061-1-ameryhung@gmail.com?part=8
next prev parent reply other threads:[~2026-09-25 21:26 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 21:12 [PATCH bpf-next v1 00/12] Unify subprog argument checks Amery Hung
2026-09-25 21:12 ` [PATCH bpf-next v1 01/12] bpf: Fix kfunc nullability diagnostics after wide arguments Amery Hung
2026-09-26 8:48 ` Alexei Starovoitov
2026-09-28 17:42 ` Amery Hung
2026-09-25 21:12 ` [PATCH bpf-next v1 02/12] bpf: Identify subprog calls in argument metadata Amery Hung
2026-09-25 21:12 ` [PATCH bpf-next v1 03/12] bpf: Build argument prototypes for subprog calls Amery Hung
2026-09-25 21:12 ` [PATCH bpf-next v1 04/12] bpf: Check subprog scalar arguments in the common path Amery Hung
2026-09-25 22:01 ` bot+bpf-ci
2026-09-25 21:12 ` [PATCH bpf-next v1 05/12] bpf: Check global subprog untrusted " Amery Hung
2026-09-25 21:12 ` [PATCH bpf-next v1 06/12] bpf: Check subprog context " Amery Hung
2026-09-25 21:12 ` [PATCH bpf-next v1 07/12] bpf: Check subprog arena " Amery Hung
2026-09-25 21:12 ` [PATCH bpf-next v1 08/12] bpf: Check subprog dynptr " Amery Hung
2026-09-25 21:26 ` sashiko-bot [this message]
2026-09-25 21:12 ` [PATCH bpf-next v1 09/12] bpf: Check global subprog BTF-ID " Amery Hung
2026-09-25 21:12 ` [PATCH bpf-next v1 10/12] bpf: Track packet changes in call metadata Amery Hung
2026-09-26 8:49 ` Alexei Starovoitov
2026-09-28 17:42 ` Amery Hung
2026-09-25 21:12 ` [PATCH bpf-next v1 11/12] bpf: Check global subprog memory arguments in the common path Amery Hung
2026-09-25 21:12 ` [PATCH bpf-next v1 12/12] bpf: Check all subprog " Amery Hung
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=20260925212625.DF3451F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=ameryhung@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=sashiko-reviews@lists.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.