mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 1/2] objtool: Fix the check for dead_end function with multiple sibling calls
@ 2025-11-19 17:32 xur
  0 siblings, 0 replies; only message in thread
From: xur @ 2025-11-19 17:32 UTC (permalink / raw)
  To: Josh Poimboeuf, Peter Zijlstra, Rong Xu
  Cc: linux-kernel, Sriraman Tallam, Han Shen, Krzysztof Pszeniczny

From: Rong Xu <xur@google.com>

If a function has multiple sibling calls, the dead_end check should
only return true if all sibling call targets are also dead_end
functions.

Signed-off-by: Rong Xu <xur@google.com>
Reviewed-by: Sriraman Tallam <tmsriram@google.com>
Reviewed-by: Han Shen <shenhan@google.com>
Reviewed-by: Krzysztof Pszeniczny <kpszeniczny@google.com>
Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>

ChangedLog:
v3: Fix the typos in the commit message. (From Josh Poimboeuf).
    Drop the other patch (split funciton) as Josh has a better fix.
    Add Acked-by from Josh.
---
 tools/objtool/check.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 9004fbc067693..c2ee3c3a84a62 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -314,7 +314,13 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func,
 				return false;
 			}
 
-			return __dead_end_function(file, insn_func(dest), recursion+1);
+			/*
+			 * A function can have multiple sibling calls. All of
+			 * them need to be dead ends for the function to be a
+			 * dead end too.
+			 */
+			if (!__dead_end_function(file, insn_func(dest), recursion+1))
+				return false;
 		}
 	}
 

base-commit: 8b690556d8fe074b4f9835075050fba3fb180e93
-- 
2.52.0.rc1.455.g30608eb744-goog


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-11-19 17:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-19 17:32 [PATCH v3 1/2] objtool: Fix the check for dead_end function with multiple sibling calls xur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®