diff options
author | jhb <jhb@FreeBSD.org> | 2005-04-01 20:00:11 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2005-04-01 20:00:11 +0000 |
commit | a3c6b782c3ed4abd939e54896eed4b89f4d18d21 (patch) | |
tree | c33b91d98e8867bbb1f42b28ab23638d2003f368 /sys/i386/linux/imgact_linux.c | |
parent | 9683bbdf3f053a2b65d3ac11aac7a2eec86c559b (diff) | |
download | FreeBSD-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/i386/linux/imgact_linux.c')
-rw-r--r-- | sys/i386/linux/imgact_linux.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/i386/linux/imgact_linux.c b/sys/i386/linux/imgact_linux.c index 50e40bf..cfc28e9 100644 --- a/sys/i386/linux/imgact_linux.c +++ b/sys/i386/linux/imgact_linux.c @@ -143,8 +143,8 @@ exec_linux_imgact(struct image_params *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)); + VM_PROT_READ, VM_PROT_READ, 0, OBJT_VNODE, + imgp->vp, trunc_page(file_offset)); if (error) goto fail; @@ -181,7 +181,8 @@ exec_linux_imgact(struct image_params *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; |