On 2/10/25 9:43 AM, Amery Hung wrote:
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 9971c03adfd5..a41ba019780f 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -22377,6 +22377,18 @@ static void print_verification_stats(struct bpf_verifier_env *env)
env->peak_states, env->longest_mark_read_walk);
}
+int bpf_prog_ctx_arg_info_init(struct bpf_prog *prog,
+ const struct bpf_ctx_arg_aux *info, u32 cnt)
+{
+ prog->aux->ctx_arg_info = kcalloc(cnt, sizeof(*info), GFP_KERNEL);
Missing a kfree.
+ if (!prog->aux->ctx_arg_info)
+ return -ENOMEM;
+
+ memcpy(prog->aux->ctx_arg_info, info, sizeof(*info) * cnt);
+ prog->aux->ctx_arg_info_size = cnt;
+ return 0;
+}
+