History

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.

Jiri Olsa committed 6 years ago

Commit dba122f1 parent cbd76f82 files · +22 −14Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/bpf.h+3−0
@@ -584,6 +584,9 @@ struct bpf_image { · 583 unmodified lines
584584 #define BPF_IMAGE_SIZE (PAGE_SIZE - sizeof(struct bpf_image))
585585 bool is_bpf_image_address(unsigned long address);
586586 void *bpf_image_alloc(void);
587+/* Called only from JIT-enabled code, so there's no need for stubs. */
588+void bpf_ksym_add(struct bpf_ksym *ksym);
589+void bpf_ksym_del(struct bpf_ksym *ksym);
587590 #else
588591 static inline struct bpf_trampoline *bpf_trampoline_lookup(u64 key)
589592 {