]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.19.35/parisc-also-set-iaoq_b-in-instruction_pointer_set.patch
Linux 4.19.35
[thirdparty/kernel/stable-queue.git] / releases / 4.19.35 / parisc-also-set-iaoq_b-in-instruction_pointer_set.patch
CommitLineData
de2fa02c
GKH
1From f324fa58327791b2696628b31480e7e21c745706 Mon Sep 17 00:00:00 2001
2From: Sven Schnelle <svens@stackframe.org>
3Date: Thu, 4 Apr 2019 18:16:04 +0200
4Subject: parisc: also set iaoq_b in instruction_pointer_set()
5
6From: Sven Schnelle <svens@stackframe.org>
7
8commit f324fa58327791b2696628b31480e7e21c745706 upstream.
9
10When setting the instruction pointer on PA-RISC we also need
11to set the back of the instruction queue to the new offset, otherwise
12we will execute on instruction from the new location, and jumping
13back to the old location stored in iaoq_b.
14
15Signed-off-by: Sven Schnelle <svens@stackframe.org>
16Signed-off-by: Helge Deller <deller@gmx.de>
17Fixes: 75ebedf1d263 ("parisc: Add HAVE_REGS_AND_STACK_ACCESS_API feature")
18Cc: stable@vger.kernel.org # 4.19+
19Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20
21---
22 arch/parisc/include/asm/ptrace.h | 3 ++-
23 1 file changed, 2 insertions(+), 1 deletion(-)
24
25--- a/arch/parisc/include/asm/ptrace.h
26+++ b/arch/parisc/include/asm/ptrace.h
27@@ -28,7 +28,8 @@ static inline unsigned long regs_return_
28 static inline void instruction_pointer_set(struct pt_regs *regs,
29 unsigned long val)
30 {
31- regs->iaoq[0] = val;
32+ regs->iaoq[0] = val;
33+ regs->iaoq[1] = val + 4;
34 }
35
36 /* Query offset/name of register from its name/offset */