Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/usermode/usermode Check if we pee'd outside the box!
details: https://anonhg.NetBSD.org/src/rev/25d35c64427e
branches: trunk
changeset: 768707:25d35c64427e
user: reinoud <reinoud%NetBSD.org@localhost>
date: Thu Aug 25 15:02:54 2011 +0000
description:
Check if we pee'd outside the box!
diffstat:
sys/arch/usermode/usermode/trap.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r bbaa8390cd5d -r 25d35c64427e sys/arch/usermode/usermode/trap.c
--- a/sys/arch/usermode/usermode/trap.c Thu Aug 25 14:55:36 2011 +0000
+++ b/sys/arch/usermode/usermode/trap.c Thu Aug 25 15:02:54 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.4 2011/08/25 14:38:56 reinoud Exp $ */
+/* $NetBSD: trap.c,v 1.5 2011/08/25 15:02:54 reinoud Exp $ */
/*-
* Copyright (c) 2011 Reinoud Zandijk <reinoud%netbsd.org@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.4 2011/08/25 14:38:56 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.5 2011/08/25 15:02:54 reinoud Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -125,6 +125,9 @@
kmem = 0;
vm_map = &vm->vm_map;
}
+ if ((va < VM_MIN_ADDRESS) || (va > VM_MAX_ADDRESS)) {
+ panic("peeing outside the box!");
+ }
pcb->pcb_onfault = NULL;
/* XXX atype?? */
Home |
Main Index |
Thread Index |
Old Index