CVS commit: src/sys/dev

2020-09-08 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Wed Sep  9 05:23:26 UTC 2020

Modified Files:
src/sys/dev: DEVNAMES

Log Message:
Add ixl and iavf


To generate a diff of this commit:
cvs rdiff -u -r1.328 -r1.329 src/sys/dev/DEVNAMES

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



CVS commit: src/sys/dev

2020-09-08 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Wed Sep  9 05:23:26 UTC 2020

Modified Files:
src/sys/dev: DEVNAMES

Log Message:
Add ixl and iavf


To generate a diff of this commit:
cvs rdiff -u -r1.328 -r1.329 src/sys/dev/DEVNAMES

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

Modified files:

Index: src/sys/dev/DEVNAMES
diff -u src/sys/dev/DEVNAMES:1.328 src/sys/dev/DEVNAMES:1.329
--- src/sys/dev/DEVNAMES:1.328	Sat May 16 13:46:12 2020
+++ src/sys/dev/DEVNAMES	Wed Sep  9 05:23:26 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: DEVNAMES,v 1.328 2020/05/16 13:46:12 maya Exp $
+#	$NetBSD: DEVNAMES,v 1.329 2020/09/09 05:23:26 yamaguchi Exp $
 #
 # This file contains all used device names and defined attributes in
 # alphabetical order. New devices added to the system somewhere should first
@@ -606,6 +606,7 @@ i2cbus			MI		Attribute
 i2c_eeprom		MI		Attribute
 i8042			shark		Attribute
 i82586			MI		Attribute
+iavf			MI
 ibmcd			MI
 ibus			pmax
 ibus			vax
@@ -691,6 +692,7 @@ iwi			MI
 iwm			mac68k
 ix			MI
 ixg			MI
+ixl			MI
 ixpclk			evbarm
 ixpide			MI
 ixpio			evbarm



CVS commit: src/doc

2020-09-08 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Wed Sep  9 05:16:01 UTC 2020

Modified Files:
src/doc: CHANGES

Log Message:
Note iavf(4)


To generate a diff of this commit:
cvs rdiff -u -r1.2734 -r1.2735 src/doc/CHANGES

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



CVS commit: src/doc

2020-09-08 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Wed Sep  9 05:16:01 UTC 2020

Modified Files:
src/doc: CHANGES

Log Message:
Note iavf(4)


To generate a diff of this commit:
cvs rdiff -u -r1.2734 -r1.2735 src/doc/CHANGES

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2734 src/doc/CHANGES:1.2735
--- src/doc/CHANGES:1.2734	Sun Sep  6 14:58:53 2020
+++ src/doc/CHANGES	Wed Sep  9 05:16:01 2020
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2734 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2735 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -275,3 +275,5 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	mips: Port crash(8) to mips.  [mrg 20200816]
 	wg(4): Add implementation of WireGuard protocol. [ozaki-r 20200820]
 	dhcpcd: Update to version 9.2.0. [roy 20200906]
+	iavf(4): Add driver for Intel Ethernet Adaptive Virtual Function
+		[yamaguchi 20200908]



CVS commit: src/tools/gcc

2020-09-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Sep  9 04:52:32 UTC 2020

Modified Files:
src/tools/gcc: mknative-gcc

Log Message:
consolidate a bunch of libstdc++ variable collection.


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/tools/gcc/mknative-gcc

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



CVS commit: src/tools/gcc

2020-09-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Sep  9 04:52:32 UTC 2020

Modified Files:
src/tools/gcc: mknative-gcc

Log Message:
consolidate a bunch of libstdc++ variable collection.


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/tools/gcc/mknative-gcc

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

Modified files:

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.110 src/tools/gcc/mknative-gcc:1.111
--- src/tools/gcc/mknative-gcc:1.110	Tue Sep  8 19:17:24 2020
+++ src/tools/gcc/mknative-gcc	Wed Sep  9 04:52:32 2020
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.110 2020/09/08 19:17:24 mrg Exp $
+#	$NetBSD: mknative-gcc,v 1.111 2020/09/09 04:52:32 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
@@ -226,12 +226,14 @@ get_libstdcxx_v3 () {
 	mkdir -p $_OUTDIR/lib/$_subdir/arch/$_MACHINE_ARCH
 
 	_build_headers="c++config.h cxxabi_tweaks.h"
-	_headers1="c_base_headers_extra_install"
+	_headers1="backward_headers c_base_headers_extra c_base_headers_extra_install"
 	_headers1="$_headers1 tr1_headers tr2_headers decimal_headers c_compatibility_headers_install"
-	_headers1="$_headers1 debug_headers parallel_headers pstl_headers"
-	_headers2="host_headers thread_host_headers"
-	_pf_headers="profile_headers profile_impl_headers"
-	_pb_headers="pb_headers1 pb_headers2 pb_headers3 pb_headers4 pb_headers5 pb_headers6 pb_headers7"
+	_headers1="$_headers1 debug_headers parallel_headers"
+	_headers1="$_headers1 pb_headers1 pb_headers2 pb_headers3 pb_headers4"
+	_headers1="$_headers1 pb_headers5 pb_headers6 pb_headers7"
+	# These subdirs get the subdir removed from the values.
+	_headers2="bits_headers ext_headers host_headers thread_host_headers pstl_headers"
+	_headers2="$_headers2 profile_headers profile_impl_headers"
 
 	# build files
 	for h in $_build_headers; do
@@ -286,13 +288,11 @@ get_libstdcxx_v3 () {
 
 		# includes
 		getvars $_PLATFORM/libstdc++-v3/include/Makefile \
-			backward_headers c_base_headers_extra $_headers1 $_pb_headers | \
+			$_headers1 | \
 sed -e 's#\${GNUHOSTDIST}/libstdc++-v3/include/##g'
 		getvars $_PLATFORM/libstdc++-v3/include/Makefile \
-			bits_headers ext_headers $_headers2 | \
-sed -e 's#\${GNUHOSTDIST}/libstdc++-v3/include/##g' -e 's#\${GNUHOSTDIST}/libstdc++-v3/config/##g'
-		getvars $_PLATFORM/libstdc++-v3/include/Makefile \
-			$_pf_headers | sed -e 's#\${GNUHOSTDIST}/libstdc++-v3/include/profile/##g'
+			$_headers2 | \
+sed -e 's#\${GNUHOSTDIST}/libstdc++-v3/[^/][^/]*/##g'
 		getvars $_PLATFORM/libstdc++-v3/include/Makefile \
 			BASIC_FILE_H ALLOCATOR_H CSTDIO_H CLOCALE_H CMESSAGES_H CTIME_H
 	} | sanitise_includes \



CVS commit: src/sys/dev/pci

2020-09-08 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Wed Sep  9 00:56:17 UTC 2020

Modified Files:
src/sys/dev/pci: if_iavf.c

Log Message:
Added the explain about locking order in iavf(4)


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/if_iavf.c

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



CVS commit: src/sys/dev/pci

2020-09-08 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Wed Sep  9 00:56:17 UTC 2020

Modified Files:
src/sys/dev/pci: if_iavf.c

Log Message:
Added the explain about locking order in iavf(4)


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/if_iavf.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/dev/pci/if_iavf.c
diff -u src/sys/dev/pci/if_iavf.c:1.3 src/sys/dev/pci/if_iavf.c:1.4
--- src/sys/dev/pci/if_iavf.c:1.3	Wed Sep  9 00:35:36 2020
+++ src/sys/dev/pci/if_iavf.c	Wed Sep  9 00:56:17 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_iavf.c,v 1.3 2020/09/09 00:35:36 jakllsch Exp $	*/
+/*	$NetBSD: if_iavf.c,v 1.4 2020/09/09 00:56:17 yamaguchi Exp $	*/
 
 /*
  * Copyright (c) 2013-2015, Intel Corporation
@@ -75,7 +75,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_iavf.c,v 1.3 2020/09/09 00:35:36 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iavf.c,v 1.4 2020/09/09 00:56:17 yamaguchi Exp $");
 
 #include 
 #include 
@@ -319,6 +319,12 @@ struct iavf_stat_counters {
  * + Other fields in iavf_softc is protected by sc_cfg_lock
  *   (an adaptive mutex).
  *   - The lock must be held before acquiring another lock.
+ *
+ * Locking order:
+ *   - IFNET_LOCK => sc_cfg_lock => sc_adminq_lock
+ *   - sc_cfg_lock => ETHER_LOCK => sc_adminq_lock
+ *   - sc_cfg_lock => txr_lock
+ *   - sc_cfg_lock => rxr_lock
  */
 
 struct iavf_softc {



CVS commit: src/sys/dev/pci

2020-09-08 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Sep  9 00:35:36 UTC 2020

Modified Files:
src/sys/dev/pci: if_iavf.c

Log Message:
fix bad conditional in iavf_parse_modprop()

found by clang


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pci/if_iavf.c

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



CVS commit: src/sys/dev/pci

2020-09-08 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Sep  9 00:35:36 UTC 2020

Modified Files:
src/sys/dev/pci: if_iavf.c

Log Message:
fix bad conditional in iavf_parse_modprop()

found by clang


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pci/if_iavf.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/dev/pci/if_iavf.c
diff -u src/sys/dev/pci/if_iavf.c:1.2 src/sys/dev/pci/if_iavf.c:1.3
--- src/sys/dev/pci/if_iavf.c:1.2	Tue Sep  8 13:28:51 2020
+++ src/sys/dev/pci/if_iavf.c	Wed Sep  9 00:35:36 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_iavf.c,v 1.2 2020/09/08 13:28:51 jakllsch Exp $	*/
+/*	$NetBSD: if_iavf.c,v 1.3 2020/09/09 00:35:36 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 2013-2015, Intel Corporation
@@ -75,7 +75,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_iavf.c,v 1.2 2020/09/08 13:28:51 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iavf.c,v 1.3 2020/09/09 00:35:36 jakllsch Exp $");
 
 #include 
 #include 
@@ -5235,7 +5235,7 @@ iavf_parse_modprop(prop_dictionary_t dic
 	if (obj != NULL && prop_object_type(obj) == PROP_TYPE_NUMBER) {
 		val = prop_number_signed_value((prop_number_t)obj);
 
-		if (val < 1 || I40E_MAX_VF_QUEUES) {
+		if (val < 1 || val > I40E_MAX_VF_QUEUES) {
 			printf("iavf: invalid queue size(1 <= n <= %d)",
 			I40E_MAX_VF_QUEUES);
 		} else {



CVS commit: src/sys/crypto/aes/arch/arm

2020-09-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Sep  8 23:58:09 UTC 2020

Modified Files:
src/sys/crypto/aes/arch/arm: aes_armv8_64.S

Log Message:
aesarmv8: Reallocate registers to shave off unnecessary MOV.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/crypto/aes/arch/arm/aes_armv8_64.S

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

Modified files:

Index: src/sys/crypto/aes/arch/arm/aes_armv8_64.S
diff -u src/sys/crypto/aes/arch/arm/aes_armv8_64.S:1.14 src/sys/crypto/aes/arch/arm/aes_armv8_64.S:1.15
--- src/sys/crypto/aes/arch/arm/aes_armv8_64.S:1.14	Tue Sep  8 23:57:43 2020
+++ src/sys/crypto/aes/arch/arm/aes_armv8_64.S	Tue Sep  8 23:58:09 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: aes_armv8_64.S,v 1.14 2020/09/08 23:57:43 riastradh Exp $	*/
+/*	$NetBSD: aes_armv8_64.S,v 1.15 2020/09/08 23:58:09 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
 
 #include 
 
-RCSID("$NetBSD: aes_armv8_64.S,v 1.14 2020/09/08 23:57:43 riastradh Exp $")
+RCSID("$NetBSD: aes_armv8_64.S,v 1.15 2020/09/08 23:58:09 riastradh Exp $")
 
 	.arch_extension	aes
 
@@ -917,13 +917,12 @@ END(aesarmv8_cbcmac_update1)
 ENTRY(aesarmv8_ccm_enc1)
 	stp	fp, lr, [sp, #-16]!	/* push stack frame */
 	mov	fp, sp
-	ld1	{v0.16b, v1.16b}, [x4]	/* q0 := auth, q2 := ctr (be) */
-	mov	v2.16b, v1.16b
+	ld1	{v0.16b-v1.16b}, [x4]	/* q0 := auth, q1 := ctr (be) */
 	adrl	x11, ctr32_inc		/* x11 := _inc */
 	ld1	{v5.4s}, [x11]		/* q5 := (0,0,0,1) (host-endian) */
 	mov	x9, x0			/* x9 := enckey */
 	mov	x10, x3			/* x10 := nbytes */
-	rev32	v2.16b, v2.16b		/* q2 := ctr (host-endian) */
+	rev32	v2.16b, v1.16b		/* q2 := ctr (host-endian) */
 	_ALIGN_TEXT
 1:	ld1	{v3.16b}, [x1], #0x10	/* q3 := plaintext block */
 	add	v2.4s, v2.4s, v5.4s	/* increment ctr (32-bit) */
@@ -937,9 +936,8 @@ ENTRY(aesarmv8_ccm_enc1)
 	subs	x10, x10, #0x10		/* count down bytes */
 	st1	{v3.16b}, [x2], #0x10	/* store ciphertext block */
 	b.ne	1b			/* repeat if more blocks */
-	rev32	v2.16b, v2.16b		/* q2 := ctr (big-endian) */
-	mov	v1.16b, v2.16b		/* store updated auth/ctr */
-	st1	{v0.16b-v1.16b}, [x4]
+	rev32	v1.16b, v2.16b		/* q1 := ctr (big-endian) */
+	st1	{v0.16b-v1.16b}, [x4]	/* store updated auth/ctr */
 	ldp	fp, lr, [sp], #16	/* pop stack frame */
 	ret
 END(aesarmv8_ccm_enc1)



CVS commit: src/sys/crypto/aes/arch/arm

2020-09-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Sep  8 23:57:43 UTC 2020

Modified Files:
src/sys/crypto/aes/arch/arm: aes_armv8_64.S

Log Message:
aesarmv8: Issue two 4-register ld/st, not four 2-register ld/st.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/crypto/aes/arch/arm/aes_armv8_64.S

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

Modified files:

Index: src/sys/crypto/aes/arch/arm/aes_armv8_64.S
diff -u src/sys/crypto/aes/arch/arm/aes_armv8_64.S:1.13 src/sys/crypto/aes/arch/arm/aes_armv8_64.S:1.14
--- src/sys/crypto/aes/arch/arm/aes_armv8_64.S:1.13	Tue Sep  8 23:57:13 2020
+++ src/sys/crypto/aes/arch/arm/aes_armv8_64.S	Tue Sep  8 23:57:43 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: aes_armv8_64.S,v 1.13 2020/09/08 23:57:13 riastradh Exp $	*/
+/*	$NetBSD: aes_armv8_64.S,v 1.14 2020/09/08 23:57:43 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
 
 #include 
 
-RCSID("$NetBSD: aes_armv8_64.S,v 1.13 2020/09/08 23:57:13 riastradh Exp $")
+RCSID("$NetBSD: aes_armv8_64.S,v 1.14 2020/09/08 23:57:43 riastradh Exp $")
 
 	.arch_extension	aes
 
@@ -693,10 +693,8 @@ ENTRY(aesarmv8_xts_enc8)
 	mov	v30.16b, v31.16b	/* q30 := tweak[6] */
 	bl	aesarmv8_xts_mulx	/* q31 *= x; trash x0/q0/q1 */
 	/* q31 := tweak[7] */
-	ld1	{v0.16b,v1.16b}, [x1], #0x20	/* q[i] := ptxt[i] */
-	ld1	{v2.16b,v3.16b}, [x1], #0x20
-	ld1	{v4.16b,v5.16b}, [x1], #0x20
-	ld1	{v6.16b,v7.16b}, [x1], #0x20
+	ld1	{v0.16b-v3.16b}, [x1], #0x40	/* q[i] := ptxt[i] */
+	ld1	{v4.16b-v7.16b}, [x1], #0x40
 	eor	v0.16b, v0.16b, v24.16b	/* q[i] := ptxt[i] ^ tweak[i] */
 	eor	v1.16b, v1.16b, v25.16b
 	eor	v2.16b, v2.16b, v26.16b
@@ -716,10 +714,8 @@ ENTRY(aesarmv8_xts_enc8)
 	eor	v5.16b, v5.16b, v29.16b
 	eor	v6.16b, v6.16b, v30.16b
 	eor	v7.16b, v7.16b, v31.16b
-	st1	{v0.16b,v1.16b}, [x2], #0x20	/* store ciphertext blocks */
-	st1	{v2.16b,v3.16b}, [x2], #0x20
-	st1	{v4.16b,v5.16b}, [x2], #0x20
-	st1	{v6.16b,v7.16b}, [x2], #0x20
+	st1	{v0.16b-v3.16b}, [x2], #0x40	/* store ciphertext blocks */
+	st1	{v4.16b-v7.16b}, [x2], #0x40
 	bl	aesarmv8_xts_mulx	/* q31 *= x; trash x0/q0/q1 */
 	subs	x10, x10, #0x80		/* count down nbytes */
 	b.ne	1b			/* repeat if more block groups */



CVS commit: src/sys/crypto/aes/arch/arm

2020-09-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Sep  8 23:57:43 UTC 2020

Modified Files:
src/sys/crypto/aes/arch/arm: aes_armv8_64.S

Log Message:
aesarmv8: Issue two 4-register ld/st, not four 2-register ld/st.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/crypto/aes/arch/arm/aes_armv8_64.S

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



CVS commit: src/sys/crypto/aes/arch/arm

2020-09-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Sep  8 23:57:13 UTC 2020

Modified Files:
src/sys/crypto/aes/arch/arm: aes_armv8_64.S

Log Message:
aesarmv8: Adapt aes_armv8_64.S to big-endian.

Patch mainly from (and tested by) jakllsch@ with minor tweaks by me.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/crypto/aes/arch/arm/aes_armv8_64.S

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



CVS commit: src/sys/crypto/aes/arch/arm

2020-09-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Sep  8 23:58:09 UTC 2020

Modified Files:
src/sys/crypto/aes/arch/arm: aes_armv8_64.S

Log Message:
aesarmv8: Reallocate registers to shave off unnecessary MOV.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/crypto/aes/arch/arm/aes_armv8_64.S

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



CVS commit: src/sys/crypto/aes/arch/arm

2020-09-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Sep  8 23:57:13 UTC 2020

Modified Files:
src/sys/crypto/aes/arch/arm: aes_armv8_64.S

Log Message:
aesarmv8: Adapt aes_armv8_64.S to big-endian.

Patch mainly from (and tested by) jakllsch@ with minor tweaks by me.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/crypto/aes/arch/arm/aes_armv8_64.S

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

Modified files:

Index: src/sys/crypto/aes/arch/arm/aes_armv8_64.S
diff -u src/sys/crypto/aes/arch/arm/aes_armv8_64.S:1.12 src/sys/crypto/aes/arch/arm/aes_armv8_64.S:1.13
--- src/sys/crypto/aes/arch/arm/aes_armv8_64.S:1.12	Sat Aug  8 14:47:01 2020
+++ src/sys/crypto/aes/arch/arm/aes_armv8_64.S	Tue Sep  8 23:57:13 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: aes_armv8_64.S,v 1.12 2020/08/08 14:47:01 riastradh Exp $	*/
+/*	$NetBSD: aes_armv8_64.S,v 1.13 2020/09/08 23:57:13 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
 
 #include 
 
-RCSID("$NetBSD: aes_armv8_64.S,v 1.12 2020/08/08 14:47:01 riastradh Exp $")
+RCSID("$NetBSD: aes_armv8_64.S,v 1.13 2020/09/08 23:57:13 riastradh Exp $")
 
 	.arch_extension	aes
 
@@ -114,11 +114,11 @@ END(unshiftrows_rotword_3)
  *	Standard ABI calling convention.
  */
 ENTRY(aesarmv8_setenckey128)
-	ldr	q1, [x1]	/* q1 := master key */
+	ld1	{v1.16b}, [x1]	/* q1 := master key */
 
 	adrl	x4, unshiftrows_rotword_3
 	eor	v0.16b, v0.16b, v0.16b	/* q0 := 0 */
-	ldr	q16, [x4]	/* q16 := unshiftrows_rotword_3 table */
+	ld1	{v16.16b}, [x4]	/* q16 := unshiftrows_rotword_3 table */
 
 	str	q1, [x0], #0x10	/* store master key as first round key */
 	mov	x2, #10		/* round count */
@@ -171,14 +171,14 @@ END(aesarmv8_setenckey128)
  *	Standard ABI calling convention.
  */
 ENTRY(aesarmv8_setenckey192)
-	ldr	q1, [x1], #0x10	/* q1 := master key[0:128) */
-	ldr	d2, [x1]	/* d2 := master key[128:192) */
+	ld1	{v1.16b}, [x1], #0x10	/* q1 := master key[0:128) */
+	ld1	{v2.8b}, [x1]	/* d2 := master key[128:192) */
 
 	adrl	x4, unshiftrows_rotword_1
 	adrl	x5, unshiftrows_rotword_3
 	eor	v0.16b, v0.16b, v0.16b	/* q0 := 0 */
-	ldr	q16, [x4]	/* q16 := unshiftrows_rotword_1 */
-	ldr	q17, [x5]	/* q17 := unshiftrows_rotword_3 */
+	ld1	{v16.16b}, [x4]	/* q16 := unshiftrows_rotword_1 */
+	ld1	{v17.16b}, [x5]	/* q17 := unshiftrows_rotword_3 */
 
 	str	q1, [x0], #0x10	/* store master key[0:128) as round key */
 	mov	x2, #12		/* round count */
@@ -351,13 +351,13 @@ END(aesarmv8_setenckey192)
  */
 ENTRY(aesarmv8_setenckey256)
 	/* q1 := key[0:128), q2 := key[128:256) */
-	ldp	q1, q2, [x1], #0x20
+	ld1	{v1.16b-v2.16b}, [x1], #0x20
 
 	adrl	x4, unshiftrows_rotword_3
 	adrl	x5, unshiftrows_3
 	eor	v0.16b, v0.16b, v0.16b	/* q0 := 0 */
-	ldr	q16, [x4]	/* q16 := unshiftrows_rotword_3 */
-	ldr	q17, [x5]	/* q17 := unshiftrows_3 */
+	ld1	{v16.16b}, [x4]	/* q16 := unshiftrows_rotword_3 */
+	ld1	{v17.16b}, [x5]	/* q17 := unshiftrows_3 */
 
 	/* store master key as first two round keys */
 	stp	q1, q2, [x0], #0x20
@@ -461,9 +461,9 @@ END(aesarmv8_enctodec)
 ENTRY(aesarmv8_enc)
 	stp	fp, lr, [sp, #-16]!	/* push stack frame */
 	mov	fp, sp
-	ldr	q0, [x1]	/* q0 := ptxt */
+	ld1	{v0.16b}, [x1]	/* q0 := ptxt */
 	bl	aesarmv8_enc1	/* q0 := ctxt; trash x0/x3/q16 */
-	str	q0, [x2]	/* store ctxt */
+	st1	{v0.16b}, [x2]	/* store ctxt */
 	ldp	fp, lr, [sp], #16	/* pop stack frame */
 	ret
 END(aesarmv8_enc)
@@ -479,9 +479,9 @@ END(aesarmv8_enc)
 ENTRY(aesarmv8_dec)
 	stp	fp, lr, [sp, #-16]!	/* push stack frame */
 	mov	fp, sp
-	ldr	q0, [x1]	/* q0 := ctxt */
+	ld1	{v0.16b}, [x1]	/* q0 := ctxt */
 	bl	aesarmv8_dec1	/* q0 := ptxt; trash x0/x3/q16 */
-	str	q0, [x2]	/* store ptxt */
+	st1	{v0.16b}, [x2]	/* store ptxt */
 	ldp	fp, lr, [sp], #16	/* pop stack frame */
 	ret
 END(aesarmv8_dec)
@@ -503,17 +503,17 @@ ENTRY(aesarmv8_cbc_enc)
 	mov	fp, sp
 	mov	x9, x0			/* x9 := enckey */
 	mov	x10, x3			/* x10 := nbytes */
-	ldr	q0, [x4]		/* q0 := chaining value */
+	ld1	{v0.16b}, [x4]		/* q0 := chaining value */
 	_ALIGN_TEXT
-1:	ldr	q1, [x1], #0x10		/* q1 := plaintext block */
+1:	ld1	{v1.16b}, [x1], #0x10	/* q1 := plaintext block */
 	eor	v0.16b, v0.16b, v1.16b	/* q0 := cv ^ ptxt */
 	mov	x0, x9			/* x0 := enckey */
 	mov	x3, x5			/* x3 := nrounds */
 	bl	aesarmv8_enc1		/* q0 := ctxt; trash x0/x3/q16 */
 	subs	x10, x10, #0x10		/* count down nbytes */
-	str	q0, [x2], #0x10		/* store ciphertext block */
+	st1	{v0.16b}, [x2], #0x10	/* store ciphertext block */
 	b.ne	1b			/* repeat if x10 is nonzero */
-	str	q0, [x4]		/* store chaining value */
+	st1	{v0.16b}, [x4]		/* store chaining value */
 	ldp	fp, lr, [sp], #16	/* pop stack frame */
 2:	ret
 END(aesarmv8_cbc_enc)
@@ -533,18 +533,21 @@ END(aesarmv8_cbc_enc)
 ENTRY(aesarmv8_cbc_dec1)
 	stp	fp, lr, [sp, #-16]!	/* push stack frame */
 	mov	fp, sp
-	ldr	q24, [x4]		/* q24 := iv */
+	ld1	{v24.16b}, [x4]		/* q24 := iv */
 	mov	x9, x0			/* x9 := enckey */
 	

CVS commit: src/sys/crypto/aes

2020-09-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Sep  8 22:48:24 UTC 2020

Modified Files:
src/sys/crypto/aes: aes_selftest.c
src/sys/crypto/aes/arch/x86: aes_sse2_subr.c

Log Message:
aes(9): Fix edge case in bitsliced SSE2 AES-CBC decryption.

Make sure self-tests exercise this edge case.

Discovered by confusion over code inspection of jak's adaptation of
aes_armv8_64.S for big-endian.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/crypto/aes/aes_selftest.c
cvs rdiff -u -r1.3 -r1.4 src/sys/crypto/aes/arch/x86/aes_sse2_subr.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/crypto/aes/aes_selftest.c
diff -u src/sys/crypto/aes/aes_selftest.c:1.5 src/sys/crypto/aes/aes_selftest.c:1.6
--- src/sys/crypto/aes/aes_selftest.c:1.5	Sat Jul 25 22:36:42 2020
+++ src/sys/crypto/aes/aes_selftest.c	Tue Sep  8 22:48:24 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: aes_selftest.c,v 1.5 2020/07/25 22:36:42 riastradh Exp $	*/
+/*	$NetBSD: aes_selftest.c,v 1.6 2020/09/08 22:48:24 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: aes_selftest.c,v 1.5 2020/07/25 22:36:42 riastradh Exp $");
+__KERNEL_RCSID(1, "$NetBSD: aes_selftest.c,v 1.6 2020/09/08 22:48:24 riastradh Exp $");
 
 #ifdef _KERNEL
 
@@ -210,7 +210,7 @@ aes_selftest_encdec_cbc(const struct aes
 	uint8_t in[144];
 	uint8_t outbuf[146] = { [0] = 0x1a, [145] = 0x1a }, *out = outbuf + 1;
 	uint8_t iv0[16], iv[16];
-	unsigned i;
+	unsigned i, j;
 
 	for (i = 0; i < 32; i++)
 		key[i] = i;
@@ -237,21 +237,26 @@ aes_selftest_encdec_cbc(const struct aes
 			"AES-%u-CBC dec", aes_keybits[i]);
 
 		/* Try incrementally, with IV update.  */
-		memcpy(iv, iv0, 16);
-		impl->ai_cbc_enc(, in, out, 16, iv, aes_nrounds[i]);
-		impl->ai_cbc_enc(, in + 16, out + 16, 128, iv,
-		aes_nrounds[i]);
-		if (memcmp(out, expected[i], 144))
-			return aes_selftest_fail(impl, out, expected[i], 144,
-			"AES-%u-CBC enc incremental", aes_keybits[i]);
-
-		memcpy(iv, iv0, 16);
-		impl->ai_cbc_dec(, out, out, 128, iv, aes_nrounds[i]);
-		impl->ai_cbc_dec(, out + 128, out + 128, 16, iv,
-		aes_nrounds[i]);
-		if (memcmp(out, in, 144))
-			return aes_selftest_fail(impl, out, in, 144,
-			"AES-%u-CBC dec incremental", aes_keybits[i]);
+		for (j = 0; j < 144; j += 16) {
+			memcpy(iv, iv0, 16);
+			impl->ai_cbc_enc(, in, out, j, iv, aes_nrounds[i]);
+			impl->ai_cbc_enc(, in + j, out + j, 144 - j, iv,
+			aes_nrounds[i]);
+			if (memcmp(out, expected[i], 144))
+return aes_selftest_fail(impl, out,
+expected[i], 144, "AES-%u-CBC enc inc %u",
+aes_keybits[i], j);
+
+			memcpy(iv, iv0, 16);
+			impl->ai_cbc_dec(, out, out, j, iv,
+			aes_nrounds[i]);
+			impl->ai_cbc_dec(, out + j, out + j, 144 - j, iv,
+			aes_nrounds[i]);
+			if (memcmp(out, in, 144))
+return aes_selftest_fail(impl, out,
+in, 144, "AES-%u-CBC dec inc %u",
+aes_keybits[i], j);
+		}
 	}
 
 	if (outbuf[0] != 0x1a)

Index: src/sys/crypto/aes/arch/x86/aes_sse2_subr.c
diff -u src/sys/crypto/aes/arch/x86/aes_sse2_subr.c:1.3 src/sys/crypto/aes/arch/x86/aes_sse2_subr.c:1.4
--- src/sys/crypto/aes/arch/x86/aes_sse2_subr.c:1.3	Sat Jul 25 22:29:56 2020
+++ src/sys/crypto/aes/arch/x86/aes_sse2_subr.c	Tue Sep  8 22:48:24 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: aes_sse2_subr.c,v 1.3 2020/07/25 22:29:56 riastradh Exp $	*/
+/*	$NetBSD: aes_sse2_subr.c,v 1.4 2020/09/08 22:48:24 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: aes_sse2_subr.c,v 1.3 2020/07/25 22:29:56 riastradh Exp $");
+__KERNEL_RCSID(1, "$NetBSD: aes_sse2_subr.c,v 1.4 2020/09/08 22:48:24 riastradh Exp $");
 
 #ifdef _KERNEL
 #include 
@@ -200,11 +200,13 @@ aes_sse2_cbc_dec(const struct aesdec *de
 		case 48:
 			w = _mm_loadu_epi8(in + nbytes - 32);
 			q[1] = aes_sse2_interleave_in(w);
-			/*FALLTHROUGH*/
-		case 32:
 			w = _mm_loadu_epi8(in + nbytes - 48);
 			q[0] = aes_sse2_interleave_in(w);
-			/*FALLTHROUGH*/
+			break;
+		case 32:
+			w = _mm_loadu_epi8(in + nbytes - 32);
+			q[0] = aes_sse2_interleave_in(w);
+			break;
 		case 16:
 			break;
 		}



CVS commit: src/sys/crypto/aes

2020-09-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Sep  8 22:48:24 UTC 2020

Modified Files:
src/sys/crypto/aes: aes_selftest.c
src/sys/crypto/aes/arch/x86: aes_sse2_subr.c

Log Message:
aes(9): Fix edge case in bitsliced SSE2 AES-CBC decryption.

Make sure self-tests exercise this edge case.

Discovered by confusion over code inspection of jak's adaptation of
aes_armv8_64.S for big-endian.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/crypto/aes/aes_selftest.c
cvs rdiff -u -r1.3 -r1.4 src/sys/crypto/aes/arch/x86/aes_sse2_subr.c

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



CVS commit: src/sys/arch/alpha/alpha

2020-09-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Sep  8 21:41:37 UTC 2020

Modified Files:
src/sys/arch/alpha/alpha: pmap.c

Log Message:
alpha: Use load-acquire/store-release.

Omit needless membar in pmap_kenter_pa while here -- caller must
ensure pmap_kenter_pa on one CPU happens before use of the VA on
another CPU anyway, so there is no benefit to a membar here.

ok thorpej@


To generate a diff of this commit:
cvs rdiff -u -r1.271 -r1.272 src/sys/arch/alpha/alpha/pmap.c

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



CVS commit: src/sys/arch/alpha/alpha

2020-09-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Sep  8 21:41:37 UTC 2020

Modified Files:
src/sys/arch/alpha/alpha: pmap.c

Log Message:
alpha: Use load-acquire/store-release.

Omit needless membar in pmap_kenter_pa while here -- caller must
ensure pmap_kenter_pa on one CPU happens before use of the VA on
another CPU anyway, so there is no benefit to a membar here.

ok thorpej@


To generate a diff of this commit:
cvs rdiff -u -r1.271 -r1.272 src/sys/arch/alpha/alpha/pmap.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/arch/alpha/alpha/pmap.c
diff -u src/sys/arch/alpha/alpha/pmap.c:1.271 src/sys/arch/alpha/alpha/pmap.c:1.272
--- src/sys/arch/alpha/alpha/pmap.c:1.271	Thu Sep  3 02:09:09 2020
+++ src/sys/arch/alpha/alpha/pmap.c	Tue Sep  8 21:41:37 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.271 2020/09/03 02:09:09 thorpej Exp $ */
+/* $NetBSD: pmap.c,v 1.272 2020/09/08 21:41:37 riastradh Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001, 2007, 2008, 2020
@@ -135,7 +135,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.271 2020/09/03 02:09:09 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.272 2020/09/08 21:41:37 riastradh Exp $");
 
 #include 
 #include 
@@ -979,7 +979,7 @@ pmap_tlb_shootnow(const struct pmap_tlb_
 		int backoff = SPINLOCK_BACKOFF_MIN;
 		u_int spins = 0;
 
-		while (atomic_load_relaxed(_context) != NULL) {
+		while (atomic_load_acquire(_context) != NULL) {
 			SPINLOCK_BACKOFF(backoff);
 			if (spins++ > 0x0fff) {
 printf("TLB LOCAL MASK  = 0x%016lx\n",
@@ -994,7 +994,6 @@ pmap_tlb_shootnow(const struct pmap_tlb_
 panic("pmap_tlb_shootnow");
 			}
 		}
-		membar_consumer();
 	}
 	KASSERT(tlb_context == NULL);
 #endif /* MULTIPROCESSOR */
@@ -1025,8 +1024,7 @@ pmap_tlb_shootdown_ipi(struct cpu_info *
 	KASSERT(tlb_context != NULL);
 	pmap_tlb_invalidate(tlb_context, ci);
 	if (atomic_and_ulong_nv(_pending, ~(1UL << ci->ci_cpuid)) == 0) {
-		membar_producer();
-		atomic_store_relaxed(_context, NULL);
+		atomic_store_release(_context, NULL);
 	}
 }
 #endif /* MULTIPROCESSOR */
@@ -2275,7 +2273,6 @@ pmap_kenter_pa(vaddr_t va, paddr_t pa, v
 	/* Set the new PTE. */
 	const pt_entry_t opte = atomic_load_relaxed(pte);
 	atomic_store_relaxed(pte, npte);
-	PMAP_MP(membar_enter());
 
 	PMAP_STAT_INCR(pmap->pm_stats.resident_count, 1);
 	PMAP_STAT_INCR(pmap->pm_stats.wired_count, 1);



CVS commit: src/tools/gcc

2020-09-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep  8 19:17:24 UTC 2020

Modified Files:
src/tools/gcc: mknative-gcc

Log Message:
oops, pull out the value of pstl_headers.


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 src/tools/gcc/mknative-gcc

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

Modified files:

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.109 src/tools/gcc/mknative-gcc:1.110
--- src/tools/gcc/mknative-gcc:1.109	Sun Sep  6 02:24:38 2020
+++ src/tools/gcc/mknative-gcc	Tue Sep  8 19:17:24 2020
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.109 2020/09/06 02:24:38 mrg Exp $
+#	$NetBSD: mknative-gcc,v 1.110 2020/09/08 19:17:24 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
@@ -228,7 +228,7 @@ get_libstdcxx_v3 () {
 	_build_headers="c++config.h cxxabi_tweaks.h"
 	_headers1="c_base_headers_extra_install"
 	_headers1="$_headers1 tr1_headers tr2_headers decimal_headers c_compatibility_headers_install"
-	_headers1="$_headers1 debug_headers parallel_headers"
+	_headers1="$_headers1 debug_headers parallel_headers pstl_headers"
 	_headers2="host_headers thread_host_headers"
 	_pf_headers="profile_headers profile_impl_headers"
 	_pb_headers="pb_headers1 pb_headers2 pb_headers3 pb_headers4 pb_headers5 pb_headers6 pb_headers7"



CVS commit: src/tools/gcc

2020-09-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep  8 19:17:24 UTC 2020

Modified Files:
src/tools/gcc: mknative-gcc

Log Message:
oops, pull out the value of pstl_headers.


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 src/tools/gcc/mknative-gcc

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



CVS commit: src/distrib/sets

2020-09-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Sep  8 19:11:30 UTC 2020

Modified Files:
src/distrib/sets: fmt-list

Log Message:
distrib/sets/fmt-list: add no-action mode

This is useful for finding parse errors only.  Inspired by some entries
that are obsolete and have more than the "obsolete" flag.  There are
only few of these entries though, and they don't seem worth fixing.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/distrib/sets/fmt-list

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

Modified files:

Index: src/distrib/sets/fmt-list
diff -u src/distrib/sets/fmt-list:1.1 src/distrib/sets/fmt-list:1.2
--- src/distrib/sets/fmt-list:1.1	Sat Sep  5 11:13:07 2020
+++ src/distrib/sets/fmt-list	Tue Sep  8 19:11:30 2020
@@ -1,5 +1,5 @@
 #! /usr/bin/lua
--- $NetBSD: fmt-list,v 1.1 2020/09/05 11:13:07 rillig Exp $
+-- $NetBSD: fmt-list,v 1.2 2020/09/08 19:11:30 rillig Exp $
 
 --[[
 
@@ -8,7 +8,7 @@ have the other fields at the same indent
 
 Sort the lines and remove duplicate lines.
 
-usage: ./fmt-list */*/{mi,ad.*,md.*}
+usage: ./fmt-list [-n] */*/{mi,ad.*,md.*}
 
 ]]
 
@@ -405,7 +405,7 @@ end
 
 
 -- Load a file list, normalize it and write it back to disk.
-local function format_list(fname)
+local function format_list(fname, write_back)
   local head, entries, errors = read_list(fname)
   if #errors > 0 then
 for _, err in ipairs(errors) do
@@ -415,10 +415,22 @@ local function format_list(fname)
   end
 
   normalize(entries)
-  write_list(fname, head, entries)
+
+  if write_back then
+write_list(fname, head, entries)
+  end
 end
 
 
-for _, fname in ipairs(arg) do
-  format_list(fname)
+local function main(arg)
+  local write_back = true
+  for _, fname in ipairs(arg) do
+if fname == "-n" then
+  write_back = false
+else
+  format_list(fname, write_back)
+end
+  end
 end
+
+main(arg)



CVS commit: src/distrib/sets

2020-09-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Sep  8 19:11:30 UTC 2020

Modified Files:
src/distrib/sets: fmt-list

Log Message:
distrib/sets/fmt-list: add no-action mode

This is useful for finding parse errors only.  Inspired by some entries
that are obsolete and have more than the "obsolete" flag.  There are
only few of these entries though, and they don't seem worth fixing.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/distrib/sets/fmt-list

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



CVS commit: src/distrib/sets/lists/man

2020-09-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Sep  8 19:06:49 UTC 2020

Modified Files:
src/distrib/sets/lists/man: mi

Log Message:
lists/man/mi: remove extraneous space


To generate a diff of this commit:
cvs rdiff -u -r1.1701 -r1.1702 src/distrib/sets/lists/man/mi

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

Modified files:

Index: src/distrib/sets/lists/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1701 src/distrib/sets/lists/man/mi:1.1702
--- src/distrib/sets/lists/man/mi:1.1701	Tue Sep  8 10:05:47 2020
+++ src/distrib/sets/lists/man/mi	Tue Sep  8 19:06:49 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1701 2020/09/08 10:05:47 yamaguchi Exp $
+# $NetBSD: mi,v 1.1702 2020/09/08 19:06:49 rillig Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -2600,7 +2600,7 @@
 ./usr/share/man/cat8/fusermount.0		man-refuse-catman	.cat
 ./usr/share/man/cat8/fwctl.0			man-sysutil-catman	.cat
 ./usr/share/man/cat8/genassym.sh.0		man-obsolete		obsolete
-./usr/share/man/cat8/getNAME.0			man-man-catman		!makemandb, .cat
+./usr/share/man/cat8/getNAME.0			man-man-catman		!makemandb,.cat
 ./usr/share/man/cat8/getencstat.0		man-sysutil-catman	.cat
 ./usr/share/man/cat8/gettable.0			man-obsolete		obsolete
 ./usr/share/man/cat8/getty.0			man-sysutil-catman	.cat



CVS commit: src/distrib/sets/lists/man

2020-09-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Sep  8 19:06:49 UTC 2020

Modified Files:
src/distrib/sets/lists/man: mi

Log Message:
lists/man/mi: remove extraneous space


To generate a diff of this commit:
cvs rdiff -u -r1.1701 -r1.1702 src/distrib/sets/lists/man/mi

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



CVS commit: src/usr.bin/make

2020-09-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Sep  8 18:51:23 UTC 2020

Modified Files:
src/usr.bin/make: cond.c

Log Message:
make(1): clean up comments in cond.c


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/usr.bin/make/cond.c

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

Modified files:

Index: src/usr.bin/make/cond.c
diff -u src/usr.bin/make/cond.c:1.116 src/usr.bin/make/cond.c:1.117
--- src/usr.bin/make/cond.c:1.116	Tue Sep  8 18:10:34 2020
+++ src/usr.bin/make/cond.c	Tue Sep  8 18:51:23 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cond.c,v 1.116 2020/09/08 18:10:34 rillig Exp $	*/
+/*	$NetBSD: cond.c,v 1.117 2020/09/08 18:51:23 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,25 +70,34 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: cond.c,v 1.116 2020/09/08 18:10:34 rillig Exp $";
+static char rcsid[] = "$NetBSD: cond.c,v 1.117 2020/09/08 18:51:23 rillig Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)cond.c	8.2 (Berkeley) 1/2/94";
 #else
-__RCSID("$NetBSD: cond.c,v 1.116 2020/09/08 18:10:34 rillig Exp $");
+__RCSID("$NetBSD: cond.c,v 1.117 2020/09/08 18:51:23 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
 
-/*-
- * cond.c --
- *	Functions to handle conditionals in a makefile.
+/* Handling of conditionals in a makefile.
  *
  * Interface:
  *	Cond_Eval 	Evaluate the conditional in the passed line.
  *
+ *	Cond_EvalExpression
+ *			Evaluate the conditional in the passed line, which
+ *			is either the argument of one of the .if directives
+ *			or the condition in a :?true:false variable modifier.
+ *
+ *	Cond_save_depth
+ *	Cond_restore_depth
+ *			Save and restore the nesting of the conditions, at
+ *			the start and end of including another makefile, to
+ *			ensure that in each makefile the conditional
+ *			directives are well-balanced.
  */
 
 #include 
@@ -119,7 +128,7 @@ __RCSID("$NetBSD: cond.c,v 1.116 2020/09
  *
  * 'symbol' is some other symbol to which the default function is applied.
  *
- * Tokens are scanned from the 'condExpr' string. The scanner (CondToken)
+ * Tokens are scanned from the lexer. The scanner (CondToken)
  * will return TOK_AND for '&' and '&&', TOK_OR for '|' and '||',
  * TOK_NOT for '!', TOK_LPAREN for '(', TOK_RPAREN for ')' and will evaluate
  * the other terminal symbols, using either the default function or the
@@ -150,6 +159,9 @@ static unsigned int cond_min_depth = 0;	
 
 /*
  * Indicate when we should be strict about lhs of comparisons.
+ * In strict mode, the lhs must be a variable expression or a string literal
+ * in quotes. In non-strict mode it may also be an unquoted string literal.
+ *
  * TRUE when Cond_EvalExpression is called from Cond_Eval (.if etc)
  * FALSE when Cond_EvalExpression is called from var.c:ApplyModifiers
  * since lhs is already expanded and we cannot tell if
@@ -191,9 +203,6 @@ CondLexer_SkipWhitespace(CondLexer *lex)
  *	func says whether the argument belongs to an actual function, or
  *	whether the parsed argument is passed to the default function.
  *
- *	XXX: This is ambiguous for the empty() function since its argument is
- *	parsed differently.
- *
  * Return the length of the argument. */
 static int
 ParseFuncArg(Boolean doEval, const char **linePtr, char **out_arg,
@@ -241,7 +250,7 @@ ParseFuncArg(Boolean doEval, const char 
 	/*
 	 * Parse the variable spec and install it as part of the argument
 	 * if it's valid. We tell Var_Parse to complain on an undefined
-	 * variable, so we don't do it too. Nor do we return an error,
+	 * variable, so we don't need to do it. Nor do we return an error,
 	 * though perhaps we should...
 	 */
 	void *freeIt;
@@ -380,18 +389,15 @@ CondCvtArg(const char *str, double *valu
 }
 
 /*-
- * Get a string from a variable reference or an optionally quoted
+ * Parse a string from a variable reference or an optionally quoted
  * string.  This is called for the lhs and rhs of string compares.
  *
  * Results:
  *	Returns the string, absent any quotes, or NULL on error.
  *	Sets quoted if the string was quoted.
  *	Sets freeIt if needed.
- *
- * Side Effects:
- *	Moves condExpr past the end of this token.
  */
-/* coverity:[+alloc : arg-*2] */
+/* coverity:[+alloc : arg-*3] */
 static const char *
 CondGetString(CondLexer *lex, Boolean doEval, Boolean *quoted, void **freeIt,
 	  Boolean strictLHS)
@@ -498,7 +504,7 @@ cleanup:
 return str;
 }
 
-/* The different forms of #if's. */
+/* The different forms of .if directives. */
 static const struct If {
 const char *form;		/* Form of if */
 size_t formlen;		/* Length of form */
@@ -513,12 +519,6 @@ static const struct If {
 { NULL,0, FALSE, NULL }
 };
 
-/*-
- * Return the next token from the input.
- *
- * Side Effects:
- *	condPushback will be set back to TOK_NONE if it is 

CVS commit: src/usr.bin/make

2020-09-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Sep  8 18:51:23 UTC 2020

Modified Files:
src/usr.bin/make: cond.c

Log Message:
make(1): clean up comments in cond.c


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/usr.bin/make/cond.c

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



CVS commit: src/usr.bin/make

2020-09-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Sep  8 18:10:34 UTC 2020

Modified Files:
src/usr.bin/make: cond.c

Log Message:
make(1): add CondLexer_SkipWhitespace


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/usr.bin/make/cond.c

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



CVS commit: src/usr.bin/make

2020-09-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Sep  8 18:10:34 UTC 2020

Modified Files:
src/usr.bin/make: cond.c

Log Message:
make(1): add CondLexer_SkipWhitespace


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/usr.bin/make/cond.c

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

Modified files:

Index: src/usr.bin/make/cond.c
diff -u src/usr.bin/make/cond.c:1.115 src/usr.bin/make/cond.c:1.116
--- src/usr.bin/make/cond.c:1.115	Tue Sep  8 18:06:27 2020
+++ src/usr.bin/make/cond.c	Tue Sep  8 18:10:34 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cond.c,v 1.115 2020/09/08 18:06:27 rillig Exp $	*/
+/*	$NetBSD: cond.c,v 1.116 2020/09/08 18:10:34 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: cond.c,v 1.115 2020/09/08 18:06:27 rillig Exp $";
+static char rcsid[] = "$NetBSD: cond.c,v 1.116 2020/09/08 18:10:34 rillig Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)cond.c	8.2 (Berkeley) 1/2/94";
 #else
-__RCSID("$NetBSD: cond.c,v 1.115 2020/09/08 18:06:27 rillig Exp $");
+__RCSID("$NetBSD: cond.c,v 1.116 2020/09/08 18:10:34 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -173,6 +173,13 @@ CondLexer_PushBack(CondLexer *lex, Token
 lex->curr = t;
 }
 
+static void
+CondLexer_SkipWhitespace(CondLexer *lex)
+{
+while (isspace((unsigned char)lex->condExpr[0]))
+	lex->condExpr++;
+}
+
 /* Parse the argument of a built-in function.
  *
  * Arguments:
@@ -538,11 +545,7 @@ compare_expression(CondLexer *lex, Boole
 if (!lhs)
 	goto done;
 
-/*
- * Skip whitespace to get to the operator
- */
-while (isspace((unsigned char)*lex->condExpr))
-	lex->condExpr++;
+CondLexer_SkipWhitespace(lex);
 
 /*
  * Make sure the operator is a valid one. If it isn't a
@@ -586,8 +589,7 @@ compare_expression(CondLexer *lex, Boole
 	goto done;
 }
 
-while (isspace((unsigned char)*lex->condExpr))
-	lex->condExpr++;
+CondLexer_SkipWhitespace(lex);
 
 if (*lex->condExpr == '\0') {
 	Parse_Error(PARSE_WARNING,



CVS commit: src/usr.bin/make

2020-09-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Sep  8 18:06:27 UTC 2020

Modified Files:
src/usr.bin/make: cond.c

Log Message:
make(1): rename CondLexer.condPushBack to curr

This variable has some context information from the struct now,
therefore its name can be shorter.


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/usr.bin/make/cond.c

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

Modified files:

Index: src/usr.bin/make/cond.c
diff -u src/usr.bin/make/cond.c:1.114 src/usr.bin/make/cond.c:1.115
--- src/usr.bin/make/cond.c:1.114	Tue Sep  8 17:55:23 2020
+++ src/usr.bin/make/cond.c	Tue Sep  8 18:06:27 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cond.c,v 1.114 2020/09/08 17:55:23 rillig Exp $	*/
+/*	$NetBSD: cond.c,v 1.115 2020/09/08 18:06:27 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: cond.c,v 1.114 2020/09/08 17:55:23 rillig Exp $";
+static char rcsid[] = "$NetBSD: cond.c,v 1.115 2020/09/08 18:06:27 rillig Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)cond.c	8.2 (Berkeley) 1/2/94";
 #else
-__RCSID("$NetBSD: cond.c,v 1.114 2020/09/08 17:55:23 rillig Exp $");
+__RCSID("$NetBSD: cond.c,v 1.115 2020/09/08 18:06:27 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -139,8 +139,7 @@ typedef enum {
 typedef struct {
 const struct If *if_info;	/* Info for current statement */
 const char *condExpr;	/* The expression to parse */
-Token condPushBack;		/* Single push-back token used in
- * parsing */
+Token curr;			/* Single push-back token used in parsing */
 } CondLexer;
 
 static Token CondE(CondLexer *lex, Boolean);
@@ -164,12 +163,14 @@ istoken(const char *str, const char *tok
 return strncmp(str, tok, len) == 0 && !isalpha((unsigned char)str[len]);
 }
 
-/* Push back the most recent token read. We only need one level of
- * this, so the thing is just stored in 'condPushback'. */
+/* Push back the most recent token read. We only need one level of this. */
 static void
-CondPushBack(CondLexer *lex, Token t)
+CondLexer_PushBack(CondLexer *lex, Token t)
 {
-lex->condPushBack = t;
+assert(lex->curr == TOK_NONE);
+assert(t != TOK_NONE);
+
+lex->curr = t;
 }
 
 /* Parse the argument of a built-in function.
@@ -799,9 +800,9 @@ CondToken(CondLexer *lex, Boolean doEval
 {
 Token t;
 
-t = lex->condPushBack;
+t = lex->curr;
 if (t != TOK_NONE) {
-	lex->condPushBack = TOK_NONE;
+	lex->curr = TOK_NONE;
 	return t;
 }
 
@@ -942,7 +943,7 @@ CondF(CondLexer *lex, Boolean doEval)
 	/*
 	 * F -> T
 	 */
-	CondPushBack(lex, o);
+	CondLexer_PushBack(lex, o);
 	}
 }
 return l;
@@ -989,7 +990,7 @@ CondE(CondLexer *lex, Boolean doEval)
 	/*
 	 * E -> F
 	 */
-	CondPushBack(lex, o);
+	CondLexer_PushBack(lex, o);
 	}
 }
 return l;
@@ -1054,7 +1055,7 @@ Cond_EvalExpression(const struct If *inf
 
 lex.if_info = info;
 lex.condExpr = line;
-lex.condPushBack = TOK_NONE;
+lex.curr = TOK_NONE;
 
 rval = do_Cond_EvalExpression(, value);
 



CVS commit: src/usr.bin/make

2020-09-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Sep  8 18:06:27 UTC 2020

Modified Files:
src/usr.bin/make: cond.c

Log Message:
make(1): rename CondLexer.condPushBack to curr

This variable has some context information from the struct now,
therefore its name can be shorter.


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/usr.bin/make/cond.c

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



CVS commit: src/usr.bin/make

2020-09-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Sep  8 17:55:23 UTC 2020

Modified Files:
src/usr.bin/make: cond.c

Log Message:
make(1): group the condition parsing state into a struct

Instead of having 3 global variables, the struct clearly communicates
that the 3 variables belong together. During debugging, it's easy to
just "p *lex" instead of remembering the names of the 3 former global
variables.

Converting the global variables into a local variable makes it
immediately clear that the functions in this file operate on this
struct.  Keeping the global variables in mind is more difficult.  Having
a local variable also gets rid of the 3 sv_* variables in
Cond_EvalExpression, which were also a sign that these "global
variables" were not that global at all.

This commit only contains the minimal code changes for converting the
variables into a local struct.  It was tempting to add functions like
CondLexer_SkipWhitespace, but this is better left for a follow-up
commit.


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/usr.bin/make/cond.c

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



CVS commit: src/usr.bin/make

2020-09-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Sep  8 17:55:23 UTC 2020

Modified Files:
src/usr.bin/make: cond.c

Log Message:
make(1): group the condition parsing state into a struct

Instead of having 3 global variables, the struct clearly communicates
that the 3 variables belong together. During debugging, it's easy to
just "p *lex" instead of remembering the names of the 3 former global
variables.

Converting the global variables into a local variable makes it
immediately clear that the functions in this file operate on this
struct.  Keeping the global variables in mind is more difficult.  Having
a local variable also gets rid of the 3 sv_* variables in
Cond_EvalExpression, which were also a sign that these "global
variables" were not that global at all.

This commit only contains the minimal code changes for converting the
variables into a local struct.  It was tempting to add functions like
CondLexer_SkipWhitespace, but this is better left for a follow-up
commit.


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/usr.bin/make/cond.c

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

Modified files:

Index: src/usr.bin/make/cond.c
diff -u src/usr.bin/make/cond.c:1.113 src/usr.bin/make/cond.c:1.114
--- src/usr.bin/make/cond.c:1.113	Tue Sep  8 14:51:43 2020
+++ src/usr.bin/make/cond.c	Tue Sep  8 17:55:23 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cond.c,v 1.113 2020/09/08 14:51:43 rillig Exp $	*/
+/*	$NetBSD: cond.c,v 1.114 2020/09/08 17:55:23 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: cond.c,v 1.113 2020/09/08 14:51:43 rillig Exp $";
+static char rcsid[] = "$NetBSD: cond.c,v 1.114 2020/09/08 17:55:23 rillig Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)cond.c	8.2 (Berkeley) 1/2/94";
 #else
-__RCSID("$NetBSD: cond.c,v 1.113 2020/09/08 14:51:43 rillig Exp $");
+__RCSID("$NetBSD: cond.c,v 1.114 2020/09/08 17:55:23 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -136,13 +136,15 @@ typedef enum {
 TOK_LPAREN, TOK_RPAREN, TOK_EOF, TOK_NONE, TOK_ERROR
 } Token;
 
-static Token CondE(Boolean);
-static CondEvalResult do_Cond_EvalExpression(Boolean *);
+typedef struct {
+const struct If *if_info;	/* Info for current statement */
+const char *condExpr;	/* The expression to parse */
+Token condPushBack;		/* Single push-back token used in
+ * parsing */
+} CondLexer;
 
-static const struct If *if_info;	/* Info for current statement */
-static const char *condExpr;		/* The expression to parse */
-static Token condPushBack = TOK_NONE;	/* Single push-back token used in
-	 * parsing */
+static Token CondE(CondLexer *lex, Boolean);
+static CondEvalResult do_Cond_EvalExpression(CondLexer *lex, Boolean *);
 
 static unsigned int cond_depth = 0;	/* current .if nesting level */
 static unsigned int cond_min_depth = 0;	/* depth at makefile open */
@@ -165,9 +167,9 @@ istoken(const char *str, const char *tok
 /* Push back the most recent token read. We only need one level of
  * this, so the thing is just stored in 'condPushback'. */
 static void
-CondPushBack(Token t)
+CondPushBack(CondLexer *lex, Token t)
 {
-condPushBack = t;
+lex->condPushBack = t;
 }
 
 /* Parse the argument of a built-in function.
@@ -383,7 +385,8 @@ CondCvtArg(const char *str, double *valu
  */
 /* coverity:[+alloc : arg-*2] */
 static const char *
-CondGetString(Boolean doEval, Boolean *quoted, void **freeIt, Boolean strictLHS)
+CondGetString(CondLexer *lex, Boolean doEval, Boolean *quoted, void **freeIt,
+	  Boolean strictLHS)
 {
 Buffer buf;
 const char *str;
@@ -395,23 +398,24 @@ CondGetString(Boolean doEval, Boolean *q
 Buf_Init(, 0);
 str = NULL;
 *freeIt = NULL;
-*quoted = qt = *condExpr == '"' ? 1 : 0;
+*quoted = qt = *lex->condExpr == '"' ? 1 : 0;
 if (qt)
-	condExpr++;
-for (start = condExpr; *condExpr && str == NULL; condExpr++) {
-	switch (*condExpr) {
+	lex->condExpr++;
+for (start = lex->condExpr;
+	 *lex->condExpr && str == NULL; lex->condExpr++) {
+	switch (*lex->condExpr) {
 	case '\\':
-	if (condExpr[1] != '\0') {
-		condExpr++;
-		Buf_AddByte(, *condExpr);
+	if (lex->condExpr[1] != '\0') {
+		lex->condExpr++;
+		Buf_AddByte(, *lex->condExpr);
 	}
 	break;
 	case '"':
 	if (qt) {
-		condExpr++;		/* we don't want the quotes */
+		lex->condExpr++;	/* we don't want the quotes */
 		goto got_str;
 	} else
-		Buf_AddByte(, *condExpr); /* likely? */
+		Buf_AddByte(, *lex->condExpr); /* likely? */
 	break;
 	case ')':
 	case '!':
@@ -423,13 +427,13 @@ CondGetString(Boolean doEval, Boolean *q
 	if (!qt)
 		goto got_str;
 	else
-		Buf_AddByte(, *condExpr);
+		Buf_AddByte(, *lex->condExpr);
 	break;
 	case '$':
 	/* if we are in quotes, then an undefined 

CVS commit: src/sys/arch/evbarm/conf

2020-09-08 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue Sep  8 17:39:04 UTC 2020

Modified Files:
src/sys/arch/evbarm/conf: std.generic64

Log Message:
Enable __BUS_SPACE_HAS_STREAM_METHODS in std.generic64

These are needed for virtio_pci on aarch64eb.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbarm/conf/std.generic64

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

Modified files:

Index: src/sys/arch/evbarm/conf/std.generic64
diff -u src/sys/arch/evbarm/conf/std.generic64:1.12 src/sys/arch/evbarm/conf/std.generic64:1.13
--- src/sys/arch/evbarm/conf/std.generic64:1.12	Sat Dec  7 16:00:09 2019
+++ src/sys/arch/evbarm/conf/std.generic64	Tue Sep  8 17:39:04 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: std.generic64,v 1.12 2019/12/07 16:00:09 jmcneill Exp $
+#	$NetBSD: std.generic64,v 1.13 2020/09/08 17:39:04 jakllsch Exp $
 #
 #	generic NetBSD/evbarm64 with FDT support
 
@@ -24,6 +24,7 @@ options 	__HAVE_GENERIC_CPU_INITCLOCKS
 options 	__HAVE_PCI_CONF_HOOK
 options 	__HAVE_PCI_MSI_MSIX
 options 	__BUS_SPACE_HAS_PROBING_METHODS
+options 	__BUS_SPACE_HAS_STREAM_METHODS
 
 # XXXNH not yet
 #options 	__HAVE_CPU_UAREA_ALLOC_IDLELWP



CVS commit: src/sys/arch/evbarm/conf

2020-09-08 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue Sep  8 17:39:04 UTC 2020

Modified Files:
src/sys/arch/evbarm/conf: std.generic64

Log Message:
Enable __BUS_SPACE_HAS_STREAM_METHODS in std.generic64

These are needed for virtio_pci on aarch64eb.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbarm/conf/std.generic64

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



CVS commit: src

2020-09-08 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue Sep  8 17:35:27 UTC 2020

Modified Files:
src/sys/crypto/aes/arch/arm: files.aesneon
src/sys/crypto/chacha/arch/arm: files.chacha_arm
src/tests/sys/crypto/aes: Makefile
src/tests/sys/crypto/chacha: Makefile

Log Message:
Acknowledge clang warning for NEON cipher code on aarch64eb

We've already made the nonportable vector initializations portable; the
code works on aarch64eb.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/crypto/aes/arch/arm/files.aesneon
cvs rdiff -u -r1.4 -r1.5 src/sys/crypto/chacha/arch/arm/files.chacha_arm
cvs rdiff -u -r1.5 -r1.6 src/tests/sys/crypto/aes/Makefile
cvs rdiff -u -r1.5 -r1.6 src/tests/sys/crypto/chacha/Makefile

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

Modified files:

Index: src/sys/crypto/aes/arch/arm/files.aesneon
diff -u src/sys/crypto/aes/arch/arm/files.aesneon:1.4 src/sys/crypto/aes/arch/arm/files.aesneon:1.5
--- src/sys/crypto/aes/arch/arm/files.aesneon:1.4	Sun Aug 16 18:02:03 2020
+++ src/sys/crypto/aes/arch/arm/files.aesneon	Tue Sep  8 17:35:27 2020
@@ -1,8 +1,10 @@
-#	$NetBSD: files.aesneon,v 1.4 2020/08/16 18:02:03 riastradh Exp $
+#	$NetBSD: files.aesneon,v 1.5 2020/09/08 17:35:27 jakllsch Exp $
 
 ifdef aarch64
 makeoptions	aes	"COPTS.aes_neon.c"+="-march=armv8-a"
 makeoptions	aes	"COPTS.aes_neon_subr.c"+="-march=armv8-a"
+makeoptions	aes	"CWARNFLAGS.aes_neon.c"+="${${ACTIVE_CC} == clang :? -Wno-nonportable-vector-initialization :}"
+makeoptions	aes	"CWARNFLAGS.aes_neon_subr.c"+="${${ACTIVE_CC} == clang :? -Wno-nonportable-vector-initialization :}"
 else
 makeoptions	aes	"COPTS.aes_neon.c"+="-mfloat-abi=softfp -mfpu=neon"
 makeoptions	aes	"COPTS.aes_neon_subr.c"+="-mfloat-abi=softfp -mfpu=neon"

Index: src/sys/crypto/chacha/arch/arm/files.chacha_arm
diff -u src/sys/crypto/chacha/arch/arm/files.chacha_arm:1.4 src/sys/crypto/chacha/arch/arm/files.chacha_arm:1.5
--- src/sys/crypto/chacha/arch/arm/files.chacha_arm:1.4	Tue Sep  8 17:17:32 2020
+++ src/sys/crypto/chacha/arch/arm/files.chacha_arm	Tue Sep  8 17:35:27 2020
@@ -1,7 +1,8 @@
-#	$NetBSD: files.chacha_arm,v 1.4 2020/09/08 17:17:32 jakllsch Exp $
+#	$NetBSD: files.chacha_arm,v 1.5 2020/09/08 17:35:27 jakllsch Exp $
 
 ifdef aarch64
 makeoptions	chacha	"COPTS.chacha_neon.c"+="-march=armv8-a"
+makeoptions	chacha	"CWARNFLAGS.chacha_neon.c"+="${${ACTIVE_CC} == clang :? -Wno-nonportable-vector-initialization :}"
 else
 makeoptions	chacha	"COPTS.chacha_neon.c"+="-mfloat-abi=softfp -mfpu=neon"
 endif

Index: src/tests/sys/crypto/aes/Makefile
diff -u src/tests/sys/crypto/aes/Makefile:1.5 src/tests/sys/crypto/aes/Makefile:1.6
--- src/tests/sys/crypto/aes/Makefile:1.5	Mon Aug 17 16:26:02 2020
+++ src/tests/sys/crypto/aes/Makefile	Tue Sep  8 17:35:27 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2020/08/17 16:26:02 riastradh Exp $
+#	$NetBSD: Makefile,v 1.6 2020/09/08 17:35:27 jakllsch Exp $
 
 .include 
 
@@ -29,9 +29,13 @@ SRCS.t_aes+=	aes_armv8.c
 SRCS.t_aes+=	aes_armv8_64.S
 .endif
 
+CLANG_NO_NONPORTABLE_VECTOR_INITIALIZATION= ${${ACTIVE_CC} == "clang":? -Wno-nonportable-vector-initialization :}
+
 SRCS.t_aes+=	aes_neon.c
+COPTS.aes_neon.c+=${CLANG_NO_NONPORTABLE_VECTOR_INITIALIZATION}
 SRCS.t_aes+=	aes_neon_impl.c
 SRCS.t_aes+=	aes_neon_subr.c
+COPTS.aes_neon_subr.c+=${CLANG_NO_NONPORTABLE_VECTOR_INITIALIZATION}
 .if !empty(MACHINE_ARCH:Mearmv7*)
 SRCS.t_aes+=	aes_neon_32.S
 .endif

Index: src/tests/sys/crypto/chacha/Makefile
diff -u src/tests/sys/crypto/chacha/Makefile:1.5 src/tests/sys/crypto/chacha/Makefile:1.6
--- src/tests/sys/crypto/chacha/Makefile:1.5	Mon Aug 17 16:26:02 2020
+++ src/tests/sys/crypto/chacha/Makefile	Tue Sep  8 17:35:27 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2020/08/17 16:26:02 riastradh Exp $
+#	$NetBSD: Makefile,v 1.6 2020/09/08 17:35:27 jakllsch Exp $
 
 .include 
 
@@ -21,7 +21,10 @@ SRCS.t_chacha+=	chacha_selftest.c
 .PATH:	${NETBSDSRCDIR}/sys/crypto/chacha/arch/arm
 CPPFLAGS+=	-I${NETBSDSRCDIR}/sys/crypto/chacha/arch/arm
 
+CLANG_NO_NONPORTABLE_VECTOR_INITIALIZATION= ${${ACTIVE_CC} == "clang":? -Wno-nonportable-vector-initialization :}
+
 SRCS.t_chacha+=	chacha_neon.c
+COPTS.chacha_neon.c+=	${CLANG_NO_NONPORTABLE_VECTOR_INITIALIZATION}
 .if !empty(MACHINE_ARCH:Mearmv7*)
 SRCS.t_chacha+=	chacha_neon_32.S
 .elif !empty(MACHINE_ARCH:Maarch64*)



CVS commit: src

2020-09-08 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue Sep  8 17:35:27 UTC 2020

Modified Files:
src/sys/crypto/aes/arch/arm: files.aesneon
src/sys/crypto/chacha/arch/arm: files.chacha_arm
src/tests/sys/crypto/aes: Makefile
src/tests/sys/crypto/chacha: Makefile

Log Message:
Acknowledge clang warning for NEON cipher code on aarch64eb

We've already made the nonportable vector initializations portable; the
code works on aarch64eb.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/crypto/aes/arch/arm/files.aesneon
cvs rdiff -u -r1.4 -r1.5 src/sys/crypto/chacha/arch/arm/files.chacha_arm
cvs rdiff -u -r1.5 -r1.6 src/tests/sys/crypto/aes/Makefile
cvs rdiff -u -r1.5 -r1.6 src/tests/sys/crypto/chacha/Makefile

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



CVS commit: src/share/man/man4

2020-09-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Sep  8 17:30:44 UTC 2020

Modified Files:
src/share/man/man4: ip.4

Log Message:
Serial comma.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/share/man/man4/ip.4

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

Modified files:

Index: src/share/man/man4/ip.4
diff -u src/share/man/man4/ip.4:1.46 src/share/man/man4/ip.4:1.47
--- src/share/man/man4/ip.4:1.46	Tue Sep  8 17:29:09 2020
+++ src/share/man/man4/ip.4	Tue Sep  8 17:30:44 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ip.4,v 1.46 2020/09/08 17:29:09 wiz Exp $
+.\"	$NetBSD: ip.4,v 1.47 2020/09/08 17:30:44 wiz Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -230,7 +230,7 @@ If the
 .Dv IP_BINDANY
 option is enabled on a
 .Dv SOCK_STREAM ,
-.Dv SOCK_DGRAM
+.Dv SOCK_DGRAM ,
 or a
 .Dv SOCK_RAW
 socket, one can



CVS commit: src/share/man/man4

2020-09-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Sep  8 17:30:44 UTC 2020

Modified Files:
src/share/man/man4: ip.4

Log Message:
Serial comma.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/share/man/man4/ip.4

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



CVS commit: src/share/man/man4

2020-09-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Sep  8 17:30:10 UTC 2020

Modified Files:
src/share/man/man4: ip6.4

Log Message:
Improve BINDANY formatting.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/share/man/man4/ip6.4

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

Modified files:

Index: src/share/man/man4/ip6.4
diff -u src/share/man/man4/ip6.4:1.33 src/share/man/man4/ip6.4:1.34
--- src/share/man/man4/ip6.4:1.33	Tue Sep  8 17:29:20 2020
+++ src/share/man/man4/ip6.4	Tue Sep  8 17:30:10 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ip6.4,v 1.33 2020/09/08 17:29:20 wiz Exp $
+.\"	$NetBSD: ip6.4,v 1.34 2020/09/08 17:30:10 wiz Exp $
 .\"	$KAME: ip6.4,v 1.23 2005/01/11 05:56:25 itojun Exp $
 .\"	$OpenBSD: ip6.4,v 1.21 2005/01/06 03:50:46 itojun Exp $
 .\"
@@ -429,10 +429,10 @@ Get or set the ESP encapsulation level.
 Get or set the
 .Xr ipcomp 4
 level.
-.Dv IPV6_BINDANY
-option is enabled on a
+.It Dv IPV6_BINDANY
+If this option is enabled on a
 .Dv SOCK_STREAM ,
-.Dv SOCK_DGRAM
+.Dv SOCK_DGRAM ,
 or a
 .Dv SOCK_RAW
 socket, one can



CVS commit: src/share/man/man4

2020-09-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Sep  8 17:30:10 UTC 2020

Modified Files:
src/share/man/man4: ip6.4

Log Message:
Improve BINDANY formatting.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/share/man/man4/ip6.4

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



CVS commit: src/share/man/man4

2020-09-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Sep  8 17:29:20 UTC 2020

Modified Files:
src/share/man/man4: ip6.4

Log Message:
Remove superfluous Pp.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/share/man/man4/ip6.4

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

Modified files:

Index: src/share/man/man4/ip6.4
diff -u src/share/man/man4/ip6.4:1.32 src/share/man/man4/ip6.4:1.33
--- src/share/man/man4/ip6.4:1.32	Tue Sep  8 14:12:57 2020
+++ src/share/man/man4/ip6.4	Tue Sep  8 17:29:20 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ip6.4,v 1.32 2020/09/08 14:12:57 christos Exp $
+.\"	$NetBSD: ip6.4,v 1.33 2020/09/08 17:29:20 wiz Exp $
 .\"	$KAME: ip6.4,v 1.23 2005/01/11 05:56:25 itojun Exp $
 .\"	$OpenBSD: ip6.4,v 1.21 2005/01/06 03:50:46 itojun Exp $
 .\"
@@ -253,7 +253,6 @@ variables:
 .Dv net.inet.ip6.anonportalgo.available
 and
 .Dv net.inet.ip6.anonportalgo.selected .
-.Pp
 .It Dv IPV6_PORTRANGE Fa "int *"
 Get or set the allocation policy of ephemeral ports for when the kernel
 automatically binds a local address to this socket.



CVS commit: src/share/man/man4

2020-09-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Sep  8 17:29:10 UTC 2020

Modified Files:
src/share/man/man4: ip.4

Log Message:
Use \(em.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/share/man/man4/ip.4

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



CVS commit: src/share/man/man4

2020-09-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Sep  8 17:29:10 UTC 2020

Modified Files:
src/share/man/man4: ip.4

Log Message:
Use \(em.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/share/man/man4/ip.4

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

Modified files:

Index: src/share/man/man4/ip.4
diff -u src/share/man/man4/ip.4:1.45 src/share/man/man4/ip.4:1.46
--- src/share/man/man4/ip.4:1.45	Tue Sep  8 14:12:57 2020
+++ src/share/man/man4/ip.4	Tue Sep  8 17:29:09 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ip.4,v 1.45 2020/09/08 14:12:57 christos Exp $
+.\"	$NetBSD: ip.4,v 1.46 2020/09/08 17:29:09 wiz Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -536,7 +536,7 @@ Source code compatibility with both envi
 .%R RFC
 .%N 1122
 .%D October 1989
-.%T "Requirements for Internet Hosts -- Communication Layers"
+.%T "Requirements for Internet Hosts \(em Communication Layers"
 .Re
 .Sh HISTORY
 The



CVS commit: src/share/man/man4

2020-09-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Sep  8 17:29:20 UTC 2020

Modified Files:
src/share/man/man4: ip6.4

Log Message:
Remove superfluous Pp.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/share/man/man4/ip6.4

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



CVS commit: src/sys/arch/arm/arm

2020-09-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Sep  8 17:20:11 UTC 2020

Modified Files:
src/sys/arch/arm/arm: efi_runtime.c

Log Message:
Disable EFI runtime support for BE kernels


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/arm/efi_runtime.c

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



CVS commit: src/sys/arch/arm/arm

2020-09-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Sep  8 17:20:11 UTC 2020

Modified Files:
src/sys/arch/arm/arm: efi_runtime.c

Log Message:
Disable EFI runtime support for BE kernels


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/arm/efi_runtime.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/arch/arm/arm/efi_runtime.c
diff -u src/sys/arch/arm/arm/efi_runtime.c:1.3 src/sys/arch/arm/arm/efi_runtime.c:1.4
--- src/sys/arch/arm/arm/efi_runtime.c:1.3	Mon Dec 16 00:03:50 2019
+++ src/sys/arch/arm/arm/efi_runtime.c	Tue Sep  8 17:20:10 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: efi_runtime.c,v 1.3 2019/12/16 00:03:50 jmcneill Exp $ */
+/* $NetBSD: efi_runtime.c,v 1.4 2020/09/08 17:20:10 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,10 +30,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: efi_runtime.c,v 1.3 2019/12/16 00:03:50 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: efi_runtime.c,v 1.4 2020/09/08 17:20:10 jmcneill Exp $");
 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -41,12 +42,13 @@ __KERNEL_RCSID(0, "$NetBSD: efi_runtime.
 
 static kmutex_t efi_lock;
 
-static struct efi_systbl *ST = NULL;
 static struct efi_rt *RT = NULL;
 
 int
 arm_efirt_init(paddr_t efi_system_table)
 {
+#if BYTE_ORDER == LITTLE_ENDIAN
+	struct efi_systbl *ST;
 	const size_t sz = PAGE_SIZE * 2;
 	vaddr_t va, cva;
 	paddr_t cpa;
@@ -74,6 +76,10 @@ arm_efirt_init(paddr_t efi_system_table)
 	mutex_init(_lock, MUTEX_DEFAULT, IPL_HIGH);
 
 	return 0;
+#else
+	/* EFI runtime not supported in big endian mode */
+	return ENXIO;
+#endif
 }
 
 int



CVS commit: src/sys/crypto/chacha/arch/arm

2020-09-08 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue Sep  8 17:17:32 UTC 2020

Modified Files:
src/sys/crypto/chacha/arch/arm: files.chacha_arm

Log Message:
use correct condition


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/crypto/chacha/arch/arm/files.chacha_arm

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



CVS commit: src/sys/crypto/chacha/arch/arm

2020-09-08 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue Sep  8 17:17:32 UTC 2020

Modified Files:
src/sys/crypto/chacha/arch/arm: files.chacha_arm

Log Message:
use correct condition


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/crypto/chacha/arch/arm/files.chacha_arm

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

Modified files:

Index: src/sys/crypto/chacha/arch/arm/files.chacha_arm
diff -u src/sys/crypto/chacha/arch/arm/files.chacha_arm:1.3 src/sys/crypto/chacha/arch/arm/files.chacha_arm:1.4
--- src/sys/crypto/chacha/arch/arm/files.chacha_arm:1.3	Tue Jul 28 20:08:48 2020
+++ src/sys/crypto/chacha/arch/arm/files.chacha_arm	Tue Sep  8 17:17:32 2020
@@ -1,9 +1,9 @@
-#	$NetBSD: files.chacha_arm,v 1.3 2020/07/28 20:08:48 riastradh Exp $
+#	$NetBSD: files.chacha_arm,v 1.4 2020/09/08 17:17:32 jakllsch Exp $
 
 ifdef aarch64
 makeoptions	chacha	"COPTS.chacha_neon.c"+="-march=armv8-a"
 else
-makeoptions	aes	"COPTS.chacha_neon.c"+="-mfloat-abi=softfp -mfpu=neon"
+makeoptions	chacha	"COPTS.chacha_neon.c"+="-mfloat-abi=softfp -mfpu=neon"
 endif
 
 file	crypto/chacha/arch/arm/chacha_neon.c	chacha & (cpu_cortex | aarch64)



CVS commit: src

2020-09-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Sep  8 17:02:18 UTC 2020

Modified Files:
src/share/man/man9: workqueue.9
src/sys/kern: subr_workqueue.c

Log Message:
workqueue: Lift unnecessary restriction on workqueue_wait.

Allow multiple concurrent waits at a time, and allow enqueueing work
at the same time (as long as it's not the work we're waiting for).
This way multiple users can use a shared global workqueue and safely
wait for individual work items concurrently, while the workqueue is
still in use for other items (e.g., wg(4) peers).

This has the side effect of taking away a diagnostic measure, but I
think allowing the diagnostic's false positives instead of rejecting
them is worth it.  We could cheaply add it back with some false
negatives if it's important.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/share/man/man9/workqueue.9
cvs rdiff -u -r1.38 -r1.39 src/sys/kern/subr_workqueue.c

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

Modified files:

Index: src/share/man/man9/workqueue.9
diff -u src/share/man/man9/workqueue.9:1.14 src/share/man/man9/workqueue.9:1.15
--- src/share/man/man9/workqueue.9:1.14	Sat Aug  1 09:51:06 2020
+++ src/share/man/man9/workqueue.9	Tue Sep  8 17:02:18 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: workqueue.9,v 1.14 2020/08/01 09:51:06 wiz Exp $
+.\"	$NetBSD: workqueue.9,v 1.15 2020/09/08 17:02:18 riastradh Exp $
 .\"
 .\" Copyright (c)2005 YAMAMOTO Takashi,
 .\" All rights reserved.
@@ -133,11 +133,11 @@ waits for a specified work
 on the workqueue
 .Fa wq
 to finish.
-The caller must ensure that no new work will be enqueued to the workqueue
-beforehand.
-Note that if the workqueue is
-.Dv WQ_PERCPU ,
-the caller can enqueue a new work to another queue other than the waiting queue.
+The caller must ensure that
+.Fa wk
+will not be enqueued to the workqueue again until after
+.Fn workqueue_wait
+returns.
 .Pp
 .\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 .Fn workqueue_destroy

Index: src/sys/kern/subr_workqueue.c
diff -u src/sys/kern/subr_workqueue.c:1.38 src/sys/kern/subr_workqueue.c:1.39
--- src/sys/kern/subr_workqueue.c:1.38	Sat Aug  1 02:14:43 2020
+++ src/sys/kern/subr_workqueue.c	Tue Sep  8 17:02:18 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_workqueue.c,v 1.38 2020/08/01 02:14:43 riastradh Exp $	*/
+/*	$NetBSD: subr_workqueue.c,v 1.39 2020/09/08 17:02:18 riastradh Exp $	*/
 
 /*-
  * Copyright (c)2002, 2005, 2006, 2007 YAMAMOTO Takashi,
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_workqueue.c,v 1.38 2020/08/01 02:14:43 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_workqueue.c,v 1.39 2020/09/08 17:02:18 riastradh Exp $");
 
 #include 
 #include 
@@ -52,7 +52,6 @@ struct workqueue_queue {
 	struct workqhead q_queue_pending;
 	struct workqhead q_queue_running;
 	lwp_t *q_worker;
-	work_impl_t *q_waiter;
 };
 
 struct workqueue {
@@ -138,10 +137,8 @@ workqueue_worker(void *cookie)
 		mutex_enter(>q_mutex);
 		KASSERT(!SIMPLEQ_EMPTY(>q_queue_running));
 		SIMPLEQ_INIT(>q_queue_running);
-		if (__predict_false(q->q_waiter != NULL)) {
-			/* Wake up workqueue_wait */
-			cv_signal(>q_cv);
-		}
+		/* Wake up workqueue_wait */
+		cv_broadcast(>q_cv);
 		mutex_exit(>q_mutex);
 	}
 	if (wq->wq_flags & WQ_FPU)
@@ -211,7 +208,7 @@ workqueue_exit(struct work *wk, void *ar
 	KASSERT(SIMPLEQ_EMPTY(>q_queue_pending));
 	mutex_enter(>q_mutex);
 	q->q_worker = NULL;
-	cv_signal(>q_cv);
+	cv_broadcast(>q_cv);
 	mutex_exit(>q_mutex);
 	kthread_exit(0);
 }
@@ -228,7 +225,7 @@ workqueue_finiqueue(struct workqueue *wq
 	KASSERT(q->q_worker != NULL);
 	mutex_enter(>q_mutex);
 	SIMPLEQ_INSERT_TAIL(>q_queue_pending, _wk, wk_entry);
-	cv_signal(>q_cv);
+	cv_broadcast(>q_cv);
 	while (q->q_worker != NULL) {
 		cv_wait(>q_cv, >q_mutex);
 	}
@@ -306,13 +303,9 @@ workqueue_q_wait(struct workqueue_queue 
 found:
 	if (wk != NULL) {
 		found = true;
-		KASSERT(q->q_waiter == NULL);
-		q->q_waiter = wk;
 		cv_wait(>q_cv, >q_mutex);
 		goto again;
 	}
-	if (q->q_waiter != NULL)
-		q->q_waiter = NULL;
 out:
 	mutex_exit(>q_mutex);
 
@@ -386,11 +379,10 @@ workqueue_enqueue(struct workqueue *wq, 
 	q = workqueue_queue_lookup(wq, ci);
 
 	mutex_enter(>q_mutex);
-	KASSERT(q->q_waiter == NULL);
 #ifdef DEBUG
 	workqueue_check_duplication(q, wk);
 #endif
 	SIMPLEQ_INSERT_TAIL(>q_queue_pending, wk, wk_entry);
-	cv_signal(>q_cv);
+	cv_broadcast(>q_cv);
 	mutex_exit(>q_mutex);
 }



CVS commit: src/sys/dev/nvmm/x86

2020-09-08 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Tue Sep  8 17:00:07 UTC 2020

Modified Files:
src/sys/dev/nvmm/x86: nvmm_x86_vmx.c

Log Message:
nvmm-x86-vmx: improve the handling of CR0

 - CR0_ET is hard-wired to 1 in the cpu, so force CR0_ET to 1 in the
   shadow.
 - Clarify.


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/sys/dev/nvmm/x86/nvmm_x86_vmx.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/dev/nvmm/x86/nvmm_x86_vmx.c
diff -u src/sys/dev/nvmm/x86/nvmm_x86_vmx.c:1.78 src/sys/dev/nvmm/x86/nvmm_x86_vmx.c:1.79
--- src/sys/dev/nvmm/x86/nvmm_x86_vmx.c:1.78	Sun Sep  6 02:18:53 2020
+++ src/sys/dev/nvmm/x86/nvmm_x86_vmx.c	Tue Sep  8 17:00:07 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvmm_x86_vmx.c,v 1.78 2020/09/06 02:18:53 riastradh Exp $	*/
+/*	$NetBSD: nvmm_x86_vmx.c,v 1.79 2020/09/08 17:00:07 maxv Exp $	*/
 
 /*
  * Copyright (c) 2018-2020 Maxime Villard, m00nbsd.net
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_vmx.c,v 1.78 2020/09/06 02:18:53 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_vmx.c,v 1.79 2020/09/08 17:00:07 maxv Exp $");
 
 #include 
 #include 
@@ -728,8 +728,8 @@ static uint64_t vmx_xcr0_mask __read_mos
 #define MSRBM_NPAGES	1
 #define MSRBM_SIZE	(MSRBM_NPAGES * PAGE_SIZE)
 
-#define CR0_STATIC \
-	(CR0_NW|CR0_CD|CR0_ET)
+#define CR0_STATIC_MASK \
+	(CR0_ET | CR0_NW | CR0_CD)
 
 #define CR4_VALID \
 	(CR4_VME |			\
@@ -1572,7 +1572,7 @@ vmx_inkernel_handle_cr0(struct nvmm_mach
 uint64_t qual)
 {
 	struct vmx_cpudata *cpudata = vcpu->cpudata;
-	uint64_t type, gpr, oldcr0, cr0;
+	uint64_t type, gpr, oldcr0, realcr0, fakecr0;
 	uint64_t efer, ctls1;
 
 	type = __SHIFTOUT(qual, VMX_QUAL_CR_TYPE);
@@ -1584,15 +1584,24 @@ vmx_inkernel_handle_cr0(struct nvmm_mach
 	KASSERT(gpr < 16);
 
 	if (gpr == NVMM_X64_GPR_RSP) {
-		gpr = vmx_vmread(VMCS_GUEST_RSP);
+		fakecr0 = vmx_vmread(VMCS_GUEST_RSP);
 	} else {
-		gpr = cpudata->gprs[gpr];
+		fakecr0 = cpudata->gprs[gpr];
 	}
 
-	cr0 = gpr | CR0_NE | CR0_ET;
-	cr0 &= ~(CR0_NW|CR0_CD);
+	/*
+	 * fakecr0 is the value the guest believes is in %cr0. realcr0 is the
+	 * actual value in %cr0.
+	 *
+	 * In fakecr0 we must force CR0_ET to 1.
+	 *
+	 * In realcr0 we must force CR0_NW and CR0_CD to 0, and CR0_ET and
+	 * CR0_NE to 1.
+	 */
+	fakecr0 |= CR0_ET;
+	realcr0 = (fakecr0 & ~CR0_STATIC_MASK) | CR0_ET | CR0_NE;
 
-	if (vmx_check_cr(cr0, vmx_cr0_fixed0, vmx_cr0_fixed1) == -1) {
+	if (vmx_check_cr(realcr0, vmx_cr0_fixed0, vmx_cr0_fixed1) == -1) {
 		return -1;
 	}
 
@@ -1601,7 +1610,7 @@ vmx_inkernel_handle_cr0(struct nvmm_mach
 	 * from CR3.
 	 */
 
-	if (cr0 & CR0_PG) {
+	if (realcr0 & CR0_PG) {
 		ctls1 = vmx_vmread(VMCS_ENTRY_CTLS);
 		efer = vmx_vmread(VMCS_GUEST_IA32_EFER);
 		if (efer & EFER_LME) {
@@ -1615,14 +1624,14 @@ vmx_inkernel_handle_cr0(struct nvmm_mach
 		vmx_vmwrite(VMCS_ENTRY_CTLS, ctls1);
 	}
 
-	oldcr0 = (vmx_vmread(VMCS_CR0_SHADOW) & CR0_STATIC) |
-	(vmx_vmread(VMCS_GUEST_CR0) & ~CR0_STATIC);
-	if ((oldcr0 ^ gpr) & CR0_TLB_FLUSH) {
+	oldcr0 = (vmx_vmread(VMCS_CR0_SHADOW) & CR0_STATIC_MASK) |
+	(vmx_vmread(VMCS_GUEST_CR0) & ~CR0_STATIC_MASK);
+	if ((oldcr0 ^ fakecr0) & CR0_TLB_FLUSH) {
 		cpudata->gtlb_want_flush = true;
 	}
 
-	vmx_vmwrite(VMCS_CR0_SHADOW, gpr);
-	vmx_vmwrite(VMCS_GUEST_CR0, cr0);
+	vmx_vmwrite(VMCS_CR0_SHADOW, fakecr0);
+	vmx_vmwrite(VMCS_GUEST_CR0, realcr0);
 	vmx_inkernel_advance();
 	return 0;
 }
@@ -2574,15 +2583,26 @@ vmx_vcpu_setstate(struct nvmm_cpu *vcpu)
 
 	if (flags & NVMM_X64_STATE_CRS) {
 		/*
-		 * CR0_NE and CR4_VMXE are mandatory.
+		 * CR0_ET must be 1 both in the shadow and the real register.
+		 * CR0_NE must be 1 in the real register.
+		 * CR0_NW and CR0_CD must be 0 in the real register.
 		 */
-		vmx_vmwrite(VMCS_CR0_SHADOW, state->crs[NVMM_X64_CR_CR0]);
+		vmx_vmwrite(VMCS_CR0_SHADOW,
+		(state->crs[NVMM_X64_CR_CR0] & CR0_STATIC_MASK) |
+		CR0_ET);
 		vmx_vmwrite(VMCS_GUEST_CR0,
-		state->crs[NVMM_X64_CR_CR0] | CR0_NE);
+		(state->crs[NVMM_X64_CR_CR0] & ~CR0_STATIC_MASK) |
+		CR0_ET | CR0_NE);
+
 		cpudata->gcr2 = state->crs[NVMM_X64_CR_CR2];
-		vmx_vmwrite(VMCS_GUEST_CR3, state->crs[NVMM_X64_CR_CR3]); // XXX PDPTE?
+
+		/* XXX We are not handling PDPTE here. */
+		vmx_vmwrite(VMCS_GUEST_CR3, state->crs[NVMM_X64_CR_CR3]);
+
+		/* CR4_VMXE is mandatory. */
 		vmx_vmwrite(VMCS_GUEST_CR4,
 		(state->crs[NVMM_X64_CR_CR4] & CR4_VALID) | CR4_VMXE);
+
 		cpudata->gcr8 = state->crs[NVMM_X64_CR_CR8];
 
 		if (vmx_xcr0_mask != 0) {
@@ -2715,8 +2735,8 @@ vmx_vcpu_getstate(struct nvmm_cpu *vcpu)
 
 	if (flags & NVMM_X64_STATE_CRS) {
 		state->crs[NVMM_X64_CR_CR0] =
-		(vmx_vmread(VMCS_CR0_SHADOW) & CR0_STATIC) |
-		(vmx_vmread(VMCS_GUEST_CR0) & ~CR0_STATIC);
+		(vmx_vmread(VMCS_CR0_SHADOW) & CR0_STATIC_MASK) |
+		(vmx_vmread(VMCS_GUEST_CR0) & ~CR0_STATIC_MASK);
 		

CVS commit: src/sys/dev/nvmm/x86

2020-09-08 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Tue Sep  8 17:02:03 UTC 2020

Modified Files:
src/sys/dev/nvmm/x86: nvmm_x86_svm.c nvmm_x86_vmx.c

Log Message:
nvmm-x86: avoid hogging behavior observed recently

When the FPU code got rewritten in NetBSD, the dependency on IPL_HIGH was
eliminated, and I took _vcpu_guest_fpu_enter() out of the VCPU loop since
there was no need to be in the splhigh window.

Later, the code was switched to use the kernel FPU API, API that works at
IPL_VM, not at IPL_NONE.

These two changes mean that the whole VCPU loop is now executing at IPL_VM,
which is not desired, because it introduces a delay in interrupt processing
on the host in certain cases.

Fix this by putting _vcpu_guest_fpu_enter() back inside the VCPU loop.


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/sys/dev/nvmm/x86/nvmm_x86_svm.c
cvs rdiff -u -r1.79 -r1.80 src/sys/dev/nvmm/x86/nvmm_x86_vmx.c

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



CVS commit: src

2020-09-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Sep  8 17:02:18 UTC 2020

Modified Files:
src/share/man/man9: workqueue.9
src/sys/kern: subr_workqueue.c

Log Message:
workqueue: Lift unnecessary restriction on workqueue_wait.

Allow multiple concurrent waits at a time, and allow enqueueing work
at the same time (as long as it's not the work we're waiting for).
This way multiple users can use a shared global workqueue and safely
wait for individual work items concurrently, while the workqueue is
still in use for other items (e.g., wg(4) peers).

This has the side effect of taking away a diagnostic measure, but I
think allowing the diagnostic's false positives instead of rejecting
them is worth it.  We could cheaply add it back with some false
negatives if it's important.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/share/man/man9/workqueue.9
cvs rdiff -u -r1.38 -r1.39 src/sys/kern/subr_workqueue.c

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



CVS commit: src/sys/dev/nvmm/x86

2020-09-08 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Tue Sep  8 17:02:03 UTC 2020

Modified Files:
src/sys/dev/nvmm/x86: nvmm_x86_svm.c nvmm_x86_vmx.c

Log Message:
nvmm-x86: avoid hogging behavior observed recently

When the FPU code got rewritten in NetBSD, the dependency on IPL_HIGH was
eliminated, and I took _vcpu_guest_fpu_enter() out of the VCPU loop since
there was no need to be in the splhigh window.

Later, the code was switched to use the kernel FPU API, API that works at
IPL_VM, not at IPL_NONE.

These two changes mean that the whole VCPU loop is now executing at IPL_VM,
which is not desired, because it introduces a delay in interrupt processing
on the host in certain cases.

Fix this by putting _vcpu_guest_fpu_enter() back inside the VCPU loop.


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/sys/dev/nvmm/x86/nvmm_x86_svm.c
cvs rdiff -u -r1.79 -r1.80 src/sys/dev/nvmm/x86/nvmm_x86_vmx.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/dev/nvmm/x86/nvmm_x86_svm.c
diff -u src/sys/dev/nvmm/x86/nvmm_x86_svm.c:1.80 src/sys/dev/nvmm/x86/nvmm_x86_svm.c:1.81
--- src/sys/dev/nvmm/x86/nvmm_x86_svm.c:1.80	Tue Sep  8 16:58:38 2020
+++ src/sys/dev/nvmm/x86/nvmm_x86_svm.c	Tue Sep  8 17:02:03 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvmm_x86_svm.c,v 1.80 2020/09/08 16:58:38 maxv Exp $	*/
+/*	$NetBSD: nvmm_x86_svm.c,v 1.81 2020/09/08 17:02:03 maxv Exp $	*/
 
 /*
  * Copyright (c) 2018-2020 Maxime Villard, m00nbsd.net
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_svm.c,v 1.80 2020/09/08 16:58:38 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_svm.c,v 1.81 2020/09/08 17:02:03 maxv Exp $");
 
 #include 
 #include 
@@ -1328,9 +1328,6 @@ svm_exit_xsetbv(struct nvmm_machine *mac
 	}
 
 	cpudata->gxcr0 = val;
-	if (svm_xcr0_mask != 0) {
-		wrxcr(0, cpudata->gxcr0);
-	}
 
 	svm_inkernel_advance(cpudata->vmcb);
 	return;
@@ -1516,7 +1513,6 @@ svm_vcpu_run(struct nvmm_machine *mach, 
 
 	svm_vcpu_guest_dbregs_enter(vcpu);
 	svm_vcpu_guest_misc_enter(vcpu);
-	svm_vcpu_guest_fpu_enter(vcpu);
 
 	while (1) {
 		if (cpudata->gtlb_want_flush) {
@@ -1530,11 +1526,13 @@ svm_vcpu_run(struct nvmm_machine *mach, 
 			svm_vmcb_cache_flush(vmcb, VMCB_CTRL_VMCB_CLEAN_I);
 		}
 
+		svm_vcpu_guest_fpu_enter(vcpu);
 		svm_clgi();
 		machgen = svm_htlb_flush(machdata, cpudata);
 		svm_vmrun(cpudata->vmcb_pa, cpudata->gprs);
 		svm_htlb_flush_ack(cpudata, machgen);
 		svm_stgi();
+		svm_vcpu_guest_fpu_leave(vcpu);
 
 		svm_vmcb_cache_default(vmcb);
 
@@ -1622,7 +1620,6 @@ svm_vcpu_run(struct nvmm_machine *mach, 
 
 	cpudata->gtsc = rdtsc() + vmcb->ctrl.tsc_offset;
 
-	svm_vcpu_guest_fpu_leave(vcpu);
 	svm_vcpu_guest_misc_leave(vcpu);
 	svm_vcpu_guest_dbregs_leave(vcpu);
 

Index: src/sys/dev/nvmm/x86/nvmm_x86_vmx.c
diff -u src/sys/dev/nvmm/x86/nvmm_x86_vmx.c:1.79 src/sys/dev/nvmm/x86/nvmm_x86_vmx.c:1.80
--- src/sys/dev/nvmm/x86/nvmm_x86_vmx.c:1.79	Tue Sep  8 17:00:07 2020
+++ src/sys/dev/nvmm/x86/nvmm_x86_vmx.c	Tue Sep  8 17:02:03 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvmm_x86_vmx.c,v 1.79 2020/09/08 17:00:07 maxv Exp $	*/
+/*	$NetBSD: nvmm_x86_vmx.c,v 1.80 2020/09/08 17:02:03 maxv Exp $	*/
 
 /*
  * Copyright (c) 2018-2020 Maxime Villard, m00nbsd.net
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_vmx.c,v 1.79 2020/09/08 17:00:07 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_vmx.c,v 1.80 2020/09/08 17:02:03 maxv Exp $");
 
 #include 
 #include 
@@ -1969,9 +1969,6 @@ vmx_exit_xsetbv(struct nvmm_machine *mac
 	}
 
 	cpudata->gxcr0 = val;
-	if (vmx_xcr0_mask != 0) {
-		wrxcr(0, cpudata->gxcr0);
-	}
 
 	vmx_inkernel_advance();
 	return;
@@ -2228,7 +2225,6 @@ vmx_vcpu_run(struct nvmm_machine *mach, 
 
 	vmx_vcpu_guest_dbregs_enter(vcpu);
 	vmx_vcpu_guest_misc_enter(vcpu);
-	vmx_vcpu_guest_fpu_enter(vcpu);
 
 	while (1) {
 		if (cpudata->gtlb_want_flush) {
@@ -2243,6 +2239,7 @@ vmx_vcpu_run(struct nvmm_machine *mach, 
 			cpudata->gtsc_want_update = false;
 		}
 
+		vmx_vcpu_guest_fpu_enter(vcpu);
 		vmx_cli();
 		machgen = vmx_htlb_flush(machdata, cpudata);
 		lcr2(cpudata->gcr2);
@@ -2254,6 +2251,7 @@ vmx_vcpu_run(struct nvmm_machine *mach, 
 		cpudata->gcr2 = rcr2();
 		vmx_htlb_flush_ack(cpudata, machgen);
 		vmx_sti();
+		vmx_vcpu_guest_fpu_leave(vcpu);
 
 		if (__predict_false(ret != 0)) {
 			vmx_exit_invalid(exit, -1);
@@ -2349,7 +2347,6 @@ vmx_vcpu_run(struct nvmm_machine *mach, 
 
 	cpudata->gtsc = vmx_vmread(VMCS_TSC_OFFSET) + rdtsc();
 
-	vmx_vcpu_guest_fpu_leave(vcpu);
 	vmx_vcpu_guest_misc_leave(vcpu);
 	vmx_vcpu_guest_dbregs_leave(vcpu);
 



CVS commit: src/sys/dev/nvmm/x86

2020-09-08 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Tue Sep  8 17:00:07 UTC 2020

Modified Files:
src/sys/dev/nvmm/x86: nvmm_x86_vmx.c

Log Message:
nvmm-x86-vmx: improve the handling of CR0

 - CR0_ET is hard-wired to 1 in the cpu, so force CR0_ET to 1 in the
   shadow.
 - Clarify.


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/sys/dev/nvmm/x86/nvmm_x86_vmx.c

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



CVS commit: src/sys/dev/nvmm

2020-09-08 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Tue Sep  8 16:58:38 UTC 2020

Modified Files:
src/sys/dev/nvmm: nvmm.c nvmm_ioctl.h
src/sys/dev/nvmm/x86: nvmm_x86.c nvmm_x86_svm.c

Log Message:
nvmm: cosmetic changes

 - Style.
 - Explicitly include ioccom.h.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/nvmm/nvmm.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/nvmm/nvmm_ioctl.h
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/nvmm/x86/nvmm_x86.c
cvs rdiff -u -r1.79 -r1.80 src/sys/dev/nvmm/x86/nvmm_x86_svm.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/dev/nvmm/nvmm.c
diff -u src/sys/dev/nvmm/nvmm.c:1.40 src/sys/dev/nvmm/nvmm.c:1.41
--- src/sys/dev/nvmm/nvmm.c:1.40	Sat Sep  5 16:30:11 2020
+++ src/sys/dev/nvmm/nvmm.c	Tue Sep  8 16:58:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvmm.c,v 1.40 2020/09/05 16:30:11 riastradh Exp $	*/
+/*	$NetBSD: nvmm.c,v 1.41 2020/09/08 16:58:38 maxv Exp $	*/
 
 /*
  * Copyright (c) 2018-2020 Maxime Villard, m00nbsd.net
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nvmm.c,v 1.40 2020/09/05 16:30:11 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvmm.c,v 1.41 2020/09/08 16:58:38 maxv Exp $");
 
 #include 
 #include 
@@ -1085,7 +1085,7 @@ nvmm_close(file_t *fp)
 	}
 	fp->f_data = NULL;
 
-   	return 0;
+	return 0;
 }
 
 static int

Index: src/sys/dev/nvmm/nvmm_ioctl.h
diff -u src/sys/dev/nvmm/nvmm_ioctl.h:1.11 src/sys/dev/nvmm/nvmm_ioctl.h:1.12
--- src/sys/dev/nvmm/nvmm_ioctl.h:1.11	Sat Sep  5 07:22:25 2020
+++ src/sys/dev/nvmm/nvmm_ioctl.h	Tue Sep  8 16:58:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvmm_ioctl.h,v 1.11 2020/09/05 07:22:25 maxv Exp $	*/
+/*	$NetBSD: nvmm_ioctl.h,v 1.12 2020/09/08 16:58:38 maxv Exp $	*/
 
 /*
  * Copyright (c) 2018-2020 Maxime Villard, m00nbsd.net
@@ -31,6 +31,7 @@
 #ifndef _NVMM_IOCTL_H_
 #define _NVMM_IOCTL_H_
 
+#include 
 #include 
 
 struct nvmm_ioc_capability {

Index: src/sys/dev/nvmm/x86/nvmm_x86.c
diff -u src/sys/dev/nvmm/x86/nvmm_x86.c:1.20 src/sys/dev/nvmm/x86/nvmm_x86.c:1.21
--- src/sys/dev/nvmm/x86/nvmm_x86.c:1.20	Sun Sep  6 02:18:53 2020
+++ src/sys/dev/nvmm/x86/nvmm_x86.c	Tue Sep  8 16:58:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvmm_x86.c,v 1.20 2020/09/06 02:18:53 riastradh Exp $	*/
+/*	$NetBSD: nvmm_x86.c,v 1.21 2020/09/08 16:58:38 maxv Exp $	*/
 
 /*
  * Copyright (c) 2018-2020 Maxime Villard, m00nbsd.net
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nvmm_x86.c,v 1.20 2020/09/06 02:18:53 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvmm_x86.c,v 1.21 2020/09/08 16:58:38 maxv Exp $");
 
 #include 
 #include 
@@ -405,7 +405,7 @@ const struct nvmm_x86_cpuid_mask nvmm_cp
 	CPUID_MPC |
 	CPUID_XD |
 	CPUID_MMXX |
-	CPUID_MMX | 
+	CPUID_MMX |
 	CPUID_FXSR |
 	CPUID_FFXSR |
 	CPUID_PAGE1GB |

Index: src/sys/dev/nvmm/x86/nvmm_x86_svm.c
diff -u src/sys/dev/nvmm/x86/nvmm_x86_svm.c:1.79 src/sys/dev/nvmm/x86/nvmm_x86_svm.c:1.80
--- src/sys/dev/nvmm/x86/nvmm_x86_svm.c:1.79	Sun Sep  6 02:18:53 2020
+++ src/sys/dev/nvmm/x86/nvmm_x86_svm.c	Tue Sep  8 16:58:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvmm_x86_svm.c,v 1.79 2020/09/06 02:18:53 riastradh Exp $	*/
+/*	$NetBSD: nvmm_x86_svm.c,v 1.80 2020/09/08 16:58:38 maxv Exp $	*/
 
 /*
  * Copyright (c) 2018-2020 Maxime Villard, m00nbsd.net
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_svm.c,v 1.79 2020/09/06 02:18:53 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_svm.c,v 1.80 2020/09/08 16:58:38 maxv Exp $");
 
 #include 
 #include 
@@ -787,7 +787,7 @@ svm_inject_gp(struct nvmm_cpu *vcpu)
 	KASSERT(ret == 0);
 }
 
-static inline int 
+static inline int
 svm_vcpu_event_commit(struct nvmm_cpu *vcpu)
 {
 	if (__predict_true(!vcpu->comm->event_commit)) {



CVS commit: src/sys/dev/nvmm

2020-09-08 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Tue Sep  8 16:58:38 UTC 2020

Modified Files:
src/sys/dev/nvmm: nvmm.c nvmm_ioctl.h
src/sys/dev/nvmm/x86: nvmm_x86.c nvmm_x86_svm.c

Log Message:
nvmm: cosmetic changes

 - Style.
 - Explicitly include ioccom.h.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/nvmm/nvmm.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/nvmm/nvmm_ioctl.h
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/nvmm/x86/nvmm_x86.c
cvs rdiff -u -r1.79 -r1.80 src/sys/dev/nvmm/x86/nvmm_x86_svm.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/acpica/dist/include/platform

2020-09-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Sep  8 16:56:29 UTC 2020

Modified Files:
src/sys/external/bsd/acpica/dist/include/platform: acnetbsd.h

Log Message:
Define ACPI_BIG_ENDIAN on BE targets


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 \
src/sys/external/bsd/acpica/dist/include/platform/acnetbsd.h

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/acpica/dist/include/platform/acnetbsd.h
diff -u src/sys/external/bsd/acpica/dist/include/platform/acnetbsd.h:1.20 src/sys/external/bsd/acpica/dist/include/platform/acnetbsd.h:1.21
--- src/sys/external/bsd/acpica/dist/include/platform/acnetbsd.h:1.20	Sat Mar 28 19:49:27 2020
+++ src/sys/external/bsd/acpica/dist/include/platform/acnetbsd.h	Tue Sep  8 16:56:29 2020
@@ -1,7 +1,7 @@
 /**
  *
  * Name: acnetbsd.h - OS specific defines, etc.
- *   $Revision: 1.20 $
+ *   $Revision: 1.21 $
  *
  */
 
@@ -65,10 +65,15 @@
 
 #include 
 #include 
+#include 
 #include 
 
 #define asm __asm
 
+#if BYTE_ORDER == BIG_ENDIAN
+#define ACPI_BIG_ENDIAN
+#endif
+
 #define ACPI_USE_NATIVE_DIVIDE
 #define ACPI_USE_NATIVE_MATH64
 



CVS commit: src/sys/external/bsd/acpica/dist/include/platform

2020-09-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Sep  8 16:56:29 UTC 2020

Modified Files:
src/sys/external/bsd/acpica/dist/include/platform: acnetbsd.h

Log Message:
Define ACPI_BIG_ENDIAN on BE targets


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 \
src/sys/external/bsd/acpica/dist/include/platform/acnetbsd.h

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



CVS commit: src/sys/net

2020-09-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Sep  8 16:39:58 UTC 2020

Modified Files:
src/sys/net: if_wg.c

Log Message:
wg: Drop wgp_lock while waiting for endpoint psref to drain.

- This is safe because wgp_endpoint_changing locks out any attempts
  to change the endpoint until the draining is complete.

- This is necessary to avoid a deadlock where the handshake thread
  holds a psref and awaits mutex_enter(wgp->wgp_lock).

XXX The same deadlock may occur in wg_destroy_session.  Not clear
that it's safe to just release wgp_lock there; may need to create a
new session state, say WGS_STATE_DRAINING, while we wait for
psref_target_destroy.  But this needs a little more thought; a new
state may not be necessary, and would be nice to avoid if not
necessary.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/net/if_wg.c

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



CVS commit: src/sys/net

2020-09-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Sep  8 16:39:58 UTC 2020

Modified Files:
src/sys/net: if_wg.c

Log Message:
wg: Drop wgp_lock while waiting for endpoint psref to drain.

- This is safe because wgp_endpoint_changing locks out any attempts
  to change the endpoint until the draining is complete.

- This is necessary to avoid a deadlock where the handshake thread
  holds a psref and awaits mutex_enter(wgp->wgp_lock).

XXX The same deadlock may occur in wg_destroy_session.  Not clear
that it's safe to just release wgp_lock there; may need to create a
new session state, say WGS_STATE_DRAINING, while we wait for
psref_target_destroy.  But this needs a little more thought; a new
state may not be necessary, and would be nice to avoid if not
necessary.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/net/if_wg.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/net/if_wg.c
diff -u src/sys/net/if_wg.c:1.55 src/sys/net/if_wg.c:1.56
--- src/sys/net/if_wg.c:1.55	Mon Sep  7 01:15:25 2020
+++ src/sys/net/if_wg.c	Tue Sep  8 16:39:57 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wg.c,v 1.55 2020/09/07 01:15:25 riastradh Exp $	*/
+/*	$NetBSD: if_wg.c,v 1.56 2020/09/08 16:39:57 riastradh Exp $	*/
 
 /*
  * Copyright (C) Ryota Ozaki 
@@ -41,7 +41,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_wg.c,v 1.55 2020/09/07 01:15:25 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wg.c,v 1.56 2020/09/08 16:39:57 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -2965,10 +2965,12 @@ wg_task_endpoint_changed(struct wg_softc
 
 	if (atomic_load_relaxed(>wgp_endpoint_changing)) {
 		pserialize_perform(wgp->wgp_psz);
+		mutex_exit(wgp->wgp_lock);
 		psref_target_destroy(>wgp_endpoint0->wgsa_psref,
 		wg_psref_class);
 		psref_target_init(>wgp_endpoint0->wgsa_psref,
 		wg_psref_class);
+		mutex_enter(wgp->wgp_lock);
 		atomic_store_release(>wgp_endpoint_changing, 0);
 	}
 }



CVS commit: src

2020-09-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Sep  8 16:39:36 UTC 2020

Modified Files:
src/distrib/sets/lists/base: ad.aarch64 ad.arm
src/sys/arch/evbarm/stand: Makefile

Log Message:
Build EFI bootloader on big endian armv7 and aarch64 targets.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/distrib/sets/lists/base/ad.aarch64
cvs rdiff -u -r1.81 -r1.82 src/distrib/sets/lists/base/ad.arm
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/stand/Makefile

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

Modified files:

Index: src/distrib/sets/lists/base/ad.aarch64
diff -u src/distrib/sets/lists/base/ad.aarch64:1.32 src/distrib/sets/lists/base/ad.aarch64:1.33
--- src/distrib/sets/lists/base/ad.aarch64:1.32	Thu Sep  3 18:58:48 2020
+++ src/distrib/sets/lists/base/ad.aarch64	Tue Sep  8 16:39:36 2020
@@ -1,4 +1,4 @@
-# $NetBSD: ad.aarch64,v 1.32 2020/09/03 18:58:48 jakllsch Exp $
+# $NetBSD: ad.aarch64,v 1.33 2020/09/08 16:39:36 jmcneill Exp $
 ./lib/eabi	base-compat-lib		compat,llvm
 ./lib/eabi/npf	base-compat-lib		compat,llvm
 ./lib/eabihf	base-compat-lib		compat,llvm
@@ -37,7 +37,7 @@
 ./usr/libexec/ld.elf_so-eabi			base-compat-shlib	compat,pic,llvm
 ./usr/libexec/ld.elf_so-eabihf			base-compat-shlib	compat,pic,llvm
 ./usr/libexec/ld.elf_so-oabi			base-sysutil-bin	compat,pic,llvm
-./usr/mdec/bootaa64.efibase-sysutil-bin	endian=1234
+./usr/mdec/bootaa64.efibase-sysutil-bin
 ./usr/sbin/acpidumpbase-sysutil-bin	endian=1234
 ./usr/sbin/amldbbase-sysutil-bin	endian=1234
 ./usr/sbin/ofctlbase-sysutil-bin

Index: src/distrib/sets/lists/base/ad.arm
diff -u src/distrib/sets/lists/base/ad.arm:1.81 src/distrib/sets/lists/base/ad.arm:1.82
--- src/distrib/sets/lists/base/ad.arm:1.81	Sat Mar 30 13:02:39 2019
+++ src/distrib/sets/lists/base/ad.arm	Tue Sep  8 16:39:36 2020
@@ -1,4 +1,4 @@
-# $NetBSD: ad.arm,v 1.81 2019/03/30 13:02:39 jmcneill Exp $
+# $NetBSD: ad.arm,v 1.82 2020/09/08 16:39:36 jmcneill Exp $
 ./libexec/ld.elf_so-oabi			base-sysutil-bin	compat,pic
 ./sbin/ldconfig	base-sysutil-root	pic,endian=1234
 ./usr/bin/fdformatbase-util-bin
@@ -17,7 +17,7 @@
 ./usr/mdec/boot26,ffabase-obsolete		obsolete
 ./usr/mdec/boot32base-sysutil-bin	endian=1234
 ./usr/mdec/boot32,ffabase-sysutil-bin	endian=1234
-./usr/mdec/bootarm.efibase-sysutil-bin	endian=1234,machine_arch=earmv7hf
+./usr/mdec/bootarm.efibase-sysutil-bin	machine_arch=earmv7hf
 ./usr/mdec/bootimx23base-sysutil-bin	endian=1234
 ./usr/mdec/bootmini2440base-sysutil-bin
 ./usr/mdec/gzboot_ADI_BRH_0x0014.bin	base-sysutil-bin

Index: src/sys/arch/evbarm/stand/Makefile
diff -u src/sys/arch/evbarm/stand/Makefile:1.11 src/sys/arch/evbarm/stand/Makefile:1.12
--- src/sys/arch/evbarm/stand/Makefile:1.11	Fri Sep  4 02:15:52 2020
+++ src/sys/arch/evbarm/stand/Makefile	Tue Sep  8 16:39:36 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.11 2020/09/04 02:15:52 jakllsch Exp $
+#	$NetBSD: Makefile,v 1.12 2020/09/08 16:39:36 jmcneill Exp $
 
 .include 
 
@@ -12,11 +12,11 @@ SUBDIR+= bootimx23
 .endif
 .endif
 
-.if ${MACHINE_ARCH} == "aarch64"
+.if ${MACHINE_ARCH} == "aarch64" || ${MACHINE_ARCH} == "aarch64eb"
 SUBDIR+= ../../../stand/efiboot/bootaa64
 .endif
 
-.if ${MACHINE_ARCH} == "earmv7hf"
+.if ${MACHINE_ARCH} == "earmv7hf" || ${MACHINE_ARCH} == "earmv7hfeb"
 SUBDIR+= ../../../stand/efiboot/bootarm
 .endif
 



CVS commit: src

2020-09-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Sep  8 16:39:36 UTC 2020

Modified Files:
src/distrib/sets/lists/base: ad.aarch64 ad.arm
src/sys/arch/evbarm/stand: Makefile

Log Message:
Build EFI bootloader on big endian armv7 and aarch64 targets.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/distrib/sets/lists/base/ad.aarch64
cvs rdiff -u -r1.81 -r1.82 src/distrib/sets/lists/base/ad.arm
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/stand/Makefile

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



CVS commit: src/sys/stand/efiboot/bootaa64

2020-09-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Sep  8 16:34:43 UTC 2020

Modified Files:
src/sys/stand/efiboot/bootaa64: Makefile

Log Message:
Be explicit about building for little endian. This allows efiboot to be
built with the aarch64eb toolchain.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/stand/efiboot/bootaa64/Makefile

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



CVS commit: src/sys/stand/efiboot/bootaa64

2020-09-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Sep  8 16:34:43 UTC 2020

Modified Files:
src/sys/stand/efiboot/bootaa64: Makefile

Log Message:
Be explicit about building for little endian. This allows efiboot to be
built with the aarch64eb toolchain.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/stand/efiboot/bootaa64/Makefile

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

Modified files:

Index: src/sys/stand/efiboot/bootaa64/Makefile
diff -u src/sys/stand/efiboot/bootaa64/Makefile:1.8 src/sys/stand/efiboot/bootaa64/Makefile:1.9
--- src/sys/stand/efiboot/bootaa64/Makefile:1.8	Sun Jun 21 17:24:26 2020
+++ src/sys/stand/efiboot/bootaa64/Makefile	Tue Sep  8 16:34:43 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2020/06/21 17:24:26 jmcneill Exp $
+# $NetBSD: Makefile,v 1.9 2020/09/08 16:34:43 jmcneill Exp $
 
 PROG=		bootaa64.efi
 OBJFMT=		binary
@@ -7,12 +7,14 @@ NEWVERSWHAT=	"efiboot (arm64)"
 EXTRA_SOURCES=	efibootaa64.c
 EXTRA_SOURCES+=	cache.S
 
-COPTS+=		-mgeneral-regs-only -fno-jump-tables
+COPTS+=		-mgeneral-regs-only -mlittle-endian -fno-jump-tables
+AFLAGS+=	-mlittle-endian
 CFLAGS+=	-DEFIBOOT_ALIGN=0x20
 CFLAGS+=	-DEFIBOOT_RUNTIME_ADDRESS=0x8000L
 CFLAGS+=	-DEFIBOOT_RUNTIME_SIZE=0x4000UL
 CFLAGS+=	-DEFIBOOT_ACPI
 CFLAGS+=	-DEFIBOOT_MODULE_MACHINE=\"evbarm\"
+LDFLAGS+=	-EL
 
 .include "${.CURDIR}/../Makefile.efiboot"
 



CVS commit: src/etc

2020-09-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Sep  8 16:10:53 UTC 2020

Modified Files:
src/etc: rc

Log Message:
Ooops, overlooked one MOUNTCRITLOCAL reference in the rename to
CRITLOCALMOUNTED.


To generate a diff of this commit:
cvs rdiff -u -r1.174 -r1.175 src/etc/rc

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



CVS commit: src/etc

2020-09-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Sep  8 16:10:53 UTC 2020

Modified Files:
src/etc: rc

Log Message:
Ooops, overlooked one MOUNTCRITLOCAL reference in the rename to
CRITLOCALMOUNTED.


To generate a diff of this commit:
cvs rdiff -u -r1.174 -r1.175 src/etc/rc

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

Modified files:

Index: src/etc/rc
diff -u src/etc/rc:1.174 src/etc/rc:1.175
--- src/etc/rc:1.174	Wed Jul 22 16:50:41 2020
+++ src/etc/rc	Tue Sep  8 16:10:53 2020
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: rc,v 1.174 2020/07/22 16:50:41 martin Exp $
+# $NetBSD: rc,v 1.175 2020/09/08 16:10:53 martin Exp $
 #
 # rc --
 #	Run the scripts in /etc/rc.d with rcorder, and log output
@@ -191,7 +191,7 @@ rc_real_work()
 #  * Scripts run during the boot may clear /tmp and/var/run, so even
 #if they are writable, using those directories too early may be
 #problematic.  We assume that it's safe to write to our log file
-#after the MOUNTCRITLOCAL script has run.
+#after the CRITLOCALMOUNTED script has run.
 #
 #  * /usr/bin/tee cannot be used because the /usr file system may not
 #be mounted early in the boot.
@@ -322,10 +322,10 @@ rc_postprocess_metadata()
 printf "%s\n" "$msg"
 			fi
 		fi
-		# After the MOUNTCRITLOCAL script has finished, it's
+		# After the CRITLOCALMOUNTED script has finished, it's
 		# OK to flush the log to disk
 		case "$1" in
-		*/MOUNTCRITLOCAL)
+		*/CRITLOCALMOUNTED)
 			rc_log_flush OK
 			;;
 		esac



CVS commit: src/sys

2020-09-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Sep  8 16:00:35 UTC 2020

Modified Files:
src/sys/kern: init_main.c subr_ipi.c
src/sys/sys: ipi.h

Log Message:
ipi: Split up initialization into two parts.

First part runs early so ipi_register can be used in module
initialization, e.g. via pktqueue_create; second part runs after CPUs
have been detected.


To generate a diff of this commit:
cvs rdiff -u -r1.530 -r1.531 src/sys/kern/init_main.c
cvs rdiff -u -r1.7 -r1.8 src/sys/kern/subr_ipi.c
cvs rdiff -u -r1.4 -r1.5 src/sys/sys/ipi.h

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

Modified files:

Index: src/sys/kern/init_main.c
diff -u src/sys/kern/init_main.c:1.530 src/sys/kern/init_main.c:1.531
--- src/sys/kern/init_main.c:1.530	Mon Sep  7 03:50:41 2020
+++ src/sys/kern/init_main.c	Tue Sep  8 16:00:35 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: init_main.c,v 1.530 2020/09/07 03:50:41 thorpej Exp $	*/
+/*	$NetBSD: init_main.c,v 1.531 2020/09/08 16:00:35 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009, 2019 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.530 2020/09/07 03:50:41 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.531 2020/09/08 16:00:35 riastradh Exp $");
 
 #include "opt_cnmagic.h"
 #include "opt_ddb.h"
@@ -362,6 +362,9 @@ main(void)
 	 */
 	bpf_setops();
 
+	/* Initialize what we can in ipi(9) before CPUs are detected. */
+	ipi_sysinit();
+
 	/* Start module system. */
 	module_init();
 	module_hook_init();
@@ -546,7 +549,8 @@ main(void)
 
 	configure2();
 
-	ipi_sysinit();
+	/* Initialize the rest of ipi(9) after CPUs have been detected. */
+	ipi_percpu_init();
 
 	futex_sys_init();
 

Index: src/sys/kern/subr_ipi.c
diff -u src/sys/kern/subr_ipi.c:1.7 src/sys/kern/subr_ipi.c:1.8
--- src/sys/kern/subr_ipi.c:1.7	Wed Oct 16 18:29:49 2019
+++ src/sys/kern/subr_ipi.c	Tue Sep  8 16:00:35 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_ipi.c,v 1.7 2019/10/16 18:29:49 christos Exp $	*/
+/*	$NetBSD: subr_ipi.c,v 1.8 2020/09/08 16:00:35 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_ipi.c,v 1.7 2019/10/16 18:29:49 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_ipi.c,v 1.8 2020/09/08 16:00:35 riastradh Exp $");
 
 #include 
 #include 
@@ -93,20 +93,10 @@ static void		ipi_msg_cpu_handler(void *)
 void
 ipi_sysinit(void)
 {
-	const size_t len = ncpu * sizeof(ipi_mbox_t);
 
-	/* Initialise the per-CPU bit fields. */
-	for (u_int i = 0; i < ncpu; i++) {
-		struct cpu_info *ci = cpu_lookup(i);
-		memset(>ci_ipipend, 0, sizeof(ci->ci_ipipend));
-	}
 	mutex_init(_mngmt_lock, MUTEX_DEFAULT, IPL_NONE);
 	memset(ipi_intrs, 0, sizeof(ipi_intrs));
 
-	/* Allocate per-CPU IPI mailboxes. */
-	ipi_mboxes = kmem_zalloc(len, KM_SLEEP);
-	KASSERT(ipi_mboxes != NULL);
-
 	/*
 	 * Register the handler for synchronous IPIs.  This mechanism
 	 * is built on top of the asynchronous interface.  Slot zero is
@@ -119,6 +109,22 @@ ipi_sysinit(void)
 	   "ipi", "full");
 }
 
+void
+ipi_percpu_init(void)
+{
+	const size_t len = ncpu * sizeof(ipi_mbox_t);
+
+	/* Initialise the per-CPU bit fields. */
+	for (u_int i = 0; i < ncpu; i++) {
+		struct cpu_info *ci = cpu_lookup(i);
+		memset(>ci_ipipend, 0, sizeof(ci->ci_ipipend));
+	}
+
+	/* Allocate per-CPU IPI mailboxes. */
+	ipi_mboxes = kmem_zalloc(len, KM_SLEEP);
+	KASSERT(ipi_mboxes != NULL);
+}
+
 /*
  * ipi_register: register an asynchronous IPI handler.
  *

Index: src/sys/sys/ipi.h
diff -u src/sys/sys/ipi.h:1.4 src/sys/sys/ipi.h:1.5
--- src/sys/sys/ipi.h:1.4	Sat Apr  6 02:59:05 2019
+++ src/sys/sys/ipi.h	Tue Sep  8 16:00:35 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipi.h,v 1.4 2019/04/06 02:59:05 thorpej Exp $	*/
+/*	$NetBSD: ipi.h,v 1.5 2020/09/08 16:00:35 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -60,6 +60,7 @@ typedef struct {
 #define	IPI_BITWORDS	(IPI_MAXREG >> IPI_BITW_SHIFT)
 
 void	ipi_sysinit(void);
+void	ipi_percpu_init(void);
 void	ipi_cpu_handler(void);
 void	cpu_ipi(struct cpu_info *);
 



CVS commit: src/sys

2020-09-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Sep  8 16:00:35 UTC 2020

Modified Files:
src/sys/kern: init_main.c subr_ipi.c
src/sys/sys: ipi.h

Log Message:
ipi: Split up initialization into two parts.

First part runs early so ipi_register can be used in module
initialization, e.g. via pktqueue_create; second part runs after CPUs
have been detected.


To generate a diff of this commit:
cvs rdiff -u -r1.530 -r1.531 src/sys/kern/init_main.c
cvs rdiff -u -r1.7 -r1.8 src/sys/kern/subr_ipi.c
cvs rdiff -u -r1.4 -r1.5 src/sys/sys/ipi.h

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



CVS commit: src/sys/stand/efiboot/bootarm

2020-09-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Sep  8 15:36:37 UTC 2020

Modified Files:
src/sys/stand/efiboot/bootarm: Makefile

Log Message:
Be explicit about building for little endian. This allows efiboot to be
built with the armv7be toolchain.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/stand/efiboot/bootarm/Makefile

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



CVS commit: src/sys/stand/efiboot/bootarm

2020-09-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Sep  8 15:36:37 UTC 2020

Modified Files:
src/sys/stand/efiboot/bootarm: Makefile

Log Message:
Be explicit about building for little endian. This allows efiboot to be
built with the armv7be toolchain.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/stand/efiboot/bootarm/Makefile

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

Modified files:

Index: src/sys/stand/efiboot/bootarm/Makefile
diff -u src/sys/stand/efiboot/bootarm/Makefile:1.5 src/sys/stand/efiboot/bootarm/Makefile:1.6
--- src/sys/stand/efiboot/bootarm/Makefile:1.5	Sun Jun 21 17:24:26 2020
+++ src/sys/stand/efiboot/bootarm/Makefile	Tue Sep  8 15:36:37 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2020/06/21 17:24:26 jmcneill Exp $
+# $NetBSD: Makefile,v 1.6 2020/09/08 15:36:37 jmcneill Exp $
 
 PROG=		bootarm.efi
 OBJFMT=		binary
@@ -9,10 +9,12 @@ LIBGNUEFI_ARCH=	arm
 EXTRA_SOURCES=	efibootarm.c
 EXTRA_SOURCES+=	cache.S
 
-COPTS+=		-mfloat-abi=soft -mno-unaligned-access -ffreestanding -fno-unwind-tables
+COPTS+=		-mfloat-abi=soft -mno-unaligned-access -mlittle-endian
+COPTS+=		-ffreestanding -fno-unwind-tables
+AFLAGS+=	-mlittle-endian
 CFLAGS+=	-DEFIBOOT_ALIGN=0x100
 CFLAGS+=	-DEFIBOOT_MODULE_MACHINE=\"evbarm\"
-LDFLAGS+=	-N
+LDFLAGS+=	-N -EL
 
 .include "${.CURDIR}/../Makefile.efiboot"
 



CVS commit: src/distrib/sets/lists/debug

2020-09-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Sep  8 14:57:32 UTC 2020

Modified Files:
src/distrib/sets/lists/debug: module.md.amd64 module.md.i386

Log Message:
Add if_iavf


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/distrib/sets/lists/debug/module.md.amd64 \
src/distrib/sets/lists/debug/module.md.i386

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

Modified files:

Index: src/distrib/sets/lists/debug/module.md.amd64
diff -u src/distrib/sets/lists/debug/module.md.amd64:1.1 src/distrib/sets/lists/debug/module.md.amd64:1.2
--- src/distrib/sets/lists/debug/module.md.amd64:1.1	Fri May  1 22:21:11 2020
+++ src/distrib/sets/lists/debug/module.md.amd64	Tue Sep  8 14:57:32 2020
@@ -1,4 +1,4 @@
-# $NetBSD: module.md.amd64,v 1.1 2020/05/01 22:21:11 christos Exp $
+# $NetBSD: module.md.amd64,v 1.2 2020/09/08 14:57:32 martin Exp $
 ./usr/libdata/debug/@MODULEDIR@/acpiacadmodules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/acpiacad/acpiacad.kmod.debug		modules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/acpibatmodules-base-kernel	kmod,debug
@@ -151,6 +151,8 @@
 ./usr/libdata/debug/@MODULEDIR@/i915drmkms/i915drmkms.kmod.debug	modules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/ichsmbmodules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/ichsmb/ichsmb.kmod.debug		modules-base-kernel	kmod,debug
+./usr/libdata/debug/@MODULEDIR@/if_iavfmodules-base-kernel	kmod,debug
+./usr/libdata/debug/@MODULEDIR@/if_iavf/if_iavf.kmod.debug		modules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/if_ixlmodules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/if_ixl/if_ixl.kmod.debug		modules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/imcmodules-base-kernel	kmod,debug
Index: src/distrib/sets/lists/debug/module.md.i386
diff -u src/distrib/sets/lists/debug/module.md.i386:1.1 src/distrib/sets/lists/debug/module.md.i386:1.2
--- src/distrib/sets/lists/debug/module.md.i386:1.1	Fri May  1 22:21:11 2020
+++ src/distrib/sets/lists/debug/module.md.i386	Tue Sep  8 14:57:32 2020
@@ -1,4 +1,4 @@
-# $NetBSD: module.md.i386,v 1.1 2020/05/01 22:21:11 christos Exp $
+# $NetBSD: module.md.i386,v 1.2 2020/09/08 14:57:32 martin Exp $
 ./usr/libdata/debug/@MODULEDIR@/acpiacadmodules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/acpiacad/acpiacad.kmod.debug		modules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/acpibatmodules-base-kernel	kmod,debug
@@ -103,6 +103,8 @@
 ./usr/libdata/debug/@MODULEDIR@/i915drmkms/i915drmkms.kmod.debug	modules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/ichsmbmodules-base-kernel kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/ichsmb/ichsmb.kmod.debug		modules-base-kernel kmod,debug
+./usr/libdata/debug/@MODULEDIR@/if_iavfmodules-base-kernel	kmod,debug
+./usr/libdata/debug/@MODULEDIR@/if_iavf/if_iavf.kmod.debug		modules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/if_ixlmodules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/if_ixl/if_ixl.kmod.debug		modules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/imcmodules-base-kernel kmod,debug



CVS commit: src/distrib/sets/lists/debug

2020-09-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Sep  8 14:57:32 UTC 2020

Modified Files:
src/distrib/sets/lists/debug: module.md.amd64 module.md.i386

Log Message:
Add if_iavf


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/distrib/sets/lists/debug/module.md.amd64 \
src/distrib/sets/lists/debug/module.md.i386

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



CVS commit: src/distrib/sets/lists/modules

2020-09-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Sep  8 14:55:44 UTC 2020

Modified Files:
src/distrib/sets/lists/modules: mi

Log Message:
Remove if_iavf


To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.141 src/distrib/sets/lists/modules/mi

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



CVS commit: src/distrib/sets/lists/modules

2020-09-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Sep  8 14:55:44 UTC 2020

Modified Files:
src/distrib/sets/lists/modules: mi

Log Message:
Remove if_iavf


To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.141 src/distrib/sets/lists/modules/mi

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

Modified files:

Index: src/distrib/sets/lists/modules/mi
diff -u src/distrib/sets/lists/modules/mi:1.140 src/distrib/sets/lists/modules/mi:1.141
--- src/distrib/sets/lists/modules/mi:1.140	Tue Sep  8 14:53:10 2020
+++ src/distrib/sets/lists/modules/mi	Tue Sep  8 14:55:44 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.140 2020/09/08 14:53:10 martin Exp $
+# $NetBSD: mi,v 1.141 2020/09/08 14:55:44 martin Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -205,8 +205,6 @@
 ./@MODULEDIR@/if_gif/if_gif.kmod		modules-base-kernel	kmod
 ./@MODULEDIR@/if_gremodules-base-kernel	kmod
 ./@MODULEDIR@/if_gre/if_gre.kmod		modules-base-kernel	kmod
-./@MODULEDIR@/if_iavfmodules-base-kernel	kmod
-./@MODULEDIR@/if_iavf/if_iavf.kmod		modules-base-kernel	kmod
 ./@MODULEDIR@/if_kuemodules-base-kernel	kmod
 ./@MODULEDIR@/if_kue/if_kue.kmod		modules-base-kernel	kmod
 ./@MODULEDIR@/if_l2tpmodules-base-kernel	kmod



CVS commit: src/distrib/sets/lists/modules

2020-09-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Sep  8 14:53:11 UTC 2020

Modified Files:
src/distrib/sets/lists/modules: mi

Log Message:
Add if_iavf


To generate a diff of this commit:
cvs rdiff -u -r1.139 -r1.140 src/distrib/sets/lists/modules/mi

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

Modified files:

Index: src/distrib/sets/lists/modules/mi
diff -u src/distrib/sets/lists/modules/mi:1.139 src/distrib/sets/lists/modules/mi:1.140
--- src/distrib/sets/lists/modules/mi:1.139	Thu Aug 27 15:32:00 2020
+++ src/distrib/sets/lists/modules/mi	Tue Sep  8 14:53:10 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.139 2020/08/27 15:32:00 riastradh Exp $
+# $NetBSD: mi,v 1.140 2020/09/08 14:53:10 martin Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -205,6 +205,8 @@
 ./@MODULEDIR@/if_gif/if_gif.kmod		modules-base-kernel	kmod
 ./@MODULEDIR@/if_gremodules-base-kernel	kmod
 ./@MODULEDIR@/if_gre/if_gre.kmod		modules-base-kernel	kmod
+./@MODULEDIR@/if_iavfmodules-base-kernel	kmod
+./@MODULEDIR@/if_iavf/if_iavf.kmod		modules-base-kernel	kmod
 ./@MODULEDIR@/if_kuemodules-base-kernel	kmod
 ./@MODULEDIR@/if_kue/if_kue.kmod		modules-base-kernel	kmod
 ./@MODULEDIR@/if_l2tpmodules-base-kernel	kmod



CVS commit: src/distrib/sets/lists/modules

2020-09-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Sep  8 14:53:11 UTC 2020

Modified Files:
src/distrib/sets/lists/modules: mi

Log Message:
Add if_iavf


To generate a diff of this commit:
cvs rdiff -u -r1.139 -r1.140 src/distrib/sets/lists/modules/mi

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



CVS commit: src/usr.bin/make

2020-09-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Sep  8 14:51:43 UTC 2020

Modified Files:
src/usr.bin/make: cond.c

Log Message:
make(1): in CondGetString, replace repeated Buf_Add with Buf_AddStr


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 src/usr.bin/make/cond.c

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



CVS commit: src/usr.bin/make

2020-09-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Sep  8 14:51:43 UTC 2020

Modified Files:
src/usr.bin/make: cond.c

Log Message:
make(1): in CondGetString, replace repeated Buf_Add with Buf_AddStr


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 src/usr.bin/make/cond.c

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

Modified files:

Index: src/usr.bin/make/cond.c
diff -u src/usr.bin/make/cond.c:1.112 src/usr.bin/make/cond.c:1.113
--- src/usr.bin/make/cond.c:1.112	Fri Sep  4 21:08:44 2020
+++ src/usr.bin/make/cond.c	Tue Sep  8 14:51:43 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cond.c,v 1.112 2020/09/04 21:08:44 rillig Exp $	*/
+/*	$NetBSD: cond.c,v 1.113 2020/09/08 14:51:43 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: cond.c,v 1.112 2020/09/04 21:08:44 rillig Exp $";
+static char rcsid[] = "$NetBSD: cond.c,v 1.113 2020/09/08 14:51:43 rillig Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)cond.c	8.2 (Berkeley) 1/2/94";
 #else
-__RCSID("$NetBSD: cond.c,v 1.112 2020/09/04 21:08:44 rillig Exp $");
+__RCSID("$NetBSD: cond.c,v 1.113 2020/09/08 14:51:43 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -386,7 +386,6 @@ static const char *
 CondGetString(Boolean doEval, Boolean *quoted, void **freeIt, Boolean strictLHS)
 {
 Buffer buf;
-const char *cp;
 const char *str;
 int len;
 Boolean qt;
@@ -455,12 +454,8 @@ CondGetString(Boolean doEval, Boolean *q
 		 strchr("!=><)", *condExpr))) {
 		goto cleanup;
 	}
-	/*
-	 * Nope, we better copy str to buf
-	 */
-	for (cp = str; *cp; cp++) {
-		Buf_AddByte(, *cp);
-	}
+
+	Buf_AddStr(, str);
 	if (*freeIt) {
 		free(*freeIt);
 		*freeIt = NULL;



CVS commit: src/distrib/sets/lists

2020-09-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Sep  8 14:17:04 UTC 2020

Modified Files:
src/distrib/sets/lists/debug: mi
src/distrib/sets/lists/tests: mi

Log Message:
Add bind test


To generate a diff of this commit:
cvs rdiff -u -r1.331 -r1.332 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.920 -r1.921 src/distrib/sets/lists/tests/mi

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

Modified files:

Index: src/distrib/sets/lists/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.331 src/distrib/sets/lists/debug/mi:1.332
--- src/distrib/sets/lists/debug/mi:1.331	Thu Aug 27 11:32:00 2020
+++ src/distrib/sets/lists/debug/mi	Tue Sep  8 10:17:03 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.331 2020/08/27 15:32:00 riastradh Exp $
+# $NetBSD: mi,v 1.332 2020/09/08 14:17:03 christos Exp $
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/lib	comp-sys-usr		compatdir
 ./usr/lib/i18n/libBIG5_g.a			comp-c-debuglib		debuglib,compatfile
@@ -2384,6 +2384,7 @@
 ./usr/libdata/debug/usr/tests/net/ipsec/natt_terminator.debug	tests-net-debug		debug,atf,rump
 ./usr/libdata/debug/usr/tests/net/mcast/mcast.debug		tests-net-debug		debug,atf,rump
 ./usr/libdata/debug/usr/tests/net/mcast/t_mcast.debug		tests-obsolete		debug,atf,rump,obsolete
+./usr/libdata/debug/usr/tests/net/net/t_bind.debug		tests-net-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/net/net/t_mapped.debug		tests-net-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/net/net/t_pktinfo.debug		tests-net-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/net/net/t_pktinfo_send.debug	tests-net-debug		debug,atf,rump

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.920 src/distrib/sets/lists/tests/mi:1.921
--- src/distrib/sets/lists/tests/mi:1.920	Sat Sep  5 02:36:40 2020
+++ src/distrib/sets/lists/tests/mi	Tue Sep  8 10:17:03 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.920 2020/09/05 06:36:40 rillig Exp $
+# $NetBSD: mi,v 1.921 2020/09/08 14:17:03 christos Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -3918,6 +3918,7 @@
 ./usr/tests/net/net	tests-net-tests		compattestfile,atf
 ./usr/tests/net/net/Atffiletests-net-tests		compattestfile,atf
 ./usr/tests/net/net/Kyuafiletests-net-tests		compattestfile,atf,kyua
+./usr/tests/net/net/t_bindtests-net-tests		atf
 ./usr/tests/net/net/t_forwarding			tests-net-tests		atf,rump
 ./usr/tests/net/net/t_ipaddresstests-net-tests		atf,rump
 ./usr/tests/net/net/t_ipv6_lifetime			tests-net-tests		atf,rump



CVS commit: src/distrib/sets/lists

2020-09-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Sep  8 14:17:04 UTC 2020

Modified Files:
src/distrib/sets/lists/debug: mi
src/distrib/sets/lists/tests: mi

Log Message:
Add bind test


To generate a diff of this commit:
cvs rdiff -u -r1.331 -r1.332 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.920 -r1.921 src/distrib/sets/lists/tests/mi

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



CVS commit: src/tests/net/net

2020-09-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Sep  8 14:13:50 UTC 2020

Modified Files:
src/tests/net/net: Makefile
Added Files:
src/tests/net/net: t_bind.c

Log Message:
Add tests for IP_BINDANY, IPV6_BINDANY


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/tests/net/net/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/net/net/t_bind.c

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

Modified files:

Index: src/tests/net/net/Makefile
diff -u src/tests/net/net/Makefile:1.24 src/tests/net/net/Makefile:1.25
--- src/tests/net/net/Makefile:1.24	Mon Jul  6 14:45:25 2020
+++ src/tests/net/net/Makefile	Tue Sep  8 10:13:50 2020
@@ -1,11 +1,12 @@
-# $NetBSD: Makefile,v 1.24 2020/07/06 18:45:25 christos Exp $
+# $NetBSD: Makefile,v 1.25 2020/09/08 14:13:50 christos Exp $
 #
 
 .include 
 
 TESTSDIR=	${TESTSBASE}/net/net
 
-TESTS_C=	t_unix
+TESTS_C=	t_bind
+TESTS_C+=	t_unix
 TESTS_C+=	t_mapped
 TESTS_C+=	t_tcp
 TESTS_C+=	t_udp

Added files:

Index: src/tests/net/net/t_bind.c
diff -u /dev/null src/tests/net/net/t_bind.c:1.1
--- /dev/null	Tue Sep  8 10:13:50 2020
+++ src/tests/net/net/t_bind.c	Tue Sep  8 10:13:50 2020
@@ -0,0 +1,180 @@
+/*	$NetBSD: t_bind.c,v 1.1 2020/09/08 14:13:50 christos Exp $	*/
+
+/*-
+ * Copyright (c) 2020 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#define _GNU_SOURCE
+
+#include 
+#ifdef __RCSID
+__RCSID("$Id: t_bind.c,v 1.1 2020/09/08 14:13:50 christos Exp $");
+#endif
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "util.h"
+
+#include "test.h"
+
+static int
+mksocket(int sfam)
+{
+	int o, p;
+	switch (sfam) {
+	case AF_INET:
+		o = IP_BINDANY;
+		p = IPPROTO_IP;
+		break;
+	case AF_INET6:
+		o = IPV6_BINDANY;
+		p = IPPROTO_IPV6;
+		break;
+	default:
+		FAIL("family");
+	}
+	int fd = socket(sfam, SOCK_STREAM, 0);
+	if (fd == -1)
+		FAIL("socket");
+	int f = 1;
+	if (setsockopt(fd, p, o, , sizeof(f)) == -1) {
+		close(fd);
+		FAIL("setsockopt");
+	}
+	return fd;
+fail:
+	return -1;
+}
+
+static socklen_t
+mkserver(int sfam, struct sockaddr_storage *ss)
+{
+	struct sockaddr_in *sin;
+	struct sockaddr_in6 *sin6;
+
+	memset(ss, 0, sizeof(*ss));
+	ss->ss_family = sfam;
+	switch (sfam) {
+	case AF_INET:
+		sin = (struct sockaddr_in *)ss;
+		sin->sin_port = htons(12345);
+#ifdef BSD4_4
+		sin->sin_len = sizeof(*sin);
+#endif
+		inet_pton(sfam, "1.1.1.1", >sin_addr);
+		return sizeof(*sin);
+	case AF_INET6:
+		sin6 = (struct sockaddr_in6 *)ss;
+		sin6->sin6_port = htons(12345);
+#ifdef BSD4_4
+		sin6->sin6_len = sizeof(*sin6);
+#endif
+		inet_pton(sfam, "2010:2020:2030:2040:2050:2060:2070:2080",
+		>sin6_addr);
+		return sizeof(*sin6);
+	default:
+		FAIL("bad family");
+	}
+fail:
+	return -1;
+}
+
+static int
+test(int sfam)
+{
+	int sfd = -1;
+	struct sockaddr_storage saddr;
+	socklen_t slen;
+
+	sfd = mksocket(sfam);
+	slen = mkserver(sfam, );
+
+	if (bind(sfd, (struct sockaddr *), slen) == -1) {
+		FAIL("bind");
+	}
+	return 0;
+fail:
+	return -1;
+}
+
+#ifndef TEST
+
+ATF_TC(bindany_4);
+ATF_TC_HEAD(bindany_4, tc)
+{
+
+	atf_tc_set_md_var(tc, "descr", "Check AF_INET bindany");
+}
+
+ATF_TC_BODY(bindany_4, tc)
+{
+	test(AF_INET);
+}
+
+ATF_TC(bindany_6);
+ATF_TC_HEAD(bindany_6, tc)
+{
+
+	atf_tc_set_md_var(tc, "descr", "Check AF_INET6 bindany");
+}
+
+ATF_TC_BODY(bindany_6, tc)
+{
+	test(AF_INET6);
+}
+

CVS commit: src/tests/net/net

2020-09-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Sep  8 14:13:50 UTC 2020

Modified Files:
src/tests/net/net: Makefile
Added Files:
src/tests/net/net: t_bind.c

Log Message:
Add tests for IP_BINDANY, IPV6_BINDANY


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/tests/net/net/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/net/net/t_bind.c

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



CVS commit: src

2020-09-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Sep  8 14:12:57 UTC 2020

Modified Files:
src/share/man/man4: ip.4 ip6.4
src/sys/netinet: in.h in_pcb.c in_pcb.h ip_output.c raw_ip.c
src/sys/netinet6: in6.h in6_pcb.c in6_pcb.h ip6_output.c
src/sys/secmodel/suser: secmodel_suser.c
src/sys/sys: kauth.h

Log Message:
Add IP_BINDANY, IPV6_BINDANY which can be used to bind to any address in
order to implement transparent proxies.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/share/man/man4/ip.4
cvs rdiff -u -r1.31 -r1.32 src/share/man/man4/ip6.4
cvs rdiff -u -r1.110 -r1.111 src/sys/netinet/in.h
cvs rdiff -u -r1.184 -r1.185 src/sys/netinet/in_pcb.c
cvs rdiff -u -r1.68 -r1.69 src/sys/netinet/in_pcb.h
cvs rdiff -u -r1.319 -r1.320 src/sys/netinet/ip_output.c
cvs rdiff -u -r1.179 -r1.180 src/sys/netinet/raw_ip.c
cvs rdiff -u -r1.99 -r1.100 src/sys/netinet6/in6.h
cvs rdiff -u -r1.166 -r1.167 src/sys/netinet6/in6_pcb.c
cvs rdiff -u -r1.51 -r1.52 src/sys/netinet6/in6_pcb.h
cvs rdiff -u -r1.225 -r1.226 src/sys/netinet6/ip6_output.c
cvs rdiff -u -r1.54 -r1.55 src/sys/secmodel/suser/secmodel_suser.c
cvs rdiff -u -r1.85 -r1.86 src/sys/sys/kauth.h

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



CVS commit: src

2020-09-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Sep  8 14:12:57 UTC 2020

Modified Files:
src/share/man/man4: ip.4 ip6.4
src/sys/netinet: in.h in_pcb.c in_pcb.h ip_output.c raw_ip.c
src/sys/netinet6: in6.h in6_pcb.c in6_pcb.h ip6_output.c
src/sys/secmodel/suser: secmodel_suser.c
src/sys/sys: kauth.h

Log Message:
Add IP_BINDANY, IPV6_BINDANY which can be used to bind to any address in
order to implement transparent proxies.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/share/man/man4/ip.4
cvs rdiff -u -r1.31 -r1.32 src/share/man/man4/ip6.4
cvs rdiff -u -r1.110 -r1.111 src/sys/netinet/in.h
cvs rdiff -u -r1.184 -r1.185 src/sys/netinet/in_pcb.c
cvs rdiff -u -r1.68 -r1.69 src/sys/netinet/in_pcb.h
cvs rdiff -u -r1.319 -r1.320 src/sys/netinet/ip_output.c
cvs rdiff -u -r1.179 -r1.180 src/sys/netinet/raw_ip.c
cvs rdiff -u -r1.99 -r1.100 src/sys/netinet6/in6.h
cvs rdiff -u -r1.166 -r1.167 src/sys/netinet6/in6_pcb.c
cvs rdiff -u -r1.51 -r1.52 src/sys/netinet6/in6_pcb.h
cvs rdiff -u -r1.225 -r1.226 src/sys/netinet6/ip6_output.c
cvs rdiff -u -r1.54 -r1.55 src/sys/secmodel/suser/secmodel_suser.c
cvs rdiff -u -r1.85 -r1.86 src/sys/sys/kauth.h

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

Modified files:

Index: src/share/man/man4/ip.4
diff -u src/share/man/man4/ip.4:1.44 src/share/man/man4/ip.4:1.45
--- src/share/man/man4/ip.4:1.44	Fri Aug 28 12:07:49 2020
+++ src/share/man/man4/ip.4	Tue Sep  8 10:12:57 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ip.4,v 1.44 2020/08/28 16:07:49 fcambus Exp $
+.\"	$NetBSD: ip.4,v 1.45 2020/09/08 14:12:57 christos Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\" @(#)ip.4	8.2 (Berkeley) 11/30/93
 .\"
-.Dd December 31, 2017
+.Dd September 8, 2020
 .Dt IP 4
 .Os
 .Sh NAME
@@ -227,6 +227,23 @@ cmsg_type = IP_RECVIF
 .Ed
 .Pp
 If the
+.Dv IP_BINDANY
+option is enabled on a
+.Dv SOCK_STREAM ,
+.Dv SOCK_DGRAM
+or a
+.Dv SOCK_RAW
+socket, one can
+.Xr bind 2
+to any address, even one not bound to any available network interface in the
+system.
+This functionality (in conjunction with special firewall rules) can be used for
+implementing a transparent proxy.
+The
+.Dv KAUTH_REQ_NETWORK_BIND_ANYADDR
+privilege is needed to set this option.
+.Pp
+If the
 .Dv IP_RECVTTL
 option is enabled on a
 .Dv SOCK_DGRAM

Index: src/share/man/man4/ip6.4
diff -u src/share/man/man4/ip6.4:1.31 src/share/man/man4/ip6.4:1.32
--- src/share/man/man4/ip6.4:1.31	Mon Jul  3 17:30:58 2017
+++ src/share/man/man4/ip6.4	Tue Sep  8 10:12:57 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ip6.4,v 1.31 2017/07/03 21:30:58 wiz Exp $
+.\"	$NetBSD: ip6.4,v 1.32 2020/09/08 14:12:57 christos Exp $
 .\"	$KAME: ip6.4,v 1.23 2005/01/11 05:56:25 itojun Exp $
 .\"	$OpenBSD: ip6.4,v 1.21 2005/01/06 03:50:46 itojun Exp $
 .\"
@@ -28,7 +28,7 @@
 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
-.Dd June 25, 2012
+.Dd September 8, 2020
 .Dt IP6 4
 .Os
 .Sh NAME
@@ -430,6 +430,21 @@ Get or set the ESP encapsulation level.
 Get or set the
 .Xr ipcomp 4
 level.
+.Dv IPV6_BINDANY
+option is enabled on a
+.Dv SOCK_STREAM ,
+.Dv SOCK_DGRAM
+or a
+.Dv SOCK_RAW
+socket, one can
+.Xr bind 2
+to any address, even one not bound to any available network interface in the
+system.
+This functionality (in conjunction with special firewall rules) can be used for
+implementing a transparent proxy.
+The
+.Dv KAUTH_REQ_NETWORK_BIND_ANYADDR
+privilege is needed to set this option.
 .El
 .Pp
 The

Index: src/sys/netinet/in.h
diff -u src/sys/netinet/in.h:1.110 src/sys/netinet/in.h:1.111
--- src/sys/netinet/in.h:1.110	Thu Aug 20 17:21:32 2020
+++ src/sys/netinet/in.h	Tue Sep  8 10:12:57 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: in.h,v 1.110 2020/08/20 21:21:32 riastradh Exp $	*/
+/*	$NetBSD: in.h,v 1.111 2020/09/08 14:12:57 christos Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -293,7 +293,7 @@ struct ip_opts {
 #define	IP_MINTTL		24   /* minimum TTL for packet or drop */
 #define	IP_PKTINFO		25   /* struct; set default src if/addr */
 #define	IP_RECVPKTINFO		26   /* int; receive dst if/addr w/dgram */
-
+#define	IP_BINDANY		27   /* bool: allow bind to any address */
 #define IP_SENDSRCADDR IP_RECVDSTADDR /* FreeBSD compatibility */
 
 /*

Index: src/sys/netinet/in_pcb.c
diff -u src/sys/netinet/in_pcb.c:1.184 src/sys/netinet/in_pcb.c:1.185
--- src/sys/netinet/in_pcb.c:1.184	Thu Aug 20 17:21:32 2020
+++ src/sys/netinet/in_pcb.c	Tue Sep  8 10:12:57 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: in_pcb.c,v 1.184 2020/08/20 21:21:32 riastradh Exp $	*/
+/*	$NetBSD: in_pcb.c,v 1.185 2020/09/08 14:12:57 christos Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -93,7 +93,7 @@
  */
 
 #include 

CVS commit: src/sys/dev/pci

2020-09-08 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue Sep  8 13:28:51 UTC 2020

Modified Files:
src/sys/dev/pci: if_iavf.c

Log Message:
iaq_datalen is 16-bit, always use htole16

fixes build failure on big endian


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/if_iavf.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/dev/pci/if_iavf.c
diff -u src/sys/dev/pci/if_iavf.c:1.1 src/sys/dev/pci/if_iavf.c:1.2
--- src/sys/dev/pci/if_iavf.c:1.1	Tue Sep  8 10:05:47 2020
+++ src/sys/dev/pci/if_iavf.c	Tue Sep  8 13:28:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_iavf.c,v 1.1 2020/09/08 10:05:47 yamaguchi Exp $	*/
+/*	$NetBSD: if_iavf.c,v 1.2 2020/09/08 13:28:51 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 2013-2015, Intel Corporation
@@ -75,7 +75,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_iavf.c,v 1.1 2020/09/08 10:05:47 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iavf.c,v 1.2 2020/09/08 13:28:51 jakllsch Exp $");
 
 #include 
 #include 
@@ -4734,7 +4734,7 @@ iavf_config_hena(struct iavf_softc *sc)
 	iaq.iaq_flags = htole16(IXL_AQ_BUF | IXL_AQ_RD);
 	iaq.iaq_opcode = htole16(IAVF_AQ_OP_SEND_TO_PF);
 	iavf_aq_vc_set_opcode(, IAVF_VC_OP_SET_RSS_HENA);
-	iaq.iaq_datalen = htole32(sizeof(*caps));
+	iaq.iaq_datalen = htole16(sizeof(*caps));
 
 	error = iavf_adminq_exec(sc, , aqb);
 	if (error != IAVF_VC_RC_SUCCESS) {
@@ -4781,7 +4781,7 @@ iavf_config_rss_key(struct iavf_softc *s
 	iaq.iaq_flags = htole16(IXL_AQ_BUF | IXL_AQ_RD);
 	iaq.iaq_opcode = htole16(IAVF_AQ_OP_SEND_TO_PF);
 	iavf_aq_vc_set_opcode(, IAVF_VC_OP_CONFIG_RSS_KEY);
-	iaq.iaq_datalen = htole32(sizeof(*rss_key) - sizeof(rss_key->pad)
+	iaq.iaq_datalen = htole16(sizeof(*rss_key) - sizeof(rss_key->pad)
 	+ (sizeof(rss_key->key[0]) * key_len));
 
 	rv = iavf_adminq_exec(sc, , aqb);
@@ -4823,7 +4823,7 @@ iavf_config_rss_lut(struct iavf_softc *s
 	iaq.iaq_flags = htole16(IXL_AQ_BUF | IXL_AQ_RD);
 	iaq.iaq_opcode = htole16(IAVF_AQ_OP_SEND_TO_PF);
 	iavf_aq_vc_set_opcode(, IAVF_VC_OP_CONFIG_RSS_LUT);
-	iaq.iaq_datalen = htole32(sizeof(*rss_lut) - sizeof(rss_lut->pad)
+	iaq.iaq_datalen = htole16(sizeof(*rss_lut) - sizeof(rss_lut->pad)
 	+ (sizeof(rss_lut->lut[0]) * IXL_RSS_VSI_LUT_SIZE));
 
 	rv = iavf_adminq_exec(sc, , aqb);



CVS commit: src/sys/dev/pci

2020-09-08 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue Sep  8 13:28:51 UTC 2020

Modified Files:
src/sys/dev/pci: if_iavf.c

Log Message:
iaq_datalen is 16-bit, always use htole16

fixes build failure on big endian


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/if_iavf.c

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



CVS commit: src/distrib/sets/lists/base

2020-09-08 Thread Adam Ciarcinski
Module Name:src
Committed By:   adam
Date:   Tue Sep  8 13:01:47 UTC 2020

Modified Files:
src/distrib/sets/lists/base: shl.mi

Log Message:
Restore libgomp, liblsan, and libstdc++ as GCC-only


To generate a diff of this commit:
cvs rdiff -u -r1.900 -r1.901 src/distrib/sets/lists/base/shl.mi

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



CVS commit: src/distrib/sets/lists/base

2020-09-08 Thread Adam Ciarcinski
Module Name:src
Committed By:   adam
Date:   Tue Sep  8 13:01:47 UTC 2020

Modified Files:
src/distrib/sets/lists/base: shl.mi

Log Message:
Restore libgomp, liblsan, and libstdc++ as GCC-only


To generate a diff of this commit:
cvs rdiff -u -r1.900 -r1.901 src/distrib/sets/lists/base/shl.mi

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

Modified files:

Index: src/distrib/sets/lists/base/shl.mi
diff -u src/distrib/sets/lists/base/shl.mi:1.900 src/distrib/sets/lists/base/shl.mi:1.901
--- src/distrib/sets/lists/base/shl.mi:1.900	Sun Sep  6 10:54:26 2020
+++ src/distrib/sets/lists/base/shl.mi	Tue Sep  8 13:01:47 2020
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.900 2020/09/06 10:54:26 mrg Exp $
+# $NetBSD: shl.mi,v 1.901 2020/09/08 13:01:47 adam Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -348,8 +348,8 @@
 ./usr/lib/libgomp.sobase-sys-shlib		compatfile,gcc
 ./usr/lib/libgomp.so.1base-sys-shlib		compatfile,obsolete
 ./usr/lib/libgomp.so.1.3			base-sys-shlib		obsolete
-./usr/lib/libgomp.so.2base-sys-shlib		compatfile
-./usr/lib/libgomp.so.2.0			base-sys-shlib		compatfile,!machine_arch=mips64eb,!machine_arch=mips64el
+./usr/lib/libgomp.so.2base-sys-shlib		compatfile,gcc
+./usr/lib/libgomp.so.2.0			base-sys-shlib		compatfile,gcc,!machine_arch=mips64eb,!machine_arch=mips64el
 ./usr/lib/libgomp.so.2.0			base-sys-shlib		machine_arch=mips64eb
 ./usr/lib/libgomp.so.2.0			base-sys-shlib		machine_arch=mips64el
 ./usr/lib/libgssapi.sobase-krb5-shlib		compatfile,kerberos
@@ -428,8 +428,8 @@
 ./usr/lib/liblsan.sobase-sys-shlib		compatfile,cxx,gcc
 ./usr/lib/liblsan.so.1base-sys-shlib		compatfile,obsolete
 ./usr/lib/liblsan.so.1.0			base-sys-shlib		compatfile,obsolete
-./usr/lib/liblsan.so.2base-sys-shlib		compatfile,cxx
-./usr/lib/liblsan.so.2.0			base-sys-shlib		compatfile,cxx
+./usr/lib/liblsan.so.2base-sys-shlib		compatfile,cxx,gcc
+./usr/lib/liblsan.so.2.0			base-sys-shlib		compatfile,cxx,gcc
 ./usr/lib/liblua.sobase-sys-shlib		compatfile
 ./usr/lib/liblua.so.5base-sys-shlib		compatfile
 ./usr/lib/liblua.so.5.3base-sys-shlib		compatfile
@@ -878,8 +878,8 @@
 ./usr/lib/libssl.so.14base-crypto-shlib	compatfile,openssl=11
 ./usr/lib/libssl.so.14.0			base-crypto-shlib	compatfile,openssl=11
 ./usr/lib/libstdc++.sobase-sys-shlib		compatfile,gcc,cxx,libstdcxx
-./usr/lib/libstdc++.so.9			base-sys-shlib		compatfile,cxx,libstdcxx
-./usr/lib/libstdc++.so.9.0			base-sys-shlib		compatfile,cxx,libstdcxx
+./usr/lib/libstdc++.so.9			base-sys-shlib		compatfile,gcc,cxx,libstdcxx
+./usr/lib/libstdc++.so.9.0			base-sys-shlib		compatfile,gcc,cxx,libstdcxx
 ./usr/lib/libtelnet.sobase-obsolete		obsolete
 ./usr/lib/libtermcap.sobase-sys-shlib		compatfile
 ./usr/lib/libtermcap.so.0			base-sys-shlib		compatfile



Re: CVS commit: src

2020-09-08 Thread Martin Husemann
On Tue, Sep 08, 2020 at 09:40:47AM -0300, Jared McNeill wrote:
> This causes issues with the source tree on case insensitive file-systems :(

Sorry, should be fixed.

Martin


CVS commit: src/etc/rc.d

2020-09-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Sep  8 12:54:36 UTC 2020

Modified Files:
src/etc/rc.d: Makefile

Log Message:
Sort - no functional change


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/etc/rc.d/Makefile

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



CVS commit: src/etc/rc.d

2020-09-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Sep  8 12:54:36 UTC 2020

Modified Files:
src/etc/rc.d: Makefile

Log Message:
Sort - no functional change


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/etc/rc.d/Makefile

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

Modified files:

Index: src/etc/rc.d/Makefile
diff -u src/etc/rc.d/Makefile:1.108 src/etc/rc.d/Makefile:1.109
--- src/etc/rc.d/Makefile:1.108	Tue Sep  8 12:52:18 2020
+++ src/etc/rc.d/Makefile	Tue Sep  8 12:54:36 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.108 2020/09/08 12:52:18 martin Exp $
+# $NetBSD: Makefile,v 1.109 2020/09/08 12:54:36 martin Exp $
 
 .include 
 
@@ -14,7 +14,7 @@
 # src/sbin/rcorder.
 
 CONFIGFILES=\
-		DAEMON DISKS LOGIN NETWORKING SERVERS \
+		CRITLOCALMOUNTED DAEMON DISKS LOGIN NETWORKING SERVERS \
 		accounting altqd amd apmd automount automountd autounmountd \
 		bluetooth bootconf.sh bootparams \
 		ccd cgd clearcritlocal cleartmp cron \
@@ -29,8 +29,7 @@ CONFIGFILES=\
 		kdc \
 		ldconfig ldpd llvmlockdir local lpd lvm \
 		makemandb mdnsd mixerctl modules mopd motd mountall \
-		mountcritlocal CRITLOCALMOUNTED \
-		mountcritremote mountd moused mrouted \
+		mountcritlocal mountcritremote mountd moused mrouted \
 		named ndbootd network newsyslog nfsd nfslocking npf npf_boot \
 		npfd ntpd ntpdate \
 		perusertmp pf pf_boot pflogd postfix powerd ppp pwcheck \



CVS commit: src/etc/rc.d

2020-09-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Sep  8 12:52:18 UTC 2020

Modified Files:
src/etc/rc.d: Makefile bootconf.sh clearcritlocal dhcpcd ip6addrctl
ipfilter ipsec iscsid llvmlockdir mdnsd mountcritremote network npf
npf_boot pf pf_boot random_seed route6d smtoff wpa_supplicant
Added Files:
src/etc/rc.d: CRITLOCALMOUNTED
Removed Files:
src/etc/rc.d: MOUNTCRITLOCAL

Log Message:
Rename MOUNTCRITLOCAL to CRITLOCALMOUNTED to avoid a name collision
on case insensitive file systems


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/etc/rc.d/CRITLOCALMOUNTED
cvs rdiff -u -r1.1 -r0 src/etc/rc.d/MOUNTCRITLOCAL
cvs rdiff -u -r1.107 -r1.108 src/etc/rc.d/Makefile
cvs rdiff -u -r1.17 -r1.18 src/etc/rc.d/bootconf.sh src/etc/rc.d/ipsec
cvs rdiff -u -r1.2 -r1.3 src/etc/rc.d/clearcritlocal src/etc/rc.d/iscsid
cvs rdiff -u -r1.10 -r1.11 src/etc/rc.d/dhcpcd src/etc/rc.d/mountcritremote \
src/etc/rc.d/route6d
cvs rdiff -u -r1.6 -r1.7 src/etc/rc.d/ip6addrctl src/etc/rc.d/npf \
src/etc/rc.d/pf_boot
cvs rdiff -u -r1.20 -r1.21 src/etc/rc.d/ipfilter
cvs rdiff -u -r1.1 -r1.2 src/etc/rc.d/llvmlockdir
cvs rdiff -u -r1.5 -r1.6 src/etc/rc.d/mdnsd src/etc/rc.d/smtoff
cvs rdiff -u -r1.81 -r1.82 src/etc/rc.d/network
cvs rdiff -u -r1.3 -r1.4 src/etc/rc.d/npf_boot
cvs rdiff -u -r1.13 -r1.14 src/etc/rc.d/pf
cvs rdiff -u -r1.14 -r1.15 src/etc/rc.d/random_seed
cvs rdiff -u -r1.8 -r1.9 src/etc/rc.d/wpa_supplicant

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



CVS commit: src/distrib/sets/lists/etc

2020-09-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Sep  8 12:52:44 UTC 2020

Modified Files:
src/distrib/sets/lists/etc: mi

Log Message:
Adjust for MOUNTCRITLOCAL -> CRITLOCALMOUNTED rename


To generate a diff of this commit:
cvs rdiff -u -r1.262 -r1.263 src/distrib/sets/lists/etc/mi

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

Modified files:

Index: src/distrib/sets/lists/etc/mi
diff -u src/distrib/sets/lists/etc/mi:1.262 src/distrib/sets/lists/etc/mi:1.263
--- src/distrib/sets/lists/etc/mi:1.262	Thu Aug 27 15:32:00 2020
+++ src/distrib/sets/lists/etc/mi	Tue Sep  8 12:52:44 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.262 2020/08/27 15:32:00 riastradh Exp $
+# $NetBSD: mi,v 1.263 2020/09/08 12:52:44 martin Exp $
 #
 # Note: end-user configuration files that are moved to another location
 #	should not be marked "obsolete"; they should just be removed from
@@ -175,10 +175,11 @@
 ./etc/rbootd.confetc-bootserver-etc
 ./etc/rc	etc-sys-rc
 ./etc/rc.conf	etc-sys-rc
+./etc/rc.d/CRITLOCALMOUNTED			etc-sys-rc
 ./etc/rc.d/DAEMONetc-sys-rc
 ./etc/rc.d/DISKSetc-sys-rc
 ./etc/rc.d/LOGINetc-sys-rc
-./etc/rc.d/MOUNTCRITLOCAL			etc-sys-rc
+./etc/rc.d/MOUNTCRITLOCAL			etc-obsolete		obsolete
 ./etc/rc.d/NETWORKetc-obsolete		obsolete
 ./etc/rc.d/NETWORKINGetc-sys-rc
 ./etc/rc.d/SERVERSetc-sys-rc



CVS commit: src/distrib/sets/lists/etc

2020-09-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Sep  8 12:52:44 UTC 2020

Modified Files:
src/distrib/sets/lists/etc: mi

Log Message:
Adjust for MOUNTCRITLOCAL -> CRITLOCALMOUNTED rename


To generate a diff of this commit:
cvs rdiff -u -r1.262 -r1.263 src/distrib/sets/lists/etc/mi

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



CVS commit: src/etc/rc.d

2020-09-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Sep  8 12:52:18 UTC 2020

Modified Files:
src/etc/rc.d: Makefile bootconf.sh clearcritlocal dhcpcd ip6addrctl
ipfilter ipsec iscsid llvmlockdir mdnsd mountcritremote network npf
npf_boot pf pf_boot random_seed route6d smtoff wpa_supplicant
Added Files:
src/etc/rc.d: CRITLOCALMOUNTED
Removed Files:
src/etc/rc.d: MOUNTCRITLOCAL

Log Message:
Rename MOUNTCRITLOCAL to CRITLOCALMOUNTED to avoid a name collision
on case insensitive file systems


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/etc/rc.d/CRITLOCALMOUNTED
cvs rdiff -u -r1.1 -r0 src/etc/rc.d/MOUNTCRITLOCAL
cvs rdiff -u -r1.107 -r1.108 src/etc/rc.d/Makefile
cvs rdiff -u -r1.17 -r1.18 src/etc/rc.d/bootconf.sh src/etc/rc.d/ipsec
cvs rdiff -u -r1.2 -r1.3 src/etc/rc.d/clearcritlocal src/etc/rc.d/iscsid
cvs rdiff -u -r1.10 -r1.11 src/etc/rc.d/dhcpcd src/etc/rc.d/mountcritremote \
src/etc/rc.d/route6d
cvs rdiff -u -r1.6 -r1.7 src/etc/rc.d/ip6addrctl src/etc/rc.d/npf \
src/etc/rc.d/pf_boot
cvs rdiff -u -r1.20 -r1.21 src/etc/rc.d/ipfilter
cvs rdiff -u -r1.1 -r1.2 src/etc/rc.d/llvmlockdir
cvs rdiff -u -r1.5 -r1.6 src/etc/rc.d/mdnsd src/etc/rc.d/smtoff
cvs rdiff -u -r1.81 -r1.82 src/etc/rc.d/network
cvs rdiff -u -r1.3 -r1.4 src/etc/rc.d/npf_boot
cvs rdiff -u -r1.13 -r1.14 src/etc/rc.d/pf
cvs rdiff -u -r1.14 -r1.15 src/etc/rc.d/random_seed
cvs rdiff -u -r1.8 -r1.9 src/etc/rc.d/wpa_supplicant

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

Modified files:

Index: src/etc/rc.d/Makefile
diff -u src/etc/rc.d/Makefile:1.107 src/etc/rc.d/Makefile:1.108
--- src/etc/rc.d/Makefile:1.107	Wed Jul 22 16:50:41 2020
+++ src/etc/rc.d/Makefile	Tue Sep  8 12:52:18 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.107 2020/07/22 16:50:41 martin Exp $
+# $NetBSD: Makefile,v 1.108 2020/09/08 12:52:18 martin Exp $
 
 .include 
 
@@ -29,7 +29,7 @@ CONFIGFILES=\
 		kdc \
 		ldconfig ldpd llvmlockdir local lpd lvm \
 		makemandb mdnsd mixerctl modules mopd motd mountall \
-		mountcritlocal MOUNTCRITLOCAL \
+		mountcritlocal CRITLOCALMOUNTED \
 		mountcritremote mountd moused mrouted \
 		named ndbootd network newsyslog nfsd nfslocking npf npf_boot \
 		npfd ntpd ntpdate \

Index: src/etc/rc.d/bootconf.sh
diff -u src/etc/rc.d/bootconf.sh:1.17 src/etc/rc.d/bootconf.sh:1.18
--- src/etc/rc.d/bootconf.sh:1.17	Wed Jul 22 16:50:41 2020
+++ src/etc/rc.d/bootconf.sh	Tue Sep  8 12:52:18 2020
@@ -1,10 +1,10 @@
 #!/bin/sh
 #
-# $NetBSD: bootconf.sh,v 1.17 2020/07/22 16:50:41 martin Exp $
+# $NetBSD: bootconf.sh,v 1.18 2020/09/08 12:52:18 martin Exp $
 #
 
 # PROVIDE: bootconf
-# REQUIRE: MOUNTCRITLOCAL
+# REQUIRE: CRITLOCALMOUNTED
 # KEYWORD: interactive
 
 $_rc_subr_loaded . /etc/rc.subr
Index: src/etc/rc.d/ipsec
diff -u src/etc/rc.d/ipsec:1.17 src/etc/rc.d/ipsec:1.18
--- src/etc/rc.d/ipsec:1.17	Wed Jul 22 16:50:41 2020
+++ src/etc/rc.d/ipsec	Tue Sep  8 12:52:18 2020
@@ -1,10 +1,10 @@
 #!/bin/sh
 #
-# $NetBSD: ipsec,v 1.17 2020/07/22 16:50:41 martin Exp $
+# $NetBSD: ipsec,v 1.18 2020/09/08 12:52:18 martin Exp $
 #
 
 # PROVIDE: ipsec
-# REQUIRE: root bootconf MOUNTCRITLOCAL tty
+# REQUIRE: root bootconf CRITLOCALMOUNTED tty
 # BEFORE:  DAEMON
 
 $_rc_subr_loaded . /etc/rc.subr

Index: src/etc/rc.d/clearcritlocal
diff -u src/etc/rc.d/clearcritlocal:1.2 src/etc/rc.d/clearcritlocal:1.3
--- src/etc/rc.d/clearcritlocal:1.2	Tue Sep  8 12:45:03 2020
+++ src/etc/rc.d/clearcritlocal	Tue Sep  8 12:52:18 2020
@@ -1,10 +1,10 @@
 #!/bin/sh
 #
-# $NetBSD: clearcritlocal,v 1.2 2020/09/08 12:45:03 martin Exp $
+# $NetBSD: clearcritlocal,v 1.3 2020/09/08 12:52:18 martin Exp $
 #
 
 # REQUIRE: mountcritlocal
-# BEFORE: MOUNTCRITLOCAL
+# BEFORE: CRITLOCALMOUNTED
 
 $_rc_subr_loaded . /etc/rc.subr
 
Index: src/etc/rc.d/iscsid
diff -u src/etc/rc.d/iscsid:1.2 src/etc/rc.d/iscsid:1.3
--- src/etc/rc.d/iscsid:1.2	Wed Jul 22 16:50:41 2020
+++ src/etc/rc.d/iscsid	Tue Sep  8 12:52:18 2020
@@ -1,10 +1,10 @@
 #!/bin/sh
 #
-# $NetBSD: iscsid,v 1.2 2020/07/22 16:50:41 martin Exp $
+# $NetBSD: iscsid,v 1.3 2020/09/08 12:52:18 martin Exp $
 #
 
 # PROVIDE: iscsid
-# REQUIRE: NETWORKING MOUNTCRITLOCAL
+# REQUIRE: NETWORKING CRITLOCALMOUNTED
 # BEFORE:  securelevel mountcritremote
 
 $_rc_subr_loaded . /etc/rc.subr

Index: src/etc/rc.d/dhcpcd
diff -u src/etc/rc.d/dhcpcd:1.10 src/etc/rc.d/dhcpcd:1.11
--- src/etc/rc.d/dhcpcd:1.10	Wed Jul 22 16:50:41 2020
+++ src/etc/rc.d/dhcpcd	Tue Sep  8 12:52:18 2020
@@ -1,9 +1,9 @@
 #!/bin/sh
 
-# $NetBSD: dhcpcd,v 1.10 2020/07/22 16:50:41 martin Exp $
+# $NetBSD: dhcpcd,v 1.11 2020/09/08 12:52:18 martin Exp $
 
 # PROVIDE: dhcpcd
-# REQUIRE: network MOUNTCRITLOCAL
+# REQUIRE: network CRITLOCALMOUNTED
 # BEFORE:  NETWORKING
 
 $_rc_subr_loaded . /etc/rc.subr
Index: src/etc/rc.d/mountcritremote
diff -u src/etc/rc.d/mountcritremote:1.10 src/etc/rc.d/mountcritremote:1.11
--- 

CVS commit: src/etc/rc.d

2020-09-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Sep  8 12:45:03 UTC 2020

Modified Files:
src/etc/rc.d: clearcritlocal

Log Message:
Make it work with empty /var


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/etc/rc.d/clearcritlocal

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

Modified files:

Index: src/etc/rc.d/clearcritlocal
diff -u src/etc/rc.d/clearcritlocal:1.1 src/etc/rc.d/clearcritlocal:1.2
--- src/etc/rc.d/clearcritlocal:1.1	Wed Jul 22 16:50:41 2020
+++ src/etc/rc.d/clearcritlocal	Tue Sep  8 12:45:03 2020
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: clearcritlocal,v 1.1 2020/07/22 16:50:41 martin Exp $
+# $NetBSD: clearcritlocal,v 1.2 2020/09/08 12:45:03 martin Exp $
 #
 
 # REQUIRE: mountcritlocal
@@ -18,7 +18,9 @@ clearcritlocal_start()
 	#	this could include the cleanup of lock files and /var/run, etc.
 	#
 	rm -f /etc/nologin /var/spool/lock/LCK.*
-	test -d /var/run && (cd /var/run && rm -rf -- *)
+	if [ -d /var/run ]; then
+		cd /var/run && rm -rf -- *
+	fi
 	return 0
 }
 



CVS commit: src/etc/rc.d

2020-09-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Sep  8 12:45:03 UTC 2020

Modified Files:
src/etc/rc.d: clearcritlocal

Log Message:
Make it work with empty /var


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/etc/rc.d/clearcritlocal

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



Re: CVS commit: src

2020-09-08 Thread Jared McNeill

This causes issues with the source tree on case insensitive file-systems :(


On Wed, 22 Jul 2020, Martin Husemann wrote:


Module Name:src
Committed By:   martin
Date:   Wed Jul 22 16:50:41 UTC 2020

Modified Files:
src/distrib/sets/lists/etc: mi
src/etc: rc
src/etc/rc.d: Makefile bootconf.sh dhcpcd ip6addrctl ipfilter ipsec
iscsid mdnsd mountcritlocal mountcritremote network npf npf_boot pf
pf_boot random_seed route6d smtoff wpa_supplicant
Added Files:
src/etc/rc.d: MOUNTCRITLOCAL clearcritlocal llvmlockdir

Log Message:
Split the local disk availability step into two phases to allow scripts
that pre-populate parts of the system (e.g. a tmpfs based /var) an
easy place to plug in like:

# REQUIRE: mountcritlocal
# BEFORE: MOUNTCRITLOCAL

This also cleans up the existing special handling a bit by separating it
into new scripts. All later scripts now depend on MOUNTCRITLOCAL.
Discussed on tech-userlevel some time ago.


To generate a diff of this commit:
cvs rdiff -u -r1.260 -r1.261 src/distrib/sets/lists/etc/mi
cvs rdiff -u -r1.173 -r1.174 src/etc/rc
cvs rdiff -u -r0 -r1.1 src/etc/rc.d/MOUNTCRITLOCAL \
   src/etc/rc.d/clearcritlocal src/etc/rc.d/llvmlockdir
cvs rdiff -u -r1.106 -r1.107 src/etc/rc.d/Makefile
cvs rdiff -u -r1.16 -r1.17 src/etc/rc.d/bootconf.sh src/etc/rc.d/ipsec
cvs rdiff -u -r1.9 -r1.10 src/etc/rc.d/dhcpcd src/etc/rc.d/mountcritremote \
   src/etc/rc.d/route6d
cvs rdiff -u -r1.5 -r1.6 src/etc/rc.d/ip6addrctl src/etc/rc.d/npf \
   src/etc/rc.d/pf_boot
cvs rdiff -u -r1.19 -r1.20 src/etc/rc.d/ipfilter
cvs rdiff -u -r1.1 -r1.2 src/etc/rc.d/iscsid
cvs rdiff -u -r1.4 -r1.5 src/etc/rc.d/mdnsd src/etc/rc.d/smtoff
cvs rdiff -u -r1.15 -r1.16 src/etc/rc.d/mountcritlocal
cvs rdiff -u -r1.80 -r1.81 src/etc/rc.d/network
cvs rdiff -u -r1.2 -r1.3 src/etc/rc.d/npf_boot
cvs rdiff -u -r1.12 -r1.13 src/etc/rc.d/pf
cvs rdiff -u -r1.13 -r1.14 src/etc/rc.d/random_seed
cvs rdiff -u -r1.7 -r1.8 src/etc/rc.d/wpa_supplicant

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




  1   2   >