Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/arm When creating a mcontext, make sure the PSR...
details: https://anonhg.NetBSD.org/src/rev/0d2a7406c9b1
branches: trunk
changeset: 801680:0d2a7406c9b1
user: matt <matt%NetBSD.org@localhost>
date: Wed Aug 13 21:10:31 2014 +0000
description:
When creating a mcontext, make sure the PSR we are saving is actually valid.
diffstat:
sys/arch/arm/arm/sig_machdep.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r 39e13a82f4d5 -r 0d2a7406c9b1 sys/arch/arm/arm/sig_machdep.c
--- a/sys/arch/arm/arm/sig_machdep.c Wed Aug 13 20:56:21 2014 +0000
+++ b/sys/arch/arm/arm/sig_machdep.c Wed Aug 13 21:10:31 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sig_machdep.c,v 1.47 2013/08/18 06:28:18 matt Exp $ */
+/* $NetBSD: sig_machdep.c,v 1.48 2014/08/13 21:10:31 matt Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@@ -44,7 +44,7 @@
#include <sys/param.h>
-__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.47 2013/08/18 06:28:18 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.48 2014/08/13 21:10:31 matt Exp $");
#include <sys/mount.h> /* XXX only needed by syscallargs.h */
#include <sys/cpu.h>
@@ -184,6 +184,9 @@
gr[_REG_PC] = tf->tf_pc;
gr[_REG_CPSR] = tf->tf_spsr;
+ KASSERTMSG(VALID_R15_PSR(gr[_REG_PC], gr[_REG_CPSR]), "%#x %#x",
+ gr[_REG_PC], gr[_REG_CPSR]);
+
if ((ras_pc = (__greg_t)ras_lookup(l->l_proc,
(void *) gr[_REG_PC])) != -1)
gr[_REG_PC] = ras_pc;
Home |
Main Index |
Thread Index |
Old Index