On Thu, Dec 5, 2024 at 8:03 PM Eduard Zingerman <eddyz87@xxxxxxxxx> wrote: > > diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h > index f4290c179bee..48b7b2eeb7e2 100644 > --- a/include/linux/bpf_verifier.h > +++ b/include/linux/bpf_verifier.h > @@ -659,6 +659,7 @@ struct bpf_subprog_info { > bool args_cached: 1; > /* true if bpf_fastcall stack region is used by functions that can't be inlined */ > bool keep_fastcall_stack: 1; > + bool changes_pkt_data: 1; since freplace was brought up in the other thread. Let's fix it all in one patch. I think propagating changes_pkt_data flag into prog_aux and into map->owner should do it. The handling will be similar to existing xdp_has_frags. Otherwise tail_call from static subprog will have the same issue. xdp_has_frags compatibility requires equality. All progs either have it or don't. changes_pkt_data flag doesn't need to be that strict: A prog with changes_pkt_data can be freplaced by prog without and tailcall into prog without it. But not the other way around.