From: Rune Torgersen Date: Fri, 23 May 2008 15:59:15 +0000 (+1000) Subject: powerpc: Check that TASK_SIZE does not overlap KERNEL_START X-Git-Tag: v2.6.27-rc1~1058^2~164 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c4f10b9003dc8423df07574ba197bbbe3bc382b;p=linux-2.6 powerpc: Check that TASK_SIZE does not overlap KERNEL_START 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 Acked-by: Kumar Gala Signed-off-by: Paul Mackerras --- diff --git a/include/asm-powerpc/processor.h b/include/asm-powerpc/processor.h index cf83f2d7e2..a1deed85f3 100644 --- a/include/asm-powerpc/processor.h +++ b/include/asm-powerpc/processor.h @@ -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