diff options
author | Balbir Singh | 2017-06-06 06:29:38 +0200 |
---|---|---|
committer | Michael Ellerman | 2017-07-03 15:12:19 +0200 |
commit | d07df82c43be82ab6972662180e89e6ba2a828ad (patch) | |
tree | 3615fcfb4aae0dad056122302c9a07d9dba15280 /arch/powerpc/kernel | |
parent | powerpc/mm/radix: Fix execute permissions for interrupt_vectors (diff) | |
download | kernel-qcow2-linux-d07df82c43be82ab6972662180e89e6ba2a828ad.tar.gz kernel-qcow2-linux-d07df82c43be82ab6972662180e89e6ba2a828ad.tar.xz kernel-qcow2-linux-d07df82c43be82ab6972662180e89e6ba2a828ad.zip |
powerpc/kprobes: Move kprobes over to patch_instruction()
arch_arm/disarm_probe() use direct assignment for copying
instructions, replace them with patch_instruction(). We don't need to
call flush_icache_range() because patch_instruction() does it for us.
Signed-off-by: Balbir Singh <bsingharora@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/kprobes.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c index 01addfb0ed0a..45f1ff721c32 100644 --- a/arch/powerpc/kernel/kprobes.c +++ b/arch/powerpc/kernel/kprobes.c @@ -164,17 +164,13 @@ NOKPROBE_SYMBOL(arch_prepare_kprobe); void arch_arm_kprobe(struct kprobe *p) { - *p->addr = BREAKPOINT_INSTRUCTION; - flush_icache_range((unsigned long) p->addr, - (unsigned long) p->addr + sizeof(kprobe_opcode_t)); + patch_instruction(p->addr, BREAKPOINT_INSTRUCTION); } NOKPROBE_SYMBOL(arch_arm_kprobe); void arch_disarm_kprobe(struct kprobe *p) { - *p->addr = p->opcode; - flush_icache_range((unsigned long) p->addr, - (unsigned long) p->addr + sizeof(kprobe_opcode_t)); + patch_instruction(p->addr, p->opcode); } NOKPROBE_SYMBOL(arch_disarm_kprobe); |