Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > fc11cd6e1c513a17304da94a5390f3cd > files > 3884

kernel-2.6.18-194.11.1.el5.src.rpm

From: Larry Woodman <lwoodman@redhat.com>
Date: Wed, 15 Apr 2009 14:51:49 -0400
Subject: [x86] add MAP_STACK mmap flag
Message-id: 1239821509.1476.357.camel@dhcp-100-19-198.bos.redhat.com
O-Subject: [RHEL5-U4 patch] add MAP_STACK mmap flag
Bugzilla: 459321
RH-Acked-by: Jeff Moyer <jmoyer@redhat.com>
RH-Acked-by: Jeff Moyer <jmoyer@redhat.com>
RH-Acked-by: Rik van Riel <riel@redhat.com>

This patch is a simple place holder that was requested in U3 but was not
upstream yet.  The current upstream status is MAP_STACK was added to
include/asm-x86/mman.h so libc will build when it is passed to mmap()
but nothing has been added to sys_mmap() yet.

Addresses BZ459321

diff --git a/include/asm-i386/mman.h b/include/asm-i386/mman.h
index 8fd9d7a..2d8ff3a 100644
--- a/include/asm-i386/mman.h
+++ b/include/asm-i386/mman.h
@@ -10,6 +10,7 @@
 #define MAP_NORESERVE	0x4000		/* don't check for reservations */
 #define MAP_POPULATE	0x8000		/* populate (prefault) pagetables */
 #define MAP_NONBLOCK	0x10000		/* do not block on IO */
+#define MAP_STACK	0x20000		/* give out an address that is best suited for process/thread stacks */
 
 #define MCL_CURRENT	1		/* lock all current mappings */
 #define MCL_FUTURE	2		/* lock all future mappings */
diff --git a/include/asm-x86_64/mman.h b/include/asm-x86_64/mman.h
index dd5cb05..3914751 100644
--- a/include/asm-x86_64/mman.h
+++ b/include/asm-x86_64/mman.h
@@ -12,6 +12,7 @@
 #define MAP_NORESERVE	0x4000		/* don't check for reservations */
 #define MAP_POPULATE	0x8000		/* populate (prefault) pagetables */
 #define MAP_NONBLOCK	0x10000		/* do not block on IO */
+#define MAP_STACK	0x20000		/* give out an address that is best suited for process/thread stacks */
 
 #define MCL_CURRENT	1		/* lock all current mappings */
 #define MCL_FUTURE	2		/* lock all future mappings */