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: Daniel Xu <dxu@dxuuu.xyz>
Link: https://lore.kernel.org/r/3c98c19dc50d3b18ea5eca135b4fc3a5db036060.1662568410.git.dxu@dxuuu.xyz
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
Daniel Xu 2022-09-07 10:40:39 -06:00 committed by Alexei Starovoitov
parent 896f07c07d
commit 84c6ac417c
2 changed files with 2 additions and 0 deletions

View File

@ -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

View File

@ -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)
{ {