From cee82bbafaf85b8e4bf9d871225b07cd41a62d53 Mon Sep 17 00:00:00 2001 From: ad Date: Tue, 3 Jun 2008 22:15:14 +0000 Subject: [PATCH] Don't use proc specificdata for the PAX stuff. Speeds up mmap() and others. --- sys/kern/exec_elf32.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/kern/exec_elf32.c b/sys/kern/exec_elf32.c index c9f0e11d3ec8..8eb65c931ddc 100644 --- a/sys/kern/exec_elf32.c +++ b/sys/kern/exec_elf32.c @@ -1,4 +1,4 @@ -/* $NetBSD: exec_elf32.c,v 1.133 2008/04/28 20:24:02 martin Exp $ */ +/* $NetBSD: exec_elf32.c,v 1.134 2008/06/03 22:15:14 ad Exp $ */ /*- * Copyright (c) 1994, 2000, 2005 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ */ #include -__KERNEL_RCSID(1, "$NetBSD: exec_elf32.c,v 1.133 2008/04/28 20:24:02 martin Exp $"); +__KERNEL_RCSID(1, "$NetBSD: exec_elf32.c,v 1.134 2008/06/03 22:15:14 ad Exp $"); /* If not included by exec_elf64.c, ELFSIZE won't be defined. */ #ifndef ELFSIZE @@ -716,8 +716,7 @@ exec_elf_makecmds(struct lwp *l, struct exec_package *epp) } #if defined(PAX_MPROTECT) || defined(PAX_SEGVGUARD) || defined(PAX_ASLR) - if (epp->ep_pax_flags) - pax_adjust(l, epp->ep_pax_flags); + p->p_pax = epp->ep_pax_flags; #endif /* PAX_MPROTECT || PAX_SEGVGUARD || PAX_ASLR */ #ifdef PAX_ASLR