diff options
author | Masami Hiramatsu <mhiramat@kernel.org> | 2020-03-26 15:49:48 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2020-05-12 17:15:32 +0200 |
commit | 1e6769b0aece51ea7a3dc3117c37d4a5669e4a21 (patch) | |
tree | c2738aa86d5cd28739f7a0a754124da21881260e /kernel/module.c | |
parent | kprobes: Lock kprobe_mutex while showing kprobe_blacklist (diff) | |
download | linux-1e6769b0aece51ea7a3dc3117c37d4a5669e4a21.tar.xz linux-1e6769b0aece51ea7a3dc3117c37d4a5669e4a21.zip |
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.c | 4 |
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); |