Module Name: src
Committed By: riastradh
Date: Mon Feb 27 16:24:46 UTC 2023
Modified Files:
src/sys/uvm: uvm_map.c
Log Message:
uvm(9): KASSERT(A && B) -> KASSERT(A); KASSERT(B)
While here, print some of the inputs with KASSERTMSG.
To generate a diff of this commit:
cvs rdiff -u -r1.403 -r1.404 src/sys/uvm/uvm_map.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/uvm/uvm_map.c
diff -u src/sys/uvm/uvm_map.c:1.403 src/sys/uvm/uvm_map.c:1.404
--- src/sys/uvm/uvm_map.c:1.403 Wed Nov 23 23:53:53 2022
+++ src/sys/uvm/uvm_map.c Mon Feb 27 16:24:45 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_map.c,v 1.403 2022/11/23 23:53:53 riastradh Exp $ */
+/* $NetBSD: uvm_map.c,v 1.404 2023/02/27 16:24:45 riastradh Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.403 2022/11/23 23:53:53 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.404 2023/02/27 16:24:45 riastradh Exp $");
#include "opt_ddb.h"
#include "opt_pax.h"
@@ -2123,7 +2123,10 @@ nextgap:
else
tmp = RIGHT_ENTRY(prev);
for (;;) {
- KASSERT(tmp && tmp->maxgap >= length);
+ KASSERT(tmp);
+ KASSERTMSG(tmp->maxgap >= length,
+ "tmp->maxgap=0x%"PRIxVSIZE" length=0x%"PRIxVSIZE,
+ tmp->maxgap, length);
if (topdown)
child = RIGHT_ENTRY(tmp);
else
@@ -2685,7 +2688,8 @@ uvm_map_extract(struct vm_map *srcmap, v
* REMOVE.
*/
- KASSERT((start & PAGE_MASK) == 0 && (len & PAGE_MASK) == 0);
+ KASSERTMSG((start & PAGE_MASK) == 0, "start=0x%"PRIxVADDR, start);
+ KASSERTMSG((len & PAGE_MASK) == 0, "len=0x%"PRIxVADDR, len);
KASSERT((flags & UVM_EXTRACT_REMOVE) == 0 ||
(flags & (UVM_EXTRACT_CONTIG|UVM_EXTRACT_QREF)) == 0);