From 3ec7ccf50187a402fea21253972796549e256f9f Mon Sep 17 00:00:00 2001 From: John Crispin Date: Wed, 1 Apr 2015 08:33:04 +0000 Subject: [PATCH] config: add an option to enable KPROBE Signed-off-by: Mathieu Olivari SVN-Revision: 45212 --- config/Config-kernel.in | 17 +++++++++++++++++ include/kernel-defaults.mk | 1 - target/linux/generic/config-3.10 | 4 ++++ target/linux/generic/config-3.14 | 4 ++++ target/linux/generic/config-3.18 | 4 ++++ target/linux/generic/config-4.0 | 4 ++++ 6 files changed, 33 insertions(+), 1 deletion(-) diff --git a/config/Config-kernel.in b/config/Config-kernel.in index 84711298a6..cc8df5ae56 100644 --- a/config/Config-kernel.in +++ b/config/Config-kernel.in @@ -127,6 +127,23 @@ config KERNEL_EARLY_PRINTK debugging purposes to send messages over the serial console in early boot. Enable this to debug early boot problems. +config KERNEL_KPROBES + bool "Compile the kernel with kprobes support" + default n + select KERNEL_FTRACE + select KERNEL_PERF_EVENTS + help + Compiles the kernel with KPROBES support, which allows you to trap + at almost any kernel address and execute a callback function. + register_kprobe() establishes a probepoint and specifies the + callback. Kprobes is useful for kernel debugging, non-intrusive + instrumentation and testing. + If in doubt, say "N". + +config KERNEL_KPROBE_EVENT + bool + default y if KERNEL_KPROBES + config KERNEL_AIO bool "Compile the kernel with asynchronous IO support" default n diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk index 3a32209b56..24d26308b1 100644 --- a/include/kernel-defaults.mk +++ b/include/kernel-defaults.mk @@ -107,7 +107,6 @@ define Kernel/Configure/Default echo "# CONFIG_KALLSYMS_EXTRA_PASS is not set" >> $(LINUX_DIR)/.config.target echo "# CONFIG_KALLSYMS_ALL is not set" >> $(LINUX_DIR)/.config.target echo "# CONFIG_KALLSYMS_UNCOMPRESSED is not set" >> $(LINUX_DIR)/.config.target - echo "# CONFIG_KPROBES is not set" >> $(LINUX_DIR)/.config.target $(SCRIPT_DIR)/metadata.pl kconfig $(TMP_DIR)/.packageinfo $(TOPDIR)/.config $(KERNEL_PATCHVER) > $(LINUX_DIR)/.config.override $(SCRIPT_DIR)/kconfig.pl 'm+' '+' $(LINUX_DIR)/.config.target /dev/null $(LINUX_DIR)/.config.override > $(LINUX_DIR)/.config $(call Kernel/SetNoInitramfs) diff --git a/target/linux/generic/config-3.10 b/target/linux/generic/config-3.10 index 4ccc96979f..c16d04bbf5 100644 --- a/target/linux/generic/config-3.10 +++ b/target/linux/generic/config-3.10 @@ -204,6 +204,7 @@ CONFIG_ARM_DMA_MEM_BUFFERABLE=y # CONFIG_ARM_ERRATA_764369 is not set # CONFIG_ARM_ERRATA_775420 is not set # CONFIG_ARM_ERRATA_798181 is not set +# CONFIG_ARM_KPROBES_TEST is not set # CONFIG_ARM_PATCH_PHYS_VIRT is not set # CONFIG_ARM_PSCI is not set # CONFIG_ARM_UNWIND is not set @@ -1551,6 +1552,7 @@ CONFIG_KERNEL_XZ=y # CONFIG_KGDB is not set # CONFIG_KMEMCHECK is not set # CONFIG_KPROBES is not set +# CONFIG_KPROBES_SANITY_TEST is not set # CONFIG_KS8842 is not set # CONFIG_KS8851 is not set # CONFIG_KS8851_MLL is not set @@ -2172,6 +2174,7 @@ CONFIG_NET_SCH_FQ_CODEL=y # CONFIG_NET_SCH_SFQ is not set # CONFIG_NET_SCH_TBF is not set # CONFIG_NET_SCH_TEQL is not set +# CONFIG_NET_TCPPROBE is not set # CONFIG_NET_TEAM is not set # CONFIG_NET_TULIP is not set CONFIG_NET_VENDOR_3COM=y @@ -2569,6 +2572,7 @@ CONFIG_PPP_MULTILINK=y # CONFIG_PPTP is not set # CONFIG_PREEMPT is not set CONFIG_PREEMPT_NONE=y +# CONFIG_PREEMPT_TRACER is not set # CONFIG_PREEMPT_VOLUNTARY is not set CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_PRINTK=y diff --git a/target/linux/generic/config-3.14 b/target/linux/generic/config-3.14 index 150c6e3b5c..846ea1ec77 100644 --- a/target/linux/generic/config-3.14 +++ b/target/linux/generic/config-3.14 @@ -229,6 +229,7 @@ CONFIG_ARM_DMA_MEM_BUFFERABLE=y # CONFIG_ARM_ERRATA_773022 is not set # CONFIG_ARM_ERRATA_775420 is not set # CONFIG_ARM_ERRATA_798181 is not set +# CONFIG_ARM_KPROBES_TEST is not set # CONFIG_ARM_PATCH_PHYS_VIRT is not set # CONFIG_ARM_PSCI is not set # CONFIG_ARM_PTDUMP is not set @@ -1687,6 +1688,7 @@ CONFIG_KERNEL_XZ=y # CONFIG_KGDB is not set # CONFIG_KMEMCHECK is not set # CONFIG_KPROBES is not set +# CONFIG_KPROBES_SANITY_TEST is not set # CONFIG_KS8842 is not set # CONFIG_KS8851 is not set # CONFIG_KS8851_MLL is not set @@ -2347,6 +2349,7 @@ CONFIG_NET_SCH_FQ_CODEL=y # CONFIG_NET_SCH_SFQ is not set # CONFIG_NET_SCH_TBF is not set # CONFIG_NET_SCH_TEQL is not set +# CONFIG_NET_TCPPROBE is not set # CONFIG_NET_TEAM is not set # CONFIG_NET_TULIP is not set CONFIG_NET_VENDOR_3COM=y @@ -2762,6 +2765,7 @@ CONFIG_PPP_MULTILINK=y # CONFIG_PPTP is not set # CONFIG_PREEMPT is not set CONFIG_PREEMPT_NONE=y +# CONFIG_PREEMPT_TRACER is not set # CONFIG_PREEMPT_VOLUNTARY is not set CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_PRINTK=y diff --git a/target/linux/generic/config-3.18 b/target/linux/generic/config-3.18 index ce721b0c40..d971aa745e 100644 --- a/target/linux/generic/config-3.18 +++ b/target/linux/generic/config-3.18 @@ -247,6 +247,7 @@ CONFIG_ARM_DMA_MEM_BUFFERABLE=y # CONFIG_ARM_ERRATA_773022 is not set # CONFIG_ARM_ERRATA_775420 is not set # CONFIG_ARM_ERRATA_798181 is not set +# CONFIG_ARM_KPROBES_TEST is not set # CONFIG_ARM_PATCH_PHYS_VIRT is not set # CONFIG_ARM_PSCI is not set # CONFIG_ARM_PTDUMP is not set @@ -1767,6 +1768,7 @@ CONFIG_KERNFS=y # CONFIG_KGDB is not set # CONFIG_KMEMCHECK is not set # CONFIG_KPROBES is not set +# CONFIG_KPROBES_SANITY_TEST is not set # CONFIG_KS8842 is not set # CONFIG_KS8851 is not set # CONFIG_KS8851_MLL is not set @@ -2468,6 +2470,7 @@ CONFIG_NET_SCH_FQ_CODEL=y # CONFIG_NET_SCH_SFQ is not set # CONFIG_NET_SCH_TBF is not set # CONFIG_NET_SCH_TEQL is not set +# CONFIG_NET_TCPPROBE is not set # CONFIG_NET_TEAM is not set # CONFIG_NET_TULIP is not set # CONFIG_NET_UDP_TUNNEL is not set @@ -2896,6 +2899,7 @@ CONFIG_PPP_MULTILINK=y # CONFIG_PPTP is not set # CONFIG_PREEMPT is not set CONFIG_PREEMPT_NONE=y +# CONFIG_PREEMPT_TRACER is not set # CONFIG_PREEMPT_VOLUNTARY is not set CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_PRINTK=y diff --git a/target/linux/generic/config-4.0 b/target/linux/generic/config-4.0 index 5e12b3b3f7..1f4d624273 100644 --- a/target/linux/generic/config-4.0 +++ b/target/linux/generic/config-4.0 @@ -249,6 +249,7 @@ CONFIG_ARM_DMA_MEM_BUFFERABLE=y # CONFIG_ARM_ERRATA_775420 is not set # CONFIG_ARM_ERRATA_798181 is not set # CONFIG_ARM_KERNMEM_PERMS is not set +# CONFIG_ARM_KPROBES_TEST is not set # CONFIG_ARM_PATCH_PHYS_VIRT is not set # CONFIG_ARM_PSCI is not set # CONFIG_ARM_PTDUMP is not set @@ -1801,6 +1802,7 @@ CONFIG_KERNFS=y # CONFIG_KMEMCHECK is not set # CONFIG_KMX61 is not set # CONFIG_KPROBES is not set +# CONFIG_KPROBES_SANITY_TEST is not set # CONFIG_KS8842 is not set # CONFIG_KS8851 is not set # CONFIG_KS8851_MLL is not set @@ -2517,6 +2519,7 @@ CONFIG_NET_SCH_FQ_CODEL=y # CONFIG_NET_SCH_TBF is not set # CONFIG_NET_SCH_TEQL is not set # CONFIG_NET_SWITCHDEV is not set +# CONFIG_NET_TCPPROBE is not set # CONFIG_NET_TEAM is not set # CONFIG_NET_TULIP is not set # CONFIG_NET_UDP_TUNNEL is not set @@ -2951,6 +2954,7 @@ CONFIG_PPP_MULTILINK=y # CONFIG_PPTP is not set # CONFIG_PREEMPT is not set CONFIG_PREEMPT_NONE=y +# CONFIG_PREEMPT_TRACER is not set # CONFIG_PREEMPT_VOLUNTARY is not set CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_PRINTK=y -- 2.30.2