summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/uprobes.c
diff options
context:
space:
mode:
authorJordan Niethe <jniethe5@gmail.com>2020-05-06 06:40:37 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2020-05-18 17:10:38 +0300
commit622cf6f436a12338bbcfbb3474629755547fd112 (patch)
treeb26ffcbde6ecc0514d9a8a06ef4d8548d526b80b /arch/powerpc/kernel/uprobes.c
parent5249385ad7f0ac178433f0ae9cc5b64612c8ff77 (diff)
downloadlinux-622cf6f436a12338bbcfbb3474629755547fd112.tar.xz
powerpc: Introduce a function for reporting instruction length
Currently all instructions have the same length, but in preparation for prefixed instructions introduce a function for returning instruction length. Signed-off-by: Jordan Niethe <jniethe5@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Reviewed-by: Alistair Popple <alistair@popple.id.au> Link: https://lore.kernel.org/r/20200506034050.24806-18-jniethe5@gmail.com
Diffstat (limited to 'arch/powerpc/kernel/uprobes.c')
-rw-r--r--arch/powerpc/kernel/uprobes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/uprobes.c b/arch/powerpc/kernel/uprobes.c
index 6893d40a48c5..83e883e1a42d 100644
--- a/arch/powerpc/kernel/uprobes.c
+++ b/arch/powerpc/kernel/uprobes.c
@@ -112,7 +112,7 @@ int arch_uprobe_post_xol(struct arch_uprobe *auprobe, struct pt_regs *regs)
* support doesn't exist and have to fix-up the next instruction
* to be executed.
*/
- regs->nip = utask->vaddr + MAX_UINSN_BYTES;
+ regs->nip = utask->vaddr + ppc_inst_len(ppc_inst_read(&auprobe->insn));
user_disable_single_step(current);
return 0;