Re: [PATCH v6 14/17] static_call: Handle tail-calls

From: Peter Zijlstra
Date: Sat Jul 11 2020 - 01:10:41 EST


On Fri, Jul 10, 2020 at 08:23:19PM -0400, Steven Rostedt wrote:
> On Fri, 10 Jul 2020 15:38:45 +0200
> Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> > GCC can turn our static_call(name)(args...) into a tail call, in which
> > case we get a JMP.d32 into the trampoline (which then does a further
> > tail-call).
> >
> > Teach objtool to recognise and mark these in .static_call_sites and
> > adjust the code patching to deal with this.
> >
>
> Hmm, were you able to trigger crashes before this patch?

No, just a bunch of tail-calls that didn't get patched and would still
point to the trampoline.