powerpc: Check that TASK_SIZE does not overlap KERNEL_START

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Tuesday, July 15, 2008 - 8:08 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7c4f10...
Commit:     7c4f10b9003dc8423df07574ba197bbbe3bc382b
Parent:     cec0dd94cf2628d5ba184e725f02be061e7bb014
Author:     Rune Torgersen <runet@innovsys.com>
AuthorDate: Sat May 24 01:59:15 2008 +1000
Committer:  Paul Mackerras <paulus@samba.org>
CommitDate: Mon Jun 9 13:46:40 2008 +1000

    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 <runet@innovsys.com>
    Acked-by: Kumar Gala <galak@kernel.crashing.org>
    Signed-off-by: Paul Mackerras <paulus@samba.org>
---
 include/asm-powerpc/processor.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/asm-powerpc/processor.h b/include/asm-powerpc/processor.h
index cf83f2d..a1deed8 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
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
powerpc: Check that TASK_SIZE does not overlap KERNEL_START, Linux Kernel Mailing ..., (Tue Jul 15, 8:08 pm)