Handle write page faults (both write only or read-modify-write) as MI vm
write-only faults. This would allow write-only mmapped regions to function correctly.
This commit is contained in:
parent
b79fdb86f6
commit
c3d52a9a3e
@ -634,7 +634,7 @@ trap_pfault(frame, usermode, eva)
|
||||
struct proc *p = curproc;
|
||||
|
||||
if (frame->tf_err & PGEX_W)
|
||||
ftype = VM_PROT_READ | VM_PROT_WRITE;
|
||||
ftype = VM_PROT_WRITE;
|
||||
else
|
||||
ftype = VM_PROT_READ;
|
||||
|
||||
@ -772,7 +772,7 @@ trap_pfault(frame, usermode, eva)
|
||||
}
|
||||
|
||||
if (frame->tf_err & PGEX_W)
|
||||
ftype = VM_PROT_READ | VM_PROT_WRITE;
|
||||
ftype = VM_PROT_WRITE;
|
||||
else
|
||||
ftype = VM_PROT_READ;
|
||||
|
||||
@ -993,7 +993,7 @@ int trapwrite(addr)
|
||||
/*
|
||||
* fault the data page
|
||||
*/
|
||||
rv = vm_fault(&vm->vm_map, va, VM_PROT_READ|VM_PROT_WRITE, VM_FAULT_DIRTY);
|
||||
rv = vm_fault(&vm->vm_map, va, VM_PROT_WRITE, VM_FAULT_DIRTY);
|
||||
|
||||
--p->p_lock;
|
||||
|
||||
|
@ -634,7 +634,7 @@ trap_pfault(frame, usermode, eva)
|
||||
struct proc *p = curproc;
|
||||
|
||||
if (frame->tf_err & PGEX_W)
|
||||
ftype = VM_PROT_READ | VM_PROT_WRITE;
|
||||
ftype = VM_PROT_WRITE;
|
||||
else
|
||||
ftype = VM_PROT_READ;
|
||||
|
||||
@ -772,7 +772,7 @@ trap_pfault(frame, usermode, eva)
|
||||
}
|
||||
|
||||
if (frame->tf_err & PGEX_W)
|
||||
ftype = VM_PROT_READ | VM_PROT_WRITE;
|
||||
ftype = VM_PROT_WRITE;
|
||||
else
|
||||
ftype = VM_PROT_READ;
|
||||
|
||||
@ -993,7 +993,7 @@ int trapwrite(addr)
|
||||
/*
|
||||
* fault the data page
|
||||
*/
|
||||
rv = vm_fault(&vm->vm_map, va, VM_PROT_READ|VM_PROT_WRITE, VM_FAULT_DIRTY);
|
||||
rv = vm_fault(&vm->vm_map, va, VM_PROT_WRITE, VM_FAULT_DIRTY);
|
||||
|
||||
--p->p_lock;
|
||||
|
||||
|
@ -634,7 +634,7 @@ trap_pfault(frame, usermode, eva)
|
||||
struct proc *p = curproc;
|
||||
|
||||
if (frame->tf_err & PGEX_W)
|
||||
ftype = VM_PROT_READ | VM_PROT_WRITE;
|
||||
ftype = VM_PROT_WRITE;
|
||||
else
|
||||
ftype = VM_PROT_READ;
|
||||
|
||||
@ -772,7 +772,7 @@ trap_pfault(frame, usermode, eva)
|
||||
}
|
||||
|
||||
if (frame->tf_err & PGEX_W)
|
||||
ftype = VM_PROT_READ | VM_PROT_WRITE;
|
||||
ftype = VM_PROT_WRITE;
|
||||
else
|
||||
ftype = VM_PROT_READ;
|
||||
|
||||
@ -993,7 +993,7 @@ int trapwrite(addr)
|
||||
/*
|
||||
* fault the data page
|
||||
*/
|
||||
rv = vm_fault(&vm->vm_map, va, VM_PROT_READ|VM_PROT_WRITE, VM_FAULT_DIRTY);
|
||||
rv = vm_fault(&vm->vm_map, va, VM_PROT_WRITE, VM_FAULT_DIRTY);
|
||||
|
||||
--p->p_lock;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user