From: Peter Zijlstra <peterz@infradead.org>
To: xur@google.com
Cc: Josh Poimboeuf <jpoimboe@kernel.org>,
linux-kernel@vger.kernel.org,
Sriraman Tallam <tmsriram@google.com>,
Han Shen <shenhan@google.com>,
Krzysztof Pszeniczny <kpszeniczny@google.com>
Subject: Re: [PATCH 1/2] objtool: fix the check for dead_end function with multiple sibliing calls
Date: Mon, 3 Nov 2025 22:01:53 +0100 [thread overview]
Message-ID: <20251103210153.GJ3245006@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20251103185154.1933872-1-xur@google.com>
On Mon, Nov 03, 2025 at 06:51:53PM +0000, xur@google.com wrote:
> 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.
Cute, however did you find this?
> 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
>
next prev parent reply other threads:[~2025-11-03 21:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-03 18:51 [PATCH 1/2] objtool: fix the check for dead_end function with multiple sibliing calls xur
2025-11-03 18:51 ` [PATCH 2/2] objtool: dead_end function change for split functions xur
2025-11-03 21:19 ` Peter Zijlstra
2025-11-03 21:40 ` Rong Xu
2025-11-03 21:01 ` Peter Zijlstra [this message]
2025-11-03 21:11 ` [PATCH 1/2] objtool: fix the check for dead_end function with multiple sibliing calls Rong Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251103210153.GJ3245006@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=jpoimboe@kernel.org \
--cc=kpszeniczny@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=shenhan@google.com \
--cc=tmsriram@google.com \
--cc=xur@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox