summaryrefslogtreecommitdiffstats
path: root/sys/compat/svr4
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2005-04-01 20:00:11 +0000
committerjhb <jhb@FreeBSD.org>2005-04-01 20:00:11 +0000
commita3c6b782c3ed4abd939e54896eed4b89f4d18d21 (patch)
treec33b91d98e8867bbb1f42b28ab23638d2003f368 /sys/compat/svr4
parent9683bbdf3f053a2b65d3ac11aac7a2eec86c559b (diff)
downloadFreeBSD-src-a3c6b782c3ed4abd939e54896eed4b89f4d18d21.zip
FreeBSD-src-a3c6b782c3ed4abd939e54896eed4b89f4d18d21.tar.gz
- Change the vm_mmap() function to accept an objtype_t parameter specifying
the type of object represented by the handle argument. - Allow vm_mmap() to map device memory via cdev objects in addition to vnodes and anonymous memory. Note that mmaping a cdev directly does not currently perform any MAC checks like mapping a vnode does. - Unbreak the DRM getbufs ioctl by having it call vm_mmap() directly on the cdev the ioctl is acting on rather than trying to find a suitable vnode to map from. Reviewed by: alc, arch@
Diffstat (limited to 'sys/compat/svr4')
-rw-r--r--sys/compat/svr4/imgact_svr4.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/compat/svr4/imgact_svr4.c b/sys/compat/svr4/imgact_svr4.c
index 39eeb99..4c71020 100644
--- a/sys/compat/svr4/imgact_svr4.c
+++ b/sys/compat/svr4/imgact_svr4.c
@@ -145,7 +145,7 @@ exec_svr4_imgact(imgp)
error = vm_mmap(kernel_map, &buffer,
round_page(a_out->a_text + a_out->a_data + file_offset),
VM_PROT_READ, VM_PROT_READ, 0,
- (caddr_t) imgp->vp, trunc_page(file_offset));
+ OBJT_VNODE, imgp->vp, trunc_page(file_offset));
if (error)
goto fail;
@@ -182,7 +182,7 @@ exec_svr4_imgact(imgp)
VM_PROT_READ | VM_PROT_EXECUTE,
VM_PROT_ALL,
MAP_PRIVATE | MAP_FIXED,
- (caddr_t)imgp->vp, file_offset);
+ OBJT_VNODE, imgp->vp, file_offset);
if (error)
goto fail;
OpenPOWER on IntegriCloud