On Thu, Jul 3, 2025 at 5:20 AM Menglong Dong <menglong8.dong@xxxxxxxxx> wrote: > > In this commit, we add the 'accessed_args' field to struct bpf_prog_aux, > which is used to record the accessed index of the function args in > btf_ctx_access(). Do we need to bother giving access to arguments through direct ctx[i] access for these multi-fentry/fexit programs? We have bpf_get_func_arg_cnt() and bpf_get_func_arg() which can be used to get any given argument at runtime. > > Meanwhile, we add the function btf_check_func_part_match() to compare the > accessed function args of two function prototype. This function will be > used in the following commit. > > Signed-off-by: Menglong Dong <dongml2@xxxxxxxxxxxxxxx> > --- > include/linux/bpf.h | 4 ++ > include/linux/btf.h | 3 +- > kernel/bpf/btf.c | 108 +++++++++++++++++++++++++++++++++++++++++- > net/sched/bpf_qdisc.c | 2 +- > 4 files changed, 113 insertions(+), 4 deletions(-) > [...]