[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1658604673-16080-1-git-send-email-khoroshilov@ispras.ru>
Date: Sat, 23 Jul 2022 22:31:13 +0300
From: Alexey Khoroshilov <khoroshilov@...ras.ru>
To: Josh Poimboeuf <jpoimboe@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Borislav Petkov <bp@...e.de>
Cc: Alexey Khoroshilov <khoroshilov@...ras.ru>,
linux-kernel@...r.kernel.org, ldv-project@...uxtesting.org
Subject: [PATCH] objtool,x86: Remove unneeded code in special_get_alts()
Commit 134ab5bd1883 ("objtool,x86: Replace alternatives with .retpoline_sites")
basically reverts
commit 50e7b4a1a1b2 ("objtool: Skip magical retpoline .altinstr_replacement"),
but it is an incomplete revert. As a result an unreachable code is left in
special_get_alts() that was intended to skip magical special sections.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 134ab5bd1883 ("objtool,x86: Replace alternatives with .retpoline_sites")
Signed-off-by: Alexey Khoroshilov <khoroshilov@...ras.ru>
---
tools/objtool/special.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/tools/objtool/special.c b/tools/objtool/special.c
index e2223dd91c37..6e84cb4d6774 100644
--- a/tools/objtool/special.c
+++ b/tools/objtool/special.c
@@ -168,8 +168,6 @@ int special_get_alts(struct elf *elf, struct list_head *alts)
memset(alt, 0, sizeof(*alt));
ret = get_alt_entry(elf, entry, sec, idx, alt);
- if (ret > 0)
- continue;
if (ret < 0)
return ret;
--
2.7.4
Powered by blists - more mailing lists