The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v2 1/2] objtool: fix the check for dead_end function with multiple sibliing calls
@ 2025-11-03 21:52 xur
  2025-11-03 21:52 ` [PATCH v2 2/2] objtool: dead_end function change for split functions xur
  2025-11-18 23:29 ` [PATCH v2 1/2] objtool: fix the check for dead_end function with multiple sibliing calls Josh Poimboeuf
  0 siblings, 2 replies; 8+ messages in thread
From: xur @ 2025-11-03 21:52 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>
---
 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: 6146a0f1dfae5d37442a9ddcba012add260bceb0
-- 
2.51.2.997.g839fc31de9-goog


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-11-18 23:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-03 21:52 [PATCH v2 1/2] objtool: fix the check for dead_end function with multiple sibliing calls xur
2025-11-03 21:52 ` [PATCH v2 2/2] objtool: dead_end function change for split functions xur
2025-11-17 18:54   ` Rong Xu
2025-11-17 21:43   ` Josh Poimboeuf
2025-11-17 21:50     ` Josh Poimboeuf
2025-11-17 22:57       ` Rong Xu
2025-11-17 23:23         ` Josh Poimboeuf
2025-11-18 23:29 ` [PATCH v2 1/2] objtool: fix the check for dead_end function with multiple sibliing calls Josh Poimboeuf

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