diff options
| author | Mykyta Yatsenko <yatsenko@meta.com> | 2026-05-18 08:23:15 -0700 |
|---|---|---|
| committer | Steven Rostedt <rostedt@goodmis.org> | 2026-07-28 07:18:48 -0400 |
| commit | f8c9b3051ded5a397172aee79271cc46529ca8f2 (patch) | |
| tree | 143b63b7bd8f6889a01dda92ce62b804b3b894b6 /include/linux | |
| parent | f5098b6bae761e346ebcd9da7f95622c04733cff (diff) | |
bpf: Make btf_get_module_btf() and btf_relocate_id() non-static
Drop the static qualifier and add prototypes to <linux/btf.h> so the
tracing core can look up module BTF and translate ids stored by
resolve_btfids (which are local to a module's split BTF) into the
runtime ids used by the kernel.
Used by the upcoming events/<sys>/<event>/btf_ids tracefs interface.
Link: https://patch.msgid.link/20260518-generic_tracepoint-v2-1-b755a5cf67bb@meta.com
Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/btf.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/btf.h b/include/linux/btf.h index c09b7994de4e..8f8d3f7a8929 100644 --- a/include/linux/btf.h +++ b/include/linux/btf.h @@ -235,6 +235,8 @@ int btf_check_and_fixup_fields(const struct btf *btf, struct btf_record *rec); bool btf_type_is_void(const struct btf_type *t); s32 btf_find_by_name_kind(const struct btf *btf, const char *name, u8 kind); s32 bpf_find_btf_id(const char *name, u32 kind, struct btf **btf_p); +struct btf *btf_get_module_btf(const struct module *module); +__u32 btf_relocate_id(const struct btf *btf, __u32 id); const struct btf_type *btf_type_skip_modifiers(const struct btf *btf, u32 id, u32 *res_id); const struct btf_type *btf_type_resolve_ptr(const struct btf *btf, |
