aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/libbpf_legacy.h
diff options
context:
space:
mode:
authorStanislav Fomichev <[email protected]>2021-10-21 21:48:12 +0000
committerAndrii Nakryiko <[email protected]>2021-10-22 23:53:11 +0000
commita77f879ba1178437e5df87090165e5a45a91ba7f (patch)
treefe0dd6faf0e68c7693141c4c022dc0f05117ef73 /tools/lib/bpf/libbpf_legacy.h
parentbpftool: Avoid leaking the JSON writer prepared for program metadata (diff)
downloadkernel-a77f879ba1178437e5df87090165e5a45a91ba7f.tar.gz
kernel-a77f879ba1178437e5df87090165e5a45a91ba7f.zip
libbpf: Use func name when pinning programs with LIBBPF_STRICT_SEC_NAME
We can't use section name anymore because they are not unique and pinning objects with multiple programs with the same progtype/secname will fail. [0] Closes: https://github.com/libbpf/libbpf/issues/273 Fixes: 33a2c75c55e2 ("libbpf: add internal pin_name") Signed-off-by: Stanislav Fomichev <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Reviewed-by: Quentin Monnet <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/lib/bpf/libbpf_legacy.h')
-rw-r--r--tools/lib/bpf/libbpf_legacy.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/lib/bpf/libbpf_legacy.h b/tools/lib/bpf/libbpf_legacy.h
index 74e6f860f703..29ccafab11a8 100644
--- a/tools/lib/bpf/libbpf_legacy.h
+++ b/tools/lib/bpf/libbpf_legacy.h
@@ -52,6 +52,9 @@ enum libbpf_strict_mode {
* allowed, with LIBBPF_STRICT_SEC_PREFIX this will become
* unrecognized by libbpf and would have to be just SEC("xdp") and
* SEC("xdp") and SEC("perf_event").
+ *
+ * Note, in this mode the program pin path will be based on the
+ * function name instead of section name.
*/
LIBBPF_STRICT_SEC_NAME = 0x04,