Re: [PATCH -tip 0/5] kprobes: Fix stacktrace in kretprobes

From: Josh Poimboeuf
Date: Wed Mar 10 2021 - 10:09:53 EST


On Wed, Mar 10, 2021 at 06:57:34PM +0900, Masami Hiramatsu wrote:
> > If I understand correctly, for #1 you need an unwind hint which treats
> > the instruction *after* the "pushq %rsp" as the beginning of the
> > function.
>
> Thanks for the patch. In that case, should I still change the stack allocation?
> Or can I continue to use a series of "push/pop" ?

You can continue to use push/pop. Objtool is only getting confused by
the unbalanced stack of the function (more pushes than pops). The
unwind hint should fix that.

--
Josh