From: Martin KaFai Lau <martin.lau@linux.dev>
To: Amery Hung <ameryhung@gmail.com>
Cc: bpf@vger.kernel.org, netdev@vger.kernel.org,
daniel@iogearbox.net, andrii@kernel.org,
alexei.starovoitov@gmail.com, martin.lau@kernel.org,
kuba@kernel.org, edumazet@google.com, xiyou.wangcong@gmail.com,
cong.wang@bytedance.com, jhs@mojatatu.com, sinquersw@gmail.com,
toke@redhat.com, jiri@resnulli.us, stfomichev@gmail.com,
ekarani.silvestre@ccc.ufcg.edu.br, yangpeihao@sjtu.edu.cn,
yepeilin.cs@gmail.com, kernel-team@meta.com
Subject: Re: [PATCH bpf-next v4 01/19] bpf: Make every prog keep a copy of ctx_arg_info
Date: Thu, 13 Feb 2025 11:54:41 -0800 [thread overview]
Message-ID: <0bee571a-927d-4042-9e89-53bf695ec054@linux.dev> (raw)
In-Reply-To: <20250210174336.2024258-2-ameryhung@gmail.com>
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;
> +}
> +
next prev parent reply other threads:[~2025-02-13 19:54 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-10 17:43 [PATCH bpf-next v4 00/19] bpf qdisc Amery Hung
2025-02-10 17:43 ` [PATCH bpf-next v4 01/19] bpf: Make every prog keep a copy of ctx_arg_info Amery Hung
2025-02-13 19:54 ` Martin KaFai Lau [this message]
2025-02-14 5:44 ` Amery Hung
2025-02-10 17:43 ` [PATCH bpf-next v4 02/19] bpf: Support getting referenced kptr from struct_ops argument Amery Hung
2025-02-10 17:43 ` [PATCH bpf-next v4 03/19] selftests/bpf: Test referenced kptr arguments of struct_ops programs Amery Hung
2025-02-10 17:43 ` [PATCH bpf-next v4 04/19] bpf: Allow struct_ops prog to return referenced kptr Amery Hung
2025-02-10 17:43 ` [PATCH bpf-next v4 05/19] selftests/bpf: Test returning referenced kptr from struct_ops programs Amery Hung
2025-02-10 17:43 ` [PATCH bpf-next v4 06/19] bpf: Prepare to reuse get_ctx_arg_idx Amery Hung
2025-02-10 17:43 ` [PATCH bpf-next v4 07/19] bpf: Generalize finding member offset of struct_ops prog Amery Hung
2025-02-10 17:43 ` [PATCH bpf-next v4 08/19] bpf: net_sched: Support implementation of Qdisc_ops in bpf Amery Hung
2025-03-10 19:51 ` Cong Wang
2025-02-10 17:43 ` [PATCH bpf-next v4 09/19] bpf: net_sched: Add basic bpf qdisc kfuncs Amery Hung
2025-02-10 17:43 ` [PATCH bpf-next v4 10/19] bpf: Search and add kfuncs in struct_ops prologue and epilogue Amery Hung
2025-02-10 17:43 ` [PATCH bpf-next v4 11/19] bpf: net_sched: Add a qdisc watchdog timer Amery Hung
2025-02-10 17:43 ` [PATCH bpf-next v4 12/19] bpf: net_sched: Support updating bstats Amery Hung
2025-02-10 17:43 ` [PATCH bpf-next v4 13/19] bpf: net_sched: Support updating qstats Amery Hung
2025-02-10 17:43 ` [PATCH bpf-next v4 14/19] bpf: net_sched: Allow writing to more Qdisc members Amery Hung
2025-02-10 17:43 ` [PATCH bpf-next v4 15/19] bpf: net_sched: Disable attaching bpf qdisc to non root Amery Hung
2025-02-15 19:35 ` Jakub Kicinski
2025-02-10 17:43 ` [PATCH bpf-next v4 16/19] libbpf: Support creating and destroying qdisc Amery Hung
2025-02-10 17:43 ` [PATCH bpf-next v4 17/19] selftests/bpf: Add a basic fifo qdisc test Amery Hung
2025-02-10 17:43 ` [PATCH bpf-next v4 18/19] selftests/bpf: Add a bpf fq qdisc to selftest Amery Hung
2025-02-10 17:43 ` [PATCH bpf-next v4 19/19] selftests/bpf: Test attaching bpf qdisc to mq and non root Amery Hung
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0bee571a-927d-4042-9e89-53bf695ec054@linux.dev \
--to=martin.lau@linux.dev \
--cc=alexei.starovoitov@gmail.com \
--cc=ameryhung@gmail.com \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=cong.wang@bytedance.com \
--cc=daniel@iogearbox.net \
--cc=edumazet@google.com \
--cc=ekarani.silvestre@ccc.ufcg.edu.br \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kernel-team@meta.com \
--cc=kuba@kernel.org \
--cc=martin.lau@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sinquersw@gmail.com \
--cc=stfomichev@gmail.com \
--cc=toke@redhat.com \
--cc=xiyou.wangcong@gmail.com \
--cc=yangpeihao@sjtu.edu.cn \
--cc=yepeilin.cs@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.