]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/5.0.8/parisc-regs_return_value-should-return-gpr28.patch
Linux 5.0.8
[thirdparty/kernel/stable-queue.git] / releases / 5.0.8 / parisc-regs_return_value-should-return-gpr28.patch
CommitLineData
1c573d6f
GKH
1From 45efd871bf0a47648f119d1b41467f70484de5bc Mon Sep 17 00:00:00 2001
2From: Sven Schnelle <svens@stackframe.org>
3Date: Thu, 4 Apr 2019 18:16:03 +0200
4Subject: parisc: regs_return_value() should return gpr28
5
6From: Sven Schnelle <svens@stackframe.org>
7
8commit 45efd871bf0a47648f119d1b41467f70484de5bc upstream.
9
10While working on kretprobes for PA-RISC I was wondering while the
11kprobes sanity test always fails on kretprobes. This is caused by
12returning gpr20 instead of gpr28.
13
14Signed-off-by: Sven Schnelle <svens@stackframe.org>
15Signed-off-by: Helge Deller <deller@gmx.de>
16Cc: stable@vger.kernel.org # 4.14+
17Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18
19---
20 arch/parisc/include/asm/ptrace.h | 2 +-
21 1 file changed, 1 insertion(+), 1 deletion(-)
22
23--- a/arch/parisc/include/asm/ptrace.h
24+++ b/arch/parisc/include/asm/ptrace.h
25@@ -22,7 +22,7 @@ unsigned long profile_pc(struct pt_regs
26
27 static inline unsigned long regs_return_value(struct pt_regs *regs)
28 {
29- return regs->gr[20];
30+ return regs->gr[28];
31 }
32
33 static inline void instruction_pointer_set(struct pt_regs *regs,