[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <854a2c2ceaa52f1ad26fb803d1ad5668fd3200b3.camel@gmail.com>
Date: Mon, 10 Nov 2025 12:44:21 -0800
From: Eduard Zingerman <eddyz87@...il.com>
To: Donglin Peng <dolinux.peng@...il.com>, Alexei Starovoitov
<alexei.starovoitov@...il.com>, Andrii Nakryiko
<andrii.nakryiko@...il.com>, Ihor Solodrai <ihor.solodrai@...ux.dev>
Cc: bot+bpf-ci@...nel.org, Alexei Starovoitov <ast@...nel.org>,
zhangxiaoqin@...omi.com, LKML <linux-kernel@...r.kernel.org>, bpf
<bpf@...r.kernel.org>, Alan Maguire <alan.maguire@...cle.com>, Song Liu
<song@...nel.org>, pengdonglin <pengdonglin@...omi.com>, Andrii Nakryiko
<andrii@...nel.org>, Daniel Borkmann <daniel@...earbox.net>, Martin KaFai
Lau <martin.lau@...nel.org>, Yonghong Song <yonghong.song@...ux.dev>,
Chris Mason <clm@...a.com>
Subject: Re: [PATCH v5 6/7] btf: Add lazy sorting validation for binary
search
On Mon, 2025-11-10 at 09:42 +0800, Donglin Peng wrote:
[...]
> [[Resending in plain text format - previous HTML email was rejected]
>
> Thanks for the feedback. Based on the previous discussions, I plan
> to implement the following changes in the next version:
>
> 1. Modify the btf__permute interface to adopt the ID map approach, as
> suggested by Andrii.
>
> 2. Remove the lazy sort check and move the verification to the BTF
> parsing phase. This addresses two concerns: potential race conditions
> with write operations and const-cast issues. The overhead is negligible
> (approximately 1.4ms for vmlinux BTF).
>
> 3. Invoke the btf__permute interface to implement BTF sorting in resolve_btfids.
>
> I welcome any further suggestions.
Hi Donglin,
I think this summarizes the discussion pretty well.
One thing to notice about (2): if sorting is done by resolve_btfids,
there is no need to check for BTF being sorted in vmlinux BTF.
So, maybe it's a good idea to skip this check for it, as Alexei suggested
(but not for programs BTF).
Thanks,
Eduard.
Powered by blists - more mailing lists