diff options
author | Sven Schnelle <svens@stackframe.org> | 2019-10-30 04:17:18 -0400 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2019-10-30 16:24:40 -0400 |
commit | 3d252454edd0fe88c8250cb7f9dfb9ec12d208d7 (patch) | |
tree | 251da25272b1694124dc2a7ec2dd98e0dbf6544f | |
parent | 320000e72ec0613e164ce9608d865396fb2da278 (diff) |
parisc: fix frame pointer in ftrace_regs_caller()
The current code in ftrace_regs_caller() doesn't assign
%r3 to contain the address of the current frame. This
is hidden if the kernel is compiled with FRAME_POINTER,
but without it just crashes because it tries to dereference
an arbitrary address. Fix this by always setting %r3 to the
current stack frame.
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r-- | arch/parisc/kernel/entry.S | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S index 1d1d748c227f..b96d74496977 100644 --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S | |||
@@ -2125,7 +2125,7 @@ ftrace_regs_caller: | |||
2125 | copy %rp, %r26 | 2125 | copy %rp, %r26 |
2126 | LDREG -FTRACE_FRAME_SIZE-PT_SZ_ALGN(%sp), %r25 | 2126 | LDREG -FTRACE_FRAME_SIZE-PT_SZ_ALGN(%sp), %r25 |
2127 | ldo -8(%r25), %r25 | 2127 | ldo -8(%r25), %r25 |
2128 | copy %r3, %arg2 | 2128 | ldo -FTRACE_FRAME_SIZE(%r1), %arg2 |
2129 | b,l ftrace_function_trampoline, %rp | 2129 | b,l ftrace_function_trampoline, %rp |
2130 | copy %r1, %arg3 /* struct pt_regs */ | 2130 | copy %r1, %arg3 /* struct pt_regs */ |
2131 | 2131 | ||