From: "Kumar Kartikeya Dwivedi" <memxor@gmail.com>
To: "Eduard Zingerman" <eddyz87@gmail.com>,
"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>,
"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: Thu, 13 Aug 2026 04:37:43 +0200 [thread overview]
Message-ID: <DKNGTPM2RNL9.2E66H1VIT9RW9@gmail.com> (raw)
In-Reply-To: <96eceba605b2cb7e93b3e33abf545a02c4eeb1cd.camel@gmail.com>
On Mon Aug 10, 2026 at 11:17 PM CEST, Eduard Zingerman wrote:
> 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>
>
> ...
I applied this one for now, thanks.
next prev parent reply other threads:[~2026-08-13 2:37 UTC|newest]
Thread overview: 7+ 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-08-13 2:37 ` Kumar Kartikeya Dwivedi [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=DKNGTPM2RNL9.2E66H1VIT9RW9@gmail.com \
--to=memxor@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=eddyz87@gmail.com \
--cc=emil@etsalapatis.com \
--cc=linux-kernel@vger.kernel.org \
--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.