[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8764ax8oz3.wl@betelheise.deep.net>
Date: Tue, 23 Jan 2007 23:31:12 +0300
From: Samium Gromoff <_deepfire@...lingofgreen.ru>
To: Alan <alan@...rguk.ukuu.org.uk>
Cc: Samium Gromoff <_deepfire@...lingofgreen.ru>,
Pavel Machek <pavel@....cz>, Valdis.Kletnieks@...edu,
David Wagner <daw@...berkeley.edu>,
linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] Make the EF_AS_NO_RANDOM e_flag bit disable PF_RANDOMIZE
Author: Samium Gromoff <deepfire@...elheise.deep.net>
Date: Tue Jan 23 23:12:16 2007 +0300
load_elf_binary: do not set PF_RANDOMIZE if the ELF file has EF_AS_NO_RANDOM s
et
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 7cb2872..007dedd 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -780,7 +780,8 @@ static int load_elf_binary(struct linux_binprm *bprm, struct p
t_regs *regs)
if (elf_read_implies_exec(loc->elf_ex, executable_stack))
current->personality |= READ_IMPLIES_EXEC;
- if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space)
+ if (!(current->personality & ADDR_NO_RANDOMIZE) &&
+ !(loc->elf_ex.e_flags & EF_AS_NO_RANDOM) && randomize_va_space)
current->flags |= PF_RANDOMIZE;
arch_pick_mmap_layout(current->mm);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists