powerpc/kprobes: Add support for KPROBES_ON_FTRACE
authorNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Wed, 19 Apr 2017 12:52:26 +0000 (18:22 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 24 Apr 2017 09:07:58 +0000 (19:07 +1000)
commitead514d5fb30a0889d51c0f0e35c3e346165a955
treea6fb97f2cfce93e5c8ff10351cd3f4763ae1fc4e
parent2f59be5b970b503ca8db1cb723b155e455ebac8e
powerpc/kprobes: Add support for KPROBES_ON_FTRACE

Allow kprobes to be placed on ftrace _mcount() call sites. This optimization
avoids the use of a trap, by riding on ftrace infrastructure.

This depends on HAVE_DYNAMIC_FTRACE_WITH_REGS which depends on MPROFILE_KERNEL,
which is only currently enabled on powerpc64le with newer toolchains.

Based on the x86 code by Masami.

Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Documentation/features/debug/kprobes-on-ftrace/arch-support.txt
arch/powerpc/Kconfig
arch/powerpc/include/asm/kprobes.h
arch/powerpc/kernel/Makefile
arch/powerpc/kernel/kprobes-ftrace.c [new file with mode: 0644]
arch/powerpc/kernel/kprobes.c