bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eduard Zingerman <eddyz87@gmail.com>
To: Xu Kuohai <xukuohai@huaweicloud.com>,
	bpf@vger.kernel.org,  linux-kernel@vger.kernel.org
Cc: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	 Andrii Nakryiko <andrii@kernel.org>,
	Kumar Kartikeya Dwivedi <memxor@gmail.com>,
	Emil Tsalapatis	 <emil@etsalapatis.com>,
	Yonghong Song <yonghong.song@linux.dev>,
	Anton Protopopov <a.s.protopopov@gmail.com>
Subject: Re: [PATCH bpf-next v2 2/2] bpf: Remove unnecessary dup/restore subprog_starts and prog clone
Date: Mon, 10 Aug 2026 14:27:32 -0700	[thread overview]
Message-ID: <855d8ae50086be9d792c5efdaedd01895c7e2f13.camel@gmail.com> (raw)
In-Reply-To: <7e27df89f8d4e1c8790cd26b4bd30ffbd2926cf6.1785240296.git.xukuohai@huawei.com>

On Tue, 2026-07-28 at 20:25 +0000, Xu Kuohai wrote:

...

> diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
> index 505d134cd264..ab5da3ff941a 100644
> --- a/kernel/bpf/core.c
> +++ b/kernel/bpf/core.c
> @@ -1564,27 +1564,34 @@ void bpf_jit_prog_release_other(struct bpf_prog *fp, struct bpf_prog *fp_other)
>   * Now this function is used only to blind the main prog and must be invoked only when
>   * bpf_prog_need_blind() returns true.
>   */
> -struct bpf_prog *bpf_jit_blind_constants(struct bpf_verifier_env *env, struct bpf_prog *prog)
> +int bpf_jit_blind_constants(struct bpf_verifier_env *env, struct bpf_prog **pprog,
> +			    bool clone_needed, bool *cloned)

Imo, the code is harder to understand after this change.
Maybe it would be simpler if clone_needed/cloned handling would moved
to the caller. In the current form I'm not convinced the change is warranted.

...

      reply	other threads:[~2026-08-10 21:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28 20:25 [PATCH bpf-next v2 0/2] bpf: Eliminate unnecessary clone/restore due to constants blinding Xu Kuohai
2026-07-28 20:25 ` [PATCH bpf-next v2 1/2] bpf: Eliminate dup/restore of insn_aux_data Xu Kuohai
2026-08-10 21:17   ` Eduard Zingerman
2026-07-28 20:25 ` [PATCH bpf-next v2 2/2] bpf: Remove unnecessary dup/restore subprog_starts and prog clone Xu Kuohai
2026-08-10 21:27   ` Eduard Zingerman [this message]

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=855d8ae50086be9d792c5efdaedd01895c7e2f13.camel@gmail.com \
    --to=eddyz87@gmail.com \
    --cc=a.s.protopopov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=emil@etsalapatis.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=memxor@gmail.com \
    --cc=xukuohai@huaweicloud.com \
    --cc=yonghong.song@linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).