[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220819132812.391619d2@gandalf.local.home>
Date: Fri, 19 Aug 2022 13:28:12 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Chen Zhongjin <chenzhongjin@...wei.com>
Cc: <linux-kernel@...r.kernel.org>, <jpoimboe@...nel.org>,
<peterz@...radead.org>, <tglx@...utronix.de>, <mingo@...hat.com>,
<bp@...en8.de>, <dave.hansen@...ux.intel.com>, <x86@...nel.org>,
<hpa@...or.com>
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@...wei.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@...r.kernel.org>
> Signed-off-by: Chen Zhongjin <chenzhongjin@...wei.com>
Reviewed-by: Steven Rostedt (Google) <rostedt@...dmis.org>
Would someone from the tip tree care to pull this in?
-- Steve
Powered by blists - more mailing lists