[RFC PATCH v4 16/34] early kprobes: perhibit probing at early kprobe reserved area.

Wang Nan wangnan0 at huawei.com
Mon Mar 2 06:24:54 PST 2015


Puts early kprobe reserved area into kprobe blacklist.

Signed-off-by: Wang Nan <wangnan0 at huawei.com>
---
 kernel/kprobes.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 2d178fc..7dbe8b2 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -1405,6 +1405,12 @@ static bool within_kprobe_blacklist(unsigned long addr)
 	if (arch_within_kprobe_blacklist(addr))
 		return true;
 
+#ifdef CONFIG_EARLY_KPROBES
+	if (addr >= (unsigned long)__early_kprobes_start &&
+			addr < (unsigned long)__early_kprobes_end)
+		return true;
+#endif
+
 	if (!kprobes_blacklist_initialized)
 		return within_kprobe_blacklist_early(addr);
 
-- 
1.8.4




More information about the linux-arm-kernel mailing list