lkml.org 
[lkml]   [2004]   [Jul]   [13]   [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 Mon, 12 Jul 2004, Linus Torvalds wrote:

    > > so ... this should be #ifndef ia64?
    >
    > No. Make it a CONFIG_DEFAULT_NOEXEC and make the relevant architectures do
    > a
    >
    > define_bool DEFAULT_NOEXEC y
    >
    > in their Kconfig files.
    >
    > In general, we should _never_ use an architecture-define. They just
    > always end up becoming more and more hairy, and less and less obvious
    > what they are all about.
    >
    > So instead, make a readable and explicit config define, and let each
    > architecture just set it (or not) as they wish.

    ok - patch below. ia64 can now define it - the default is that legacy
    binaries have executability expectations.

    Ingo

    --- linux/fs/binfmt_elf.c.orig
    +++ linux/fs/binfmt_elf.c
    @@ -627,8 +627,14 @@ static int load_elf_binary(struct linux_
    executable_stack = EXSTACK_DISABLE_X;
    break;
    }
    +#ifndef CONFIG_DEFAULT_NOEXEC
    + /*
    + * Legacy binaries (unless the arch defaults to noexec) have an
    + * expectation of executability - turn it 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:2.746 / U:0.612 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site