MIPS: non-exec stack & heap when non-exec PT_GNU_STACK is present
[deliverable/linux.git] / arch / mips / kernel / vdso.c
index 54e1663ce639ba156267d7d87db085008aa64fc4..9abe447a4b480a8254633fd1afa9f3f7dbac319e 100644 (file)
@@ -107,6 +107,16 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
        if (down_write_killable(&mm->mmap_sem))
                return -EINTR;
 
+       /* Map delay slot emulation page */
+       base = mmap_region(NULL, STACK_TOP, PAGE_SIZE,
+                          VM_READ|VM_WRITE|VM_EXEC|
+                          VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC,
+                          0);
+       if (IS_ERR_VALUE(base)) {
+               ret = base;
+               goto out;
+       }
+
        /*
         * Determine total area size. This includes the VDSO data itself, the
         * data page, and the GIC user page if present. Always create a mapping
This page took 0.025282 seconds and 5 git commands to generate.