Re: [PATCH] ftrace/x86: Fix function graph tracer reset path

From: Matt Fleming
Date: Sun May 15 2016 - 17:41:22 EST


On Fri, 13 May, at 10:06:10AM, Steven Rostedt wrote:
> Matt,
>
> This bug looks very similar to what you were hitting with the function
> profiler. Can you apply this patch and see if it fixes the issue for
> you.

Yep, this patch fixes it for me.

For the record, this is what objdump tells me (with patch applied),

00000000000000b6 <ftrace_epilogue>:
b6: eb 03 jmp bb <ftrace_stub>
b8: 90 nop
b9: 90 nop
ba: 90 nop

So my toolchain is definitely generating a short jump. This is
binutils 2.26.

But on one of my other test machines with binutils 2.24 I see this,

00000000000000aa <ftrace_epilogue>:
aa: e9 00 00 00 00 jmpq af <ftrace_stub>
ab: R_X86_64_PC32 ftrace_stub-0x4

i.e. a near jump.