mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-27 09:09:27 +00:00
bpf: Add bpf_ksym_add/del functions
Separating /proc/kallsyms add/del code and adding bpf_ksym_add/del functions for that. Moving bpf_prog_ksym_node_add/del functions to __bpf_ksym_add/del and changing their argument to 'struct bpf_ksym' object. This way we can call them for other bpf objects types like trampoline and dispatcher. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20200312195610.346362-10-jolsa@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
parent
cbd76f8d5a
commit
dba122fb5e
2 changed files with 22 additions and 14 deletions
include/linux
|
@ -584,6 +584,9 @@ struct bpf_image {
|
|||
#define BPF_IMAGE_SIZE (PAGE_SIZE - sizeof(struct bpf_image))
|
||||
bool is_bpf_image_address(unsigned long address);
|
||||
void *bpf_image_alloc(void);
|
||||
/* Called only from JIT-enabled code, so there's no need for stubs. */
|
||||
void bpf_ksym_add(struct bpf_ksym *ksym);
|
||||
void bpf_ksym_del(struct bpf_ksym *ksym);
|
||||
#else
|
||||
static inline struct bpf_trampoline *bpf_trampoline_lookup(u64 key)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue