History

bpf: Move ksym_tnode to bpf_ksym

Moving ksym_tnode list node to 'struct bpf_ksym' object, so the symbol itself can be chained and used in other objects like bpf_trampoline and bpf_dispatcher. We need bpf_ksym object to be linked both in bpf_kallsyms via lnode for /proc/kallsyms and in bpf_tree via tnode for bpf address lookup functions like __bpf_address_lookup or bpf_prog_kallsyms_find.

Jiri Olsa committed 6 years ago

Commit ca4424c1 parent ecb60d12 files · +11 −15Browse files

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

Unified · Split

include/linux/bpf.h+1−1
@@ -477,6 +477,7 @@ struct bpf_ksym { · 476 unmodified lines
477 unsigned long end;477 unsigned long end;
478 char name[KSYM_NAME_LEN];478 char name[KSYM_NAME_LEN];
479 struct list_head lnode;479 struct list_head lnode;
480 struct latch_tree_node tnode;
480};481};
481 482
482enum bpf_tramp_prog_type {483enum bpf_tramp_prog_type {
@@ -659,7 +660,6 @@ struct bpf_prog_aux { · 176 unmodified lines
659 void *jit_data; /* JIT specific data. arch dependent */660 void *jit_data; /* JIT specific data. arch dependent */
660 struct bpf_jit_poke_descriptor *poke_tab;661 struct bpf_jit_poke_descriptor *poke_tab;
661 u32 size_poke_tab;662 u32 size_poke_tab;
662 struct latch_tree_node ksym_tnode;
663 struct bpf_ksym ksym;663 struct bpf_ksym ksym;
664 const struct bpf_prog_ops *ops;664 const struct bpf_prog_ops *ops;
665 struct bpf_map **used_maps;665 struct bpf_map **used_maps;