Messages in this thread | | | Date | Wed, 10 Mar 2021 14:46:14 -0800 | From | Daniel Xu <> | Subject | Re: [PATCH -tip 0/5] kprobes: Fix stacktrace in kretprobes |
| |
On Thu, Mar 11, 2021 at 12:55:09AM +0900, Masami Hiramatsu wrote: > Hi Josh and Daniel, <...>
> commit aa452d999b524b1851f69cc947be3e1a2f3ca1ec > Author: Masami Hiramatsu <mhiramat@kernel.org> > Date: Sat Mar 6 08:34:51 2021 +0900 > > x86/unwind/orc: Fixup kretprobe trampoline entry > > Since the kretprobe replaces the function return address with > the kretprobe_trampoline on the stack, the ORC unwinder can not > continue the stack unwinding at that point. > > To fix this issue, correct state->ip as like as function-graph > tracer in the unwind_next_frame(). > > Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> >
I applied your original patchset + Josh's patch + this patch and can confirm it works for bpftrace + kretprobes.
Tested-by: Daniel Xu <dxu@dxuuu.xyz>
| |