summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2011-10-13 18:18:42 +0000
committermarcel <marcel@FreeBSD.org>2011-10-13 18:18:42 +0000
commitd23bcad30d6038847dc53cef491968645978ba26 (patch)
tree928eb836f8fbc04c066eb7149ea20468425054ff /sys/compat
parent411bc9d083339d566eea659757c208aa9cd4321d (diff)
downloadFreeBSD-src-d23bcad30d6038847dc53cef491968645978ba26.zip
FreeBSD-src-d23bcad30d6038847dc53cef491968645978ba26.tar.gz
In freebsd32_mmap() and when compiling for amd64 or ia64, also
ask for execute permissions when read permissions are wanted. This is needed for JDK 1.4.x on i386.
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/freebsd32/freebsd32_misc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c
index 6d28715..ae80ef2 100644
--- a/sys/compat/freebsd32/freebsd32_misc.c
+++ b/sys/compat/freebsd32/freebsd32_misc.c
@@ -520,6 +520,11 @@ freebsd32_mmap(struct thread *td, struct freebsd32_mmap_args *uap)
}
#endif
+#if defined(__amd64__) || defined(__ia64__)
+ if (prot & PROT_READ)
+ prot |= PROT_EXEC;
+#endif
+
ap.addr = (void *) addr;
ap.len = len;
ap.prot = prot;
OpenPOWER on IntegriCloud