Re: [PATCH 00/10] ftrace: Add register_ftrace_direct()
From: Peter Zijlstra
Date: Mon Nov 11 2019 - 03:47:50 EST
On Fri, Nov 08, 2019 at 04:51:00PM -0600, Josh Poimboeuf wrote:
> From: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
> Subject: [PATCH] ftrace/x86: Tell objtool to ignore nondeterministic ftrace stack layout
>
> Objtool complains about the new ftrace direct trampoline code:
>
> arch/x86/kernel/ftrace_64.o: warning: objtool: ftrace_regs_caller()+0x190: stack state mismatch: cfa1=7+16 cfa2=7+24
>
> Typically, code has a deterministic stack layout, such that at a given
> instruction address, the stack frame size is always the same.
>
> That's not the case for the new ftrace_regs_caller() code after it
> adjusts the stack for the direct case. Just plead ignorance and assume
> it's always the non-direct path. Note this creates a tiny window for
> ORC to get confused.
How is that not a problem for livepatch?