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 1/2] bpf: Eliminate dup/restore of insn_aux_data
Date: Mon, 10 Aug 2026 14:17:03 -0700 [thread overview]
Message-ID: <96eceba605b2cb7e93b3e33abf545a02c4eeb1cd.camel@gmail.com> (raw)
In-Reply-To: <5a4528f019c8d2638c019a2f37475cccc16a9503.1785240296.git.xukuohai@huawei.com>
On Tue, 2026-07-28 at 20:25 +0000, Xu Kuohai wrote:
> From: Xu Kuohai <xukuohai@huawei.com>
>
> The dup/restore of insn_aux_data was introduced to resolve the
> inconsistency between insnsi and insn_aux_data arrays, which occurs
> on the failure path where insnsi was rolled back to the original
> state before constants blinding, while insn_aux_data was not.
>
> After JIT failure, there is only one user, bpf_clear_insn_aux_data(),
> that requires insnsi and insn_aux_data to be synchronized. It accesses
> both insnsi and insn_aux_data using the same array size and index.
>
> However, the access to insnsi in bpf_clear_insn_aux_data() is not
> necessary. It is checked to skip the second slot of an ldimm64 instruction,
> whose jt is never set and can be absorbed into the jt check itself.
>
> So remove the access to insnsi from bpf_clear_insn_aux_data(), and add a
> specific length field for insn_aux_data to allow it to have a different
> length from the insnsi array. Then remove dup/restore of insn_aux_data.
>
> Signed-off-by: Xu Kuohai <xukuohai@huawei.com>
> ---
Hi Xu, sorry for the delayed response, the patch lgtm.
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
...
next prev parent reply other threads:[~2026-08-10 21:17 UTC|newest]
Thread overview: 6+ 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 [this message]
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
2026-08-11 13:00 ` Xu Kuohai
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=96eceba605b2cb7e93b3e33abf545a02c4eeb1cd.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 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.