diff options
author | Kumar Kartikeya Dwivedi <memxor@gmail.com> | 2021-10-28 09:34:54 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2021-10-29 02:30:06 +0300 |
commit | d6aef08a872b9e23eecc92d0e92393473b13c497 (patch) | |
tree | e0a592a65fa04ea132da6c21be6517498544f650 /include/linux/bpf.h | |
parent | 2895f48f98db3dedfa499bae95c41b0be7fe92ce (diff) | |
download | linux-d6aef08a872b9e23eecc92d0e92393473b13c497.tar.xz |
bpf: Add bpf_kallsyms_lookup_name helper
This helper allows us to get the address of a kernel symbol from inside
a BPF_PROG_TYPE_SYSCALL prog (used by gen_loader), so that we can
relocate typeless ksym vars.
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20211028063501.2239335-2-memxor@gmail.com
Diffstat (limited to 'include/linux/bpf.h')
-rw-r--r-- | include/linux/bpf.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 50105e0b8fcc..6deebf8bf78f 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -2110,6 +2110,7 @@ extern const struct bpf_func_proto bpf_for_each_map_elem_proto; extern const struct bpf_func_proto bpf_btf_find_by_name_kind_proto; extern const struct bpf_func_proto bpf_sk_setsockopt_proto; extern const struct bpf_func_proto bpf_sk_getsockopt_proto; +extern const struct bpf_func_proto bpf_kallsyms_lookup_name_proto; const struct bpf_func_proto *tracing_prog_func_proto( enum bpf_func_id func_id, const struct bpf_prog *prog); |