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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <158759428560.28353.8582555495693130530.tip-bot2@tip-bot2>
Date:   Wed, 22 Apr 2020 22:24:45 -0000
From:   "tip-bot2 for Muchun Song" <tip-bot2@...utronix.de>
To:     linux-tip-commits@...r.kernel.org
Cc:     Muchun Song <songmuchun@...edance.com>,
        Josh Poimboeuf <jpoimboe@...hat.com>, x86 <x86@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: [tip: objtool/core] objtool: Remove redundant .rodata section name comparison

The following commit has been merged into the objtool/core branch of tip:

Commit-ID:     069cdb3f72e947c7564240fa4c5468b7e514b679
Gitweb:        https://git.kernel.org/tip/069cdb3f72e947c7564240fa4c5468b7e514b679
Author:        Muchun Song <songmuchun@...edance.com>
AuthorDate:    Sun, 12 Apr 2020 22:44:05 +08:00
Committer:     Josh Poimboeuf <jpoimboe@...hat.com>
CommitterDate: Tue, 14 Apr 2020 17:34:07 -05:00

objtool: Remove redundant .rodata section name comparison

If the prefix of section name is not '.rodata', the following
function call can never return 0.

    strcmp(sec->name, C_JUMP_TABLE_SECTION)

So the name comparison is pointless, just remove it.

Signed-off-by: Muchun Song <songmuchun@...edance.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@...hat.com>
---
 tools/objtool/check.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 10fbfb3..276bce3 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -1372,8 +1372,8 @@ static void mark_rodata(struct objtool_file *file)
 	 * .rodata.str1.* sections are ignored; they don't contain jump tables.
 	 */
 	for_each_sec(file, sec) {
-		if ((!strncmp(sec->name, ".rodata", 7) && !strstr(sec->name, ".str1.")) ||
-		    !strcmp(sec->name, C_JUMP_TABLE_SECTION)) {
+		if (!strncmp(sec->name, ".rodata", 7) &&
+		    !strstr(sec->name, ".str1.")) {
 			sec->rodata = true;
 			found = true;
 		}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ