Date: Thu, 13 Oct 2011 16:16:46 +0000 (UTC) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r226342 - head/sys/kern Message-ID: <201110131616.p9DGGk02022789@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marcel Date: Thu Oct 13 16:16:46 2011 New Revision: 226342 URL: http://svn.freebsd.org/changeset/base/226342 Log: In elf32_trans_prot() and when compiling for amd64 or ia64, add PROT_EXECUTE when PROT_READ is needed. By default i386 allows execution when reading is allowed and JDK 1.4.x depends on that. Modified: head/sys/kern/imgact_elf.c Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Thu Oct 13 14:20:27 2011 (r226341) +++ head/sys/kern/imgact_elf.c Thu Oct 13 16:16:46 2011 (r226342) @@ -1664,6 +1664,12 @@ __elfN(trans_prot)(Elf_Word flags) prot |= VM_PROT_WRITE; if (flags & PF_R) prot |= VM_PROT_READ; +#if __ELF_WORD_SIZE == 32 +#if defined(__amd64__) || defined(__ia64__) + if (flags & PF_R) + prot |= VM_PROT_EXECUTE; +#endif +#endif return (prot); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110131616.p9DGGk02022789>