lkml.org 
[lkml]   [2007]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 2/2] Make the EF_AS_NO_RANDOM e_flag bit disable PF_RANDOMIZE
Author: Samium Gromoff <deepfire@betelheise.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@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: 2007-01-23 22:13    [W:0.084 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site