VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / arch / ia64 / ia32 / binfmt_elf32.c
index fcd84c5..a6bc522 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/types.h>
 #include <linux/mm.h>
 #include <linux/security.h>
+#include <linux/vs_memory.h>
 
 #include <asm/param.h>
 #include <asm/signal.h>
@@ -41,6 +42,8 @@ static void elf32_set_personality (void);
 #undef SET_PERSONALITY
 #define SET_PERSONALITY(ex, ibcs2)     elf32_set_personality()
 
+#define elf_read_implies_exec(ex, have_pt_gnu_stack)   (!(have_pt_gnu_stack))
+
 /* Ugly but avoids duplication */
 #include "../../../fs/binfmt_elf.c"
 
@@ -202,6 +205,10 @@ ia32_setup_arg_pages (struct linux_binprm *bprm, int executable_stack)
        }
        up_write(&current->mm->mmap_sem);
 
+       /* Can't do it in ia64_elf32_init(). Needs to be done before calls to
+          elf32_map() */
+       current->thread.ppl = ia32_init_pp_list();
+
        return 0;
 }
 
@@ -211,7 +218,6 @@ elf32_set_personality (void)
        set_personality(PER_LINUX32);
        current->thread.map_base  = IA32_PAGE_OFFSET/3;
        current->thread.task_size = IA32_PAGE_OFFSET;   /* use what Linux/x86 uses... */
-       current->thread.flags |= IA64_THREAD_XSTACK;    /* data must be executable */
        set_fs(USER_DS);                                /* set addr limit for new TASK_SIZE */
 }