]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
dtrace: add kprobe-unsafe addresses to FBT blacklist
authorKris Van Hees <kris.van.hees@oracle.com>
Mon, 12 Jun 2017 13:33:05 +0000 (09:33 -0400)
committerKris Van Hees <kris.van.hees@oracle.com>
Mon, 26 Jun 2017 22:19:01 +0000 (18:19 -0400)
By means of the newly introduced API to add entries to the FBT
blacklist, we make sure to register addresses that are unsafe for
kprobes with the FBT blacklist because they are unsafe there also.

Orabug: 26190412
Signed-off-by: Tomas Jedlicka <tomas.jedlicka@oracle.com>
Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Acked-by: Nick Alcock <nick.alcock@oracle.com>
Reviewed-by: Dhaval Giani <dhaval.giani@oracle.com>
kernel/kprobes.c

index c90e417bb9636300e4f4fe87d2c995a6c2cdab12..3864e014e36dde2afbc488628e7a9ab0384bd1bd 100644 (file)
 #include <linux/cpu.h>
 #include <linux/jump_label.h>
 
+#ifdef CONFIG_DTRACE
+#include <linux/dtrace_fbt.h>
+#endif
+
 #include <asm-generic/sections.h>
 #include <asm/cacheflush.h>
 #include <asm/errno.h>
@@ -2071,6 +2075,10 @@ static int __init populate_kprobe_blacklist(unsigned long *start,
                        continue;
                }
 
+#ifdef CONFIG_DTRACE
+               dtrace_fbt_bl_add(entry, NULL);
+#endif
+
                ent = kmalloc(sizeof(*ent), GFP_KERNEL);
                if (!ent)
                        return -ENOMEM;