From: Hui Su <sh_def@163.com>
To: bpf@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Eduard Zingerman <eddyz87@gmail.com>,
Kumar Kartikeya Dwivedi <memxor@gmail.com>
Cc: Yonghong Song <yonghong.song@linux.dev>,
Quentin Monnet <qmo@kernel.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
Song Liu <song@kernel.org>, Jiri Olsa <jolsa@kernel.org>,
Emil Tsalapatis <emil@etsalapatis.com>,
Ihor Solodrai <ihor.solodrai@linux.dev>,
Shuah Khan <shuah@kernel.org>,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
Hui Su <sh_def@163.com>
Subject: [PATCH bpf-next v3 0/3] bpf: expose cgroup preorder attachment state to userspace
Date: Tue, 22 Sep 2026 11:54:39 +0900 [thread overview]
Message-ID: <20260922025442.3176057-1-sh_def@163.com> (raw)
The BPF_F_PREORDER attach flag changes the ordering of programs in the
effective cgroup program array, but BPF_PROG_QUERY did not report the
per-program flag. This series exposes that state and updates bpftool to
display, accept, and document this flag.
The series is split into three patches:
1. Report BPF_F_PREORDER in direct cgroup program queries.
2. Add selftests for direct and link-based program queries.
3. Add bpftool support for text, JSON, command-line, completion, and
documentation handling of BPF_F_PREORDER.
Changes in v3:
- Simplify the changelogs for patches 1 and 2.
- Simplify the ATTACH_FLAGS synopsis and represent attach flags as an
array in JSON output, as suggested by Quentin Monnet.
- Widen the plain-text AttachFlags column for combined flags.
- Address checkpatch line-length and alignment warnings.
Testing:
- PASS: cgroup_mprog_opts, cgroup_preorder, and bpftool cgroup
plain-text/JSON smoke (x86_64 QEMU/KVM).
- PASS: bpftool build, Documentation build, bash -n, and checkpatch on
generated v3 patches.
Previous versions:
v2: https://lore.kernel.org/bpf/20260919094400.600585-1-sh_def@163.com/
v1: https://lore.kernel.org/bpf/20260918172407.3459188-1-sh_def@163.com/
Hui Su (3):
bpf: Report BPF_F_PREORDER in cgroup program queries
selftests/bpf: Test querying BPF_F_PREORDER cgroup attachments
bpftool: Add support for BPF_F_PREORDER cgroup attach flag
kernel/bpf/cgroup.c | 16 +--
.../bpftool/Documentation/bpftool-cgroup.rst | 25 +++--
tools/bpf/bpftool/bash-completion/bpftool | 4 +-
tools/bpf/bpftool/cgroup.c | 99 +++++++++++++------
.../bpf/prog_tests/cgroup_mprog_opts.c | 71 ++++++++++++-
5 files changed, 166 insertions(+), 49 deletions(-)
base-commit: 79dc258c9392051420a26f1504c647bd3d27c66a
--
2.55.0
next reply other threads:[~2026-09-22 2:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 2:54 Hui Su [this message]
2026-09-22 2:54 ` [PATCH bpf-next v3 1/3] bpf: Report BPF_F_PREORDER in cgroup program queries Hui Su
2026-09-22 2:54 ` [PATCH bpf-next v3 2/3] selftests/bpf: Test querying BPF_F_PREORDER cgroup attachments Hui Su
2026-09-22 2:54 ` [PATCH bpf-next v3 3/3] bpftool: Add support for BPF_F_PREORDER cgroup attach flag Hui Su
2026-09-22 3:01 ` sashiko-bot
2026-09-22 10:23 ` Quentin Monnet
2026-09-22 10:23 ` Quentin Monnet
2026-09-24 21:20 ` [PATCH bpf-next v3 0/3] bpf: expose cgroup preorder attachment state to userspace patchwork-bot+netdevbpf
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=20260922025442.3176057-1-sh_def@163.com \
--to=sh_def@163.com \
--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=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=qmo@kernel.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