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] [day] [month] [year] [list]
Message-ID: <d36c5422-d7f7-00f8-f52b-6e3887884566@oracle.com>
Date:   Fri, 3 Aug 2018 19:41:32 +0100
From:   Allan Xavier <allan.x.xavier@...cle.com>
To:     Josh Poimboeuf <jpoimboe@...hat.com>
Cc:     Peter Zijlstra <peterz@...radead.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] objtool: Support multiple rodata sections.

Hi Josh,

Thanks for your comments, I've sent a v2 with fixes for what you mentioned, but
also just wanted to respond to some of your comments directly.

On 26/07/18 17:36, Josh Poimboeuf wrote:
> 
>> +		if (strstr(sec->name, ".rodata") == sec->name) {
>> +			sec->rodata = true;
>> +			found = true;
> 
> This check is too broad.  It will also match the following sections:
> 
> .rodata.str1.8
> .rodata.str1.1
> .rela.rodata
> .init.rodata

As written, it doesn't match .rela.rodata or .init.rodata, although you're right
that incorrectly matches .rodata.str1.[18] as well as
.rodata.<funcname>.str1.[18] when data sections are used.

In the v2 I've addressed this by checking for .str1. before the last character
of the section name, I fully admit it's pretty ugly though and the logic could
be relaxed for a cleaner implementation, it depends on how strict you want to be.

Alternatively, it could also be possible to key off whether the rodata section
has any relocations, which has the additional benefit of narrowing down which
rodata sections are likely to contain jump tables.

Let me know what you think of this or if you have any better suggestions.

> Also, the loop should break once it finds an rodata section.

I don't quite understand your point here. If the loop breaks once it has found
an .rodata section it would only ever mark that one section as rodata, ignoring
the rest?

Thanks,
Allan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ