From: sashiko-bot@kernel.org
To: "Leon Hwang" <leon.hwang@linux.dev>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next v11 04/10] libbpf: Probe percpu data feature
Date: Thu, 06 Aug 2026 17:05:43 +0000 [thread overview]
Message-ID: <20260806170543.EC13F1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260806163125.11172-5-leon.hwang@linux.dev>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The newly added feature probe `FEAT_PERCPU_DATA` is never used to make capability decisions.
--
--- Patch [4]: [PATCH bpf-next v11 04/10] libbpf: Probe percpu data feature ---
commit 925264284b89c241360ff401bd914f9c19997613
Author: Leon Hwang <leon.hwang@linux.dev>
libbpf: Probe percpu data feature
This commit adds a feature probe to detect if the kernel supports global
percpu data. It aims to allow libbpf to fail predictably when this feature
is unavailable on older kernels.
> diff --git a/tools/lib/bpf/features.c b/tools/lib/bpf/features.c
> index b7e388f99d0bb..ef9581c113035 100644
> --- a/tools/lib/bpf/features.c
> +++ b/tools/lib/bpf/features.c
[ ... ]
> @@ -707,6 +739,9 @@ static struct kern_feature_desc {
> [FEAT_BPF_SYSCALL_COMMON_ATTRS] = {
> "BPF syscall common attributes support", probe_bpf_syscall_common_attrs,
> },
> + [FEAT_PERCPU_DATA] = {
> + "kernel supports percpu data", probe_kern_percpu_data,
> + },
> };
[Severity: Medium]
Are there any callers that actually query this new feature probe?
The commit message notes that libbpf can make capability decisions early
and fail predictably when global percpu data is unavailable. However,
FEAT_PERCPU_DATA appears to only be defined and registered, without being
queried in the loader code.
Is there a missing update to the loader, perhaps using kernel_supports(),
that checks this flag before attempting to load percpu global data?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260806163125.11172-1-leon.hwang@linux.dev?part=4
next prev parent reply other threads:[~2026-08-06 17:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-06 16:31 [PATCH bpf-next v11 00/10] bpf: Introduce global percpu data Leon Hwang
2026-08-06 16:31 ` [PATCH bpf-next v11 01/10] bpf: Drop duplicate blank lines in kernel/bpf/ Leon Hwang
2026-08-06 16:31 ` [PATCH bpf-next v11 02/10] bpf: Factor out check_map_mem_read helper in verifier Leon Hwang
2026-08-06 16:31 ` [PATCH bpf-next v11 03/10] bpf: Introduce global percpu data Leon Hwang
2026-08-06 16:31 ` [PATCH bpf-next v11 04/10] libbpf: Probe percpu data feature Leon Hwang
2026-08-06 17:05 ` sashiko-bot [this message]
2026-08-07 2:26 ` Leon Hwang
2026-08-06 16:31 ` [PATCH bpf-next v11 05/10] libbpf: Add support for global percpu data Leon Hwang
2026-08-06 16:57 ` sashiko-bot
2026-08-07 2:36 ` Leon Hwang
2026-08-06 16:31 ` [PATCH bpf-next v11 06/10] bpftool: Generate skeleton " Leon Hwang
2026-08-06 16:31 ` [PATCH bpf-next v11 07/10] selftests/bpf: Add tests to verify " Leon Hwang
2026-08-06 16:31 ` [PATCH bpf-next v11 08/10] selftests/bpf: Test direct reading/writing read-only percpu_array map Leon Hwang
2026-08-06 16:31 ` [PATCH bpf-next v11 09/10] selftests/bpf: Test verifier log for global percpu data Leon Hwang
2026-08-06 16:31 ` [PATCH bpf-next v11 10/10] selftests/bpf: Verify bpf_iter " 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=20260806170543.EC13F1F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=leon.hwang@linux.dev \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox