From: Ingo Molnar <mingo@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Chen Zhongjin <chenzhongjin@huawei.com>,
linux-kernel@vger.kernel.org, jpoimboe@kernel.org,
peterz@infradead.org, tglx@linutronix.de, mingo@redhat.com,
bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org,
hpa@zytor.com
Subject: Re: [PATCH v2] x86/unwind/orc: unwind ftrace trampolines with correct orc
Date: Sun, 21 Aug 2022 12:20:50 +0200 [thread overview]
Message-ID: <YwIHAvSGOmDLZ42k@gmail.com> (raw)
In-Reply-To: <20220819132812.391619d2@gandalf.local.home>
* Steven Rostedt <rostedt@goodmis.org> wrote:
> On Fri, 19 Aug 2022 16:43:34 +0800
> Chen Zhongjin <chenzhongjin@huawei.com> wrote:
>
> > When meeting ftrace trampolines in orc unwinding, unwinder uses address
> > of ftrace_{regs_}call address to find the orc, which gets next frame at
> > sp+176.
> >
> > If there is an irq hitting at sub $0xa8,%rsp, the next frame should be
> > sp+8 instead of 176. It makes unwinder skip correct frame and throw
> > warnings such as "wrong direction" or "can't access registers", etc,
> > depending on the content of the wrong frame address.
> >
> > By adding the base address ftrace_{regs_}caller with the offset
> > *ip - ops->trampoline*,
> > we can get the correct address to find orc.
> >
> > Also change "caller" to "tramp_addr" to make variable name conform to
> > its content.
> >
> > Fixes: 6be7fa3c74d1 ("ftrace, orc, x86: Handle ftrace dynamically allocated trampolines")
> > Cc: <stable@vger.kernel.org>
> > Signed-off-by: Chen Zhongjin <chenzhongjin@huawei.com>
>
> Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
>
> Would someone from the tip tree care to pull this in?
Picked it up into tip:x86/urgent with minor edits to the changelog - will
push it out after some testing.
Thanks,
Ingo
next prev parent reply other threads:[~2022-08-21 10:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-19 8:43 [PATCH v2] x86/unwind/orc: unwind ftrace trampolines with correct orc Chen Zhongjin
2022-08-19 17:28 ` Steven Rostedt
2022-08-21 10:20 ` Ingo Molnar [this message]
2022-08-22 15:00 ` Steven Rostedt
2022-08-21 10:33 ` [tip: x86/urgent] x86/unwind/orc: Unwind ftrace trampolines with correct ORC entry tip-bot2 for Chen Zhongjin
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=YwIHAvSGOmDLZ42k@gmail.com \
--to=mingo@kernel.org \
--cc=bp@alien8.de \
--cc=chenzhongjin@huawei.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.