Date: Sat, 9 Feb 2019 03:56:48 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343929 - head/sys/vm Message-ID: <201902090356.x193umxU047998@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Sat Feb 9 03:56:48 2019 New Revision: 343929 URL: https://svnweb.freebsd.org/changeset/base/343929 Log: i386: honor kern.elf32.read_exec for ommap(2) and break(2), as already done on amd64. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/vm_mmap.c head/sys/vm/vm_unix.c Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Sat Feb 9 03:51:51 2019 (r343928) +++ head/sys/vm/vm_mmap.c Sat Feb 9 03:56:48 2019 (r343929) @@ -414,12 +414,10 @@ ommap(struct thread *td, struct ommap_args *uap) #define OMAP_FIXED 0x0100 prot = cvtbsdprot[uap->prot & 0x7]; -#ifdef COMPAT_FREEBSD32 -#if defined(__amd64__) +#if (defined(COMPAT_FREEBSD32) && defined(__amd64__)) || defined(__i386__) if (i386_read_exec && SV_PROC_FLAG(td->td_proc, SV_ILP32) && prot != 0) prot |= PROT_EXEC; -#endif #endif flags = 0; if (uap->flags & OMAP_ANON) Modified: head/sys/vm/vm_unix.c ============================================================================== --- head/sys/vm/vm_unix.c Sat Feb 9 03:51:51 2019 (r343928) +++ head/sys/vm/vm_unix.c Sat Feb 9 03:56:48 2019 (r343929) @@ -180,11 +180,9 @@ kern_break(struct thread *td, uintptr_t *addr) } #endif prot = VM_PROT_RW; -#ifdef COMPAT_FREEBSD32 -#if defined(__amd64__) +#if (defined(COMPAT_FREEBSD32) && defined(__amd64__)) || defined(__i386__) if (i386_read_exec && SV_PROC_FLAG(td->td_proc, SV_ILP32)) prot |= VM_PROT_EXECUTE; -#endif #endif rv = vm_map_insert(map, NULL, 0, old, new, prot, VM_PROT_ALL, 0); if (rv != KERN_SUCCESS) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902090356.x193umxU047998>