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

From: Wang Nan
Date: Mon Mar 02 2015 - 09:32:32 EST


Puts early kprobe reserved area into kprobe blacklist.

Signed-off-by: Wang Nan <wangnan0@xxxxxxxxxx>
---
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

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