lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20070323121746.4925a639.kamezawa.hiroyu@jp.fujitsu.com>
Date:	Fri, 23 Mar 2007 12:17:46 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	"linux-ia64@...r.kernel.org" <linux-ia64@...r.kernel.org>
Cc:	"tony.luck@...el.com" <tony.luck@...el.com>, dmosberger@...il.com,
	surinder.kumar@...cle.com, LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH][ia64][1/2] bugfix stack layout upside-down

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@...fujitsu.com>

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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ