diff --git a/libpthread/pthread/pt-create.c b/libpthread/pthread/pt-create.c
index c2c84b1..78dd17e 100644
--- a/libpthread/pthread/pt-create.c
+++ b/libpthread/pthread/pt-create.c
@@ -118,12 +118,13 @@ __pthread_create_internal (struct __pthread **thread,
     {
       /* Allocate a stack.  */
       err = __pthread_stack_alloc (&pthread->stackaddr,
-				   setup->stacksize);
+				   ((setup->guardsize + __vm_page_size-1)
+				    / __vm_page_size) * __vm_page_size
+				   + setup->stacksize);
       if (err)
 	goto failed_stack_alloc;
 
-      pthread->guardsize = (setup->guardsize <= setup->stacksize
-			   ? setup->guardsize : setup->stacksize);
+      pthread->guardsize = setup->guardsize;
       pthread->stack = 1;
     }
 
@@ -226,7 +227,10 @@ __pthread_create_internal (struct __pthread **thread,
   goto failed;
  failed_thread_alloc:
   if (pthread->stack)
-    __pthread_stack_dealloc (pthread->stackaddr, pthread->stacksize);
+    __pthread_stack_dealloc (pthread->stackaddr,
+			     ((setup->guardsize + __vm_page_size-1)
+			      / __vm_page_size) * __vm_page_size
+			     + pthread->stacksize);
  failed_stack_alloc:
   __pthread_dealloc (pthread);
  failed:
diff --git a/libpthread/pthread/pt-internal.h b/libpthread/pthread/pt-internal.h
index eca63a1..79db55c 100644
--- a/libpthread/pthread/pt-internal.h
+++ b/libpthread/pthread/pt-internal.h
@@ -94,11 +94,7 @@ struct __pthread
   /* Thread stack.  */
   void *stackaddr;
   size_t stacksize;
-  size_t guardsize;		/* Included in STACKSIZE (i.e. total
-				   stack memory is STACKSIZE, not
-				   STACKSIZE + GUARDSIZE).  */
-				/* FIXME: standard says that guardsize is in
-				   addition to stacksize.  */
+  size_t guardsize;
   int stack;			/* Nonzero if the stack was allocated.  */
 
   /* Exit status.  */
diff --git a/libpthread/sysdeps/generic/pt-attr-setstacksize.c b/libpthread/sysdeps/generic/pt-attr-setstacksize.c
index c88f917..00d9675 100644
--- a/libpthread/sysdeps/generic/pt-attr-setstacksize.c
+++ b/libpthread/sysdeps/generic/pt-attr-setstacksize.c
@@ -26,11 +26,5 @@ pthread_attr_setstacksize (pthread_attr_t *attr,
 {
   attr->stacksize = stacksize;
 
-  /* The guard size cannot be larger than the stack itself, as
-     such, if the new stack size is smaller than the guard size,
-     we squash the guard size.  */
-  if (attr->guardsize > attr->stacksize)
-    attr->guardsize = attr->stacksize;
-
   return 0;
 }
diff --git a/libpthread/sysdeps/mach/hurd/i386/pt-setup.c b/libpthread/sysdeps/mach/hurd/i386/pt-setup.c
index c3abe91..4511463 100644
--- a/libpthread/sysdeps/mach/hurd/i386/pt-setup.c
+++ b/libpthread/sysdeps/mach/hurd/i386/pt-setup.c
@@ -46,7 +46,9 @@ stack_setup (struct __pthread *thread,
 
   /* Calculate the top of the new stack.  */
   bottom = thread->stackaddr;
-  top = (uintptr_t *) ((uintptr_t) bottom + thread->stacksize);
+  top = (uintptr_t *) ((uintptr_t) bottom + thread->stacksize
+        + ((thread->guardsize + __vm_page_size-1)
+	   / __vm_page_size) * __vm_page_size);
 
   if (start_routine)
     {
diff --git a/libpthread/sysdeps/mach/pt-thread-terminate.c b/libpthread/sysdeps/mach/pt-thread-terminate.c
index 6672065..cb9e26a 100644
--- a/libpthread/sysdeps/mach/pt-thread-terminate.c
+++ b/libpthread/sysdeps/mach/pt-thread-terminate.c
@@ -42,7 +42,9 @@ __pthread_thread_terminate (struct __pthread *thread)
   if (thread->stack)
     {
       stackaddr = thread->stackaddr;
-      stacksize = thread->stacksize;
+      stacksize = ((thread->guardsize + __vm_page_size-1)
+		  / __vm_page_size) * __vm_page_size
+		  + thread->stacksize;
     }
   else
     {
diff --git a/libpthread/pthread/pt-getattr.c b/libpthread/pthread/pt-getattr.c
index 24599c6..edb013f 100644
--- a/libpthread/pthread/pt-getattr.c
+++ b/libpthread/pthread/pt-getattr.c
@@ -39,7 +39,9 @@ pthread_getattr_np (pthread_t thread, pthread_attr_t *attr)
      are not supported yet, so fill them with our default values.  */
   *attr = __pthread_default_attr;
 
-  attr->stackaddr = pthread->stackaddr;
+  attr->stackaddr = pthread->stackaddr +
+		      ((pthread->guardsize + __vm_page_size-1)
+		       / __vm_page_size * __vm_page_size);
   attr->stacksize = pthread->stacksize;
   attr->guardsize = pthread->guardsize;
   attr->detachstate = (pthread->state == PTHREAD_DETACHED
