Source-Changes-HG archive

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

[src/trunk]: src/sys/kern While we are inside ddb, allow all memory access.



details:   https://anonhg.NetBSD.org/src/rev/a2208fa30ee4
branches:  trunk
changeset: 979166:a2208fa30ee4
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Dec 18 15:33:34 2020 +0000

description:
While we are inside ddb, allow all memory access.

diffstat:

 sys/kern/subr_asan.c |  13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diffs (41 lines):

diff -r 617a10744eac -r a2208fa30ee4 sys/kern/subr_asan.c
--- a/sys/kern/subr_asan.c      Fri Dec 18 14:46:44 2020 +0000
+++ b/sys/kern/subr_asan.c      Fri Dec 18 15:33:34 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_asan.c,v 1.26 2020/09/10 14:10:46 maxv Exp $      */
+/*     $NetBSD: subr_asan.c,v 1.27 2020/12/18 15:33:34 martin Exp $    */
 
 /*
  * Copyright (c) 2018-2020 Maxime Villard, m00nbsd.net
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_asan.c,v 1.26 2020/09/10 14:10:46 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_asan.c,v 1.27 2020/12/18 15:33:34 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -42,6 +42,11 @@
 
 #include <uvm/uvm_extern.h>
 
+#ifdef DDB
+#include <machine/db_machdep.h>
+#include <ddb/db_extern.h>
+#endif
+
 #ifdef KASAN_PANIC
 #define REPORT panic
 #else
@@ -391,6 +396,10 @@
 
        if (__predict_false(!kasan_enabled))
                return;
+#ifdef DDB
+       if (__predict_false(db_recover != NULL))
+               return;
+#endif
        if (__predict_false(size == 0))
                return;
        if (__predict_false(kasan_md_unsupported(addr)))



Home | Main Index | Thread Index | Old Index