Don't permit DRM buffer mappings to be upgraded to executable.
Reviewed by: kib MFC after: 1 month Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D26697
This commit is contained in:
parent
71506b21d8
commit
e238a70cd7
@ -1635,14 +1635,12 @@ int drm_mapbufs(struct drm_device *dev, void *data,
|
||||
goto done;
|
||||
}
|
||||
retcode = vm_mmap(&vms->vm_map, &virtual, map->size,
|
||||
VM_PROT_READ | VM_PROT_WRITE, VM_PROT_ALL,
|
||||
MAP_SHARED | MAP_NOSYNC, OBJT_DEVICE,
|
||||
file_priv->minor->device, token);
|
||||
VM_PROT_RW, VM_PROT_RW, MAP_SHARED | MAP_NOSYNC,
|
||||
OBJT_DEVICE, file_priv->minor->device, token);
|
||||
} else {
|
||||
retcode = vm_mmap(&vms->vm_map, &virtual, dma->byte_count,
|
||||
VM_PROT_READ | VM_PROT_WRITE, VM_PROT_ALL,
|
||||
MAP_SHARED | MAP_NOSYNC, OBJT_DEVICE,
|
||||
file_priv->minor->device, 0);
|
||||
VM_PROT_RW, VM_PROT_RW, MAP_SHARED | MAP_NOSYNC,
|
||||
OBJT_DEVICE, file_priv->minor->device, 0);
|
||||
}
|
||||
if (retcode) {
|
||||
/* Real error */
|
||||
|
Loading…
Reference in New Issue
Block a user