We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d82c59 commit e6928e5Copy full SHA for e6928e5
arch/x86/kernel/ftrace_32.S
@@ -16,12 +16,19 @@ ENTRY(mcount)
16
END(mcount)
17
18
ENTRY(ftrace_caller)
19
+
20
+ pushl %ebp
21
+ movl %esp, %ebp
22
23
pushl %eax
24
pushl %ecx
25
pushl %edx
26
pushl $0 /* Pass NULL as regs pointer */
- movl 4*4(%esp), %eax
- movl 0x4(%ebp), %edx
27
+ movl 5*4(%esp), %eax
28
+ /* Copy original ebp into %edx */
29
+ movl 4*4(%esp), %edx
30
+ /* Get the parent ip */
31
+ movl 0x4(%edx), %edx
32
movl function_trace_op, %ecx
33
subl $MCOUNT_INSN_SIZE, %eax
34
@@ -33,6 +40,7 @@ ftrace_call:
40
popl %edx
41
popl %ecx
35
42
popl %eax
43
+ popl %ebp
36
44
.Lftrace_ret:
37
45
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
38
46
.globl ftrace_graph_call
0 commit comments