[GIT PULL] objtool fix

From: Ingo Molnar
Date: Sun Sep 17 2023 - 13:35:02 EST


Linus,

Please pull the latest objtool/urgent git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git objtool-urgent-2023-09-17

# HEAD: 72178d5d1a38dd185d1db15f177f2d122ef10d9b objtool: Fix _THIS_IP_ detection for cold functions

Fix a cold functions related false-positive objtool warning
that triggers on Clang.

Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
Thanks,

Ingo

------------------>
Josh Poimboeuf (1):
objtool: Fix _THIS_IP_ detection for cold functions


tools/objtool/check.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 1384090530db..e308d1ba664e 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -4333,7 +4333,8 @@ static int validate_ibt_insn(struct objtool_file *file, struct instruction *insn
continue;
}

- if (insn_func(dest) && insn_func(dest) == insn_func(insn)) {
+ if (insn_func(dest) && insn_func(insn) &&
+ insn_func(dest)->pfunc == insn_func(insn)->pfunc) {
/*
* Anything from->to self is either _THIS_IP_ or
* IRET-to-self.