Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Don't advertise the abt/und/irq stack pointers as accessible...



details:   https://anonhg.NetBSD.org/src/rev/09ba37691f11
branches:  trunk
changeset: 781300:09ba37691f11
user:      skrll <skrll%NetBSD.org@localhost>
date:      Fri Aug 31 11:52:39 2012 +0000

description:
Don't advertise the abt/und/irq stack pointers as accessible to crash(8)
when they're not

diffstat:

 sys/arch/arm/arm32/db_machdep.c |  10 +++++++---
 usr.sbin/crash/Makefile         |   4 ++--
 2 files changed, 9 insertions(+), 5 deletions(-)

diffs (78 lines):

diff -r 99dee44c6fcf -r 09ba37691f11 sys/arch/arm/arm32/db_machdep.c
--- a/sys/arch/arm/arm32/db_machdep.c   Fri Aug 31 11:45:38 2012 +0000
+++ b/sys/arch/arm/arm32/db_machdep.c   Fri Aug 31 11:52:39 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_machdep.c,v 1.13 2012/02/16 02:33:37 christos Exp $ */
+/*     $NetBSD: db_machdep.c,v 1.14 2012/08/31 11:52:39 skrll Exp $    */
 
 /* 
  * Copyright (c) 1996 Mark Brinicombe
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.13 2012/02/16 02:33:37 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.14 2012/08/31 11:52:39 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -45,11 +45,13 @@
 #include <ddb/db_variables.h>
 #include <ddb/db_command.h>
 
+#ifdef _KERNEL
 static long nil;
 
 int db_access_und_sp(const struct db_variable *, db_expr_t *, int);
 int db_access_abt_sp(const struct db_variable *, db_expr_t *, int);
 int db_access_irq_sp(const struct db_variable *, db_expr_t *, int);
+#endif
 
 const struct db_variable db_regs[] = {
        { "spsr", (long *)&DDB_REGS->tf_spsr, FCN_NULL, NULL },
@@ -71,9 +73,11 @@
        { "svc_sp", (long *)&DDB_REGS->tf_svc_sp, FCN_NULL, NULL },
        { "svc_lr", (long *)&DDB_REGS->tf_svc_lr, FCN_NULL, NULL },
        { "pc", (long *)&DDB_REGS->tf_pc, FCN_NULL, NULL },
+#ifdef _KERNEL
        { "und_sp", &nil, db_access_und_sp, NULL },
        { "abt_sp", &nil, db_access_abt_sp, NULL },
        { "irq_sp", &nil, db_access_irq_sp, NULL },
+#endif
 };
 
 const struct db_variable * const db_eregs = db_regs + sizeof(db_regs)/sizeof(db_regs[0]);
@@ -94,6 +98,7 @@
        { DDB_ADD_CMD(NULL,     NULL,           0,NULL,NULL,NULL) }
 };
 
+#ifdef _KERNEL
 int
 db_access_und_sp(const struct db_variable *vp, db_expr_t *valp, int rw)
 {
@@ -121,7 +126,6 @@
        return(0);
 }
 
-#ifdef _KERNEL
 void
 db_show_panic_cmd(db_expr_t addr, bool have_addr, db_expr_t count, const char *modif)
 {
diff -r 99dee44c6fcf -r 09ba37691f11 usr.sbin/crash/Makefile
--- a/usr.sbin/crash/Makefile   Fri Aug 31 11:45:38 2012 +0000
+++ b/usr.sbin/crash/Makefile   Fri Aug 31 11:52:39 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.21 2012/02/18 17:56:49 christos Exp $
+#      $NetBSD: Makefile,v 1.22 2012/08/31 11:52:39 skrll Exp $
 
 PROG=          crash
 MAN=           crash.8
@@ -59,7 +59,7 @@
 
 .if ${MACHINE_ARCH} == "arm"
 .PATH: ${S}/arch/arm/arm32
-SRCS+=disassem.c setstack.S cpufunc_asm.S
+SRCS+=disassem.c cpufunc_asm.S
 .endif
 
 .PATH: ${S}/arch/${MACHINE_FAMILY}/${MACHINE_FAMILY}



Home | Main Index | Thread Index | Old Index