On 2/25/25 1:29 PM, Amery Hung wrote:
From: Amery Hung <amery.hung@xxxxxxxxxxxxx> Currently, add_kfunc_call() is only invoked once before the main verification loop. Therefore, the verifier could not find the bpf_kfunc_btf_tab of a new kfunc call which is not seen in user defined struct_ops operators but introduced in gen_prologue or gen_epilogue during do_misc_fixup(). Fix this by searching kfuncs in the patching instruction buffer and add them to prog->aux->kfunc_tab.
Acked-by: Martin KaFai Lau <martin.lau@xxxxxxxxxx>