clrnd()/clbase() discarding.
This commit is contained in:
parent
93d3beb3f1
commit
26e1b45757
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: trap.c,v 1.71 1999/09/25 21:47:05 is Exp $ */
|
/* $NetBSD: trap.c,v 1.72 1999/12/05 11:56:30 ragge Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988 University of Utah.
|
* Copyright (c) 1988 University of Utah.
|
||||||
@ -403,7 +403,7 @@ trapmmufault(type, code, v, fp, p, sticks)
|
|||||||
*/
|
*/
|
||||||
nss = 0;
|
nss = 0;
|
||||||
if (map != kernel_map && (caddr_t)va >= vm->vm_maxsaddr) {
|
if (map != kernel_map && (caddr_t)va >= vm->vm_maxsaddr) {
|
||||||
nss = clrnd(btoc(USRSTACK - (unsigned)va));
|
nss = btoc(USRSTACK - (unsigned)va);
|
||||||
if (nss > btoc(p->p_rlimit[RLIMIT_STACK].rlim_cur)) {
|
if (nss > btoc(p->p_rlimit[RLIMIT_STACK].rlim_cur)) {
|
||||||
rv = KERN_FAILURE;
|
rv = KERN_FAILURE;
|
||||||
goto nogo;
|
goto nogo;
|
||||||
@ -493,7 +493,7 @@ trapmmufault(type, code, v, fp, p, sticks)
|
|||||||
*/
|
*/
|
||||||
if (map != kernel_map && (caddr_t)va >= vm->vm_maxsaddr) {
|
if (map != kernel_map && (caddr_t)va >= vm->vm_maxsaddr) {
|
||||||
if (rv == KERN_SUCCESS) {
|
if (rv == KERN_SUCCESS) {
|
||||||
nss = clrnd(btoc(USRSTACK-(unsigned)va));
|
nss = btoc(USRSTACK-(unsigned)va);
|
||||||
if (nss > vm->vm_ssize)
|
if (nss > vm->vm_ssize)
|
||||||
vm->vm_ssize = nss;
|
vm->vm_ssize = nss;
|
||||||
} else if (rv == KERN_PROTECTION_FAILURE)
|
} else if (rv == KERN_PROTECTION_FAILURE)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: trap.c,v 1.46 1999/11/13 00:30:30 thorpej Exp $ */
|
/* $NetBSD: trap.c,v 1.47 1999/12/05 11:56:31 ragge Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988 University of Utah.
|
* Copyright (c) 1988 University of Utah.
|
||||||
@ -644,7 +644,7 @@ trap(type, code, v, frame)
|
|||||||
if (rv == KERN_SUCCESS) {
|
if (rv == KERN_SUCCESS) {
|
||||||
unsigned nss;
|
unsigned nss;
|
||||||
|
|
||||||
nss = clrnd(btoc(USRSTACK-(unsigned)va));
|
nss = btoc(USRSTACK-(unsigned)va);
|
||||||
if (nss > vm->vm_ssize)
|
if (nss > vm->vm_ssize)
|
||||||
vm->vm_ssize = nss;
|
vm->vm_ssize = nss;
|
||||||
} else if (rv == KERN_PROTECTION_FAILURE)
|
} else if (rv == KERN_PROTECTION_FAILURE)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: trap.c,v 1.74 1999/11/13 00:30:33 thorpej Exp $ */
|
/* $NetBSD: trap.c,v 1.75 1999/12/05 11:56:32 ragge Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988 University of Utah.
|
* Copyright (c) 1988 University of Utah.
|
||||||
@ -642,7 +642,7 @@ trap(type, code, v, frame)
|
|||||||
if (rv == KERN_SUCCESS) {
|
if (rv == KERN_SUCCESS) {
|
||||||
unsigned nss;
|
unsigned nss;
|
||||||
|
|
||||||
nss = clrnd(btoc(USRSTACK-(unsigned)va));
|
nss = btoc(USRSTACK-(unsigned)va);
|
||||||
if (nss > vm->vm_ssize)
|
if (nss > vm->vm_ssize)
|
||||||
vm->vm_ssize = nss;
|
vm->vm_ssize = nss;
|
||||||
} else if (rv == KERN_PROTECTION_FAILURE)
|
} else if (rv == KERN_PROTECTION_FAILURE)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: trap.c,v 1.76 1999/11/13 00:30:37 thorpej Exp $ */
|
/* $NetBSD: trap.c,v 1.77 1999/12/05 11:56:32 ragge Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988 University of Utah.
|
* Copyright (c) 1988 University of Utah.
|
||||||
@ -613,7 +613,7 @@ copyfault:
|
|||||||
if (rv == KERN_SUCCESS) {
|
if (rv == KERN_SUCCESS) {
|
||||||
u_int nss;
|
u_int nss;
|
||||||
|
|
||||||
nss = clrnd(btoc(USRSTACK - (u_int)va));
|
nss = btoc(USRSTACK - (u_int)va);
|
||||||
if (nss > vm->vm_ssize)
|
if (nss > vm->vm_ssize)
|
||||||
vm->vm_ssize = nss;
|
vm->vm_ssize = nss;
|
||||||
} else if (rv == KERN_PROTECTION_FAILURE)
|
} else if (rv == KERN_PROTECTION_FAILURE)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: trap.c,v 1.34 1999/11/13 00:30:40 thorpej Exp $ */
|
/* $NetBSD: trap.c,v 1.35 1999/12/05 11:56:33 ragge Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988 University of Utah.
|
* Copyright (c) 1988 University of Utah.
|
||||||
@ -643,7 +643,7 @@ trap(type, code, v, frame)
|
|||||||
if (rv == KERN_SUCCESS) {
|
if (rv == KERN_SUCCESS) {
|
||||||
unsigned nss;
|
unsigned nss;
|
||||||
|
|
||||||
nss = clrnd(btoc(USRSTACK-(unsigned)va));
|
nss = btoc(USRSTACK-(unsigned)va);
|
||||||
if (nss > vm->vm_ssize)
|
if (nss > vm->vm_ssize)
|
||||||
vm->vm_ssize = nss;
|
vm->vm_ssize = nss;
|
||||||
} else if (rv == KERN_PROTECTION_FAILURE)
|
} else if (rv == KERN_PROTECTION_FAILURE)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: trap.c,v 1.18 1999/11/13 00:30:41 thorpej Exp $ */
|
/* $NetBSD: trap.c,v 1.19 1999/12/05 11:56:33 ragge Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This file was taken from mvme68k/mvme68k/trap.c
|
* This file was taken from mvme68k/mvme68k/trap.c
|
||||||
@ -650,7 +650,7 @@ trap(type, code, v, frame)
|
|||||||
if (rv == KERN_SUCCESS) {
|
if (rv == KERN_SUCCESS) {
|
||||||
unsigned nss;
|
unsigned nss;
|
||||||
|
|
||||||
nss = clrnd(btoc(USRSTACK-(unsigned)va));
|
nss = btoc(USRSTACK-(unsigned)va);
|
||||||
if (nss > vm->vm_ssize)
|
if (nss > vm->vm_ssize)
|
||||||
vm->vm_ssize = nss;
|
vm->vm_ssize = nss;
|
||||||
} else if (rv == KERN_PROTECTION_FAILURE)
|
} else if (rv == KERN_PROTECTION_FAILURE)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: trap.c,v 1.36 1999/06/17 00:22:43 thorpej Exp $ */
|
/* $NetBSD: trap.c,v 1.37 1999/12/05 11:56:34 ragge Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1996 Matthias Pfaller. All rights reserved.
|
* Copyright (c) 1996 Matthias Pfaller. All rights reserved.
|
||||||
@ -401,7 +401,7 @@ trap(frame)
|
|||||||
if ((caddr_t)va >= vm->vm_maxsaddr
|
if ((caddr_t)va >= vm->vm_maxsaddr
|
||||||
&& (caddr_t)va < (caddr_t)VM_MAXUSER_ADDRESS
|
&& (caddr_t)va < (caddr_t)VM_MAXUSER_ADDRESS
|
||||||
&& map != kernel_map) {
|
&& map != kernel_map) {
|
||||||
nss = clrnd(btoc(USRSTACK-(unsigned)va));
|
nss = btoc(USRSTACK-(unsigned)va);
|
||||||
if (nss > btoc(p->p_rlimit[RLIMIT_STACK].rlim_cur)) {
|
if (nss > btoc(p->p_rlimit[RLIMIT_STACK].rlim_cur)) {
|
||||||
rv = KERN_FAILURE;
|
rv = KERN_FAILURE;
|
||||||
goto nogo;
|
goto nogo;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: trap.c,v 1.16 1999/06/28 08:20:47 itojun Exp $ */
|
/* $NetBSD: trap.c,v 1.17 1999/12/05 11:56:34 ragge Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988 University of Utah.
|
* Copyright (c) 1988 University of Utah.
|
||||||
@ -547,7 +547,7 @@ trap(statusReg, causeReg, vadr, pc, args)
|
|||||||
if (rv == KERN_SUCCESS) {
|
if (rv == KERN_SUCCESS) {
|
||||||
unsigned nss;
|
unsigned nss;
|
||||||
|
|
||||||
nss = clrnd(btoc(USRSTACK-(unsigned)va));
|
nss = btoc(USRSTACK-(unsigned)va);
|
||||||
if (nss > vm->vm_ssize)
|
if (nss > vm->vm_ssize)
|
||||||
vm->vm_ssize = nss;
|
vm->vm_ssize = nss;
|
||||||
} else if (rv == KERN_PROTECTION_FAILURE)
|
} else if (rv == KERN_PROTECTION_FAILURE)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: trap.c,v 1.3 1999/10/21 22:50:53 msaitoh Exp $ */
|
/* $NetBSD: trap.c,v 1.4 1999/12/05 11:56:35 ragge Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1995 Charles M. Hannum. All rights reserved.
|
* Copyright (c) 1995 Charles M. Hannum. All rights reserved.
|
||||||
@ -353,7 +353,7 @@ trap(p1, p2, p3, p4, frame)
|
|||||||
if ((caddr_t)va >= vm->vm_maxsaddr
|
if ((caddr_t)va >= vm->vm_maxsaddr
|
||||||
&& (caddr_t)va < (caddr_t)VM_MAXUSER_ADDRESS
|
&& (caddr_t)va < (caddr_t)VM_MAXUSER_ADDRESS
|
||||||
&& map != kernel_map) {
|
&& map != kernel_map) {
|
||||||
nss = clrnd(btoc(USRSTACK-(unsigned)va));
|
nss = btoc(USRSTACK-(unsigned)va);
|
||||||
if (nss > btoc(p->p_rlimit[RLIMIT_STACK].rlim_cur)) {
|
if (nss > btoc(p->p_rlimit[RLIMIT_STACK].rlim_cur)) {
|
||||||
rv = KERN_FAILURE;
|
rv = KERN_FAILURE;
|
||||||
goto nogo;
|
goto nogo;
|
||||||
@ -672,7 +672,7 @@ tlb_handler(p1, p2, p3, p4, frame)
|
|||||||
if ((caddr_t)va >= vm->vm_maxsaddr
|
if ((caddr_t)va >= vm->vm_maxsaddr
|
||||||
&& (caddr_t)va < (caddr_t)VM_MAXUSER_ADDRESS
|
&& (caddr_t)va < (caddr_t)VM_MAXUSER_ADDRESS
|
||||||
&& map != kernel_map) {
|
&& map != kernel_map) {
|
||||||
nss = clrnd(btoc(USRSTACK-(unsigned)va));
|
nss = btoc(USRSTACK-(unsigned)va);
|
||||||
if (nss > btoc(p->p_rlimit[RLIMIT_STACK].rlim_cur)) {
|
if (nss > btoc(p->p_rlimit[RLIMIT_STACK].rlim_cur)) {
|
||||||
rv = KERN_FAILURE;
|
rv = KERN_FAILURE;
|
||||||
goto nogo;
|
goto nogo;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: trap.c,v 1.86 1999/09/17 20:04:54 thorpej Exp $ */
|
/* $NetBSD: trap.c,v 1.87 1999/12/05 11:56:35 ragge Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1996
|
* Copyright (c) 1996
|
||||||
@ -800,7 +800,7 @@ mem_access_fault(type, ser, v, pc, psr, tf)
|
|||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
if (rv == KERN_SUCCESS) {
|
if (rv == KERN_SUCCESS) {
|
||||||
unsigned nss = clrnd(btoc(USRSTACK - va));
|
unsigned nss = btoc(USRSTACK - va);
|
||||||
if (nss > vm->vm_ssize)
|
if (nss > vm->vm_ssize)
|
||||||
vm->vm_ssize = nss;
|
vm->vm_ssize = nss;
|
||||||
} else if (rv == KERN_PROTECTION_FAILURE)
|
} else if (rv == KERN_PROTECTION_FAILURE)
|
||||||
@ -1041,7 +1041,7 @@ mem_access_fault4m(type, sfsr, sfva, tf)
|
|||||||
*/
|
*/
|
||||||
if ((caddr_t)va >= vm->vm_maxsaddr) {
|
if ((caddr_t)va >= vm->vm_maxsaddr) {
|
||||||
if (rv == KERN_SUCCESS) {
|
if (rv == KERN_SUCCESS) {
|
||||||
unsigned nss = clrnd(btoc(USRSTACK - va));
|
unsigned nss = btoc(USRSTACK - va);
|
||||||
if (nss > vm->vm_ssize)
|
if (nss > vm->vm_ssize)
|
||||||
vm->vm_ssize = nss;
|
vm->vm_ssize = nss;
|
||||||
} else if (rv == KERN_PROTECTION_FAILURE)
|
} else if (rv == KERN_PROTECTION_FAILURE)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: trap.c,v 1.32 1999/11/20 18:12:00 eeh Exp $ */
|
/* $NetBSD: trap.c,v 1.33 1999/12/05 11:56:36 ragge Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1996
|
* Copyright (c) 1996
|
||||||
@ -1089,7 +1089,7 @@ data_access_fault(type, addr, pc, tf)
|
|||||||
*/
|
*/
|
||||||
if ((caddr_t)va >= vm->vm_maxsaddr) {
|
if ((caddr_t)va >= vm->vm_maxsaddr) {
|
||||||
if (rv == KERN_SUCCESS) {
|
if (rv == KERN_SUCCESS) {
|
||||||
unsigned nss = clrnd(btoc(USRSTACK - va));
|
unsigned nss = btoc(USRSTACK - va);
|
||||||
if (nss > vm->vm_ssize)
|
if (nss > vm->vm_ssize)
|
||||||
vm->vm_ssize = nss;
|
vm->vm_ssize = nss;
|
||||||
} else if (rv == KERN_PROTECTION_FAILURE)
|
} else if (rv == KERN_PROTECTION_FAILURE)
|
||||||
@ -1355,7 +1355,7 @@ DEBUGGER(type, tf);
|
|||||||
*/
|
*/
|
||||||
if ((caddr_t)va >= vm->vm_maxsaddr) {
|
if ((caddr_t)va >= vm->vm_maxsaddr) {
|
||||||
if (rv == KERN_SUCCESS) {
|
if (rv == KERN_SUCCESS) {
|
||||||
unsigned nss = clrnd(btoc(USRSTACK - va));
|
unsigned nss = btoc(USRSTACK - va);
|
||||||
if (nss > vm->vm_ssize)
|
if (nss > vm->vm_ssize)
|
||||||
vm->vm_ssize = nss;
|
vm->vm_ssize = nss;
|
||||||
} else if (rv == KERN_PROTECTION_FAILURE)
|
} else if (rv == KERN_PROTECTION_FAILURE)
|
||||||
@ -1497,7 +1497,7 @@ text_access_fault(type, pc, tf)
|
|||||||
*/
|
*/
|
||||||
if ((caddr_t)va >= vm->vm_maxsaddr) {
|
if ((caddr_t)va >= vm->vm_maxsaddr) {
|
||||||
if (rv == KERN_SUCCESS) {
|
if (rv == KERN_SUCCESS) {
|
||||||
unsigned nss = clrnd(btoc(USRSTACK - va));
|
unsigned nss = btoc(USRSTACK - va);
|
||||||
if (nss > vm->vm_ssize)
|
if (nss > vm->vm_ssize)
|
||||||
vm->vm_ssize = nss;
|
vm->vm_ssize = nss;
|
||||||
} else if (rv == KERN_PROTECTION_FAILURE)
|
} else if (rv == KERN_PROTECTION_FAILURE)
|
||||||
@ -1662,7 +1662,7 @@ text_access_error(type, pc, sfsr, afva, afsr, tf)
|
|||||||
*/
|
*/
|
||||||
if ((caddr_t)va >= vm->vm_maxsaddr) {
|
if ((caddr_t)va >= vm->vm_maxsaddr) {
|
||||||
if (rv == KERN_SUCCESS) {
|
if (rv == KERN_SUCCESS) {
|
||||||
unsigned nss = clrnd(btoc(USRSTACK - va));
|
unsigned nss = btoc(USRSTACK - va);
|
||||||
if (nss > vm->vm_ssize)
|
if (nss > vm->vm_ssize)
|
||||||
vm->vm_ssize = nss;
|
vm->vm_ssize = nss;
|
||||||
} else if (rv == KERN_PROTECTION_FAILURE)
|
} else if (rv == KERN_PROTECTION_FAILURE)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: trap.c,v 1.86 1999/10/26 00:20:40 itohy Exp $ */
|
/* $NetBSD: trap.c,v 1.87 1999/12/05 11:56:36 ragge Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1994 Gordon W. Ross
|
* Copyright (c) 1994 Gordon W. Ross
|
||||||
@ -539,7 +539,7 @@ trap(type, code, v, tf)
|
|||||||
if (rv == KERN_SUCCESS) {
|
if (rv == KERN_SUCCESS) {
|
||||||
unsigned nss;
|
unsigned nss;
|
||||||
|
|
||||||
nss = clrnd(btoc((u_int)(USRSTACK-va)));
|
nss = btoc((u_int)(USRSTACK-va));
|
||||||
if (nss > vm->vm_ssize)
|
if (nss > vm->vm_ssize)
|
||||||
vm->vm_ssize = nss;
|
vm->vm_ssize = nss;
|
||||||
} else if (rv == KERN_PROTECTION_FAILURE)
|
} else if (rv == KERN_PROTECTION_FAILURE)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: trap.c,v 1.35 1999/11/13 00:32:21 thorpej Exp $ */
|
/* $NetBSD: trap.c,v 1.36 1999/12/05 11:56:37 ragge Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988 University of Utah.
|
* Copyright (c) 1988 University of Utah.
|
||||||
@ -689,7 +689,7 @@ trap(type, code, v, frame)
|
|||||||
if (rv == KERN_SUCCESS) {
|
if (rv == KERN_SUCCESS) {
|
||||||
unsigned nss;
|
unsigned nss;
|
||||||
|
|
||||||
nss = clrnd(btoc(USRSTACK-(unsigned)va));
|
nss = btoc(USRSTACK-(unsigned)va);
|
||||||
if (nss > vm->vm_ssize)
|
if (nss > vm->vm_ssize)
|
||||||
vm->vm_ssize = nss;
|
vm->vm_ssize = nss;
|
||||||
} else if (rv == KERN_PROTECTION_FAILURE)
|
} else if (rv == KERN_PROTECTION_FAILURE)
|
||||||
|
Loading…
Reference in New Issue
Block a user