summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Schnelle <svens@stackframe.org>2019-04-04 18:16:04 +0200
committerHelge Deller <deller@gmx.de>2019-04-06 19:07:55 +0200
commitf324fa58327791b2696628b31480e7e21c745706 (patch)
treea1e32062c0ea2a0677d9f0acce6f8a63ef71b9dd
parent45efd871bf0a47648f119d1b41467f70484de5bc (diff)
downloadlinux-f324fa58327791b2696628b31480e7e21c745706.tar.bz2
parisc: also set iaoq_b in instruction_pointer_set()
When setting the instruction pointer on PA-RISC we also need to set the back of the instruction queue to the new offset, otherwise we will execute on instruction from the new location, and jumping back to the old location stored in iaoq_b. Signed-off-by: Sven Schnelle <svens@stackframe.org> Signed-off-by: Helge Deller <deller@gmx.de> Fixes: 75ebedf1d263 ("parisc: Add HAVE_REGS_AND_STACK_ACCESS_API feature") Cc: stable@vger.kernel.org # 4.19+
-rw-r--r--arch/parisc/include/asm/ptrace.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/parisc/include/asm/ptrace.h b/arch/parisc/include/asm/ptrace.h
index 4a87b3d600c6..9ff033d261ab 100644
--- a/arch/parisc/include/asm/ptrace.h
+++ b/arch/parisc/include/asm/ptrace.h
@@ -28,7 +28,8 @@ static inline unsigned long regs_return_value(struct pt_regs *regs)
static inline void instruction_pointer_set(struct pt_regs *regs,
unsigned long val)
{
- regs->iaoq[0] = val;
+ regs->iaoq[0] = val;
+ regs->iaoq[1] = val + 4;
}
/* Query offset/name of register from its name/offset */