> commit a51463b14defa13db013ab6b988af5e53ffa136f > Author: Hui Su <[email protected]> > > bpf: Report BPF_F_PREORDER in cgroup program queries > > Commit 4b82b181a26c ("bpf: Allow pre-ordering for bpf cgroup progs") > introduced BPF_F_PREORDER to request pre-order execution across the > cgroup hierarchy, altering the effective prog array ordering. > > While pl->flags stores BPF_F_PREORDER for each attached program, > __cgroup_bpf_query() currently does not report it. When querying > attached programs (!effective_query), __cgroup_bpf_query() fills > prog_attach_flags[] with cgrp->bpf.flags[atype] for all entries, > omitting the per-program BPF_F_PREORDER attribute. > > Extend direct cgroup program queries to merge (pl->flags & BPF_F_PREORDER) > with the cgroup-wide flags when copying prog_attach_flags to user space. > Only BPF_F_PREORDER is extracted from pl->flags to ensure transient > positioning flags (such as BPF_F_BEFORE, BPF_F_AFTER, BPF_F_ID, or > BPF_F_REPLACE) are not leaked to user space. Also perform both ID and > attach flags copies within the same hlist iteration. > > This extends prog_attach_flags[] with the per-program BPF_F_PREORDER bit.
This isn't a bug, but could the changelog drop the duplicated sentence? The paragraph starting with "Extend direct cgroup program queries to merge (pl->flags & BPF_F_PREORDER) with the cgroup-wide flags..." and the following sentence "This extends prog_attach_flags[] with the per-program BPF_F_PREORDER bit." say the same thing. Also, does the line "Also perform both ID and attach flags copies within the same hlist iteration." add information that isn't already visible in the diff? --- 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/35436378806

