Skip to content

Commit

Permalink
parisc: also set iaoq_b in instruction_pointer_set()
Browse files Browse the repository at this point in the history
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: 75ebedf ("parisc: Add HAVE_REGS_AND_STACK_ACCESS_API feature")
Cc: stable@vger.kernel.org # 4.19+
  • Loading branch information
svenschnelle authored and hdeller committed Apr 6, 2019
1 parent 45efd87 commit f324fa5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/parisc/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit f324fa5

Please sign in to comment.