diff options
author | 2015-06-05 16:59:10 +0000 | |
---|---|---|
committer | 2015-06-05 16:59:10 +0000 | |
commit | 7dff4b537a3bfc9e1b67b40aab296bb2f2db377e (patch) | |
tree | eb7c26bfe9132bfea0b24aeeaad0a89d5fe0ae14 | |
parent | these days, curproc is never NULL, so skip those checks. (diff) | |
download | wireguard-openbsd-7dff4b537a3bfc9e1b67b40aab296bb2f2db377e.tar.xz wireguard-openbsd-7dff4b537a3bfc9e1b67b40aab296bb2f2db377e.zip |
Do not unconditionally clear pcb_onfault after a uvm_fault. That will
permit the active copyout/copyin to continue work on subsequent faulting
pages and not misinterpret & fault them as kernel bcopy against userland
addresses. Old bug -- fall of 1996. This should fix getentropy issues
on MP systems which have become more apparent recently, probably due to
some combo of increased ASLR with unlocked getentropy happening very soon
after vfork/fork...
ok miod
-rw-r--r-- | sys/arch/alpha/alpha/trap.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/arch/alpha/alpha/trap.c b/sys/arch/alpha/alpha/trap.c index 3efaeba90f4..fd8423d3d74 100644 --- a/sys/arch/alpha/alpha/trap.c +++ b/sys/arch/alpha/alpha/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.78 2015/06/05 16:45:24 deraadt Exp $ */ +/* $OpenBSD: trap.c,v 1.79 2015/06/05 16:59:10 deraadt Exp $ */ /* $NetBSD: trap.c,v 1.52 2000/05/24 16:48:33 thorpej Exp $ */ /*- @@ -448,7 +448,6 @@ do_fault: if (p->p_addr->u_pcb.pcb_onfault != 0) { framep->tf_regs[FRAME_PC] = p->p_addr->u_pcb.pcb_onfault; - p->p_addr->u_pcb.pcb_onfault = 0; KERNEL_UNLOCK(); goto out; } |