bpf: Export btf_type_by_id() and bpf_log()
authorDaniel Xu <dxu@dxuuu.xyz>
Wed, 7 Sep 2022 16:40:39 +0000 (10:40 -0600)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 11 Sep 2022 00:27:32 +0000 (17:27 -0700)
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>
kernel/bpf/btf.c
kernel/bpf/verifier.c

index 9d12212..98be25d 100644 (file)
@@ -818,6 +818,7 @@ const struct btf_type *btf_type_by_id(const struct btf *btf, u32 type_id)
                return NULL;
        return btf->types[type_id];
 }
+EXPORT_SYMBOL_GPL(btf_type_by_id);
 
 /*
  * Regular int is not a bit field and it must be either
index c3efd46..9109e07 100644 (file)
@@ -370,6 +370,7 @@ __printf(2, 3) void bpf_log(struct bpf_verifier_log *log,
        bpf_verifier_vlog(log, fmt, args);
        va_end(args);
 }
+EXPORT_SYMBOL_GPL(bpf_log);
 
 static const char *ltrim(const char *s)
 {