Messages in this thread | | | Date | Fri, 19 Aug 2022 13:28:12 -0400 | From | Steven Rostedt <> | Subject | Re: [PATCH v2] x86/unwind/orc: unwind ftrace trampolines with correct orc |
| |
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?
-- Steve
| |