diff options
author | Jordan Niethe <jniethe5@gmail.com> | 2020-05-06 05:40:37 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2020-05-18 16:10:38 +0200 |
commit | 622cf6f436a12338bbcfbb3474629755547fd112 (patch) | |
tree | b26ffcbde6ecc0514d9a8a06ef4d8548d526b80b /arch/powerpc/kernel/uprobes.c | |
parent | powerpc: Define and use get_user_instr() et. al. (diff) | |
download | linux-622cf6f436a12338bbcfbb3474629755547fd112.tar.xz linux-622cf6f436a12338bbcfbb3474629755547fd112.zip |
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.c | 2 |
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; |