These BTF functions are not available unconditionally, only reference them when they are available. Avoid the following build warnings: BTF .tmp_vmlinux1.btf.o btf_encoder__tag_kfunc: failed to find kfunc 'bpf_send_signal_task' in BTF btf_encoder__tag_kfuncs: failed to tag kfunc 'bpf_send_signal_task' NM .tmp_vmlinux1.syms KSYMS .tmp_vmlinux1.kallsyms.S AS .tmp_vmlinux1.kallsyms.o LD .tmp_vmlinux2 NM .tmp_vmlinux2.syms KSYMS .tmp_vmlinux2.kallsyms.S AS .tmp_vmlinux2.kallsyms.o LD vmlinux BTFIDS vmlinux WARN: resolve_btfids: unresolved symbol prog_test_ref_kfunc WARN: resolve_btfids: unresolved symbol bpf_crypto_ctx WARN: resolve_btfids: unresolved symbol bpf_send_signal_task WARN: resolve_btfids: unresolved symbol bpf_modify_return_test_tp WARN: resolve_btfids: unresolved symbol bpf_dynptr_from_xdp WARN: resolve_btfids: unresolved symbol bpf_dynptr_from_skb
Unified · Split
| @@ -3104,7 +3104,9 @@ BTF_ID_FLAGS(func, bpf_task_get_cgroup1, KF_ACQUIRE | KF_RCU | KF_RET_NULL) · 3103 unmodified lines | ||
| 3104 | 3104 | BTF_ID_FLAGS(func, bpf_task_from_pid, KF_ACQUIRE | KF_RET_NULL) |
| 3105 | 3105 | BTF_ID_FLAGS(func, bpf_task_from_vpid, KF_ACQUIRE | KF_RET_NULL) |
| 3106 | 3106 | BTF_ID_FLAGS(func, bpf_throw) |
| 3107 | +#ifdef CONFIG_BPF_EVENTS | |
| 3107 | 3108 | BTF_ID_FLAGS(func, bpf_send_signal_task, KF_TRUSTED_ARGS) |
| 3109 | +#endif | |
| 3108 | 3110 | BTF_KFUNCS_END(generic_btf_ids) |
| 3109 | 3111 | |
| 3110 | 3112 | static const struct btf_kfunc_id_set generic_kfunc_set = { |
| @@ -3150,7 +3152,9 @@ BTF_ID_FLAGS(func, bpf_dynptr_is_null) · 39 unmodified lines | ||
| 3150 | 3152 | BTF_ID_FLAGS(func, bpf_dynptr_is_rdonly) |
| 3151 | 3153 | BTF_ID_FLAGS(func, bpf_dynptr_size) |
| 3152 | 3154 | BTF_ID_FLAGS(func, bpf_dynptr_clone) |
| 3155 | +#ifdef CONFIG_NET | |
| 3153 | 3156 | BTF_ID_FLAGS(func, bpf_modify_return_test_tp) |
| 3157 | +#endif | |
| 3154 | 3158 | BTF_ID_FLAGS(func, bpf_wq_init) |
| 3155 | 3159 | BTF_ID_FLAGS(func, bpf_wq_set_callback_impl) |
| 3156 | 3160 | BTF_ID_FLAGS(func, bpf_wq_start) |
| @@ -5681,7 +5681,9 @@ static bool in_rcu_cs(struct bpf_verifier_env *env) · 5680 unmodified lines | ||
| 5681 | 5681 | |
| 5682 | 5682 | /* Once GCC supports btf_type_tag the following mechanism will be replaced with tag check */ |
| 5683 | 5683 | BTF_SET_START(rcu_protected_types) |
| 5684 | +#ifdef CONFIG_NET | |
| 5684 | 5685 | BTF_ID(struct, prog_test_ref_kfunc) |
| 5686 | +#endif | |
| 5685 | 5687 | #ifdef CONFIG_CGROUPS |
| 5686 | 5688 | BTF_ID(struct, cgroup) |
| 5687 | 5689 | #endif |
| @@ -5689,7 +5691,9 @@ BTF_ID(struct, cgroup) · 1 unmodified line | ||
| 5689 | 5691 | BTF_ID(struct, bpf_cpumask) |
| 5690 | 5692 | #endif |
| 5691 | 5693 | BTF_ID(struct, task_struct) |
| 5694 | +#ifdef CONFIG_CRYPTO | |
| 5692 | 5695 | BTF_ID(struct, bpf_crypto_ctx) |
| 5696 | +#endif | |
| 5693 | 5697 | BTF_SET_END(rcu_protected_types) |
| 5694 | 5698 | |
| 5695 | 5699 | static bool rcu_protected_object(const struct btf *btf, u32 btf_id) |
| @@ -11722,8 +11726,10 @@ BTF_ID(func, bpf_rdonly_cast) · 6026 unmodified lines | ||
| 11722 | 11726 | BTF_ID(func, bpf_rbtree_remove) |
| 11723 | 11727 | BTF_ID(func, bpf_rbtree_add_impl) |
| 11724 | 11728 | BTF_ID(func, bpf_rbtree_first) |
| 11729 | +#ifdef CONFIG_NET | |
| 11725 | 11730 | BTF_ID(func, bpf_dynptr_from_skb) |
| 11726 | 11731 | BTF_ID(func, bpf_dynptr_from_xdp) |
| 11732 | +#endif | |
| 11727 | 11733 | BTF_ID(func, bpf_dynptr_slice) |
| 11728 | 11734 | BTF_ID(func, bpf_dynptr_slice_rdwr) |
| 11729 | 11735 | BTF_ID(func, bpf_dynptr_clone) |
| @@ -11751,8 +11757,10 @@ BTF_ID(func, bpf_rcu_read_unlock) · 21 unmodified lines | ||
| 11751 | 11757 | BTF_ID(func, bpf_rbtree_remove) |
| 11752 | 11758 | BTF_ID(func, bpf_rbtree_add_impl) |
| 11753 | 11759 | BTF_ID(func, bpf_rbtree_first) |
| 11760 | +#ifdef CONFIG_NET | |
| 11754 | 11761 | BTF_ID(func, bpf_dynptr_from_skb) |
| 11755 | 11762 | BTF_ID(func, bpf_dynptr_from_xdp) |
| 11763 | +#endif | |
| 11756 | 11764 | BTF_ID(func, bpf_dynptr_slice) |
| 11757 | 11765 | BTF_ID(func, bpf_dynptr_slice_rdwr) |
| 11758 | 11766 | BTF_ID(func, bpf_dynptr_clone) |