lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 2 Mar 2015 22:24:56 +0800
From:	Wang Nan <wangnan0@...wei.com>
To:	<rostedt@...dmis.org>, <masami.hiramatsu.pt@...achi.com>,
	<mingo@...e.hu>, <linux@....linux.org.uk>, <tixy@...aro.org>
CC:	<lizefan@...wei.com>, <linux-kernel@...r.kernel.org>,
	<x86@...nel.org>, <linux-arm-kernel@...ts.infradead.org>
Subject: [RFC PATCH v4 18/34] early kprobes: add CONFIG_EARLY_KPROBES option.

Enable early kprobes in Kconfig.

Currently only allow early kprobes for ARM. Following patchs will deal
with KPROBES_ON_FTRACE. After that x86 will also be enabled.

Signed-off-by: Wang Nan <wangnan0@...wei.com>
---
 arch/Kconfig     | 19 +++++++++++++++++++
 arch/arm/Kconfig |  1 +
 2 files changed, 20 insertions(+)

diff --git a/arch/Kconfig b/arch/Kconfig
index 05d7a8a..8a772ab 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -46,6 +46,22 @@ config KPROBES
 	  for kernel debugging, non-intrusive instrumentation and testing.
 	  If in doubt, say "N".
 
+config EARLY_KPROBES
+	bool "Enable kprobes at very early booting stage"
+	depends on KPROBES
+	depends on HAVE_EARLY_KPROBES
+	def_bool y
+	help
+	  Enable kprobe at very early booting stage.
+
+config NR_EARLY_KPROBES_SLOTS
+	int "Number of possible early kprobes"
+	range 1 64
+	default 16
+	depends on EARLY_KPROBES
+	help
+	  Number of early kprobes slots.
+
 config JUMP_LABEL
        bool "Optimize very unlikely/likely branches"
        depends on HAVE_ARCH_JUMP_LABEL
@@ -170,6 +186,9 @@ config HAVE_IOREMAP_PROT
 config HAVE_KPROBES
 	bool
 
+config HAVE_EARLY_KPROBES
+	bool
+
 config HAVE_KRETPROBES
 	bool
 
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 9f1f09a..84ad7f9 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -43,6 +43,7 @@ config ARM
 	select HAVE_DMA_ATTRS
 	select HAVE_DMA_CONTIGUOUS if MMU
 	select HAVE_DYNAMIC_FTRACE if (!XIP_KERNEL)
+	select HAVE_EARLY_KPROBES if (HAVE_KPROBES)
 	select HAVE_EFFICIENT_UNALIGNED_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && MMU
 	select HAVE_FTRACE_MCOUNT_RECORD if (!XIP_KERNEL)
 	select HAVE_FUNCTION_GRAPH_TRACER if (!THUMB2_KERNEL)
-- 
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ