[PATCH] x86/retpoline,kprobes: Fix "Fix position of thunk sections with CONFIG_LTO_CLANG"

From: Andrew Cooper
Date: Thu Aug 03 2023 - 19:05:51 EST


Lets hope there are no .text..__x86womble sections around.

Fixes: 973ab2d61f33 ("x86/retpoline,kprobes: Fix position of thunk sections with CONFIG_LTO_CLANG")
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Petr Pavlu <petr.pavlu@xxxxxxxx>
CC: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
CC: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
CC: linux-kernel@xxxxxxxxxxxxxxx

Alternatively,

int strstarts(const char *s1, const char *s2)
{
return strncmp(s1, s2, strlen(s2));
}
---
tools/objtool/check.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index e096eb325acd..e2ee10ce7703 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -389,7 +389,7 @@ static int decode_instructions(struct objtool_file *file)
if (!strcmp(sec->name, ".noinstr.text") ||
!strcmp(sec->name, ".entry.text") ||
!strcmp(sec->name, ".cpuidle.text") ||
- !strncmp(sec->name, ".text..__x86.", 12))
+ !strncmp(sec->name, ".text..__x86.", 13))
sec->noinstr = true;

/*

base-commit: 029239c5b0e6484e4443be90e5664fd0bf0f066b
--
2.30.2