When CONFIG_FRAME_POINTER, we should mark pt_regs frames.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
 #include <asm/export.h>
 #include <asm/ftrace.h>
 #include <asm/nospec-branch.h>
+#include <asm/frame.h>
 
 # define function_hook __fentry__
 EXPORT_SYMBOL(__fentry__)
        pushl   %ecx
        pushl   %ebx
 
+       ENCODE_FRAME_POINTER
+
        movl    12*4(%esp), %eax                /* Load ip (1st parameter) */
        subl    $MCOUNT_INSN_SIZE, %eax         /* Adjust ip */
        movl    15*4(%esp), %edx                /* Load parent ip (2nd parameter) */
 
 #include <asm/export.h>
 #include <asm/nospec-branch.h>
 #include <asm/unwind_hints.h>
+#include <asm/frame.h>
 
        .code64
        .section .entry.text, "ax"
        leaq MCOUNT_REG_SIZE+8*2(%rsp), %rcx
        movq %rcx, RSP(%rsp)
 
+       ENCODE_FRAME_POINTER
+
        /* regs go into 4th parameter */
        leaq (%rsp), %rcx