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
This commit is contained in:
parent
32c9348f1f
commit
d0cb5e667f
@ -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)
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user