svn commit: r340660 - in stable/11/sys: kern vm
Mark Johnston
markj at FreeBSD.org
Tue Nov 20 01:12:22 UTC 2018
Author: markj
Date: Tue Nov 20 01:12:21 2018
New Revision: 340660
URL: https://svnweb.freebsd.org/changeset/base/340660
Log:
MFC r340205:
Avoid specifying VM_PROT_EXECUTE in mappings from pipe_map and exec_map.
Modified:
stable/11/sys/kern/sys_pipe.c
stable/11/sys/vm/vm_kern.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/kern/sys_pipe.c
==============================================================================
--- stable/11/sys/kern/sys_pipe.c Tue Nov 20 00:56:54 2018 (r340659)
+++ stable/11/sys/kern/sys_pipe.c Tue Nov 20 01:12:21 2018 (r340660)
@@ -511,9 +511,8 @@ retry:
size = round_page(size);
buffer = (caddr_t) vm_map_min(pipe_map);
- error = vm_map_find(pipe_map, NULL, 0,
- (vm_offset_t *) &buffer, size, 0, VMFS_ANY_SPACE,
- VM_PROT_ALL, VM_PROT_ALL, 0);
+ error = vm_map_find(pipe_map, NULL, 0, (vm_offset_t *)&buffer, size, 0,
+ VMFS_ANY_SPACE, VM_PROT_RW, VM_PROT_RW, 0);
if (error != KERN_SUCCESS) {
if ((cpipe->pipe_buffer.buffer == NULL) &&
(size > SMALL_PIPE_SIZE)) {
Modified: stable/11/sys/vm/vm_kern.c
==============================================================================
--- stable/11/sys/vm/vm_kern.c Tue Nov 20 00:56:54 2018 (r340659)
+++ stable/11/sys/vm/vm_kern.c Tue Nov 20 01:12:21 2018 (r340660)
@@ -461,8 +461,8 @@ kmap_alloc_wait(vm_map_t map, vm_size_t size)
map->needs_wakeup = TRUE;
vm_map_unlock_and_wait(map, 0);
}
- vm_map_insert(map, NULL, 0, addr, addr + size, VM_PROT_ALL,
- VM_PROT_ALL, MAP_ACC_CHARGED);
+ vm_map_insert(map, NULL, 0, addr, addr + size, VM_PROT_RW, VM_PROT_RW,
+ MAP_ACC_CHARGED);
vm_map_unlock(map);
return (addr);
}
More information about the svn-src-all
mailing list