-/* $OpenBSD: trap.c,v 1.87 2020/10/22 13:41:51 deraadt Exp $ */
+/* $OpenBSD: trap.c,v 1.88 2021/05/05 07:29:00 mpi Exp $ */
/* $NetBSD: trap.c,v 1.2 2003/05/04 23:51:56 fvdl Exp $ */
/*-
union sigval sv;
int signal, sicode, error;
- KERNEL_LOCK();
error = uvm_fault(&p->p_vmspace->vm_map, va, 0, access_type);
- KERNEL_UNLOCK();
-
if (error == 0) {
uvm_grow(p, va);
return 1;
if (curcpu()->ci_inatomic == 0 || map == kernel_map) {
onfault = pcb->pcb_onfault;
pcb->pcb_onfault = NULL;
- KERNEL_LOCK();
error = uvm_fault(map, va, 0, access_type);
- KERNEL_UNLOCK();
pcb->pcb_onfault = onfault;
if (error == 0 && map != kernel_map)
-/* $OpenBSD: trap.c,v 1.35 2021/01/25 19:37:18 kettenis Exp $ */
+/* $OpenBSD: trap.c,v 1.36 2021/05/05 07:29:00 mpi Exp $ */
/*-
* Copyright (c) 2014 Andrew Turner
* All rights reserved.
if (pmap_fault_fixup(map->pmap, va, access_type))
return;
- KERNEL_LOCK();
error = uvm_fault(map, va, 0, access_type);
- KERNEL_UNLOCK();
if (error == 0) {
uvm_grow(p, va);
/* Handle referenced/modified emulation */
if (!pmap_fault_fixup(map->pmap, va, access_type)) {
- KERNEL_LOCK();
error = uvm_fault(map, va, 0, access_type);
- KERNEL_UNLOCK();
if (error == 0 && map != kernel_map)
uvm_grow(p, va);
-/* $OpenBSD: trap.c,v 1.151 2020/10/27 19:17:12 deraadt Exp $ */
+/* $OpenBSD: trap.c,v 1.152 2021/05/05 07:29:01 mpi Exp $ */
/* $NetBSD: trap.c,v 1.95 1996/05/05 06:50:02 mycroft Exp $ */
/*-
union sigval sv;
int signal, sicode, error;
- KERNEL_LOCK();
error = uvm_fault(&p->p_vmspace->vm_map, va, 0, access_type);
- KERNEL_UNLOCK();
-
if (error == 0) {
uvm_grow(p, va);
return 1;
if (curcpu()->ci_inatomic == 0 || map == kernel_map) {
onfault = pcb->pcb_onfault;
pcb->pcb_onfault = NULL;
- KERNEL_LOCK();
error = uvm_fault(map, va, 0, access_type);
- KERNEL_UNLOCK();
pcb->pcb_onfault = onfault;
if (error == 0 && map != kernel_map)
-/* $OpenBSD: trap.c,v 1.119 2021/03/11 11:16:59 jsg Exp $ */
+/* $OpenBSD: trap.c,v 1.120 2021/05/05 07:29:01 mpi Exp $ */
/* $NetBSD: trap.c,v 1.3 1996/10/13 03:31:37 christos Exp $ */
/*
else
ftype = PROT_READ;
- KERNEL_LOCK();
error = uvm_fault(map, trunc_page(va), 0, ftype);
- KERNEL_UNLOCK();
if (error == 0)
return;
} else
vftype = ftype = PROT_READ;
- KERNEL_LOCK();
error = uvm_fault(&p->p_vmspace->vm_map,
trunc_page(frame->dar), 0, ftype);
- KERNEL_UNLOCK();
if (error == 0) {
uvm_grow(p, frame->dar);
ftype = PROT_READ | PROT_EXEC;
- KERNEL_LOCK();
error = uvm_fault(&p->p_vmspace->vm_map,
trunc_page(frame->srr0), 0, ftype);
- KERNEL_UNLOCK();
if (error == 0) {
uvm_grow(p, frame->srr0);
-/* $OpenBSD: trap.c,v 1.49 2021/01/09 13:14:02 kettenis Exp $ */
+/* $OpenBSD: trap.c,v 1.50 2021/05/05 07:29:01 mpi Exp $ */
/*
* Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org>
access_type = PROT_READ | PROT_WRITE;
else
access_type = PROT_READ;
- KERNEL_LOCK();
error = uvm_fault(map, trunc_page(va), 0, access_type);
- KERNEL_UNLOCK();
if (error == 0)
return;
access_type = PROT_READ | PROT_WRITE;
else
access_type = PROT_READ;
- KERNEL_LOCK();
error = uvm_fault(map, trunc_page(va), 0, access_type);
- KERNEL_UNLOCK();
if (error == 0)
uvm_grow(p, va);
map = &p->p_vmspace->vm_map;
va = frame->srr0;
access_type = PROT_READ | PROT_EXEC;
- KERNEL_LOCK();
error = uvm_fault(map, trunc_page(va), 0, access_type);
- KERNEL_UNLOCK();
if (error == 0)
uvm_grow(p, va);
-/* $OpenBSD: trap.c,v 1.108 2021/03/11 11:17:00 jsg Exp $ */
+/* $OpenBSD: trap.c,v 1.109 2021/05/05 07:29:01 mpi Exp $ */
/* $NetBSD: trap.c,v 1.73 2001/08/09 01:03:01 eeh Exp $ */
/*
if (!(addr & TLB_TAG_ACCESS_CTX)) {
/* CTXT == NUCLEUS */
- KERNEL_LOCK();
error = uvm_fault(kernel_map, va, 0, access_type);
- KERNEL_UNLOCK();
-
if (error == 0)
return;
goto kfault;
onfault = (vaddr_t)p->p_addr->u_pcb.pcb_onfault;
p->p_addr->u_pcb.pcb_onfault = NULL;
- KERNEL_LOCK();
error = uvm_fault(&p->p_vmspace->vm_map, (vaddr_t)va, 0, access_type);
- KERNEL_UNLOCK();
p->p_addr->u_pcb.pcb_onfault = (void *)onfault;
/*
uvm_map_inentry_sp, p->p_vmspace->vm_map.sserial))
goto out;
- KERNEL_LOCK();
error = uvm_fault(&p->p_vmspace->vm_map, va, 0, access_type);
- KERNEL_UNLOCK();
/*
* If this was a stack access we keep track of the maximum
uvm_map_inentry_sp, p->p_vmspace->vm_map.sserial))
goto out;
- KERNEL_LOCK();
error = uvm_fault(&p->p_vmspace->vm_map, va, 0, access_type);
- KERNEL_UNLOCK();
/*
* If this was a stack access we keep track of the maximum