On Tue, Jul 22, 2025 at 05:37 PM -07, Martin KaFai Lau wrote: > On 7/21/25 3:52 AM, Jakub Sitnicki wrote: >> @@ -21788,12 +21798,17 @@ static void specialize_kfunc(struct bpf_verifier_env *env, >> if (offset) >> return; >> - if (func_id == special_kfunc_list[KF_bpf_dynptr_from_skb]) { >> + if (func_id == special_kfunc_list[KF_bpf_dynptr_from_skb] || >> + func_id == special_kfunc_list[KF_bpf_dynptr_from_skb_meta]) { > > I don't think this check is needed. The skb_meta is writable to tc. > >> seen_direct_write = env->seen_direct_write; >> is_rdonly = !may_access_direct_pkt_data(env, NULL, BPF_WRITE); > > is_rdonly is always false here. > >> - if (is_rdonly) >> - *addr = (unsigned long)bpf_dynptr_from_skb_rdonly; >> + if (is_rdonly) { >> + if (func_id == special_kfunc_list[KF_bpf_dynptr_from_skb]) >> + *addr = (unsigned long)bpf_dynptr_from_skb_rdonly; >> + else if (func_id == special_kfunc_list[KF_bpf_dynptr_from_skb_meta]) >> + *addr = (unsigned long)bpf_dynptr_from_skb_meta_rdonly; >> + } > > [ ... ] > >> +int bpf_dynptr_from_skb_meta_rdonly(struct __sk_buff *skb, u64 flags, > > so I suspect this is never used and not needed now. Please check. > It can be revisited in the future when other hooks are supported. It will be a > useful comment in the commit message. You're right. This is dead code ATM. I missed that. Will remove. [...]