linux/arch/arm64/kernel
Mark Rutland 39a90ca639 arm64: Survive invalid cpu enable-methods
Currently, if you pass the kernel a dtb where a cpu node has an
unsupported enable-method property (e.g. "not-psci"), it'll explode
horribly, as it iterates over the enable_ops array incorrectly. It
increments the pointer *at* the current element, rather than
incrementing the pointer *to* the current element. As the first two
elements pointed to structures that were contiguous in memory, this
happened to be equivalent. However the third element is NULL, so when
the list is exhausted, smp_get_enable_ops generates the wrong pointer,
and dereferences an arbitrary portion of memory, which currently happens
to contain zero.

This patch fixes this by indirecting the pointer one level, so we
iterate over the array elements correctly, avoiding the below panic:

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2013-04-25 17:45:54 +01:00
..
vdso arm64: vdso: remove broken, redundant sequence counting for timezones 2013-01-10 10:43:43 +00:00
.gitignore arm64: Build infrastructure 2012-09-17 13:42:21 +01:00
Makefile arm64: SMP: enable PSCI boot method 2013-01-29 16:56:37 +00:00
arm64ksyms.c arm64: klib: Optimised atomic bitops 2013-03-21 17:39:31 +00:00
asm-offsets.c arm64: Assembly macros and definitions 2012-09-17 10:24:44 +01:00
cputable.c arm64: CPU support 2012-09-17 13:41:59 +01:00
debug-monitors.c arm64: Debugging support 2012-09-17 13:42:14 +01:00
early_printk.c arm64: add support for 8250/16550 earlyprintk 2013-03-20 16:46:42 +00:00
entry-fpsimd.S arm64: move FP-SIMD save/restore code to a macro 2012-12-05 11:26:50 +00:00
entry.S arm64: add explicit symbols to ESR_EL1 decoding 2013-04-17 15:58:25 +01:00
fpsimd.c arm64: Floating point and SIMD 2012-09-17 13:42:13 +01:00
head.S arm64: head: match all affinity levels in the pen of the secondaries 2013-03-20 18:09:42 +00:00
hw_breakpoint.c arm64: Debugging support 2012-09-17 13:42:14 +01:00
hyp-stub.S arm64: add hypervisor stub 2012-12-05 11:26:49 +00:00
io.c arm64: Device specific operations 2012-09-17 13:42:04 +01:00
irq.c arm64: Use irqchip_init() for interrupt controller initialisation 2013-03-26 16:02:23 +00:00
kuser32.S arm64: 32-bit (compat) applications support 2012-09-17 13:42:12 +01:00
module.c arm64: Loadable modules 2012-09-17 13:42:19 +01:00
perf_event.c arm64: perf: add guest vs host discrimination 2013-01-29 16:56:17 +00:00
process.c arm64: Execute DSB during thread switching for TLB/cache maintenance 2013-04-25 17:45:48 +01:00
psci.c arm64: psci: add support for PSCI invocations from the kernel 2013-01-29 16:56:37 +00:00
ptrace.c arm64: ptrace: use HW_BREAKPOINT_EMPTY type for disabled breakpoints 2012-10-18 20:15:34 +01:00
setup.c arm64: kernel: initialise cpu_logical_map from the DT 2013-03-20 17:26:24 +00:00
signal.c arm64: switch to generic sigaltstack 2013-02-14 09:17:29 -05:00
signal32.c arm64: Removed unused variable in compat_setup_rt_frame() 2013-03-18 10:12:56 +00:00
smp.c arm64: Survive invalid cpu enable-methods 2013-04-25 17:45:54 +01:00
smp_psci.c arm64: psci: Use the MPIDR values from cpu_logical_map for cpu ids. 2013-03-26 11:58:10 +00:00
smp_spin_table.c arm64: SMP: rework the SMP code to be enabling method agnostic 2013-01-29 16:56:37 +00:00
stacktrace.c arm64: Exception handling 2012-09-17 10:24:46 +01:00
sys.c arm64: switch to generic sigaltstack 2013-02-14 09:17:29 -05:00
sys32.S switch lseek to COMPAT_SYSCALL_DEFINE 2013-02-24 10:52:26 -05:00
sys_compat.c compat: generic compat_sys_sched_rr_get_interval() implementation 2012-12-17 17:15:18 -08:00
time.c arm64: move from arm_generic to arm_arch_timer 2013-01-31 15:51:59 +00:00
traps.c taint: add explicit flag to show whether lock dep is still OK. 2013-01-21 17:17:57 +10:30
vdso.c arm64: vdso: remove broken, redundant sequence counting for timezones 2013-01-10 10:43:43 +00:00
vmlinux.lds.S arm64: Build infrastructure 2012-09-17 13:42:21 +01:00