diff options
author | Peter Zijlstra <peterz@infradead.org> | 2019-05-07 23:25:50 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-06-25 10:23:47 +0200 |
commit | ea1ed38dba64b64a245ab8ca1406269d17b99485 (patch) | |
tree | 5d23b360d04bdde52ef73bf04598e103537c7d4c /arch/x86/kernel/ftrace_32.S | |
parent | 4201311dae59781fb19c40adddda45bf3c562b63 (diff) | |
download | lwn-ea1ed38dba64b64a245ab8ca1406269d17b99485.tar.gz lwn-ea1ed38dba64b64a245ab8ca1406269d17b99485.zip |
x86/stackframe, x86/ftrace: Add pt_regs frame annotations
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>
Diffstat (limited to 'arch/x86/kernel/ftrace_32.S')
-rw-r--r-- | arch/x86/kernel/ftrace_32.S | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kernel/ftrace_32.S b/arch/x86/kernel/ftrace_32.S index 2ba914a34b06..0344c3aad4a5 100644 --- a/arch/x86/kernel/ftrace_32.S +++ b/arch/x86/kernel/ftrace_32.S @@ -9,6 +9,7 @@ #include <asm/export.h> #include <asm/ftrace.h> #include <asm/nospec-branch.h> +#include <asm/frame.h> # define function_hook __fentry__ EXPORT_SYMBOL(__fentry__) @@ -116,6 +117,8 @@ ENTRY(ftrace_regs_caller) 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) */ |