summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-08-05 07:04:33 +0000
committerphk <phk@FreeBSD.org>2004-08-05 07:04:33 +0000
commit007ee2473b3618941df647e0881184059ae8800b (patch)
treeedb7e92a1f5102b373f9612c27f4928bd59bab91 /sys/vm
parent562235ab9797faabe4696ea9b435010730825dc3 (diff)
downloadFreeBSD-src-007ee2473b3618941df647e0881184059ae8800b.zip
FreeBSD-src-007ee2473b3618941df647e0881184059ae8800b.tar.gz
Remove a product specific workaround for wrong modes when mmap(2)'ing
devices. They have had plenty of time to adjust now.
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_mmap.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c
index c44ebb6..4487986 100644
--- a/sys/vm/vm_mmap.c
+++ b/sys/vm/vm_mmap.c
@@ -1071,7 +1071,7 @@ vm_mmap_vnode(struct thread *td, vm_size_t objsize,
struct vattr va;
void *handle;
vm_object_t obj;
- int disablexworkaround, error, flags, type;
+ int error, flags, type;
mtx_lock(&Giant);
if ((error = vget(vp, LK_EXCLUSIVE, td)) != 0) {
@@ -1112,20 +1112,7 @@ vm_mmap_vnode(struct thread *td, vm_size_t objsize,
error = EACCES;
goto done;
}
- /*
- * However, for XIG X server to continue to work,
- * we should allow the superuser to do it anyway.
- * We only allow it at securelevel < 1.
- * (Because the XIG X server writes directly to video
- * memory via /dev/mem, it should never work at any
- * other securelevel.
- * XXX this will have to go
- */
- if (securelevel_ge(td->td_ucred, 1))
- disablexworkaround = 1;
- else
- disablexworkaround = suser(td);
- if (disablexworkaround && (flags & (MAP_PRIVATE|MAP_COPY))) {
+ if (flags & (MAP_PRIVATE|MAP_COPY)) {
error = EINVAL;
goto done;
}
OpenPOWER on IntegriCloud