ia64 expects following vm layout == [register-stack] [memory-stack] == But, when ulimit -s is used and stack-base-address-randomization works, vm layout is sometimes following. == [memory-stack] [register-stack] == If this happens, register-stack cannot be expanded. This patch fixes this bug by adjusting register-stack. Signed-Off-By: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> Index: linux-2.6.21-rc4/arch/ia64/mm/init.c =================================================================== --- linux-2.6.21-rc4.orig/arch/ia64/mm/init.c +++ linux-2.6.21-rc4/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 - stack_size); } /* - To unsubscribe from this list: send the line "unsubscribe linux-ia64" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
![]() |