lkml.org 
[lkml]   [2004]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: serious performance regression due to NX patch

On Sun, 11 Jul 2004, Ingo Molnar wrote:

> > ok, agreed. I'll check that it still does the right thing on x86.
>
> it doesnt seem to do the right thing for !PT_GNU_STACK applications on
> x86:

how about the patch below? This way we recognize the fact that x86 didnt
have any executability check previously at the point where we discover
that it's a 'legacy' binary.

Ingo

--- linux/fs/binfmt_elf.c.orig3
+++ linux/fs/binfmt_elf.c
@@ -627,8 +627,14 @@ static int load_elf_binary(struct linux_
executable_stack = EXSTACK_DISABLE_X;
break;
}
+#ifdef __i386_
+ /*
+ * Legacy x86 binaries have an expectation of executability for
+ * virtually all their address-space - turn executability on:
+ */
if (i == elf_ex.e_phnum)
def_flags |= VM_EXEC | VM_MAYEXEC;
+#endif

/* Some simple consistency checks for the interpreter */
if (elf_interpreter) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:04    [W:0.687 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site