diff -upN reference/fs/proc/base.c current/fs/proc/base.c
--- reference/fs/proc/base.c	2004-05-09 13:44:04.000000000 -0700
+++ current/fs/proc/base.c	2004-05-09 13:44:04.000000000 -0700
@@ -92,6 +92,7 @@ enum pid_directory_inos {
 	PROC_TID_ATTR_EXEC,
 	PROC_TID_ATTR_FSCREATE,
 #endif
+	PROC_PID_MAPBASE,
 	PROC_TID_FD_DIR = 0x8000,	/* 0x8000-0xffff */
 };
 
@@ -126,6 +127,9 @@ static struct pid_entry tgid_base_stuff[
 #ifdef CONFIG_KALLSYMS
 	E(PROC_TGID_WCHAN,     "wchan",   S_IFREG|S_IRUGO),
 #endif
+#ifdef __HAS_ARCH_PROC_MAPPED_BASE
+	E(PROC_PID_MAPBASE, "mapped_base",S_IFREG|S_IRUSR|S_IWUSR),
+#endif
 	{0,0,NULL,0}
 };
 static struct pid_entry tid_base_stuff[] = {
@@ -708,6 +712,58 @@ static struct file_operations proc_mem_o
 	.open		= mem_open,
 };
 
+#ifdef __HAS_ARCH_PROC_MAPPED_BASE
+static ssize_t mapbase_read(struct file * file, char * buf,
+			size_t count, loff_t *ppos)
+{
+	struct task_struct *task = PROC_I(file->f_dentry->d_inode)->task;
+	char buffer[64];
+	size_t len;
+	
+	sprintf(buffer, "%li", task->map_base);
+	len=strlen(buffer)+1;			
+	*ppos += len;
+	if (copy_to_user(buf, buffer, len)) 
+		len = -EFAULT;
+	
+	return (len<*ppos)?0:len;
+}
+
+static ssize_t mapbase_write(struct file * file, const char * buf,
+			 size_t count, loff_t *ppos)
+{
+	struct task_struct *task = PROC_I(file->f_dentry->d_inode)->task;
+	char buffer[64];
+	int len;
+	unsigned long newbase;
+	if (!capable(CAP_SYS_ADMIN)) return -EPERM;
+	memset(buffer, 0, 64);
+	len = count;
+	if (len>63)
+		len = 63;
+	if (copy_from_user(buffer, buf, len)) 
+		return -EFAULT;
+	
+	for (len = 0; len < 64; len++)
+		if (!buffer[len])
+			break;
+	if (len>60)
+		return -EFAULT;
+	
+	newbase = simple_strtoul(buffer, NULL, 0);
+
+	if (newbase > 0)
+		task->map_base = newbase;
+	
+	return len;
+}
+
+static struct file_operations proc_mapbase_operations = {
+	read:		mapbase_read,
+	write:		mapbase_write,
+};
+#endif /* __HAS_ARCH_PROC_MAPPED_BASE */
+
 static struct inode_operations proc_mem_inode_operations = {
 	.permission	= proc_permission,
 };
@@ -1402,6 +1458,11 @@ static struct dentry *proc_pident_lookup
 			ei->op.proc_read = proc_pid_wchan;
 			break;
 #endif
+#ifdef __HAS_ARCH_PROC_MAPPED_BASE
+		case PROC_PID_MAPBASE:
+			inode->i_fop = &proc_mapbase_operations;
+			break;
+#endif
 		default:
 			printk("procfs: impossible type (%d)",p->type);
 			iput(inode);
diff -upN reference/include/asm-i386/processor.h current/include/asm-i386/processor.h
--- reference/include/asm-i386/processor.h	2004-05-09 13:44:00.000000000 -0700
+++ current/include/asm-i386/processor.h	2004-05-09 13:44:05.000000000 -0700
@@ -294,7 +294,8 @@ extern unsigned int mca_pentium_flag;
 /* This decides where the kernel will search for a free chunk of vm
  * space during mmap's.
  */
-#define TASK_UNMAPPED_BASE	(PAGE_ALIGN(TASK_SIZE / 3))
+#define __TASK_UNMAPPED_BASE	(PAGE_ALIGN(TASK_SIZE / 3))
+#define TASK_UNMAPPED_BASE	(current->map_base)
 
 /*
  * Size of io_bitmap, covering ports 0 to 0x3ff.
diff -upN reference/include/asm-ppc64/processor.h current/include/asm-ppc64/processor.h
--- reference/include/asm-ppc64/processor.h	2004-05-09 13:43:53.000000000 -0700
+++ current/include/asm-ppc64/processor.h	2004-05-09 13:44:05.000000000 -0700
@@ -527,8 +527,9 @@ extern struct task_struct *last_task_use
 #define TASK_UNMAPPED_BASE_USER32 (PAGE_ALIGN(STACK_TOP_USER32 / 4))
 #define TASK_UNMAPPED_BASE_USER64 (PAGE_ALIGN(STACK_TOP_USER64 / 4))
 
+#define __TASK_UNMAPPED_BASE (PAGE_ALIGN(STACK_TOP_USER32 / 4))
 #define TASK_UNMAPPED_BASE ((test_thread_flag(TIF_32BIT)||(ppcdebugset(PPCDBG_BINFMT_32ADDR))) ? \
-		TASK_UNMAPPED_BASE_USER32 : TASK_UNMAPPED_BASE_USER64 )
+		(current->map_base) : TASK_UNMAPPED_BASE_USER64 )
 
 typedef struct {
 	unsigned long seg;
diff -upN reference/include/asm-s390/processor.h current/include/asm-s390/processor.h
--- reference/include/asm-s390/processor.h	2004-04-07 14:54:34.000000000 -0700
+++ current/include/asm-s390/processor.h	2004-05-09 13:44:05.000000000 -0700
@@ -62,14 +62,16 @@ extern struct task_struct *last_task_use
 #ifndef __s390x__
 
 # define TASK_SIZE		(0x80000000UL)
-# define TASK_UNMAPPED_BASE	(TASK_SIZE / 2)
+# define __TASK_UNMAPPED_BASE	(TASK_SIZE / 2)
+# define TASK_UNMAPPED_BASE	(current->mmap_base)
 
 #else /* __s390x__ */
 
 # define TASK_SIZE		(0x40000000000UL)
 # define TASK31_SIZE		(0x80000000UL)
+# define __TASK_UNMAPPED_BASE (TASK31_SIZE/2)
 # define TASK_UNMAPPED_BASE	(test_thread_flag(TIF_31BIT) ? \
-					(TASK31_SIZE / 2) : (TASK_SIZE / 2))
+					(current->map_base) : (TASK_SIZE / 2))
 
 #endif /* __s390x__ */
 
diff -upN reference/include/asm-um/processor-generic.h current/include/asm-um/processor-generic.h
--- reference/include/asm-um/processor-generic.h	2004-04-07 14:54:35.000000000 -0700
+++ current/include/asm-um/processor-generic.h	2004-05-09 13:44:05.000000000 -0700
@@ -119,7 +119,8 @@ extern unsigned long task_size;
 /* This decides where the kernel will search for a free chunk of vm
  * space during mmap's.
  */
-#define TASK_UNMAPPED_BASE	(0x40000000)
+#define __TASK_UNMAPPED_BASE	(0x40000000)
+#define TASK_UNMAPPED_BASE	(current->map_base)
 
 extern void start_thread(struct pt_regs *regs, unsigned long entry, 
 			 unsigned long stack);
diff -upN reference/include/linux/init_task.h current/include/linux/init_task.h
--- reference/include/linux/init_task.h	2004-04-30 11:23:53.000000000 -0700
+++ current/include/linux/init_task.h	2004-05-09 13:44:05.000000000 -0700
@@ -112,6 +112,7 @@ extern struct group_info init_groups;
 	.proc_lock	= SPIN_LOCK_UNLOCKED,				\
 	.switch_lock	= SPIN_LOCK_UNLOCKED,				\
 	.journal_info	= NULL,						\
+	.map_base	= __TASK_UNMAPPED_BASE,				\
 }
 
 
diff -upN reference/include/linux/sched.h current/include/linux/sched.h
--- reference/include/linux/sched.h	2004-05-09 13:44:00.000000000 -0700
+++ current/include/linux/sched.h	2004-05-09 13:44:05.000000000 -0700
@@ -503,6 +503,8 @@ struct task_struct {
 	void *journal_info;
 
 /* VM state */
+	/* TASK_UNMAPPED_BASE value */
+	unsigned long map_base;
 	struct reclaim_state *reclaim_state;
 
 	struct dentry *proc_dentry;
@@ -527,6 +529,12 @@ extern void __put_task_struct(struct tas
 #define put_task_struct(tsk) \
 do { if (atomic_dec_and_test(&(tsk)->usage)) __put_task_struct(tsk); } while(0)
 
+#ifndef __TASK_UNMAPPED_BASE
+#define __TASK_UNMAPPED_BASE 0UL
+#else
+#define __HAS_ARCH_PROC_MAPPED_BASE
+#endif
+
 /*
  * Per process flags
  */