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: <6f93bb5c-43da-4a88-a8b3-7b7ea992b0e6@redhat.com>
Date: Tue, 10 Jun 2025 08:39:10 -0400
From: Joe Lawrence <joe.lawrence@...hat.com>
To: Josh Poimboeuf <jpoimboe@...nel.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
 Petr Mladek <pmladek@...e.com>, Miroslav Benes <mbenes@...e.cz>,
 live-patching@...r.kernel.org, Song Liu <song@...nel.org>,
 laokz <laokz@...mail.com>, Jiri Kosina <jikos@...nel.org>,
 Marcos Paulo de Souza <mpdesouza@...e.com>, Weinan Liu <wnliu@...gle.com>,
 Fazla Mehrab <a.mehrab@...edance.com>,
 Chen Zhongjin <chenzhongjin@...wei.com>, Puranjay Mohan <puranjay@...nel.org>
Subject: Re: [PATCH v2 52/62] objtool/klp: Introduce klp diff subcommand for
 diffing object files

On 6/9/25 7:21 PM, Josh Poimboeuf wrote:
> On Mon, Jun 09, 2025 at 02:32:19PM -0400, Joe Lawrence wrote:
>> On Fri, May 09, 2025 at 01:17:16PM -0700, Josh Poimboeuf wrote:
>>> +static int validate_ffunction_fdata_sections(struct elf *elf)
>>> +{
>>> +	struct symbol *sym;
>>> +	bool found_text = false, found_data = false;
>>> +
>>> +	for_each_sym(elf, sym) {
>>> +		char sec_name[SEC_NAME_LEN];
>>> +
>>> +		if (!found_text && is_func_sym(sym)) {
>>> +			snprintf(sec_name, SEC_NAME_LEN, ".text.%s", sym->name);
>>> +			if (!strcmp(sym->sec->name, sec_name))
>>> +				found_text = true;
>>> +		}
>>> +
>>> +		if (!found_data && is_object_sym(sym)) {
>>> +			snprintf(sec_name, SEC_NAME_LEN, ".data.%s", sym->name);
>>> +			if (!strcmp(sym->sec->name, sec_name))
>>> +				found_data = true;
>>
>> Hi Josh,
>>
>> Should we check for other data section prefixes here, like:
>>
>> 			else {
>> 				snprintf(sec_name, SEC_NAME_LEN, ".rodata.%s", sym->name);
>> 				if (!strcmp(sym->sec->name, sec_name))
>> 					found_data = true;
>> 			}
> 
> Indeed.  And also .bss.*.
> 
>> At the same time, while we're here, what about other .text.* section
>> prefixes?
> 
> AFAIK, .text.* is the only one.
> 

What about .text.unlikely, .text.hot (not sure if these can come alone
or are only optimization copies) ?

-- 
Joe


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ