Re: [PATCH] Kprobes blacklist: Conditionally add x86-specificsymbols

From: Masami Hiramatsu
Date: Thu Mar 07 2013 - 23:23:36 EST


(2013/03/07 19:44), oskar.andero@xxxxxxxxxxxxxx wrote:
> From: Bjorn Davidsson <bjorn.davidsson@xxxxxxxxxxxxxx>
>
> The kprobes blacklist contains x86-specific symbols.
> Looking for these in kallsyms takes unnecessary time
> during startup on non-X86 platform.
> Added #ifdef CONFIG_X86 around them.

Right. however, it might be better break that into
common and arch-specific lists, because there may be
other arch-specific non-probe-able functions on each
architecture...

Would you know some other black points on your platform?

Thank you,

>
> Reviewed-by: Radovan Lekanovic <radovan.lekanovic@xxxxxxxxxxxxxx>
> Signed-off-by: BjÃrn Davidsson <bjorn.davidsson@xxxxxxxxxxxxxx>
> Signed-off-by: Oskar Andero <oskar.andero@xxxxxxxxxxxxxx>
> ---
> kernel/kprobes.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/kernel/kprobes.c b/kernel/kprobes.c
> index e35be53..8c3796f 100644
> --- a/kernel/kprobes.c
> +++ b/kernel/kprobes.c
> @@ -95,9 +95,11 @@ static raw_spinlock_t *kretprobe_table_lock_ptr(unsigned long hash)
> */
> static struct kprobe_blackpoint kprobe_blacklist[] = {
> {"preempt_schedule",},
> +#ifdef CONFIG_X86
> {"native_get_debugreg",},
> {"irq_entries_start",},
> {"common_interrupt",},
> +#endif
> {"mcount",}, /* mcount can be called from everywhere */
> {NULL} /* Terminator */
> };
>


--
Masami HIRAMATSU
IT Management Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@xxxxxxxxxxx


--
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/