lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <063c8a1b-be0a-4688-bb7f-047db216de5f@linux.dev>
Date: Mon, 15 Dec 2025 18:16:11 -0800
From: Ihor Solodrai <ihor.solodrai@...ux.dev>
To: Eduard Zingerman <eddyz87@...il.com>, Alexei Starovoitov
 <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>,
 Andrii Nakryiko <andrii@...nel.org>, Martin KaFai Lau
 <martin.lau@...ux.dev>, Song Liu <song@...nel.org>,
 Yonghong Song <yonghong.song@...ux.dev>,
 John Fastabend <john.fastabend@...il.com>, KP Singh <kpsingh@...nel.org>,
 Stanislav Fomichev <sdf@...ichev.me>, Hao Luo <haoluo@...gle.com>,
 Jiri Olsa <jolsa@...nel.org>, Andrew Morton <akpm@...ux-foundation.org>,
 Nathan Chancellor <nathan@...nel.org>, Nicolas Schier <nsc@...nel.org>,
 Tejun Heo <tj@...nel.org>, David Vernet <void@...ifault.com>,
 Andrea Righi <arighi@...dia.com>, Changwoo Min <changwoo@...lia.com>,
 Shuah Khan <shuah@...nel.org>,
 Nick Desaulniers <nick.desaulniers+lkml@...il.com>,
 Bill Wendling <morbo@...gle.com>, Justin Stitt <justinstitt@...gle.com>,
 Alan Maguire <alan.maguire@...cle.com>, Donglin Peng <dolinux.peng@...il.com>
Cc: bpf@...r.kernel.org, dwarves@...r.kernel.org,
 linux-kernel@...r.kernel.org, linux-kbuild@...r.kernel.org
Subject: Re: [PATCH bpf-next v3 6/6] resolve_btfids: change in-place update
 with raw binary output

On 12/11/25 11:08 PM, Eduard Zingerman wrote:
> On Fri, 2025-12-05 at 14:35 -0800, Ihor Solodrai wrote:
>
> [...]
> 
>> @@ -860,23 +913,34 @@ int main(int argc, const char **argv)
>>  	 */
>>  	if (obj.efile.idlist_shndx == -1 ||
>>  	    obj.efile.symbols_shndx == -1) {
>> -		pr_debug("Cannot find .BTF_ids or symbols sections, nothing to do\n");
>> -		err = 0;
>> -		goto out;
>> +		pr_debug("Cannot find .BTF_ids or symbols sections, skip symbols resolution\n");
>> +		goto dump_btf;
>>  	}
>>  
>>  	if (symbols_collect(&obj))
>>  		goto out;
>>  
>> -	if (load_btf(&obj))
>> -		goto out;
>> -
>>  	if (symbols_resolve(&obj))
>>  		goto out;
>>  
>>  	if (symbols_patch(&obj))
>>  		goto out;
>>  
>> +	err = make_out_path(out_path, obj.path, BTF_IDS_SECTION);
>> +	if (err || dump_raw_btf_ids(&obj, out_path))
>> +		goto out;
>> +
>> +dump_btf:
>> +	err = make_out_path(out_path, obj.path, BTF_ELF_SEC);
>> +	if (err || dump_raw_btf(obj.btf, out_path))
> 
> Nit: 'err' is not set if dump_raw_btf() errors out.
>      Maybe use:
> 
>      	   err = make_out_path(out_path, obj.path, BTF_ELF_SEC);
>      	   err = err ?: dump_raw_btf(obj.btf, out_path);
> 	   if (err)
> 	      goto out;
>      ?

Good observation. I'll fix this, thanks.

> 
>> +		goto out;
>> +
>> +	if (obj.base_btf && obj.distill_base) {
>> +		err = make_out_path(out_path, obj.path, BTF_BASE_ELF_SEC);
>> +		if (err || dump_raw_btf(obj.base_btf, out_path))
>> +			goto out;
>> +	}
>> +
>>  	if (!(fatal_warnings && warnings))
>>  		err = 0;
>>  out:
> 
> [...]


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ