From: Alexei Starovoitov Date: Fri, 17 Sep 2021 16:04:13 +0000 (-0700) Subject: Merge branch 'Improve set_attach_target() and deprecate open_opts.attach_prog_fd' X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f706f6c66c4360e41dd650bcf24a45880e75bb39;p=linux.git Merge branch 'Improve set_attach_target() and deprecate open_opts.attach_prog_fd' Andrii Nakryiko says: ==================== This patch set deprecates bpf_object_open_opts.attach_prog_fd (in libbpf 0.7+) by extending bpf_program__set_attach_target() to support some more flexible scenarios. Existing fexit_bpf2bpf selftest is updated accordingly to not use deprecated APIs. While at it, also deprecate no-op relaxed_core_relocs option (they are always "relaxed"). Last patch also const-ifies all high-level libbpf attach APIs, as there is no reason for them to assume bpf_program/bpf_map modifications. Patch #1 also removes one more unneeded use of find_sec_def(), relying on prog->sec_def that's set during bpf_object__open() operation, simplifying upcoming refactoring a little bit more. All these changes are preparatory patches before SEC() handling refactoring that will come next. ==================== Signed-off-by: Alexei Starovoitov --- f706f6c66c4360e41dd650bcf24a45880e75bb39