]>
Commit | Line | Data |
---|---|---|
de2fa02c GKH |
1 | From f324fa58327791b2696628b31480e7e21c745706 Mon Sep 17 00:00:00 2001 |
2 | From: Sven Schnelle <svens@stackframe.org> | |
3 | Date: Thu, 4 Apr 2019 18:16:04 +0200 | |
4 | Subject: parisc: also set iaoq_b in instruction_pointer_set() | |
5 | ||
6 | From: Sven Schnelle <svens@stackframe.org> | |
7 | ||
8 | commit f324fa58327791b2696628b31480e7e21c745706 upstream. | |
9 | ||
10 | When setting the instruction pointer on PA-RISC we also need | |
11 | to set the back of the instruction queue to the new offset, otherwise | |
12 | we will execute on instruction from the new location, and jumping | |
13 | back to the old location stored in iaoq_b. | |
14 | ||
15 | Signed-off-by: Sven Schnelle <svens@stackframe.org> | |
16 | Signed-off-by: Helge Deller <deller@gmx.de> | |
17 | Fixes: 75ebedf1d263 ("parisc: Add HAVE_REGS_AND_STACK_ACCESS_API feature") | |
18 | Cc: stable@vger.kernel.org # 4.19+ | |
19 | Signed-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 */ |