]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'Improve set_attach_target() and deprecate open_opts.attach_prog_fd'
authorAlexei Starovoitov <ast@kernel.org>
Fri, 17 Sep 2021 16:04:13 +0000 (09:04 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 17 Sep 2021 16:05:41 +0000 (09:05 -0700)
commit50dea1717fd6d0337c96226ae4f8f0cd0d76d33b
tree41c2d3963751330b621ff21f8e1014f3d058ba88
parente27b2d28f19cca6b54ab2c6e0be8d999e0e08b61
parentb61f337655e83aafd0f0f67ba44ce89344f9f311
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 <ast@kernel.org>