kprobes broken in linux-next (was Re: [tip:perf/kprobes] kprobes: Introduce NOKPROBE_SYMBOL() macro to maintain kprobes blacklist)

From: Vineet Gupta
Date: Thu May 01 2014 - 01:34:36 EST


On Thursday 24 April 2014 04:28 PM, tip-bot for Masami Hiramatsu wrote:
> Commit-ID: 376e242429bf8539ef39a080ac113c8799840b13
> Gitweb: http://git.kernel.org/tip/376e242429bf8539ef39a080ac113c8799840b13
> Author: Masami Hiramatsu <masami.hiramatsu.pt@xxxxxxxxxxx>
> AuthorDate: Thu, 17 Apr 2014 17:17:05 +0900
> Committer: Ingo Molnar <mingo@xxxxxxxxxx>
> CommitDate: Thu, 24 Apr 2014 10:02:56 +0200
>
> kprobes: Introduce NOKPROBE_SYMBOL() macro to maintain kprobes blacklist
>
> Introduce NOKPROBE_SYMBOL() macro which builds a kprobes
> blacklist at kernel build time.
>
....

> diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> index 146e4ff..40ceb3c 100644
> --- a/include/asm-generic/vmlinux.lds.h
> +++ b/include/asm-generic/vmlinux.lds.h
> @@ -109,6 +109,14 @@
> #define BRANCH_PROFILE()
> #endif
>
> +#ifdef CONFIG_KPROBES
> +#define KPROBE_BLACKLIST() VMLINUX_SYMBOL(__start_kprobe_blacklist) = .; \
> + *(_kprobe_blacklist) \
> + VMLINUX_SYMBOL(__stop_kprobe_blacklist) = .;
> +#else
> +#define KPROBE_BLACKLIST()
> +#endif
> +
> #ifdef CONFIG_EVENT_TRACING
> #define FTRACE_EVENTS() . = ALIGN(8); \
> VMLINUX_SYMBOL(__start_ftrace_events) = .; \
> @@ -507,6 +515,7 @@
> *(.init.rodata) \
> FTRACE_EVENTS() \
> TRACE_SYSCALLS() \
> + KPROBE_BLACKLIST() \
> MEM_DISCARD(init.rodata) \
> CLK_OF_TABLES() \
> RESERVEDMEM_OF_TABLES() \

Linux-next fails to boot on ARC due to misaligned __start_kprobe_blacklist. Patch
below fixes it.

------------------------>