Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933125AbXAWUbQ (ORCPT ); Tue, 23 Jan 2007 15:31:16 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933116AbXAWUbP (ORCPT ); Tue, 23 Jan 2007 15:31:15 -0500 Received: from 69-100-st.zelcom.ru ([80.92.100.69]:1494 "EHLO etherstorm.feelingofgreen.ru" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S933125AbXAWUbO (ORCPT ); Tue, 23 Jan 2007 15:31:14 -0500 Date: Tue, 23 Jan 2007 23:31:12 +0300 Message-ID: <8764ax8oz3.wl@betelheise.deep.net> From: Samium Gromoff <_deepfire@feelingofgreen.ru> To: Alan Cc: Samium Gromoff <_deepfire@feelingofgreen.ru>, Pavel Machek , Valdis.Kletnieks@vt.edu, David Wagner , linux-kernel@vger.kernel.org Subject: [PATCH 2/2] Make the EF_AS_NO_RANDOM e_flag bit disable PF_RANDOMIZE In-Reply-To: <20070123154127.57059632@localhost.localdomain> References: <87r6toufpp.wl@betelheise.deep.net> <200701221520.l0MFKLdK032645@turing-police.cc.vt.edu> <871wlnq7ue.wl@betelheise.deep.net> <20070123084805.GB5560@ucw.cz> <87mz4996wg.wl@betelheise.deep.net> <20070123154127.57059632@localhost.localdomain> User-Agent: Wanderlust/2.15.5 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/23.0.51 (i486-pc-linux-gnu) MULE/5.0 (SAKAKI) X-Face: "P-:w!.&Hdk.h~~pT`!Q%H6;/8Cce^m&%vIn"W-SXb4h88dCgwD\_}N5:\}lowY2gxg0u^wVO*L\$C@MvBDRTmh/=,468w{W{OTc$kfq5O9Y!`pd+N}SMHrN+Gs>jXe5}}EL`cRbc0^_0cZ-}M\b~55I;Qe$1uL8M`M`82<_%CQ(GwLk."M>zBLn:-u>n,$kjH`~Uo[pH`08#\G!GVMd`%7![m9]*w5PMts4@m>=;lX41Z90N MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1076 Lines: 25 Author: Samium Gromoff 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/