libbpf: Constify all high-level program attach APIs
mainline inclusion from mainline-5.16-rc1 commit 942025c9 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5EUVD CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=942025c9f37ee45e69eb5f39a2877afab66d9555 ------------------------------------------------- Attach APIs shouldn't need to modify bpf_program/bpf_map structs, so change all struct bpf_program and struct bpf_map pointers to const pointers. This is completely backwards compatible with no functional change. Signed-off-by: NAndrii Nakryiko <andrii@kernel.org> Signed-off-by: NAlexei Starovoitov <ast@kernel.org> Acked-by: NYonghong Song <yhs@fb.com> Link: https://lore.kernel.org/bpf/20210916015836.1248906-8-andrii@kernel.org (cherry picked from commit 942025c9) Signed-off-by: NWang Yufen <wangyufen@huawei.com> Conflicts: tools/lib/bpf/libbpf.c tools/lib/bpf/libbpf.h Signed-off-by: NWang Yufen <wangyufen@huawei.com>
Showing
想要评论请 注册 或 登录