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.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -477,6 +477,7 @@ struct bpf_ksym { · 476 unmodified lines | ||
| 477 | 477 | unsigned long end; |
| 478 | 478 | char name[KSYM_NAME_LEN]; |
| 479 | 479 | struct list_head lnode; |
| 480 | + struct latch_tree_node tnode; | |
| 480 | 481 | }; |
| 481 | 482 | |
| 482 | 483 | enum bpf_tramp_prog_type { |
| @@ -659,7 +660,6 @@ struct bpf_prog_aux { · 176 unmodified lines | ||
| 659 | 660 | void *jit_data; /* JIT specific data. arch dependent */ |
| 660 | 661 | struct bpf_jit_poke_descriptor *poke_tab; |
| 661 | 662 | u32 size_poke_tab; |
| 662 | − struct latch_tree_node ksym_tnode; | |
| 663 | 663 | struct bpf_ksym ksym; |
| 664 | 664 | const struct bpf_prog_ops *ops; |
| 665 | 665 | struct bpf_map **used_maps; |