From: Steven Rostedt <rostedt@goodmis.org>
To: Yifan Feng <evanfengff@gmail.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, Jiri Olsa <jolsa@kernel.org>,
Josh Poimboeuf <jpoimboe@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexei Starovoitov <ast@kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>,
linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/fgraph: Fix the unwind hint at the end of return_to_handler()
Date: Thu, 19 Nov 2026 12:53:09 -0500 [thread overview]
Message-ID: <20261119125309.75c417b7@gandalf.local.home> (raw)
In-Reply-To: <20261118235023.14978-1-evanfengff@gmail.com>
On Wed, 18 Nov 2026 15:50:23 -0800
Yifan Feng <evanfengff@gmail.com> wrote:
> return_to_handler() reserves 8 bytes of stack for the return address
> and marks that with UNWIND_HINT_FUNC. The hint stays in effect after
> "addq $(FRAME_SIZE) + 8, %rsp" has dropped the slot again, so the ORC
> entry of the following call has CFA = sp+0:
>
> return_to_handler+0x41: sp+0 call .Ldo_rop
> return_to_handler+0x46: (und) int3
> return_to_handler+0x47: sp+8 mov %rdi, (%rsp)
>
> A stack trace taken from an interrupt which hits the call or the mov
> ends up at that entry, the stack pointer does not advance and the
> unwinder prints:
>
> WARNING: stack going in the wrong direction? at return_to_handler+0x46/0x50
>
> The return address is only in %rdi at that point. Mark the code as
> UNWIND_HINT_UNDEFINED again, as it was before the hint was added, so
> that the unwinder stops there without the warning.
Makes sense.
Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
Peter, can you take this?
-- Steve
prev parent reply other threads:[~2026-11-19 17:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 23:50 Yifan Feng
2026-11-19 15:19 ` Jiri Olsa
2026-11-19 17:53 ` Steven Rostedt [this message]
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=20261119125309.75c417b7@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=ast@kernel.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=evanfengff@gmail.com \
--cc=hpa@zytor.com \
--cc=jolsa@kernel.org \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mhiramat@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@kernel.org \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®