Skip to content

Commit 69902c7

Browse files
Vineet GuptaIngo Molnar
Vineet Gupta
authored and
Ingo Molnar
committed
kprobes: Ensure blacklist data is aligned
ARC Linux (not supporting native unaligned access) was failing to boot because __start_kprobe_blacklist was not aligned. This was because per generated vmlinux.lds it was emitted right next to .rodata with strings etc hence could be randomly unaligned. Fix that by ensuring a word alignment. While 4 would suffice for 32bit arches and problem at hand, it is probably better to put 8. | Path: (null) CPU: 0 PID: 1 Comm: swapper Not tainted | 3.15.0-rc3-next-20140430 #2 | task: 8f044000 ti: 8f01e000 task.ti: 8f01e000 | | [ECR ]: 0x00230400 => Misaligned r/w from 0x800fb0d3 | [EFA ]: 0x800fb0d3 | [BLINK ]: do_one_initcall+0x86/0x1bc | [ERET ]: init_kprobes+0x52/0x120 Signed-off-by: Vineet Gupta <[email protected]> Cc: <[email protected]> Cc: <[email protected]> Cc: <[email protected]> Cc: <[email protected]> Cc: <[email protected]> Cc: <[email protected]> Cc: <[email protected]> Cc: <[email protected]> Cc: <[email protected]> Cc: <[email protected]> Cc: <[email protected]> Cc: <[email protected]> Cc: <[email protected]> Cc: anton Kolesov <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 6372474 commit 69902c7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/asm-generic/vmlinux.lds.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@
110110
#endif
111111

112112
#ifdef CONFIG_KPROBES
113-
#define KPROBE_BLACKLIST() VMLINUX_SYMBOL(__start_kprobe_blacklist) = .; \
113+
#define KPROBE_BLACKLIST() . = ALIGN(8); \
114+
VMLINUX_SYMBOL(__start_kprobe_blacklist) = .; \
114115
*(_kprobe_blacklist) \
115116
VMLINUX_SYMBOL(__stop_kprobe_blacklist) = .;
116117
#else

0 commit comments

Comments
 (0)