CVS commit: src

2021-07-13 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Jul 14 03:22:33 UTC 2021

Modified Files:
src/distrib/sets/lists/tests: mi
src/etc/mtree: NetBSD.dist.tests
src/tests/net: Makefile
Added Files:
src/tests/net/altq: Makefile t_cbq.sh

Log Message:
tests: add tests for ALTQ CBQ


To generate a diff of this commit:
cvs rdiff -u -r1.1086 -r1.1087 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.184 -r1.185 src/etc/mtree/NetBSD.dist.tests
cvs rdiff -u -r1.38 -r1.39 src/tests/net/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/net/altq/Makefile \
src/tests/net/altq/t_cbq.sh

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/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.1086 src/distrib/sets/lists/tests/mi:1.1087
--- src/distrib/sets/lists/tests/mi:1.1086	Tue Jul 13 19:38:10 2021
+++ src/distrib/sets/lists/tests/mi	Wed Jul 14 03:22:33 2021
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1086 2021/07/13 19:38:10 rillig Exp $
+# $NetBSD: mi,v 1.1087 2021/07/14 03:22:33 ozaki-r Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -4042,6 +4042,10 @@
 ./usr/tests/net		tests-net-tests		compattestfile,atf
 ./usr/tests/net/Atffile	tests-net-tests		compattestfile,atf
 ./usr/tests/net/Kyuafiletests-net-tests		compattestfile,atf,kyua
+./usr/tests/net/altq	tests-net-tests		compattestfile,atf
+./usr/tests/net/altq/Atffiletests-net-tests		atf,rump
+./usr/tests/net/altq/Kyuafiletests-net-tests		atf,rump,kyua
+./usr/tests/net/altq/t_cbqtests-net-tests		atf,rump
 ./usr/tests/net/arp	tests-net-tests		compattestfile,atf
 ./usr/tests/net/arp/Atffiletests-net-tests		atf,rump
 ./usr/tests/net/arp/Kyuafiletests-net-tests		atf,rump,kyua

Index: src/etc/mtree/NetBSD.dist.tests
diff -u src/etc/mtree/NetBSD.dist.tests:1.184 src/etc/mtree/NetBSD.dist.tests:1.185
--- src/etc/mtree/NetBSD.dist.tests:1.184	Mon May 17 04:07:42 2021
+++ src/etc/mtree/NetBSD.dist.tests	Wed Jul 14 03:22:33 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.tests,v 1.184 2021/05/17 04:07:42 yamaguchi Exp $
+#	$NetBSD: NetBSD.dist.tests,v 1.185 2021/07/14 03:22:33 ozaki-r Exp $
 
 ./usr/libdata/debug/usr/tests
 ./usr/libdata/debug/usr/tests/atf
@@ -345,6 +345,7 @@
 ./usr/tests/libexec/ld.elf_so/h_helper_symver_dso2
 ./usr/tests/modules
 ./usr/tests/net
+./usr/tests/net/altq
 ./usr/tests/net/arp
 ./usr/tests/net/bpf
 ./usr/tests/net/bpfilter

Index: src/tests/net/Makefile
diff -u src/tests/net/Makefile:1.38 src/tests/net/Makefile:1.39
--- src/tests/net/Makefile:1.38	Mon May 17 04:07:44 2021
+++ src/tests/net/Makefile	Wed Jul 14 03:22:33 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.38 2021/05/17 04:07:44 yamaguchi Exp $
+# $NetBSD: Makefile,v 1.39 2021/07/14 03:22:33 ozaki-r Exp $
 
 .include 
 
@@ -6,7 +6,7 @@ TESTSDIR=	${TESTSBASE}/net
 
 TESTS_SUBDIRS=		fdpass in_cksum net sys
 .if (${MKRUMP} != "no") && !defined(BSD_MK_COMPAT_FILE)
-TESTS_SUBDIRS+=		arp bpf bpfilter can carp icmp if if_bridge if_gif
+TESTS_SUBDIRS+=		altq arp bpf bpfilter can carp icmp if if_bridge if_gif
 TESTS_SUBDIRS+=		if_ipsec if_l2tp if_lagg if_loop if_pppoe if_tap
 TESTS_SUBDIRS+=		if_tun if_vether if_vlan if_wg ipsec mcast mpls
 TESTS_SUBDIRS+=		ndp npf route

Added files:

Index: src/tests/net/altq/Makefile
diff -u /dev/null src/tests/net/altq/Makefile:1.1
--- /dev/null	Wed Jul 14 03:22:33 2021
+++ src/tests/net/altq/Makefile	Wed Jul 14 03:22:33 2021
@@ -0,0 +1,13 @@
+# $NetBSD: Makefile,v 1.1 2021/07/14 03:22:33 ozaki-r Exp $
+#
+
+.include 
+
+TESTSDIR=	${TESTSBASE}/net/altq
+
+.for name in cbq
+ TESTS_SH+=	t_${name}
+ TESTS_SH_SRC_t_${name}=	../net_common.sh t_${name}.sh
+.endfor
+
+.include 
Index: src/tests/net/altq/t_cbq.sh
diff -u /dev/null src/tests/net/altq/t_cbq.sh:1.1
--- /dev/null	Wed Jul 14 03:22:33 2021
+++ src/tests/net/altq/t_cbq.sh	Wed Jul 14 03:22:33 2021
@@ -0,0 +1,347 @@
+#	$NetBSD: t_cbq.sh,v 1.1 2021/07/14 03:22:33 ozaki-r Exp $
+#
+# Copyright (c) 2021 Internet Initiative Japan Inc.
+# All rights reserved.
+#
+# 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, 

CVS commit: src

2021-07-13 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Jul 14 03:19:24 UTC 2021

Modified Files:
src/distrib/sets/lists/base: shl.mi
src/distrib/sets/lists/comp: mi shl.mi
src/distrib/sets/lists/debug: mi shl.mi
src/sys/rump/include/opt: opt_rumpkernel.h
src/sys/rump/librump/rumpnet: net_stub.c
src/sys/rump/net: Makefile.rumpnetcomp
Added Files:
src/sys/rump/net/lib/libaltq: Makefile altq_component.c

Log Message:
Rump-ify ALTQ (librumpnet_altq.so)


To generate a diff of this commit:
cvs rdiff -u -r1.921 -r1.922 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.2389 -r1.2390 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.346 -r1.347 src/distrib/sets/lists/comp/shl.mi
cvs rdiff -u -r1.355 -r1.356 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.278 -r1.279 src/distrib/sets/lists/debug/shl.mi
cvs rdiff -u -r1.6 -r1.7 src/sys/rump/include/opt/opt_rumpkernel.h
cvs rdiff -u -r1.42 -r1.43 src/sys/rump/librump/rumpnet/net_stub.c
cvs rdiff -u -r1.24 -r1.25 src/sys/rump/net/Makefile.rumpnetcomp
cvs rdiff -u -r0 -r1.1 src/sys/rump/net/lib/libaltq/Makefile \
src/sys/rump/net/lib/libaltq/altq_component.c

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.921 src/distrib/sets/lists/base/shl.mi:1.922
--- src/distrib/sets/lists/base/shl.mi:1.921	Thu Jun 17 01:17:27 2021
+++ src/distrib/sets/lists/base/shl.mi	Wed Jul 14 03:19:23 2021
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.921 2021/06/17 01:17:27 christos Exp $
+# $NetBSD: shl.mi,v 1.922 2021/07/14 03:19:23 ozaki-r Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -765,6 +765,9 @@
 ./usr/lib/librumpnet_agr.so			base-rump-shlib		rump
 ./usr/lib/librumpnet_agr.so.0			base-rump-shlib		rump
 ./usr/lib/librumpnet_agr.so.0.0			base-rump-shlib		rump
+./usr/lib/librumpnet_altq.so			base-rump-shlib		rump
+./usr/lib/librumpnet_altq.so.0			base-rump-shlib		rump
+./usr/lib/librumpnet_altq.so.0.0		base-rump-shlib		rump
 ./usr/lib/librumpnet_bpfjit.so			base-rump-shlib		rump,sljit
 ./usr/lib/librumpnet_bpfjit.so.0		base-rump-shlib		rump,sljit
 ./usr/lib/librumpnet_bpfjit.so.0.0		base-rump-shlib		rump,sljit

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.2389 src/distrib/sets/lists/comp/mi:1.2390
--- src/distrib/sets/lists/comp/mi:1.2389	Thu Jun 17 01:17:28 2021
+++ src/distrib/sets/lists/comp/mi	Wed Jul 14 03:19:24 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2389 2021/06/17 01:17:28 christos Exp $
+#	$NetBSD: mi,v 1.2390 2021/07/14 03:19:24 ozaki-r Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.compcomp-sys-root
@@ -4011,8 +4011,12 @@
 ./usr/lib/librumpkern_z.a			comp-c-lib		rump
 ./usr/lib/librumpkern_z_p.a			comp-c-proflib		rump,profile
 ./usr/lib/librumpnet.acomp-c-lib		compatfile,rump
+./usr/lib/librumpnet_altq.a			comp-c-lib		rump
+./usr/lib/librumpnet_altq_p.a			comp-c-proflib		rump,profile
 ./usr/lib/librumpnet_agr.a			comp-c-lib		rump
 ./usr/lib/librumpnet_agr_p.a			comp-c-proflib		rump,profile
+./usr/lib/librumpnet_altq.a			comp-c-lib		rump
+./usr/lib/librumpnet_altq_p.a			comp-c-proflib		rump,profile
 ./usr/lib/librumpnet_bpfjit.a			comp-c-lib		rump,sljit
 ./usr/lib/librumpnet_bpfjit_p.a			comp-c-proflib		rump,sljit,profile
 ./usr/lib/librumpnet_bridge.a			comp-c-lib		rump

Index: src/distrib/sets/lists/comp/shl.mi
diff -u src/distrib/sets/lists/comp/shl.mi:1.346 src/distrib/sets/lists/comp/shl.mi:1.347
--- src/distrib/sets/lists/comp/shl.mi:1.346	Mon May 17 04:07:41 2021
+++ src/distrib/sets/lists/comp/shl.mi	Wed Jul 14 03:19:24 2021
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.346 2021/05/17 04:07:41 yamaguchi Exp $
+# $NetBSD: shl.mi,v 1.347 2021/07/14 03:19:24 ozaki-r Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -225,6 +225,7 @@
 ./usr/lib/librumpkern_tty_pic.a			comp-c-piclib		picinstall,rump
 ./usr/lib/librumpkern_z_pic.a			comp-c-piclib		picinstall,rump
 ./usr/lib/librumpnet_agr_pic.a			comp-c-piclib		picinstall,rump
+./usr/lib/librumpnet_altq_pic.a			comp-c-piclib		picinstall,rump
 ./usr/lib/librumpnet_bpfjit_pic.a		comp-c-piclib		picinstall,rump,sljit
 ./usr/lib/librumpnet_bridge_pic.a		comp-c-piclib		picinstall,rump
 ./usr/lib/librumpnet_gif_pic.a			comp-c-piclib		picinstall,rump

Index: src/distrib/sets/lists/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.355 src/distrib/sets/lists/debug/mi:1.356
--- src/distrib/sets/lists/debug/mi:1.355	Fri Jul  9 05:54:11 2021
+++ src/distrib/sets/lists/debug/mi	Wed Jul 14 03:19:24 2021
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.355 2021/07/09 05:54:11 yamaguchi Exp $
+# $NetBSD: mi,v 1.356 2021/07/14 03:19:24 ozaki-r Exp $
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/lib	

CVS commit: src/sys/rump/net/lib/libshmif

2021-07-13 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Jul 14 03:16:06 UTC 2021

Modified Files:
src/sys/rump/net/lib/libshmif: if_shmem.c

Log Message:
shmif: support ALTQ


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/rump/net/lib/libshmif/if_shmem.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/rump/net/lib/libshmif/if_shmem.c
diff -u src/sys/rump/net/lib/libshmif/if_shmem.c:1.82 src/sys/rump/net/lib/libshmif/if_shmem.c:1.83
--- src/sys/rump/net/lib/libshmif/if_shmem.c:1.82	Wed Jun 16 00:21:19 2021
+++ src/sys/rump/net/lib/libshmif/if_shmem.c	Wed Jul 14 03:16:06 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_shmem.c,v 1.82 2021/06/16 00:21:19 riastradh Exp $	*/
+/*	$NetBSD: if_shmem.c,v 1.83 2021/07/14 03:16:06 ozaki-r Exp $	*/
 
 /*
  * Copyright (c) 2009, 2010 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.82 2021/06/16 00:21:19 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.83 2021/07/14 03:16:06 ozaki-r Exp $");
 
 #include 
 #include 
@@ -191,6 +191,7 @@ allocif(int unit, struct shmif_sc **scp)
 	IFCAP_CSUM_UDPv4_Rx	| IFCAP_CSUM_UDPv4_Tx |
 	IFCAP_CSUM_TCPv6_Rx	| IFCAP_CSUM_TCPv6_Tx |
 	IFCAP_CSUM_UDPv6_Rx	| IFCAP_CSUM_UDPv6_Tx;
+	IFQ_SET_READY(>if_snd);
 
 	mutex_init(>sc_mtx, MUTEX_DEFAULT, IPL_NONE);
 	cv_init(>sc_cv, "shmifcv");
@@ -206,6 +207,7 @@ allocif(int unit, struct shmif_sc **scp)
 	}
 #endif
 
+	if_deferred_start_init(ifp, NULL);
 	ether_ifattach(ifp, enaddr);
 	if_register(ifp);
 
@@ -545,7 +547,7 @@ shmif_start(struct ifnet *ifp)
 	ifp->if_flags |= IFF_OACTIVE;
 
 	for (;;) {
-		IF_DEQUEUE(>if_snd, m);
+		IFQ_DEQUEUE(>if_snd, m);
 		if (m == NULL)
 			break;
 



CVS commit: src/sys/arch/alpha

2021-07-13 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jul 14 02:18:10 UTC 2021

Modified Files:
src/sys/arch/alpha/alpha: lock_stubs.s
src/sys/arch/alpha/include: mutex.h

Log Message:
Disable the mutex_spin_{enter,exit}() fast-path stubs while I investigate
some an odd IPL-related panic that seems to be related (that I can fairly
reliabily reproduce on an LCA45).


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/alpha/alpha/lock_stubs.s
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/alpha/include/mutex.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/arch/alpha/alpha/lock_stubs.s
diff -u src/sys/arch/alpha/alpha/lock_stubs.s:1.8 src/sys/arch/alpha/alpha/lock_stubs.s:1.9
--- src/sys/arch/alpha/alpha/lock_stubs.s:1.8	Tue Jul 13 13:58:30 2021
+++ src/sys/arch/alpha/alpha/lock_stubs.s	Wed Jul 14 02:18:10 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: lock_stubs.s,v 1.8 2021/07/13 13:58:30 thorpej Exp $	*/
+/*	$NetBSD: lock_stubs.s,v 1.9 2021/07/14 02:18:10 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2021 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: lock_stubs.s,v 1.8 2021/07/13 13:58:30 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lock_stubs.s,v 1.9 2021/07/14 02:18:10 thorpej Exp $");
 
 #include "assym.h"
 
@@ -114,6 +114,7 @@ LEAF(mutex_exit, 1)
 	br	1b
 	END(mutex_exit)
 
+#if 0 /* XXX disabled for now XXX */
 /*
  * void mutex_spin_enter(kmutex_t *mtx);
  */
@@ -227,6 +228,7 @@ LEAF(mutex_spin_exit, 1)
 1:
 	RET
 	END(mutex_spin_exit)
+#endif /* XXX disabled for now XXX */
 
 /*
  * void rw_enter(krwlock_t *rwl, krw_t op);
@@ -399,8 +401,10 @@ lock_stub_patch_table:
 #if !defined(LOCKDEBUG)
 	.quad	.L_mutex_enter_mb_1
 	.quad	.L_mutex_exit_mb_1
+#if 0 /* XXX disabled for now XXX */
 	.quad	.L_mutex_spin_enter_mb_1
 	.quad	.L_mutex_spin_exit_mb_1
+#endif /* XXX disabled for now XXX */
 	.quad	.L_rw_enter_mb_1
 	.quad	.L_rw_enter_mb_2
 	.quad	.L_rw_tryenter_mb_1

Index: src/sys/arch/alpha/include/mutex.h
diff -u src/sys/arch/alpha/include/mutex.h:1.9 src/sys/arch/alpha/include/mutex.h:1.10
--- src/sys/arch/alpha/include/mutex.h:1.9	Mon Jul 12 15:21:51 2021
+++ src/sys/arch/alpha/include/mutex.h	Wed Jul 14 02:18:10 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: mutex.h,v 1.9 2021/07/12 15:21:51 thorpej Exp $	*/
+/*	$NetBSD: mutex.h,v 1.10 2021/07/14 02:18:10 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2006, 2007 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@ struct kmutex {
 
 #define	__HAVE_SIMPLE_MUTEXES		1
 #define	__HAVE_MUTEX_STUBS		1
-#define	__HAVE_SPIN_MUTEX_STUBS		1
+/* XXX #define	__HAVE_SPIN_MUTEX_STUBS		1 XXX */
 
 #define	MUTEX_CAS(p, o, n)		_lock_cas((p), (o), (n))
 



CVS commit: src

2021-07-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Jul 13 22:01:34 UTC 2021

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_031.c msg_031.exp msg_067.c
msg_067.exp msg_152.exp msg_175.exp
src/usr.bin/xlint/lint1: decl.c err.c

Log Message:
lint: fix wording of message for incomplete struct (2021-07-04)

A struct member is not an argument.  In err.c 1.124 from 2021-07-04, the
wording had been changed, without noticing that the message was used
twice: once for an argument, once for a struct member.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/msg_031.c \
src/tests/usr.bin/xlint/lint1/msg_031.exp
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_067.c \
src/tests/usr.bin/xlint/lint1/msg_067.exp
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_152.exp
cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/xlint/lint1/msg_175.exp
cvs rdiff -u -r1.198 -r1.199 src/usr.bin/xlint/lint1/decl.c
cvs rdiff -u -r1.128 -r1.129 src/usr.bin/xlint/lint1/err.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/usr.bin/xlint/lint1/msg_031.c
diff -u src/tests/usr.bin/xlint/lint1/msg_031.c:1.5 src/tests/usr.bin/xlint/lint1/msg_031.c:1.6
--- src/tests/usr.bin/xlint/lint1/msg_031.c:1.5	Sun Jul  4 13:31:10 2021
+++ src/tests/usr.bin/xlint/lint1/msg_031.c	Tue Jul 13 22:01:34 2021
@@ -1,7 +1,7 @@
-/*	$NetBSD: msg_031.c,v 1.5 2021/07/04 13:31:10 rillig Exp $	*/
+/*	$NetBSD: msg_031.c,v 1.6 2021/07/13 22:01:34 rillig Exp $	*/
 # 3 "msg_031.c"
 
-// Test for message: argument '%s' has type '%s' [31]
+// Test for message: '%s' has incomplete type '%s' [31]
 
 struct complete {
 	int dummy;
@@ -12,8 +12,9 @@ struct incomplete;			/* expect: 233 */
 
 struct complete complete_var;
 
-struct incomplete incomplete_var;	/* expect: 31 */
+/* expect+1: 'incomplete_var' has incomplete type 'incomplete struct incomplete' */
+struct incomplete incomplete_var;
 
 
-/* expect+1: error: argument '' has type 'incomplete struct incomplete' [31] */
+/* expect+1: '' has incomplete type 'incomplete struct incomplete' [31] */
 void function(struct incomplete);
Index: src/tests/usr.bin/xlint/lint1/msg_031.exp
diff -u src/tests/usr.bin/xlint/lint1/msg_031.exp:1.5 src/tests/usr.bin/xlint/lint1/msg_031.exp:1.6
--- src/tests/usr.bin/xlint/lint1/msg_031.exp:1.5	Sun Jul  4 13:31:10 2021
+++ src/tests/usr.bin/xlint/lint1/msg_031.exp	Tue Jul 13 22:01:34 2021
@@ -1,3 +1,3 @@
-msg_031.c(19): error: argument '' has type 'incomplete struct incomplete' [31]
+msg_031.c(20): error: '' has incomplete type 'incomplete struct incomplete' [31]
 msg_031.c(10): warning: struct incomplete never defined [233]
-msg_031.c(15): error: argument 'incomplete_var' has type 'incomplete struct incomplete' [31]
+msg_031.c(16): error: 'incomplete_var' has incomplete type 'incomplete struct incomplete' [31]

Index: src/tests/usr.bin/xlint/lint1/msg_067.c
diff -u src/tests/usr.bin/xlint/lint1/msg_067.c:1.3 src/tests/usr.bin/xlint/lint1/msg_067.c:1.4
--- src/tests/usr.bin/xlint/lint1/msg_067.c:1.3	Tue Jul 13 21:50:05 2021
+++ src/tests/usr.bin/xlint/lint1/msg_067.c	Tue Jul 13 22:01:34 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_067.c,v 1.3 2021/07/13 21:50:05 rillig Exp $	*/
+/*	$NetBSD: msg_067.c,v 1.4 2021/07/13 22:01:34 rillig Exp $	*/
 # 3 "msg_067.c"
 
 // Test for message: cannot return incomplete type [67]
@@ -12,8 +12,7 @@ struct incomplete
 function_definition(void)
 /* expect+1: error: cannot return incomplete type [67] */
 {
-	/* FIXME: 'r' is not an argument. */
-	/* expect+1: error: argument 'r' has type 'incomplete struct incomplete' [31] */
+	/* expect+1: error: 'r' has incomplete type 'incomplete struct incomplete' [31] */
 	struct incomplete r;
 
 	/* expect+1: error: cannot return incomplete type [212] */
Index: src/tests/usr.bin/xlint/lint1/msg_067.exp
diff -u src/tests/usr.bin/xlint/lint1/msg_067.exp:1.3 src/tests/usr.bin/xlint/lint1/msg_067.exp:1.4
--- src/tests/usr.bin/xlint/lint1/msg_067.exp:1.3	Tue Jul 13 21:50:05 2021
+++ src/tests/usr.bin/xlint/lint1/msg_067.exp	Tue Jul 13 22:01:34 2021
@@ -1,4 +1,4 @@
 msg_067.c(14): error: cannot return incomplete type [67]
-msg_067.c(17): error: argument 'r' has type 'incomplete struct incomplete' [31]
-msg_067.c(20): error: cannot return incomplete type [212]
+msg_067.c(16): error: 'r' has incomplete type 'incomplete struct incomplete' [31]
+msg_067.c(19): error: cannot return incomplete type [212]
 msg_067.c(7): warning: struct incomplete never defined [233]

Index: src/tests/usr.bin/xlint/lint1/msg_152.exp
diff -u src/tests/usr.bin/xlint/lint1/msg_152.exp:1.4 src/tests/usr.bin/xlint/lint1/msg_152.exp:1.5
--- src/tests/usr.bin/xlint/lint1/msg_152.exp:1.4	Sun Jul  4 13:31:10 2021
+++ src/tests/usr.bin/xlint/lint1/msg_152.exp	Tue Jul 13 22:01:34 2021
@@ -1,4 +1,4 @@
-msg_152.c(8): error: argument '' has type 'incomplete struct incomplete' 

CVS commit: src/tests/usr.bin/xlint/lint1

2021-07-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Jul 13 21:50:05 UTC 2021

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_065.c msg_065.exp msg_067.c
msg_067.exp

Log Message:
tests/lint: add tests for empty and incomplete structs


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_065.c \
src/tests/usr.bin/xlint/lint1/msg_065.exp \
src/tests/usr.bin/xlint/lint1/msg_067.c \
src/tests/usr.bin/xlint/lint1/msg_067.exp

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

Modified files:

Index: src/tests/usr.bin/xlint/lint1/msg_065.c
diff -u src/tests/usr.bin/xlint/lint1/msg_065.c:1.2 src/tests/usr.bin/xlint/lint1/msg_065.c:1.3
--- src/tests/usr.bin/xlint/lint1/msg_065.c:1.2	Sun Feb 21 09:07:58 2021
+++ src/tests/usr.bin/xlint/lint1/msg_065.c	Tue Jul 13 21:50:05 2021
@@ -1,7 +1,18 @@
-/*	$NetBSD: msg_065.c,v 1.2 2021/02/21 09:07:58 rillig Exp $	*/
+/*	$NetBSD: msg_065.c,v 1.3 2021/07/13 21:50:05 rillig Exp $	*/
 # 3 "msg_065.c"
 
 // Test for message: %s has no named members [65]
 
-TODO: "Add example code that triggers the above message." /* expect: 249 */
-TODO: "Add example code that almost triggers the above message."
+struct ok {
+	int member;
+};
+
+/* XXX: should generate a warning as well. */
+struct empty {
+};
+
+struct only_unnamed_members {
+	unsigned int :14;
+	unsigned int :0;
+};
+/* expect-1: warning: structure has no named members [65] */
Index: src/tests/usr.bin/xlint/lint1/msg_065.exp
diff -u src/tests/usr.bin/xlint/lint1/msg_065.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_065.exp:1.3
--- src/tests/usr.bin/xlint/lint1/msg_065.exp:1.2	Sun Mar 21 20:44:59 2021
+++ src/tests/usr.bin/xlint/lint1/msg_065.exp	Tue Jul 13 21:50:05 2021
@@ -1 +1 @@
-msg_065.c(6): error: syntax error ':' [249]
+msg_065.c(17): warning: structure has no named members [65]
Index: src/tests/usr.bin/xlint/lint1/msg_067.c
diff -u src/tests/usr.bin/xlint/lint1/msg_067.c:1.2 src/tests/usr.bin/xlint/lint1/msg_067.c:1.3
--- src/tests/usr.bin/xlint/lint1/msg_067.c:1.2	Sun Feb 21 09:07:58 2021
+++ src/tests/usr.bin/xlint/lint1/msg_067.c	Tue Jul 13 21:50:05 2021
@@ -1,7 +1,21 @@
-/*	$NetBSD: msg_067.c,v 1.2 2021/02/21 09:07:58 rillig Exp $	*/
+/*	$NetBSD: msg_067.c,v 1.3 2021/07/13 21:50:05 rillig Exp $	*/
 # 3 "msg_067.c"
 
 // Test for message: cannot return incomplete type [67]
 
-TODO: "Add example code that triggers the above message." /* expect: 249 */
-TODO: "Add example code that almost triggers the above message."
+/* expect+1: warning: struct incomplete never defined [233] */
+struct incomplete;
+
+struct incomplete function_declaration(void);
+
+struct incomplete
+function_definition(void)
+/* expect+1: error: cannot return incomplete type [67] */
+{
+	/* FIXME: 'r' is not an argument. */
+	/* expect+1: error: argument 'r' has type 'incomplete struct incomplete' [31] */
+	struct incomplete r;
+
+	/* expect+1: error: cannot return incomplete type [212] */
+	return r;
+}
Index: src/tests/usr.bin/xlint/lint1/msg_067.exp
diff -u src/tests/usr.bin/xlint/lint1/msg_067.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_067.exp:1.3
--- src/tests/usr.bin/xlint/lint1/msg_067.exp:1.2	Sun Mar 21 20:44:59 2021
+++ src/tests/usr.bin/xlint/lint1/msg_067.exp	Tue Jul 13 21:50:05 2021
@@ -1 +1,4 @@
-msg_067.c(6): error: syntax error ':' [249]
+msg_067.c(14): error: cannot return incomplete type [67]
+msg_067.c(17): error: argument 'r' has type 'incomplete struct incomplete' [31]
+msg_067.c(20): error: cannot return incomplete type [212]
+msg_067.c(7): warning: struct incomplete never defined [233]



CVS commit: src

2021-07-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Jul 13 19:38:11 UTC 2021

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/usr.bin/xlint/lint1: Makefile lex_integer.c
Added Files:
src/tests/usr.bin/xlint/lint1: lex_integer_binary.c
lex_integer_binary.exp

Log Message:
tests/lint: test binary integer literals and underscores


To generate a diff of this commit:
cvs rdiff -u -r1.1085 -r1.1086 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.87 -r1.88 src/tests/usr.bin/xlint/lint1/Makefile
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/lex_integer.c
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/lex_integer_binary.c \
src/tests/usr.bin/xlint/lint1/lex_integer_binary.exp

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/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.1085 src/distrib/sets/lists/tests/mi:1.1086
--- src/distrib/sets/lists/tests/mi:1.1085	Sun Jul 11 19:24:41 2021
+++ src/distrib/sets/lists/tests/mi	Tue Jul 13 19:38:10 2021
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1085 2021/07/11 19:24:41 rillig Exp $
+# $NetBSD: mi,v 1.1086 2021/07/13 19:38:10 rillig Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -6260,6 +6260,8 @@
 ./usr/tests/usr.bin/xlint/lint1/lex_floating.exp		tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/lex_integer.c			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/lex_integer.exp			tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/xlint/lint1/lex_integer_binary.c		tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/xlint/lint1/lex_integer_binary.exp		tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/lex_integer_ilp32.c		tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/lex_integer_ilp32.exp		tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/lex_string.c			tests-usr.bin-tests	compattestfile,atf

Index: src/tests/usr.bin/xlint/lint1/Makefile
diff -u src/tests/usr.bin/xlint/lint1/Makefile:1.87 src/tests/usr.bin/xlint/lint1/Makefile:1.88
--- src/tests/usr.bin/xlint/lint1/Makefile:1.87	Tue Jul 13 18:50:16 2021
+++ src/tests/usr.bin/xlint/lint1/Makefile	Tue Jul 13 19:38:10 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.87 2021/07/13 18:50:16 rillig Exp $
+# $NetBSD: Makefile,v 1.88 2021/07/13 19:38:10 rillig Exp $
 
 NOMAN=		# defined
 MAX_MESSAGE=	345		# see lint1/err.c
@@ -161,6 +161,8 @@ FILES+=		lex_floating.c
 FILES+=		lex_floating.exp
 FILES+=		lex_integer.c
 FILES+=		lex_integer.exp
+FILES+=		lex_integer_binary.c
+FILES+=		lex_integer_binary.exp
 FILES+=		lex_integer_ilp32.c
 FILES+=		lex_integer_ilp32.exp
 FILES+=		lex_string.c

Index: src/tests/usr.bin/xlint/lint1/lex_integer.c
diff -u src/tests/usr.bin/xlint/lint1/lex_integer.c:1.5 src/tests/usr.bin/xlint/lint1/lex_integer.c:1.6
--- src/tests/usr.bin/xlint/lint1/lex_integer.c:1.5	Sat Jul 10 18:42:28 2021
+++ src/tests/usr.bin/xlint/lint1/lex_integer.c	Tue Jul 13 19:38:10 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: lex_integer.c,v 1.5 2021/07/10 18:42:28 rillig Exp $	*/
+/*	$NetBSD: lex_integer.c,v 1.6 2021/07/13 19:38:10 rillig Exp $	*/
 # 3 "lex_integer.c"
 
 /*
@@ -59,3 +59,10 @@ suffixes(void)
 	/* The 'Ll' must not used mixed case. Checked by the compiler. */
 	sinkull(3ULl);
 }
+
+/* https://gcc.gnu.org/onlinedocs/gcc/Binary-constants.html */
+void
+binary_literal(void)
+{
+	sinku(0b01011010);
+}

Added files:

Index: src/tests/usr.bin/xlint/lint1/lex_integer_binary.c
diff -u /dev/null src/tests/usr.bin/xlint/lint1/lex_integer_binary.c:1.1
--- /dev/null	Tue Jul 13 19:38:11 2021
+++ src/tests/usr.bin/xlint/lint1/lex_integer_binary.c	Tue Jul 13 19:38:10 2021
@@ -0,0 +1,30 @@
+/*	$NetBSD: lex_integer_binary.c,v 1.1 2021/07/13 19:38:10 rillig Exp $	*/
+# 3 "lex_integer_binary.c"
+
+/*
+ * Test for parsing binary integer literals in non-GCC mode.
+ * As of C11, binary integer literals are not supported.
+ * Neither are underscores in integer literals.
+ */
+
+/* Remove the default -g flag. */
+/* lint1-flags: -Ac11 -w */
+
+void sink(unsigned int);
+
+void
+binary_literal(void)
+{
+	/*
+	 * Binary integer literals are a GCC extension, but lint allows them
+	 * even in non-GCC mode.
+	 */
+	sink(0b01011010);
+
+	/*
+	 * Even though it would be useful for binary literals, GCC does not
+	 * support underscores to separate the digit groups.
+	 */
+	/* expect+1: syntax error '__0101_1010' [249] */
+	sink(0b__0101_1010);
+}
Index: src/tests/usr.bin/xlint/lint1/lex_integer_binary.exp
diff -u /dev/null src/tests/usr.bin/xlint/lint1/lex_integer_binary.exp:1.1
--- /dev/null	Tue Jul 13 19:38:11 2021
+++ src/tests/usr.bin/xlint/lint1/lex_integer_binary.exp	Tue Jul 13 19:38:10 2021
@@ -0,0 +1 @@
+lex_integer_binary.c(29): error: syntax error '__0101_1010' [249]



CVS commit: src/tests/usr.bin/xlint/lint1

2021-07-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Jul 13 19:11:35 UTC 2021

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_142.c msg_142.exp

Log Message:
tests/lint: skip test for floating point overflow on alpha

On alpha and a few other platforms (see t_integration.sh), 'long double'
has 128 bit, which under IEEE 754 rules means a decimal exponent of up
to 4932.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_142.c
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_142.exp

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

Modified files:

Index: src/tests/usr.bin/xlint/lint1/msg_142.c
diff -u src/tests/usr.bin/xlint/lint1/msg_142.c:1.4 src/tests/usr.bin/xlint/lint1/msg_142.c:1.5
--- src/tests/usr.bin/xlint/lint1/msg_142.c:1.4	Mon Apr  5 01:35:34 2021
+++ src/tests/usr.bin/xlint/lint1/msg_142.c	Tue Jul 13 19:11:35 2021
@@ -1,6 +1,14 @@
-/*	$NetBSD: msg_142.c,v 1.4 2021/04/05 01:35:34 rillig Exp $	*/
+/*	$NetBSD: msg_142.c,v 1.5 2021/07/13 19:11:35 rillig Exp $	*/
 # 3 "msg_142.c"
 
 // Test for message: floating point overflow detected, op %s [142]
 
-double dbl = 1e100 * 1e100 * 1e100 * 1e100 * 1e100;	/* expect: 142 *//* expect: 142 */
+/* lint1-only-if ldbl-64 */
+/*
+ * For 96-bit and 128-bit floating point numbers, a different number of
+ * multipliers is needed to produce an overflow.
+ */
+
+/* expect+2: warning: floating point overflow detected, op * [142] */
+/* expect+1: warning: floating point overflow detected, op * [142] */
+double dbl = 1e100 * 1e100 * 1e100 * 1e100 * 1e100;

Index: src/tests/usr.bin/xlint/lint1/msg_142.exp
diff -u src/tests/usr.bin/xlint/lint1/msg_142.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_142.exp:1.3
--- src/tests/usr.bin/xlint/lint1/msg_142.exp:1.2	Fri Jan  8 21:25:03 2021
+++ src/tests/usr.bin/xlint/lint1/msg_142.exp	Tue Jul 13 19:11:35 2021
@@ -1,2 +1,2 @@
-msg_142.c(6): warning: floating point overflow detected, op * [142]
-msg_142.c(6): warning: floating point overflow detected, op * [142]
+msg_142.c(14): warning: floating point overflow detected, op * [142]
+msg_142.c(14): warning: floating point overflow detected, op * [142]



CVS commit: src/tests/usr.bin/xlint/lint1

2021-07-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Jul 13 18:50:16 UTC 2021

Modified Files:
src/tests/usr.bin/xlint/lint1: Makefile t_integration.sh

Log Message:
tests/lint: take archsubdir from usr.bin/xlint/Makefile.inc

This fixes the tests on the various ARM platforms where the platform
name does not correspond to MACHINE_ARCH, such as earmv7hf.


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 src/tests/usr.bin/xlint/lint1/Makefile
cvs rdiff -u -r1.67 -r1.68 src/tests/usr.bin/xlint/lint1/t_integration.sh

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

Modified files:

Index: src/tests/usr.bin/xlint/lint1/Makefile
diff -u src/tests/usr.bin/xlint/lint1/Makefile:1.86 src/tests/usr.bin/xlint/lint1/Makefile:1.87
--- src/tests/usr.bin/xlint/lint1/Makefile:1.86	Sun Jul 11 19:24:42 2021
+++ src/tests/usr.bin/xlint/lint1/Makefile	Tue Jul 13 18:50:16 2021
@@ -1,13 +1,19 @@
-# $NetBSD: Makefile,v 1.86 2021/07/11 19:24:42 rillig Exp $
+# $NetBSD: Makefile,v 1.87 2021/07/13 18:50:16 rillig Exp $
 
 NOMAN=		# defined
 MAX_MESSAGE=	345		# see lint1/err.c
 
 .include 
 
+ARCHSUBDIR!=	cd ${NETBSDSRCDIR}/usr.bin/xlint/lint1 && ${MAKE} -v ARCHSUBDIR
+
 TESTSDIR=	${TESTSBASE}/usr.bin/xlint/lint1
 
 TESTS_SH=	t_integration
+TESTS_SH_SRC_t_integration=	archsubdir.sh t_integration.sh
+
+archsubdir.sh:
+	@echo archsubdir=${ARCHSUBDIR} >${.TARGET}
 
 FILESDIR=	${TESTSDIR}
 FILES+=		c11_generic_expression.c
@@ -198,6 +204,6 @@ sync-mi: .PHONY
 	cvs diff "$$mi" || true
 
 accept: .PHONY
-	@sh ./accept.sh ''
+	@archsubdir=${ARCHSUBDIR:Q} sh ./accept.sh ''
 
 .include 

Index: src/tests/usr.bin/xlint/lint1/t_integration.sh
diff -u src/tests/usr.bin/xlint/lint1/t_integration.sh:1.67 src/tests/usr.bin/xlint/lint1/t_integration.sh:1.68
--- src/tests/usr.bin/xlint/lint1/t_integration.sh:1.67	Sun Jul 11 22:41:36 2021
+++ src/tests/usr.bin/xlint/lint1/t_integration.sh	Tue Jul 13 18:50:16 2021
@@ -1,4 +1,4 @@
-# $NetBSD: t_integration.sh,v 1.67 2021/07/11 22:41:36 rillig Exp $
+# $NetBSD: t_integration.sh,v 1.68 2021/07/13 18:50:16 rillig Exp $
 #
 # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -26,8 +26,7 @@
 #
 
 lint1=/usr/libexec/lint1
-
-: "${machine_arch:="$(sysctl -n hw.machine_arch)"}"
+: "${archsubdir:=archsubdir_must_be_set}"
 
 
 configure_test_case()
@@ -37,7 +36,7 @@ configure_test_case()
 	# shellcheck disable=SC2016
 	awk='
 		BEGIN {
-			# see usr.bin/xlint/arch/.../targparam.h
+			# see usr.bin/xlint/arch/*/targparam.h
 			platform["aarch64"]	= "schar lp64  long ldbl-128"
 			platform["alpha"]	= "schar lp64  long ldbl-64"
 			platform["arm"]		= "uchar ilp32 long ldbl-64"
@@ -68,15 +67,15 @@ configure_test_case()
 printf("bad property '\''%s'\''\n", prop) > "/dev/stderr"
 exit(1)
 			}
-			if (platform[machine_arch] == "") {
-printf("bad machine_arch '\''%s'\''\n", machine_arch) > "/dev/stderr"
+			if (platform[archsubdir] == "") {
+printf("bad archsubdir '\''%s'\''\n", archsubdir) > "/dev/stderr"
 exit(1)
 			}
-			return match(" " platform[machine_arch] " ", " " prop " ")
+			return match(" " platform[archsubdir] " ", " " prop " ")
 		}
 
 		BEGIN {
-			machine_arch = "'"$machine_arch"'"
+			archsubdir = "'"$archsubdir"'"
 			flags = "-g -S -w"
 			skip = "no"
 		}



CVS commit: src/share/man/man7

2021-07-13 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Tue Jul 13 16:56:43 UTC 2021

Modified Files:
src/share/man/man7: sysctl.7

Log Message:
Swap encryption no longer experimental or default-off.


To generate a diff of this commit:
cvs rdiff -u -r1.151 -r1.152 src/share/man/man7/sysctl.7

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/man7/sysctl.7
diff -u src/share/man/man7/sysctl.7:1.151 src/share/man/man7/sysctl.7:1.152
--- src/share/man/man7/sysctl.7:1.151	Sat Oct 17 09:20:33 2020
+++ src/share/man/man7/sysctl.7	Tue Jul 13 16:56:43 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sysctl.7,v 1.151 2020/10/17 09:20:33 wiz Exp $
+.\"	$NetBSD: sysctl.7,v 1.152 2021/07/13 16:56:43 nia Exp $
 .\"
 .\" Copyright (c) 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	@(#)sysctl.3	8.4 (Berkeley) 5/9/95
 .\"
-.Dd October 17, 2020
+.Dd July 13, 2021
 .Dt SYSCTL 7
 .Os
 .Sh NAME
@@ -2602,7 +2602,7 @@ Return system wide guard size for the ma
 .It Li vm.thread_guard_size
 Return system wide default size for the guard area of all other threads
 of a program.
-.It Li vm.swap_encrypt Bq Sy "EXPERIMENTAL" Ns No , default off
+.It Li vm.swap_encrypt
 If true, encrypt data while swapped out to disk.
 .Pp
 Each swap device maintains an independent AES-256 key, generated when



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

2021-07-13 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Jul 13 13:58:30 UTC 2021

Modified Files:
src/sys/arch/alpha/alpha: lock_stubs.s

Log Message:
Fix non-MULTIPROCESSOR build (e.g. INSTALL kernel).


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/alpha/alpha/lock_stubs.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/arch/alpha/alpha/lock_stubs.s
diff -u src/sys/arch/alpha/alpha/lock_stubs.s:1.7 src/sys/arch/alpha/alpha/lock_stubs.s:1.8
--- src/sys/arch/alpha/alpha/lock_stubs.s:1.7	Tue Jul 13 01:59:10 2021
+++ src/sys/arch/alpha/alpha/lock_stubs.s	Tue Jul 13 13:58:30 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: lock_stubs.s,v 1.7 2021/07/13 01:59:10 thorpej Exp $	*/
+/*	$NetBSD: lock_stubs.s,v 1.8 2021/07/13 13:58:30 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2021 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: lock_stubs.s,v 1.7 2021/07/13 01:59:10 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lock_stubs.s,v 1.8 2021/07/13 13:58:30 thorpej Exp $");
 
 #include "assym.h"
 
@@ -45,7 +45,7 @@ __KERNEL_RCSID(0, "$NetBSD: lock_stubs.s
  */
 #define	MB(label)	label: unop
 #else
-#define	MB		/* nothing */
+#define	MB(label)	/* nothing */
 #endif
 
 /*



CVS commit: src/usr.sbin/sysinst

2021-07-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul 13 09:13:00 UTC 2021

Modified Files:
src/usr.sbin/sysinst: Makefile.inc defs.h

Log Message:
PR install/56303: when using xz files enable swap during set extraction
if the machine does not have more than 256MB of RAM.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/usr.sbin/sysinst/Makefile.inc
cvs rdiff -u -r1.70 -r1.71 src/usr.sbin/sysinst/defs.h

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

Modified files:

Index: src/usr.sbin/sysinst/Makefile.inc
diff -u src/usr.sbin/sysinst/Makefile.inc:1.40 src/usr.sbin/sysinst/Makefile.inc:1.41
--- src/usr.sbin/sysinst/Makefile.inc:1.40	Tue Apr 13 07:53:19 2021
+++ src/usr.sbin/sysinst/Makefile.inc	Tue Jul 13 09:13:00 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.40 2021/04/13 07:53:19 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.41 2021/07/13 09:13:00 martin Exp $
 #
 # Makefile for sysinst
 
@@ -94,6 +94,10 @@ CPPFLAGS+=	-I. -I${.CURDIR}/../.. -I${.C
 		${NODISKLABEL:D-DNO_DISKLABEL} \
 		${NOPARTMAN:D-DNO_PARTMAN}
 
+.if ${USE_XZ_SETS:Uno} != "no"
+CPPFLAGS+=	-DEXTRACT_NEEDS_BIG_RAM
+.endif
+
 .if ${RELEASEMACHINEDIR} != ${MACHINE}
 CPPFLAGS+=	-DARCH_SUBDIR="\"${RELEASEMACHINEDIR}\""
 CPPFLAGS+=	-DPKG_ARCH_SUBDIR="\"${MACHINE_ARCH}\""

Index: src/usr.sbin/sysinst/defs.h
diff -u src/usr.sbin/sysinst/defs.h:1.70 src/usr.sbin/sysinst/defs.h:1.71
--- src/usr.sbin/sysinst/defs.h:1.70	Sun Jan 31 22:45:46 2021
+++ src/usr.sbin/sysinst/defs.h	Tue Jul 13 09:13:00 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: defs.h,v 1.70 2021/01/31 22:45:46 rillig Exp $	*/
+/*	$NetBSD: defs.h,v 1.71 2021/07/13 09:13:00 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -68,7 +68,12 @@ const char *getfslabelname(uint, uint);
  * if a system does not have more ram (in MB) than this, swap will be enabled
  * very early (as soon as the swap partition has been created)
  */
+#ifdef	EXTRACT_NEEDS_BIG_RAM	/* we use an expensive decompressor */
+#define	TINY_RAM_SIZE		256
+#else
 #define	TINY_RAM_SIZE		32
+#endif
+
 /*
  * if a system has less ram (in MB) than this, we will not create a
  * tmpfs /tmp by default (to workaround PR misc/54886)



CVS commit: src/sys/net/lagg

2021-07-13 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Jul 13 09:00:27 UTC 2021

Modified Files:
src/sys/net/lagg: if_lagg.c

Log Message:
lagg: fix typo for ALTQ


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/net/lagg/if_lagg.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/lagg/if_lagg.c
diff -u src/sys/net/lagg/if_lagg.c:1.5 src/sys/net/lagg/if_lagg.c:1.6
--- src/sys/net/lagg/if_lagg.c:1.5	Wed Jun 16 00:21:19 2021
+++ src/sys/net/lagg/if_lagg.c	Tue Jul 13 09:00:26 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_lagg.c,v 1.5 2021/06/16 00:21:19 riastradh Exp $	*/
+/*	$NetBSD: if_lagg.c,v 1.6 2021/07/13 09:00:26 ozaki-r Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006 Reyk Floeter 
@@ -20,7 +20,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_lagg.c,v 1.5 2021/06/16 00:21:19 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_lagg.c,v 1.6 2021/07/13 09:00:26 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -369,7 +369,7 @@ lagg_clone_create(struct if_clone *ifc, 
 	ifp->if_extflags = IFEF_MPSAFE;
 	ifp->if_transmit = lagg_transmit;
 	ifp->if_start = lagg_start;
-	IFQ_SET_READY(>if_send);
+	IFQ_SET_READY(>if_snd);
 
 	error = lagg_setup_sysctls(sc);
 	if (error != 0)



CVS commit: src/sys/altq

2021-07-13 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Jul 13 08:23:39 UTC 2021

Modified Files:
src/sys/altq: altq_rmclass.c

Log Message:
altq, cbq: calculate a delay period based on a borrowed class

A delay period was calculated based on a suspended class even if the
class can borrow bandwidth from another class.  In that case a delay
period should be calculated based on a borrowed class.  Otherwise
a borrowing class can't borrow bandwidth correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/altq/altq_rmclass.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/altq/altq_rmclass.c
diff -u src/sys/altq/altq_rmclass.c:1.23 src/sys/altq/altq_rmclass.c:1.24
--- src/sys/altq/altq_rmclass.c:1.23	Tue Jul 13 07:59:48 2021
+++ src/sys/altq/altq_rmclass.c	Tue Jul 13 08:23:39 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: altq_rmclass.c,v 1.23 2021/07/13 07:59:48 ozaki-r Exp $	*/
+/*	$NetBSD: altq_rmclass.c,v 1.24 2021/07/13 08:23:39 ozaki-r Exp $	*/
 /*	$KAME: altq_rmclass.c,v 1.19 2005/04/13 03:44:25 suz Exp $	*/
 
 /*
@@ -38,7 +38,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: altq_rmclass.c,v 1.23 2021/07/13 07:59:48 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altq_rmclass.c,v 1.24 2021/07/13 08:23:39 ozaki-r Exp $");
 
 /* #ident "@(#)rm_class.c  1.48 97/12/05 SMI" */
 
@@ -1482,7 +1482,10 @@ rmc_delay_action(struct rm_class *cl, st
 	int	ndelay, t, extradelay;
 
 	cl->stats_.overactions++;
-	TV_DELTA(>undertime_, >overtime_, ndelay);
+	if (borrow != NULL)
+		TV_DELTA(>undertime_, >overtime_, ndelay);
+	else
+		TV_DELTA(>undertime_, >overtime_, ndelay);
 #ifndef BORROW_OFFTIME
 	ndelay += cl->offtime_;
 #endif



CVS commit: src/sys/altq

2021-07-13 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Jul 13 08:04:31 UTC 2021

Modified Files:
src/sys/altq: altq_rmclass.h

Log Message:
altq, cbq: apply the do-while idiom to TV_* macros


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/altq/altq_rmclass.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/altq/altq_rmclass.h
diff -u src/sys/altq/altq_rmclass.h:1.8 src/sys/altq/altq_rmclass.h:1.9
--- src/sys/altq/altq_rmclass.h:1.8	Sat Oct 28 11:35:17 2006
+++ src/sys/altq/altq_rmclass.h	Tue Jul 13 08:04:31 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: altq_rmclass.h,v 1.8 2006/10/28 11:35:17 peter Exp $	*/
+/*	$NetBSD: altq_rmclass.h,v 1.9 2021/07/13 08:04:31 ozaki-r Exp $	*/
 /*	$KAME: altq_rmclass.h,v 1.10 2003/08/20 23:30:23 itojun Exp $	*/
 
 /*
@@ -76,7 +76,7 @@ struct red;
 #define	TV_LT(a, b) (((a)->tv_sec < (b)->tv_sec) ||  \
 	(((a)->tv_usec < (b)->tv_usec) && ((a)->tv_sec <= (b)->tv_sec)))
 
-#define	TV_DELTA(a, b, delta) { \
+#define	TV_DELTA(a, b, delta) do { \
 	register int	xxs;	\
 			\
 	delta = (a)->tv_usec - (b)->tv_usec; \
@@ -95,9 +95,9 @@ struct red;
 			break; \
 		} \
 	} \
-}
+} while (0)
 
-#define	TV_ADD_DELTA(a, delta, res) { \
+#define	TV_ADD_DELTA(a, delta, res) do { \
 	register int xxus = (a)->tv_usec + (delta); \
 	\
 	(res)->tv_sec = (a)->tv_sec; \
@@ -106,7 +106,7 @@ struct red;
 		xxus -= 100; \
 	} \
 	(res)->tv_usec = xxus; \
-}
+} while (0)
 
 #define	RM_TIMEOUT	2	/* 1 Clock tick. */
 



CVS commit: src/sys/altq

2021-07-13 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Jul 13 07:59:48 UTC 2021

Modified Files:
src/sys/altq: altq_rmclass.c

Log Message:
altq, cbq: don't increment the xmit counter of the root class twice wrongly


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/altq/altq_rmclass.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/altq/altq_rmclass.c
diff -u src/sys/altq/altq_rmclass.c:1.22 src/sys/altq/altq_rmclass.c:1.23
--- src/sys/altq/altq_rmclass.c:1.22	Sat Nov 19 22:51:18 2011
+++ src/sys/altq/altq_rmclass.c	Tue Jul 13 07:59:48 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: altq_rmclass.c,v 1.22 2011/11/19 22:51:18 tls Exp $	*/
+/*	$NetBSD: altq_rmclass.c,v 1.23 2021/07/13 07:59:48 ozaki-r Exp $	*/
 /*	$KAME: altq_rmclass.c,v 1.19 2005/04/13 03:44:25 suz Exp $	*/
 
 /*
@@ -38,7 +38,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: altq_rmclass.c,v 1.22 2011/11/19 22:51:18 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altq_rmclass.c,v 1.23 2021/07/13 07:59:48 ozaki-r Exp $");
 
 /* #ident "@(#)rm_class.c  1.48 97/12/05 SMI" */
 
@@ -1251,7 +1251,7 @@ rmc_update_class_util(struct rm_ifdat *i
 {
 	int		 idle, avgidle, pktlen;
 	int		 pkt_time, tidle;
-	rm_class_t	*cl, *borrowed;
+	rm_class_t	*cl, *cl0, *borrowed;
 	rm_class_t	*borrows;
 	struct timeval	*nowp;
 
@@ -1261,6 +1261,7 @@ rmc_update_class_util(struct rm_ifdat *i
 	if ((cl = ifd->class_[ifd->qo_]) == NULL)
 		return;
 
+	cl0 = cl;
 	pktlen = ifd->curlen_[ifd->qo_];
 	borrowed = ifd->borrowed_[ifd->qo_];
 	borrows = borrowed;
@@ -1370,7 +1371,7 @@ rmc_update_class_util(struct rm_ifdat *i
 		cl->last_pkttime_ = pkt_time;
 
 #if 1
-		if (cl->parent_ == NULL) {
+		if (cl->parent_ == NULL && cl != cl0) {
 			/* take stats of root class */
 			PKTCNTR_ADD(>stats_.xmit_cnt, pktlen);
 		}



CVS commit: src/external/gpl3/gcc/dist/gcc/config/aarch64

2021-07-13 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jul 13 06:56:24 UTC 2021

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/aarch64: aarch64-netbsd.h

Log Message:
Fix a comment


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-netbsd.h

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

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-netbsd.h
diff -u src/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-netbsd.h:1.5 src/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-netbsd.h:1.6
--- src/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-netbsd.h:1.5	Sat Apr 24 06:44:24 2021
+++ src/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-netbsd.h	Tue Jul 13 06:56:24 2021
@@ -20,7 +20,7 @@
 #ifndef GCC_AARCH64_NETBSD_H
 #define GCC_AARCH64_NETBSD_H
 
-/* NetBSD malloc(3) does 64, not 128 bytes. */
+/* NetBSD malloc(3) does 64, not 128 bits. */
 #undef MALLOC_ABI_ALIGNMENT
 #define MALLOC_ABI_ALIGNMENT  64
 



CVS commit: src/external/gpl3/gcc/dist/gcc/config/pa

2021-07-13 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jul 13 06:56:09 UTC 2021

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/pa: pa-netbsd.h

Log Message:
Fix a comment


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gcc/dist/gcc/config/pa/pa-netbsd.h

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

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/config/pa/pa-netbsd.h
diff -u src/external/gpl3/gcc/dist/gcc/config/pa/pa-netbsd.h:1.6 src/external/gpl3/gcc/dist/gcc/config/pa/pa-netbsd.h:1.7
--- src/external/gpl3/gcc/dist/gcc/config/pa/pa-netbsd.h:1.6	Sun Nov  3 01:03:30 2019
+++ src/external/gpl3/gcc/dist/gcc/config/pa/pa-netbsd.h	Tue Jul 13 06:56:09 2021
@@ -131,7 +131,7 @@ along with GCC; see the file COPYING3.  
 #undef PTRDIFF_TYPE
 #define PTRDIFF_TYPE "long int"
 
-/* NetBSD always uses 128 byte alignment.  */
+/* NetBSD always uses 128 bits / 16 byte alignment.  */
 #undef MALLOC_ABI_ALIGNMENT
 #define MALLOC_ABI_ALIGNMENT 128