summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2026-09-02 17:20:12 -0700
committerAndrii Nakryiko <andrii@kernel.org>2026-09-02 17:20:12 -0700
commitd9a0f184dc174cd35a732a790e0dbae9ceb18543 (patch)
treeb79733b07fe38a3911e1ffbb20ca92db14e0a01a /tools/lib/python
parent418814c9fb26db952dad973b07d1d21d5fd66b54 (diff)
parent99c71666dcb11b92bacedb7ddc5bf172aedc07c4 (diff)
downloadlinux-next-d9a0f184dc174cd35a732a790e0dbae9ceb18543.tar.gz
linux-next-d9a0f184dc174cd35a732a790e0dbae9ceb18543.zip
Merge branch 'libbpf-move-section-defined-program-flags-to-prog_flags'
says: ==================== libbpf: Move section-defined program flags to prog_flags This series moves the libbpf section-defined program flags into bpf_program->prog_flags, thereby making them available for applications to inspect and modify before loading the program into the kernel. See patch 3 in the series for details. Setting program flags with bpf_program__set_flags() was always potentially a destructive action, as it clobbers any existing flags. Since this changes the flags value to be pre-populated at initialisation, this clobbering can be visible in cases it wasn't before. To prevent any fallout, the first two commits fixes up existing in-tree users of bpf_program__set_flags() to be non-destructive. v3: - Also fix destructive flag setting in bpf_verif_scale.c - Reorder patches so fixups precede the libbpf change. v2: - Use a generic section setup function that also applies to BPF_F_SLEEPABLE Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com> --- Toke Høiland-Jørgensen (4): bpftool: Set BPF_F_XDP_DEV_BOUND_ONLY flag non-destructively selftests/bpf: Set BPF program flags non-destructively libbpf: Move section-defined program flags to prog_flags selftests/bpf: Check for flag presence in bpf_program__flags() tools/bpf/bpftool/prog.c | 2 +- tools/lib/bpf/libbpf.c | 20 ++++++++++++++------ .../testing/selftests/bpf/prog_tests/attach_probe.c | 6 ++++-- .../selftests/bpf/prog_tests/bpf_verif_scale.c | 2 +- tools/testing/selftests/bpf/prog_tests/kernel_flag.c | 3 +++ .../selftests/bpf/prog_tests/kprobe_multi_test.c | 2 +- .../selftests/bpf/prog_tests/xdp_adjust_frags.c | 3 +++ .../selftests/bpf/prog_tests/xdp_devmap_attach.c | 5 +++++ .../testing/selftests/bpf/prog_tests/xdp_metadata.c | 4 ++-- tools/testing/selftests/bpf/xdp_hw_metadata.c | 2 +- 10 files changed, 35 insertions(+), 14 deletions(-) --- base-commit: 1555de33018fad06ca5dfa2fad5d3d1c6a6eb2fe change-id: 20260901-libbpf-frags-flags-6bdeecd96114 ==================== Link: https://patch.msgid.link/20260901-libbpf-frags-flags-v3-0-4eb6f14968b0@redhat.com Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions