powerpc: Check that TASK_SIZE does not overlap KERNEL_START
authorRune Torgersen <runet@innovsys.com>
Fri, 23 May 2008 15:59:15 +0000 (01:59 +1000)
committerPaul Mackerras <paulus@samba.org>
Mon, 9 Jun 2008 03:46:40 +0000 (13:46 +1000)
Make sure CONFIG_TASK_SIZE does not overlap CONFIG_KERNEL_START
This could happen when overriding settings to get 1GB lowmem, and would lead
to userland mysteriousely hanging.

This setting is only used by PPC32.

Signed-off-by: Rune Torgersen <runet@innovsys.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
include/asm-powerpc/processor.h

index cf83f2d7e2a5dea90b550861b3b0502c54853551..a1deed85f31d087dd87f9f2bc8b8269e73c2d308 100644 (file)
@@ -81,6 +81,10 @@ extern struct task_struct *last_task_used_altivec;
 extern struct task_struct *last_task_used_spe;
 
 #ifdef CONFIG_PPC32
+
+#if CONFIG_TASK_SIZE > CONFIG_KERNEL_START
+#error User TASK_SIZE overlaps with KERNEL_START address
+#endif
 #define TASK_SIZE      (CONFIG_TASK_SIZE)
 
 /* This decides where the kernel will search for a free chunk of vm