From: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
This patch adds CONFIG_HAVE_KRETPROBES to the arch/<arch>/Kconfig file
for relevant architectures with kprobes support. This facilitates easy
handling of in-kernel modules (like samples/kprobes/kretprobe_example.c)
that depend on kretprobes being present in the kernel.
This patch depends on Mathieu Desnoyers' "Instrumentation menu removal"
patchset (http://marc.info/?l=linux-kernel&m=119496432229633&w=2)
Updated to apply on 2.6.24-rc4-mm1. Thanks to Sam Ravnborg for helping
make the patch more lean.
V2: Per Mathieu's suggestion, added CONFIG_KRETPROBES and fixed up
dependencies.
Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
---
arch/Kconfig | 7 +++++++
arch/ia64/Kconfig | 1 +
arch/powerpc/Kconfig | 1 +
arch/s390/Kconfig | 1 +
arch/x86/Kconfig | 1 +
include/asm-ia64/kprobes.h | 1 -
include/asm-powerpc/kprobes.h | 1 -
include/asm-x86/kprobes_32.h | 1 -
include/asm-x86/kprobes_64.h | 1 -
include/linux/kprobes.h | 6 +++---
kernel/kprobes.c | 8 +++-----
11 files changed, 17 insertions(+), 12 deletions(-)
Index: linux-2.6.24-rc4/arch/Kconfig
===================================================================
--- linux-2.6.24-rc4.orig/arch/Kconfig
+++ linux-2.6.24-rc4/arch/Kconfig
@@ -27,5 +27,12 @@ config KPROBES
for kernel debugging, non-intrusive instrumentation and testing.
If in doubt, say "N".
+config KRETPROBES
+ def_bool y
+ depends on KPROBES && HAVE_KRETPROBES
+
config HAVE_KPROBES
def_bool n
+
+config HAVE_KRETPROBES
+ def_bool n
Index: linux-2.6.24-rc4/arch/ia64/Kconfig
===================================================================
--- linux-2.6.24-rc4.orig/arch/ia64/Kconfig
+++ linux-2.6.24-rc4/arch/ia64/Kconfig
@@ -17,6 +17,7 @@ config IA64
select ARCH_SUPPORTS_MSI
select HAVE_OPROFILE
select HAVE_KPROBES
+ select ...