Index: kernel/arch/amd64/src/userspace.c
===================================================================
--- kernel/arch/amd64/src/userspace.c	(revision 2689a0ba890434ede8f74c746b6f5d89947db465)
+++ kernel/arch/amd64/src/userspace.c	(revision 375e501a4e8faac7fad7a1d019a8a778e97346e6)
@@ -55,5 +55,5 @@
 	asm volatile (
 		"pushq %[udata_des]\n"
-		"pushq %[stack_size]\n"
+		"pushq %[stack_top]\n"
 		"pushq %[ipl]\n"
 		"pushq %[utext_des]\n"
@@ -65,5 +65,6 @@
 		"iretq\n"
 		:: [udata_des] "i" (GDT_SELECTOR(UDATA_DES) | PL_USER),
-		   [stack_size] "r" (kernel_uarg->uspace_stack + STACK_SIZE),
+		   [stack_top] "r" ((uint8_t *) kernel_uarg->uspace_stack +
+		       kernel_uarg->uspace_stack_size),
 		   [ipl] "r" (ipl),
 		   [utext_des] "i" (GDT_SELECTOR(UTEXT_DES) | PL_USER),
@@ -74,6 +75,5 @@
 	
 	/* Unreachable */
-	while (1)
-		;
+	while (1);
 }
 
Index: kernel/arch/arm32/src/userspace.c
===================================================================
--- kernel/arch/arm32/src/userspace.c	(revision 2689a0ba890434ede8f74c746b6f5d89947db465)
+++ kernel/arch/arm32/src/userspace.c	(revision 375e501a4e8faac7fad7a1d019a8a778e97346e6)
@@ -92,5 +92,6 @@
 
 	/* set user stack */
-	ustate.sp = ((uint32_t)kernel_uarg->uspace_stack) + STACK_SIZE;
+	ustate.sp = ((uint32_t) kernel_uarg->uspace_stack) +
+	    kernel_uarg->uspace_stack_size;
 
 	/* set where uspace execution starts */
Index: kernel/arch/ia32/src/userspace.c
===================================================================
--- kernel/arch/ia32/src/userspace.c	(revision 2689a0ba890434ede8f74c746b6f5d89947db465)
+++ kernel/arch/ia32/src/userspace.c	(revision 375e501a4e8faac7fad7a1d019a8a778e97346e6)
@@ -63,5 +63,5 @@
 		
 		"pushl %[udata_des]\n"
-		"pushl %[stack_size]\n"
+		"pushl %[stack_top]\n"
 		"pushl %[ipl]\n"
 		"pushl %[utext_des]\n"
@@ -75,5 +75,6 @@
 		:
 		: [udata_des] "i" (GDT_SELECTOR(UDATA_DES) | PL_USER),
-		  [stack_size] "r" ((uint8_t *) kernel_uarg->uspace_stack + STACK_SIZE),
+		  [stack_top] "r" ((uint8_t *) kernel_uarg->uspace_stack +
+		      kernel_uarg->uspace_stack_size),
 		  [ipl] "r" (ipl),
 		  [utext_des] "i" (GDT_SELECTOR(UTEXT_DES) | PL_USER),
Index: kernel/arch/ia64/src/ia64.c
===================================================================
--- kernel/arch/ia64/src/ia64.c	(revision 2689a0ba890434ede8f74c746b6f5d89947db465)
+++ kernel/arch/ia64/src/ia64.c	(revision 375e501a4e8faac7fad7a1d019a8a778e97346e6)
@@ -232,14 +232,16 @@
 	 *
 	 * When calculating stack addresses, mind the stack split between the
-	 * memory stack and the RSE stack. Each occuppies STACK_SIZE / 2 bytes.
+	 * memory stack and the RSE stack. Each occuppies
+	 * uspace_stack_size / 2 bytes.
 	 */
 	switch_to_userspace((uintptr_t) kernel_uarg->uspace_entry,
-	    ((uintptr_t) kernel_uarg->uspace_stack) + STACK_SIZE / 2 -
+	    ((uintptr_t) kernel_uarg->uspace_stack) +
+	    kernel_uarg->uspace_stack_size / 2 -
 	    ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT),
-	    ((uintptr_t) kernel_uarg->uspace_stack) + STACK_SIZE / 2,
+	    ((uintptr_t) kernel_uarg->uspace_stack) +
+	    kernel_uarg->uspace_stack_size / 2,
 	    (uintptr_t) kernel_uarg->uspace_uarg, psr.value, rsc.value);
-
-	while (1)
-		;
+	
+	while (1);
 }
 
Index: kernel/arch/mips32/src/mips32.c
===================================================================
--- kernel/arch/mips32/src/mips32.c	(revision 2689a0ba890434ede8f74c746b6f5d89947db465)
+++ kernel/arch/mips32/src/mips32.c	(revision 375e501a4e8faac7fad7a1d019a8a778e97346e6)
@@ -211,5 +211,6 @@
 	    cp0_status_um_bit | cp0_status_ie_enabled_bit));
 	cp0_epc_write((uintptr_t) kernel_uarg->uspace_entry);
-	userspace_asm(((uintptr_t) kernel_uarg->uspace_stack + STACK_SIZE),
+	userspace_asm(((uintptr_t) kernel_uarg->uspace_stack +
+	    kernel_uarg->uspace_stack_size),
 	    (uintptr_t) kernel_uarg->uspace_uarg,
 	    (uintptr_t) kernel_uarg->uspace_entry);
Index: kernel/arch/mips64/src/mips64.c
===================================================================
--- kernel/arch/mips64/src/mips64.c	(revision 2689a0ba890434ede8f74c746b6f5d89947db465)
+++ kernel/arch/mips64/src/mips64.c	(revision 375e501a4e8faac7fad7a1d019a8a778e97346e6)
@@ -188,5 +188,6 @@
 	    cp0_status_um_bit | cp0_status_ie_enabled_bit));
 	cp0_epc_write((uintptr_t) kernel_uarg->uspace_entry);
-	userspace_asm(((uintptr_t) kernel_uarg->uspace_stack + STACK_SIZE),
+	userspace_asm(((uintptr_t) kernel_uarg->uspace_stack +
+	    kernel_uarg->uspace_stack_size),
 	    (uintptr_t) kernel_uarg->uspace_uarg,
 	    (uintptr_t) kernel_uarg->uspace_entry);
Index: kernel/arch/ppc32/src/ppc32.c
===================================================================
--- kernel/arch/ppc32/src/ppc32.c	(revision 2689a0ba890434ede8f74c746b6f5d89947db465)
+++ kernel/arch/ppc32/src/ppc32.c	(revision 375e501a4e8faac7fad7a1d019a8a778e97346e6)
@@ -269,5 +269,6 @@
 {
 	userspace_asm((uintptr_t) kernel_uarg->uspace_uarg,
-	    (uintptr_t) kernel_uarg->uspace_stack + STACK_SIZE - SP_DELTA,
+	    (uintptr_t) kernel_uarg->uspace_stack +
+	    kernel_uarg->uspace_stack_size - SP_DELTA,
 	    (uintptr_t) kernel_uarg->uspace_entry);
 	
Index: kernel/arch/sparc64/src/sun4u/sparc64.c
===================================================================
--- kernel/arch/sparc64/src/sun4u/sparc64.c	(revision 2689a0ba890434ede8f74c746b6f5d89947db465)
+++ kernel/arch/sparc64/src/sun4u/sparc64.c	(revision 375e501a4e8faac7fad7a1d019a8a778e97346e6)
@@ -156,11 +156,11 @@
 	(void) interrupts_disable();
 	switch_to_userspace((uintptr_t) kernel_uarg->uspace_entry,
-	    ((uintptr_t) kernel_uarg->uspace_stack) + STACK_SIZE
-	    - (ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT) + STACK_BIAS),
+	    ((uintptr_t) kernel_uarg->uspace_stack) +
+	    kernel_uarg->uspace_stack_size -
+	    (ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT) + STACK_BIAS),
 	    (uintptr_t) kernel_uarg->uspace_uarg);
-
-	for (;;)
-		;
-	/* not reached */
+	
+	/* Not reached */
+	while (1);
 }
 
Index: kernel/arch/sparc64/src/sun4v/sparc64.c
===================================================================
--- kernel/arch/sparc64/src/sun4v/sparc64.c	(revision 2689a0ba890434ede8f74c746b6f5d89947db465)
+++ kernel/arch/sparc64/src/sun4v/sparc64.c	(revision 375e501a4e8faac7fad7a1d019a8a778e97346e6)
@@ -154,11 +154,11 @@
 	(void) interrupts_disable();
 	switch_to_userspace((uintptr_t) kernel_uarg->uspace_entry,
-	    ((uintptr_t) kernel_uarg->uspace_stack) + STACK_SIZE
-	    - (ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT) + STACK_BIAS),
+	    ((uintptr_t) kernel_uarg->uspace_stack) +
+	    kernel_uarg->uspace_stack_size -
+	    (ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT) + STACK_BIAS),
 	    (uintptr_t) kernel_uarg->uspace_uarg);
-
-	for (;;)
-		;
-	/* not reached */
+	
+	/* Not reached */
+	while (1);
 }
 
