Re: [PATCH 3/3] x86/ftrace: Use text_poke()
From: Peter Zijlstra
Date: Wed Oct 23 2019 - 05:03:16 EST
On Tue, Oct 22, 2019 at 09:20:27PM -0700, Andy Lutomirski wrote:
> Also, Alexei, are you testing on a CONFIG_FRAME_POINTER=y kernel? The
> ftrace code has a somewhat nasty special case to make
> CONFIG_FRAME_POINTER=y work right, and your example trampoline does
> not but arguably should have exaclty the same fixup. For good
> performance, you should be using CONFIG_FRAME_POINTER=n.
Trampolines and JITs (which both lack ORC data) should always have frame
pointers. That way, when ORC fails, it can fall back to FP and we can
still get sensible unwinds.
See:
ae6a45a08689 ("x86/unwind/orc: Fall back to using frame pointers for generated code")