Commit:     83d2cd3de48a7fb73838c45145780cfa9b1f61fd
Parent:     8a3a0ee736b9a0150c9d894f2c6cc836a62125a1
Author:     KAMEZAWA Hiroyuki <[EMAIL PROTECTED]>
AuthorDate: Fri Mar 23 12:17:46 2007 +0900
Committer:  Tony Luck <[EMAIL PROTECTED]>
CommitDate: Thu Mar 29 15:15:24 2007 -0700

    [IA64] bugfix stack layout upside-down
    ia64 expects following vm layout:
    == low memory
    [register-stack grows up]
    [memory-stack grows down]
    == high memory
    But the code assigns the base of the register stack at the
    maximum stack size offset from the fixed address where the
    stack *might* start.  Stack randomization will result in the
    memory stack starting at a lower address than this, and if the
    user has set a low stack limit with "ulimit -s", then you can
    end up with the register stack above the memory stack (or if
    you were very unlucky right on top of it!).
    Fix: Calculate the base address for the register stack starting
    from the actual address of the memory stack.
    Signed-off-by: KAMEZAWA Hiroyuki <[EMAIL PROTECTED]>
    Signed-off-by: Tony Luck <[EMAIL PROTECTED]>
 arch/ia64/mm/init.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
index c8da621..4f36987 100644
--- a/arch/ia64/mm/init.c
+++ b/arch/ia64/mm/init.c
@@ -155,7 +155,7 @@ ia64_set_rbs_bot (void)
        if (stack_size > MAX_USER_STACK_SIZE)
                stack_size = MAX_USER_STACK_SIZE;
-       current->thread.rbs_bot = STACK_TOP - stack_size;
+       current->thread.rbs_bot = PAGE_ALIGN(current->mm->start_stack - 
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to