Linux-parisc archive on
 help / color / Atom feed
* [PATCH] parisc: fix frame pointer in ftrace_regs_caller()
@ 2019-10-30  8:17 Sven Schnelle
  0 siblings, 0 replies; only message in thread
From: Sven Schnelle @ 2019-10-30  8:17 UTC (permalink / raw)
  To: Helge Deller; +Cc: linux-parisc, Sven Schnelle

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 <>
 arch/parisc/kernel/entry.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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:
 	copy	%rp, %r26
 	ldo	-8(%r25), %r25
-	copy	%r3, %arg2
+	ldo	-FTRACE_FRAME_SIZE(%r1), %arg2
 	b,l	ftrace_function_trampoline, %rp
 	copy	%r1, %arg3 /* struct pt_regs */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-30  8:17 [PATCH] parisc: fix frame pointer in ftrace_regs_caller() Sven Schnelle

Linux-parisc archive on

Archives are clonable:
	git clone --mirror linux-parisc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-parisc linux-parisc/ \
	public-inbox-index linux-parisc

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone