Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/amd64/amd64 Work around dumb KASSERT in vtopte(), t...
details: https://anonhg.NetBSD.org/src/rev/929c326a197e
branches: trunk
changeset: 433331:929c326a197e
user: maxv <maxv%NetBSD.org@localhost>
date: Sat Sep 08 12:40:17 2018 +0000
description:
Work around dumb KASSERT in vtopte(), the PTE area can now be above the
MAIN area. I guess the KASSERT should be removed because it doesn't make
a lot of sense.
diffstat:
sys/arch/amd64/amd64/db_disasm.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diffs (31 lines):
diff -r f0738d1526b7 -r 929c326a197e sys/arch/amd64/amd64/db_disasm.c
--- a/sys/arch/amd64/amd64/db_disasm.c Sat Sep 08 11:54:26 2018 +0000
+++ b/sys/arch/amd64/amd64/db_disasm.c Sat Sep 08 12:40:17 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_disasm.c,v 1.24 2018/01/21 16:51:14 christos Exp $ */
+/* $NetBSD: db_disasm.c,v 1.25 2018/09/08 12:40:17 maxv Exp $ */
/*
* Mach Operating System
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.24 2018/01/21 16:51:14 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.25 2018/09/08 12:40:17 maxv Exp $");
#ifndef _KERNEL
#include <sys/types.h>
@@ -1207,7 +1207,11 @@
pte = kvtopte((vaddr_t)loc);
else
pte = vtopte((vaddr_t)loc);
- pde = vtopte((vaddr_t)pte);
+ if ((vaddr_t)pte >= VM_MIN_KERNEL_ADDRESS)
+ pde = kvtopte((vaddr_t)pte);
+ else
+ pde = vtopte((vaddr_t)pte);
+
if ((*pde & PG_V) == 0 || (*pte & PG_V) == 0) {
db_printf("invalid address\n");
return (loc);
Home |
Main Index |
Thread Index |
Old Index