summaryrefslogtreecommitdiff
path: root/kernel/module.c
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2020-03-26 23:49:48 +0900
committerThomas Gleixner <tglx@linutronix.de>2020-05-12 17:15:32 +0200
commit1e6769b0aece51ea7a3dc3117c37d4a5669e4a21 (patch)
treec2738aa86d5cd28739f7a0a754124da21881260e /kernel/module.c
parent4fdd88877e5259dcc5e504dca449acc0324d71b9 (diff)
kprobes: Support __kprobes blacklist in modules
Support __kprobes attribute for blacklist functions in modules. The __kprobes attribute functions are stored in .kprobes.text section. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com> Acked-by: Peter Zijlstra <peterz@infradead.org> Link: https://lkml.kernel.org/r/20200505134059.678201813@linutronix.de
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 646f1e2330d2..978f3fa40850 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -3194,6 +3194,10 @@ static int find_module_sections(struct module *mod, struct load_info *info)
sizeof(*mod->ei_funcs),
&mod->num_ei_funcs);
#endif
+#ifdef CONFIG_KPROBES
+ mod->kprobes_text_start = section_objs(info, ".kprobes.text", 1,
+ &mod->kprobes_text_size);
+#endif
mod->extable = section_objs(info, "__ex_table",
sizeof(*mod->extable), &mod->num_exentries);