Re: [PATCH bpf-next v2 1/2] bpf: Eliminate dup/restore of insn_aux_data

"Kumar Kartikeya Dwivedi" <[email protected]>
Newsgroups org.kernel.vger.bpf,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
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 <[email protected]>
>>
>> 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 <[email protected]>
>> ---
>
> Hi Xu, sorry for the delayed response, the patch lgtm.
>
> Acked-by: Eduard Zingerman <[email protected]>
>
> ...

I applied this one for now, thanks.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.