CVS commit: src/sys/external/bsd/libnv/dist

2019-07-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jul 24 14:25:56 UTC 2019

Modified Files:
src/sys/external/bsd/libnv/dist: nv_impl.h nvpair.c

Log Message:
Adapt for userland compilation


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/libnv/dist/nv_impl.h
cvs rdiff -u -r1.10 -r1.11 src/sys/external/bsd/libnv/dist/nvpair.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/libnv/dist

2019-07-24 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Wed Jul 24 12:13:13 UTC 2019

Modified Files:
src/sys/external/bsd/libnv/dist: nvpair.c

Log Message:
off by 1


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/external/bsd/libnv/dist/nvpair.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/external/bsd/libnv/dist/nvpair.c
diff -u src/sys/external/bsd/libnv/dist/nvpair.c:1.9 src/sys/external/bsd/libnv/dist/nvpair.c:1.10
--- src/sys/external/bsd/libnv/dist/nvpair.c:1.9	Wed Jul 24 11:34:55 2019
+++ src/sys/external/bsd/libnv/dist/nvpair.c	Wed Jul 24 12:13:13 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvpair.c,v 1.9 2019/07/24 11:34:55 sevan Exp $	*/
+/*	$NetBSD: nvpair.c,v 1.10 2019/07/24 12:13:13 sevan Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
@@ -36,7 +36,7 @@
 #ifdef __FreeBSD__
 __FBSDID("$FreeBSD: head/sys/contrib/libnv/nvpair.c 335382 2018-06-19 18:43:02Z lwhsu $");
 #else
-__RCSID("$NetBSD: nvpair.c,v 1.9 2019/07/24 11:34:55 sevan Exp $");
+__RCSID("$NetBSD: nvpair.c,v 1.10 2019/07/24 12:13:13 sevan Exp $");
 #endif
 
 #include 
@@ -1217,7 +1217,7 @@ nvpair_create_stringv(const char *name, 
 	if (len < 0)
 		return (NULL);
 	nvp = nvpair_create_string(name, str);
-	kmem_free(str, len);
+	kmem_free(str, len+1);
 	return (nvp);
 }
 #endif



CVS commit: src/sys/external/bsd/libnv/dist

2019-07-24 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Wed Jul 24 12:13:13 UTC 2019

Modified Files:
src/sys/external/bsd/libnv/dist: nvpair.c

Log Message:
off by 1


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/external/bsd/libnv/dist/nvpair.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/libnv/dist

2019-07-24 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Wed Jul 24 11:34:55 UTC 2019

Modified Files:
src/sys/external/bsd/libnv/dist: nvpair.c

Log Message:
need sys/kmem.h for kmem_free()


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/external/bsd/libnv/dist/nvpair.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/external/bsd/libnv/dist/nvpair.c
diff -u src/sys/external/bsd/libnv/dist/nvpair.c:1.8 src/sys/external/bsd/libnv/dist/nvpair.c:1.9
--- src/sys/external/bsd/libnv/dist/nvpair.c:1.8	Wed Jul 24 11:12:30 2019
+++ src/sys/external/bsd/libnv/dist/nvpair.c	Wed Jul 24 11:34:55 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvpair.c,v 1.8 2019/07/24 11:12:30 martin Exp $	*/
+/*	$NetBSD: nvpair.c,v 1.9 2019/07/24 11:34:55 sevan Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
@@ -36,7 +36,7 @@
 #ifdef __FreeBSD__
 __FBSDID("$FreeBSD: head/sys/contrib/libnv/nvpair.c 335382 2018-06-19 18:43:02Z lwhsu $");
 #else
-__RCSID("$NetBSD: nvpair.c,v 1.8 2019/07/24 11:12:30 martin Exp $");
+__RCSID("$NetBSD: nvpair.c,v 1.9 2019/07/24 11:34:55 sevan Exp $");
 #endif
 
 #include 
@@ -49,6 +49,7 @@ __RCSID("$NetBSD: nvpair.c,v 1.8 2019/07
 #include 
 #include 
 #include 
+#include 
 
 #ifdef __FreeBSD__
 #include 



CVS commit: src/sys/external/bsd/libnv/dist

2019-07-24 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Wed Jul 24 11:34:55 UTC 2019

Modified Files:
src/sys/external/bsd/libnv/dist: nvpair.c

Log Message:
need sys/kmem.h for kmem_free()


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/external/bsd/libnv/dist/nvpair.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/libnv/dist

2019-07-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jul 24 11:12:31 UTC 2019

Modified Files:
src/sys/external/bsd/libnv/dist: nvpair.c

Log Message:
PR kern/54406: the result of vasprintf (in the kernel) should be freed
by kmem_free(). Spotted by Mindaugas.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/libnv/dist/nvpair.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/external/bsd/libnv/dist/nvpair.c
diff -u src/sys/external/bsd/libnv/dist/nvpair.c:1.7 src/sys/external/bsd/libnv/dist/nvpair.c:1.8
--- src/sys/external/bsd/libnv/dist/nvpair.c:1.7	Tue Jul 23 00:49:16 2019
+++ src/sys/external/bsd/libnv/dist/nvpair.c	Wed Jul 24 11:12:30 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvpair.c,v 1.7 2019/07/23 00:49:16 rmind Exp $	*/
+/*	$NetBSD: nvpair.c,v 1.8 2019/07/24 11:12:30 martin Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
@@ -36,7 +36,7 @@
 #ifdef __FreeBSD__
 __FBSDID("$FreeBSD: head/sys/contrib/libnv/nvpair.c 335382 2018-06-19 18:43:02Z lwhsu $");
 #else
-__RCSID("$NetBSD: nvpair.c,v 1.7 2019/07/23 00:49:16 rmind Exp $");
+__RCSID("$NetBSD: nvpair.c,v 1.8 2019/07/24 11:12:30 martin Exp $");
 #endif
 
 #include 
@@ -1216,7 +1216,7 @@ nvpair_create_stringv(const char *name, 
 	if (len < 0)
 		return (NULL);
 	nvp = nvpair_create_string(name, str);
-	nv_free(str);
+	kmem_free(str, len);
 	return (nvp);
 }
 #endif



CVS commit: src/sys/external/bsd/libnv/dist

2019-07-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jul 24 11:12:31 UTC 2019

Modified Files:
src/sys/external/bsd/libnv/dist: nvpair.c

Log Message:
PR kern/54406: the result of vasprintf (in the kernel) should be freed
by kmem_free(). Spotted by Mindaugas.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/libnv/dist/nvpair.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/libnv/dist

2019-07-22 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Tue Jul 23 00:49:16 UTC 2019

Modified Files:
src/sys/external/bsd/libnv/dist: nv.h nvlist.c nvpair.c

Log Message:
- nvpair_create_stringf: use the in-kernel vasprintf().
- Make nvlist_add_stringf() availabe in the kernel.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/libnv/dist/nv.h
cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/libnv/dist/nvlist.c
cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/libnv/dist/nvpair.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/libnv/dist

2019-07-22 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Tue Jul 23 00:49:16 UTC 2019

Modified Files:
src/sys/external/bsd/libnv/dist: nv.h nvlist.c nvpair.c

Log Message:
- nvpair_create_stringf: use the in-kernel vasprintf().
- Make nvlist_add_stringf() availabe in the kernel.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/libnv/dist/nv.h
cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/libnv/dist/nvlist.c
cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/libnv/dist/nvpair.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/external/bsd/libnv/dist/nv.h
diff -u src/sys/external/bsd/libnv/dist/nv.h:1.2 src/sys/external/bsd/libnv/dist/nv.h:1.3
--- src/sys/external/bsd/libnv/dist/nv.h:1.2	Sat Sep  8 14:02:15 2018
+++ src/sys/external/bsd/libnv/dist/nv.h	Tue Jul 23 00:49:16 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nv.h,v 1.2 2018/09/08 14:02:15 christos Exp $	*/
+/*	$NetBSD: nv.h,v 1.3 2019/07/23 00:49:16 rmind Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-2-Clause
@@ -152,9 +152,7 @@ void nvlist_add_bool(nvlist_t *nvl, cons
 void nvlist_add_number(nvlist_t *nvl, const char *name, uint64_t value);
 void nvlist_add_string(nvlist_t *nvl, const char *name, const char *value);
 void nvlist_add_stringf(nvlist_t *nvl, const char *name, const char *valuefmt, ...) __printflike(3, 4);
-#if !defined(_KERNEL) || defined(_VA_LIST_DECLARED)
 void nvlist_add_stringv(nvlist_t *nvl, const char *name, const char *valuefmt, va_list valueap) __printflike(3, 0);
-#endif
 void nvlist_add_nvlist(nvlist_t *nvl, const char *name, const nvlist_t *value);
 void nvlist_add_binary(nvlist_t *nvl, const char *name, const void *value, size_t size);
 void nvlist_add_bool_array(nvlist_t *nvl, const char *name, const bool *value, size_t nitems);

Index: src/sys/external/bsd/libnv/dist/nvlist.c
diff -u src/sys/external/bsd/libnv/dist/nvlist.c:1.7 src/sys/external/bsd/libnv/dist/nvlist.c:1.8
--- src/sys/external/bsd/libnv/dist/nvlist.c:1.7	Tue Feb 12 12:49:23 2019
+++ src/sys/external/bsd/libnv/dist/nvlist.c	Tue Jul 23 00:49:16 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvlist.c,v 1.7 2019/02/12 12:49:23 rmind Exp $	*/
+/*	$NetBSD: nvlist.c,v 1.8 2019/07/23 00:49:16 rmind Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
@@ -36,7 +36,7 @@
 #ifdef __FreeBSD__
 __FBSDID("$FreeBSD: head/sys/contrib/libnv/nvlist.c 335347 2018-06-18 22:57:32Z oshogbo $");
 #else
-__RCSID("$NetBSD: nvlist.c,v 1.7 2019/02/12 12:49:23 rmind Exp $");
+__RCSID("$NetBSD: nvlist.c,v 1.8 2019/07/23 00:49:16 rmind Exp $");
 #endif
 
 #include 
@@ -1507,7 +1507,7 @@ nvlist_add_nvpair(nvlist_t *nvl, const n
 	nvpair_insert(>nvl_head, newnvp, nvl);
 }
 
-#if !defined(_KERNEL) && !defined(_STANDALONE) && !defined(__NetBSD__)
+#if !defined(_STANDALONE)
 void
 nvlist_add_stringf(nvlist_t *nvl, const char *name, const char *valuefmt, ...)
 {

Index: src/sys/external/bsd/libnv/dist/nvpair.c
diff -u src/sys/external/bsd/libnv/dist/nvpair.c:1.6 src/sys/external/bsd/libnv/dist/nvpair.c:1.7
--- src/sys/external/bsd/libnv/dist/nvpair.c:1.6	Fri Feb 15 22:49:24 2019
+++ src/sys/external/bsd/libnv/dist/nvpair.c	Tue Jul 23 00:49:16 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvpair.c,v 1.6 2019/02/15 22:49:24 rmind Exp $	*/
+/*	$NetBSD: nvpair.c,v 1.7 2019/07/23 00:49:16 rmind Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
@@ -36,7 +36,7 @@
 #ifdef __FreeBSD__
 __FBSDID("$FreeBSD: head/sys/contrib/libnv/nvpair.c 335382 2018-06-19 18:43:02Z lwhsu $");
 #else
-__RCSID("$NetBSD: nvpair.c,v 1.6 2019/02/15 22:49:24 rmind Exp $");
+__RCSID("$NetBSD: nvpair.c,v 1.7 2019/07/23 00:49:16 rmind Exp $");
 #endif
 
 #include 
@@ -1191,7 +1191,7 @@ nvpair_name(const nvpair_t *nvp)
 	return (nvp->nvp_name);
 }
 
-#if !defined(_KERNEL) && !defined(_STANDALONE) && !defined(__NetBSD__)
+#if !defined(_STANDALONE)
 nvpair_t *
 nvpair_create_stringf(const char *name, const char *valuefmt, ...)
 {
@@ -1212,7 +1212,7 @@ nvpair_create_stringv(const char *name, 
 	char *str;
 	int len;
 
-	len = nv_vasprintf(, valuefmt, valueap);
+	len = vasprintf(, valuefmt, valueap);
 	if (len < 0)
 		return (NULL);
 	nvp = nvpair_create_string(name, str);



Re: CVS commit: src/sys/external/bsd/libnv/dist

2019-02-15 Thread Martin Husemann
On Fri, Feb 15, 2019 at 11:21:51PM +, Mindaugas Rasiukevicius wrote:
> Well, I did run libnv tests as well as NPF tests and they both passed,
> just not on NetBSD. :)  Turns out NetBSD libnv and Github libnv code
> bases deviated a little bit, causing a bug in NetBSD (but not upstream).
> Anyway, I committed the fix.  As for the NetBSD tests: it takes forever
> to recompile and rerun them, so it is not really practical for me.

You can recompile parts of it and also run sub-tests (like in this
case: the npf tests, which would have taken like 10 min combined),
and you do not need to run the (sub-) tests on qemu.

You could post patches and ask for others to include the patches in
their next test runs.

The "not practical" bit sounds to me like "I am in a hurry, I can not
deal properly with it", which feels slightly wrong.

But you dealt with the fallout and this is -current, so no big deal and
thank you for fixing it!

Martin


Re: CVS commit: src/sys/external/bsd/libnv/dist

2019-02-15 Thread Mindaugas Rasiukevicius
Martin Husemann  wrote:
> Can you try this patch?
> 
> rmind: can you *please* run the tests before commiting such changes?
> That would have immediately caught this.

Well, I did run libnv tests as well as NPF tests and they both passed,
just not on NetBSD. :)  Turns out NetBSD libnv and Github libnv code
bases deviated a little bit, causing a bug in NetBSD (but not upstream).
Anyway, I committed the fix.  As for the NetBSD tests: it takes forever
to recompile and rerun them, so it is not really practical for me.

-- 
Mindaugas


Re: CVS commit: src/sys/external/bsd/libnv/dist

2019-02-14 Thread Timo Buhrmester
> Can you try this patch?

With the patch I get a different panic:
| # npfctl reload
| panic: kernel diagnostic assertion "(nvp) != ((void *)0)" failed: file 
"/home/fstd/qemutest/src/sys/external/bsd/libnv/dist/nvpair.c", line 2140 
| cpu0: Begin traceback...
| 
vpanic(c15035d4,c94c0b80,c94c0b80,c94c0b90,c0d6b321,c15035d4,c15035c6,c15035b1,c1503574,85c)
 at netbsd:vpanic+0x1b4
| 
kern_assert(c15035d4,c15035c6,c15035b1,c1503574,85c,c94c0bac,c0d6313c,0,c94c0bc8,c0bf4da5)
 at netbsd:kern_assert+0x27
| 
nvpair_free_structure(0,c94c0bc8,c0bf4da5,c1e9dd80,c25ff000,c94c0bd0,c0d66ef4,c2439a5c,0,1)
 at netbsd:nvpair_free_structure+0x40
| 
nvlist_set_array_next(c2439a5c,0,1,0,c1ec1dbc,c2439a5c,0,c94c0bec,c0d6700d,c294b00c)
 at netbsd:nvlist_set_array_next+0xb8
| 
nvpair_remove_nvlist_array(c294b00c,c94c0be8,c0d6b459,c25ff00c,c94c0c08,c94c0c08,c0d664bc,c2439ac0,c294b00c,c2439aac)
 at netbsd:nvpair_remove_nvlist_array+0x6a
| 
nvpair_remove(c2439ac0,c294b00c,c2439aac,c94c0c28,c08a443e,c94c0c28,c0d62d61,c2439aac,c294b00c,c0d62900)
 at netbsd:nvpair_remove+0xf7
| 
nvlist_remove_nvpair(c2439aac,c294b00c,c0d62900,439aac,c1fdefa8,c294b00c,c94c0c7c,c08a5ad3,c2439aac,c20640c8)
 at netbsd:nvlist_remove_nvpair+0xeb
| nvlist_destroy(c2439aac,c20640c8,c203dda8,c25706c8,c1ec1d68,0,0,1,0,0) at 
netbsd:nvlist_destroy+0x9e
| 
npfctl_load_nvlist(c1fd8700,c2439aac,c25706f4,f,c2439aac,0,c25706f4,c94c0cc8,c08b4709,c1fd8700)
 at netbsd:npfctl_load_nvlist+0x25f
| 
npfctl_load(c1fd8700,c00c4e66,c94c0e74,0,0,0,c94c0cdc,c1fd8700,c94c0cf4,c0beb8cf)
 at netbsd:npfctl_load+0x55
| 
npf_dev_ioctl(c600,0,c00c4e66,c94c0e74,1,c225fd20,c14370e0,100,c225fd20,c94c0d28)
 at netbsd:npf_dev_ioctl+0x161
| cdev_ioctl(c600,0,c00c4e66,c94c0e74,1,c225fd20,c94c0d4c,c258cba8,c600,0) at 
netbsd:cdev_ioctl+0x7c
| 
spec_ioctl(c94c0d4c,c94c0d44,c94c0d43,0,17d,c2134008,0,c14df640,c258cba8,c00c4e66)
 at netbsd:spec_ioctl+0xde
| 
VOP_IOCTL(c258cba8,c00c4e66,c94c0e74,1,c1ed7a80,0,c258cba8,c0bddbf5,c225fd20,c17bddc0)
 at netbsd:VOP_IOCTL+0x77
| vn_ioctl(c21e3780,c00c4e66,c94c0e74,c,0,0,0,0,c1ea4180,c00c4e66) at 
netbsd:vn_ioctl+0x230
| 
sys_ioctl(c225fd20,c94c0f74,c94c0f6c,c94c0f30,c94c0f3c,c0169e2b,c1807b98,c225fd20,c94c0f74,c94c0f6c)
 at netbsd:sys_ioctl+0x43e
| 
sy_call(c1807b98,c225fd20,c94c0f74,c94c0f6c,c0bcc36c,25fd20,c225fd20,c94c0f9c,c016a0a2,c1807b98)
 at c0169d5b
| 
sy_invoke(c1807b98,c225fd20,c94c0f74,c94c0f6c,36,0,c225fd20,c223bbd4,36,c1807b98)
 at netbsd:sy_invoke+0xbb
| syscall() at netbsd:syscall+0xd7
| --- syscall (number 54) ---
| acde9af7:
| cpu0: End traceback...


Re: CVS commit: src/sys/external/bsd/libnv/dist

2019-02-14 Thread Martin Husemann
Can you try this patch?

rmind: can you *please* run the tests before commiting such changes?
That would have immediately caught this.


Martin
Index: nvlist.c
===
RCS file: /cvsroot/src/sys/external/bsd/libnv/dist/nvlist.c,v
retrieving revision 1.7
diff -u -p -r1.7 nvlist.c
--- nvlist.c12 Feb 2019 12:49:23 -  1.7
+++ nvlist.c14 Feb 2019 10:49:59 -
@@ -263,7 +263,7 @@ nvlist_set_array_next(nvlist_t *nvl, nvp
nvl->nvl_flags |= NV_FLAG_IN_ARRAY;
} else {
nvl->nvl_flags &= ~NV_FLAG_IN_ARRAY;
-   nv_free(nvl->nvl_array_next);
+   nvpair_free_structure(nvl->nvl_array_next);
}
 
nvl->nvl_array_next = ele;


Re: CVS commit: src/sys/external/bsd/libnv/dist

2019-02-14 Thread Timo Buhrmester
This commit (or the following one) gives me the following
panic on 'npfctl reload':

| # npfctl reload
| [ 169.6257771] panic: kmem_free(0xc1fd76a0, 46) != allocated size 4294967295
| [ 169.6361202] cpu0: Begin traceback...
| [ 169.6361202] 
vpanic(c14cc1ac,c94e0b30,c94e0b30,c94e0b44,c0bf557e,c14cc1ac,c1fd76a0,2e,,c1fd7698)
 at netbsd:vpanic+0x1b4
| [ 169.6457867] 
vpanic(c14cc1ac,c1fd76a0,2e,,c1fd7698,,c94e0b70,c0bf4d80,c1fd7698,2e)
 at netbsd:vpanic
| [ 169.6558448] 
kmem_size_check(c1fd7698,2e,,c0bfa6db,6,c1e9a480,30,38,6,c94e0b84) at 
netbsd:kmem_size_check+0x40
| [ 169.6658635] 
kmem_intr_free(c1fd7698,2e,c1fd76a0,c94e0b90,c0d6b461,c1fd76a4,c94e0bac,c0d63144,c1fd76a4,c94e0bc8)
 at netbsd:kmem_intr_free+0x157
| [ 169.6758977] 
kern_free(c1fd76a4,c94e0bac,c0d63144,c1fd76a4,c94e0bc8,c0bf4dad,c1e9dd80,c2891000,c94e0bd0,c0d66efc)
 at netbsd:kern_free+0x51
| [ 169.6859073] 
nv_free(c1fd76a4,c94e0bc8,c0bf4dad,c1e9dd80,c2891000,c94e0bd0,c0d66efc,c23a235c,0,6)
 at netbsd:nv_free+0x17
| [ 169.6959382] 
nvlist_set_array_next(c23a235c,0,6,0,c23a2384,c23a235c,c1fd76a4,c94e0bec,c0d67015,c289600c)
 at netbsd:nvlist_set_array_next+0xb8
| [ 169.7059703] 
nvpair_remove_nvlist_array(c289600c,c94e0be8,c0d6b461,c289100c,c94e0c08,c94e0c08,c0d664c4,c23a2410,c289600c,c23a23fc)
 at netbsd:nvpair_remove_nvlist_array+0x6a
| [ 169.7160051] 
nvpair_remove(c23a2410,c289600c,c23a23fc,c94e0c28,1,c94e0c28,c0d62d69,c23a23fc,c289600c,c0d62900)
 at netbsd:nvpair_remove+0xf7
| [ 169.7260339] 
nvlist_remove_nvpair(c23a23fc,c289600c,c0d62900,3a23fc,c1fde2e8,c289600c,c94e0c7c,c08a5ad3,c23a23fc,c288cf88)
 at netbsd:nvlist_remove_nvpair+0xeb
| [ 169.7361114] 
nvlist_destroy(c23a23fc,c288cf88,c203df70,c247ca88,c25c6978,0,0,1,0,0) at 
netbsd:nvlist_destroy+0x9e
| [ 169.7461010] 
npfctl_load_nvlist(c1fd87c0,c23a23fc,c247cab4,f,c23a23fc,0,c247cab4,c94e0cc8,c08b4709,c1fd87c0)
 at netbsd:npfctl_load_nvlist+0x25f
| [ 169.7561366] 
npfctl_load(c1fd87c0,c00c4e66,c94e0e74,0,0,0,c0bcc374,c1fd87c0,c94e0cf4,c0beb8d7)
 at netbsd:npfctl_load+0x55
| [ 169.7762031] 
npf_dev_ioctl(c600,0,c00c4e66,c94e0e74,1,c21e6aa0,c1436860,100,c21e6aa0,c94e0d28)
 at netbsd:npf_dev_ioctl+0x161
| [ 169.7862327] 
cdev_ioctl(c600,0,c00c4e66,c94e0e74,1,c21e6aa0,c94e0d4c,c24461b0,c600,0) at 
netbsd:cdev_ioctl+0x7c
| [ 169.7962746] 
spec_ioctl(c94e0d4c,c94e0d44,c94e0d43,0,1b54698,c21be008,0,c14de57c,c24461b0,c00c4e66)
 at netbsd:spec_ioctl+0xde
| [ 169.8063312] 
VOP_IOCTL(c24461b0,c00c4e66,c94e0e74,1,c1ed7a80,c94e0e40,c24461b0,c94e0db4,c0b57109,c94e0e40)
 at netbsd:VOP_IOCTL+0x77
| [ 169.8163557] 
vn_ioctl(c21ccf00,c00c4e66,c94e0e74,c,0,c219ab98,cbc000,1000,c219ab98,c00c4e66) 
at netbsd:vn_ioctl+0x230
| [ 169.8263985] 
sys_ioctl(c21e6aa0,c94e0f74,c94e0f6c,1,c94e0f3c,c0169e2b,c1805b98,c21e6aa0,c94e0f74,c94e0f6c)
 at netbsd:sys_ioctl+0x43e
| [ 169.8364516] 
sy_call(c1805b98,c21e6aa0,c94e0f74,c94e0f6c,c94e0f3c,0,c21e6aa0,c94e0f9c,c016a0a2,c1805b98)
 at c0169d5b
| [ 169.8565044] 
sy_invoke(c1805b98,c21e6aa0,c94e0f74,c94e0f6c,36,0,c21e6aa0,c20745e8,36,c1805b98)
 at netbsd:sy_invoke+0xbb
| [ 169.8665328] syscall() at netbsd:syscall+0xd7
| [ 169.8765640] --- syscall (number 54) --- 
| [ 169.8765640] ba474af7:
| [ 169.8765640] cpu0: End traceback...

with a rather minimal npf.conf like this:

| procedure "log" { log: npflog0 }
| 
| group default {
|   block final all apply "log"
| }
| 
| group "wm0" on wm0 {
|   block final all apply "log"
| }
| 
| group "lo0" on lo0 {
| pass final all
| }