Re: [PATCH v2 1/2] objtool: fix the check for dead_end function with multiple sibliing calls

From: Josh Poimboeuf

Date: Tue Nov 18 2025 - 18:29:55 EST


On Mon, Nov 03, 2025 at 09:52:43PM +0000, xur@xxxxxxxxxx wrote:
> From: Rong Xu <xur@xxxxxxxxxx>
>
> 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@xxxxxxxxxx>
> Reviewed-by: Sriraman Tallam <tmsriram@xxxxxxxxxx>
> Reviewed-by: Han Shen <shenhan@xxxxxxxxxx>
> Reviewed-by: Krzysztof Pszeniczny <kpszeniczny@xxxxxxxxxx>
> ---
> 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;
> }
> }
>

There's a typo in the subject "sibliing", and "fix" should be
capitalized:

objtool: Fix the check for dead_end function with multiple sibling calls

Otherwise it LGTM.

Acked-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>

--
Josh