Commit 84c6ac41 authored by Daniel Xu's avatar Daniel Xu Committed by Alexei Starovoitov

bpf: Export btf_type_by_id() and bpf_log()

These symbols will be used in nf_conntrack.ko to support direct writes
to `nf_conn`.
Signed-off-by: default avatarDaniel Xu <dxu@dxuuu.xyz>
Link: https://lore.kernel.org/r/3c98c19dc50d3b18ea5eca135b4fc3a5db036060.1662568410.git.dxu@dxuuu.xyzSigned-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 896f07c0
...@@ -818,6 +818,7 @@ const struct btf_type *btf_type_by_id(const struct btf *btf, u32 type_id) ...@@ -818,6 +818,7 @@ const struct btf_type *btf_type_by_id(const struct btf *btf, u32 type_id)
return NULL; return NULL;
return btf->types[type_id]; return btf->types[type_id];
} }
EXPORT_SYMBOL_GPL(btf_type_by_id);
/* /*
* Regular int is not a bit field and it must be either * Regular int is not a bit field and it must be either
......
...@@ -370,6 +370,7 @@ __printf(2, 3) void bpf_log(struct bpf_verifier_log *log, ...@@ -370,6 +370,7 @@ __printf(2, 3) void bpf_log(struct bpf_verifier_log *log,
bpf_verifier_vlog(log, fmt, args); bpf_verifier_vlog(log, fmt, args);
va_end(args); va_end(args);
} }
EXPORT_SYMBOL_GPL(bpf_log);
static const char *ltrim(const char *s) static const char *ltrim(const char *s)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment