Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern In execve1(), don't assume VM_MIN_ADDRESS is 0 for ...
details: https://anonhg.NetBSD.org/src/rev/a94fb8ede4fe
branches: trunk
changeset: 768810:a94fb8ede4fe
user: reinoud <reinoud%NetBSD.org@localhost>
date: Sat Aug 27 17:53:21 2011 +0000
description:
In execve1(), don't assume VM_MIN_ADDRESS is 0 for PIE executables.
diffstat:
sys/kern/exec_elf.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r 7e255ef2011a -r a94fb8ede4fe sys/kern/exec_elf.c
--- a/sys/kern/exec_elf.c Sat Aug 27 17:51:38 2011 +0000
+++ b/sys/kern/exec_elf.c Sat Aug 27 17:53:21 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exec_elf.c,v 1.31 2011/08/02 16:44:01 christos Exp $ */
+/* $NetBSD: exec_elf.c,v 1.32 2011/08/27 17:53:21 reinoud Exp $ */
/*-
* Copyright (c) 1994, 2000, 2005 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.31 2011/08/02 16:44:01 christos Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.32 2011/08/27 17:53:21 reinoud Exp $");
#ifdef _KERNEL_OPT
#include "opt_pax.h"
@@ -152,6 +152,8 @@
#endif /* PAX_ASLR */
offset = MAX(align, PAGE_SIZE);
+ offset += epp->ep_vm_minaddr;
+
for (i = 0; i < eh->e_phnum; i++)
ph[i].p_vaddr += offset;
eh->e_entry += offset;
Home |
Main Index |
Thread Index |
Old Index