CVS commit: src/sys/arch/sparc/fpu

2022-08-29 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Aug 30 01:48:09 UTC 2022

Modified Files:
src/sys/arch/sparc/fpu: fpu_extern.h fpu_subr.c

Log Message:
Drop one more register qualifier.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sparc/fpu/fpu_extern.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sparc/fpu/fpu_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/arch/sparc/fpu/fpu_extern.h
diff -u src/sys/arch/sparc/fpu/fpu_extern.h:1.10 src/sys/arch/sparc/fpu/fpu_extern.h:1.11
--- src/sys/arch/sparc/fpu/fpu_extern.h:1.10	Sun Aug 28 22:09:26 2022
+++ src/sys/arch/sparc/fpu/fpu_extern.h	Tue Aug 30 01:48:09 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpu_extern.h,v 1.10 2022/08/28 22:09:26 rin Exp $	*/
+/*	$NetBSD: fpu_extern.h,v 1.11 2022/08/30 01:48:09 rin Exp $	*/
 
 /*-
  * Copyright (c) 1995 The NetBSD Foundation, Inc.
@@ -91,6 +91,6 @@ struct fpn *fpu_mul(struct fpemu *);
 struct fpn *fpu_sqrt(struct fpemu *);
 
 /* fpu_subr.c */
-int fpu_shr(struct fpn *, register int);
+int fpu_shr(struct fpn *, int);
 void fpu_norm(struct fpn *);
 struct fpn *fpu_newnan(struct fpemu *);

Index: src/sys/arch/sparc/fpu/fpu_subr.c
diff -u src/sys/arch/sparc/fpu/fpu_subr.c:1.7 src/sys/arch/sparc/fpu/fpu_subr.c:1.8
--- src/sys/arch/sparc/fpu/fpu_subr.c:1.7	Sun Aug 28 22:09:26 2022
+++ src/sys/arch/sparc/fpu/fpu_subr.c	Tue Aug 30 01:48:09 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpu_subr.c,v 1.7 2022/08/28 22:09:26 rin Exp $ */
+/*	$NetBSD: fpu_subr.c,v 1.8 2022/08/30 01:48:09 rin Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fpu_subr.c,v 1.7 2022/08/28 22:09:26 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_subr.c,v 1.8 2022/08/30 01:48:09 rin Exp $");
 
 #include 
 #ifdef DIAGNOSTIC
@@ -66,7 +66,7 @@ __KERNEL_RCSID(0, "$NetBSD: fpu_subr.c,v
  * sticky field is ignored anyway.
  */
 int
-fpu_shr(struct fpn *fp, register int rsh)
+fpu_shr(struct fpn *fp, int rsh)
 {
 	u_int m0, m1, m2, m3, s;
 	int lsh;



CVS commit: src/sys/arch/sparc/fpu

2022-08-29 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Aug 30 01:48:09 UTC 2022

Modified Files:
src/sys/arch/sparc/fpu: fpu_extern.h fpu_subr.c

Log Message:
Drop one more register qualifier.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sparc/fpu/fpu_extern.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sparc/fpu/fpu_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/dev/ic

2022-08-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Aug 30 01:13:10 UTC 2022

Modified Files:
src/sys/dev/ic: nvme.c

Log Message:
nvme(4): If bp is null or bp->b_ci is not assigned, use curcpu().

curcpu() might be stale by the time we're done, but it's still safe
to pass it to cpu_index, and this is just used as a best-effort
mechanism to keep I/O on queues handled by the same CPU.

bp is not always provided, and bp->b_ci is not always assigned,
e.g. when dumping.  (If bp->b_ci is supposed to be always assigned,
then we need to audit all the paths into it to assign it in those
where it's not.)

Fixes dump on nvme.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/dev/ic/nvme.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/ic/nvme.c
diff -u src/sys/dev/ic/nvme.c:1.64 src/sys/dev/ic/nvme.c:1.65
--- src/sys/dev/ic/nvme.c:1.64	Sat Aug 20 11:31:38 2022
+++ src/sys/dev/ic/nvme.c	Tue Aug 30 01:13:10 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvme.c,v 1.64 2022/08/20 11:31:38 riastradh Exp $	*/
+/*	$NetBSD: nvme.c,v 1.65 2022/08/30 01:13:10 riastradh Exp $	*/
 /*	$OpenBSD: nvme.c,v 1.49 2016/04/18 05:59:50 dlg Exp $ */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.64 2022/08/20 11:31:38 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.65 2022/08/30 01:13:10 riastradh Exp $");
 
 #include 
 #include 
@@ -1867,7 +1867,7 @@ static struct nvme_ccb *
 nvme_ccb_get_bio(struct nvme_softc *sc, struct buf *bp,
 struct nvme_queue **selq)
 {
-	u_int cpuindex = cpu_index(bp->b_ci);
+	u_int cpuindex = cpu_index(bp->b_ci ? bp->b_ci : curcpu());
 
 	/*
 	 * Find a queue with available ccbs, preferring the originating



CVS commit: src/sys/dev/ic

2022-08-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Aug 30 01:13:10 UTC 2022

Modified Files:
src/sys/dev/ic: nvme.c

Log Message:
nvme(4): If bp is null or bp->b_ci is not assigned, use curcpu().

curcpu() might be stale by the time we're done, but it's still safe
to pass it to cpu_index, and this is just used as a best-effort
mechanism to keep I/O on queues handled by the same CPU.

bp is not always provided, and bp->b_ci is not always assigned,
e.g. when dumping.  (If bp->b_ci is supposed to be always assigned,
then we need to audit all the paths into it to assign it in those
where it's not.)

Fixes dump on nvme.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/dev/ic/nvme.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

2022-08-29 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Mon Aug 29 23:48:18 UTC 2022

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

Log Message:
Fix build failure when no options INET6.


To generate a diff of this commit:
cvs rdiff -u -r1.232 -r1.233 src/sys/net/route.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/route.c
diff -u src/sys/net/route.c:1.232 src/sys/net/route.c:1.233
--- src/sys/net/route.c:1.232	Mon Aug 29 09:14:02 2022
+++ src/sys/net/route.c	Mon Aug 29 23:48:18 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: route.c,v 1.232 2022/08/29 09:14:02 knakahara Exp $	*/
+/*	$NetBSD: route.c,v 1.233 2022/08/29 23:48:18 knakahara Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.232 2022/08/29 09:14:02 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.233 2022/08/29 23:48:18 knakahara Exp $");
 
 #include 
 #ifdef RTFLUSH_DEBUG
@@ -1553,23 +1553,29 @@ rt_newmsg(const int cmd, const struct rt
 void
 rt_newmsg_dynamic(const int cmd, const struct rtentry *rt)
 {
-	extern bool icmp_dynamic_rt_msg;
-	extern bool icmp6_dynamic_rt_msg;
 	struct rt_addrinfo info;
 	struct sockaddr *gateway = rt->rt_gateway;
 
 	if (gateway == NULL)
 		return;
 
-	switch(gateway->sa_family){
-	case AF_INET:
+	switch(gateway->sa_family) {
+#ifdef INET
+	case AF_INET: {
+		extern bool icmp_dynamic_rt_msg;
 		if (!icmp_dynamic_rt_msg)
 			return;
 		break;
-	case AF_INET6:
+	}
+#endif
+#ifdef INET6
+	case AF_INET6: {
+		extern bool icmp6_dynamic_rt_msg;
 		if (!icmp6_dynamic_rt_msg)
 			return;
 		break;
+	}
+#endif
 	default:
 		return;
 	}



CVS commit: src/sys/net

2022-08-29 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Mon Aug 29 23:48:18 UTC 2022

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

Log Message:
Fix build failure when no options INET6.


To generate a diff of this commit:
cvs rdiff -u -r1.232 -r1.233 src/sys/net/route.c

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



CVS commit: src/usr.sbin/sysinst

2022-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Aug 29 17:35:15 UTC 2022

Modified Files:
src/usr.sbin/sysinst: disks.c

Log Message:
Trim trailing whitespace from disk names we got via drvctl.


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 src/usr.sbin/sysinst/disks.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.sbin/sysinst/disks.c
diff -u src/usr.sbin/sysinst/disks.c:1.86 src/usr.sbin/sysinst/disks.c:1.87
--- src/usr.sbin/sysinst/disks.c:1.86	Fri Jun 24 22:05:24 2022
+++ src/usr.sbin/sysinst/disks.c	Mon Aug 29 17:35:15 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: disks.c,v 1.86 2022/06/24 22:05:24 tsutsui Exp $ */
+/*	$NetBSD: disks.c,v 1.87 2022/08/29 17:35:15 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -142,6 +142,29 @@ tmpfs_on_var_shm(void)
 	return ram > 16 * MEG;
 }
 
+/*
+ * like strncpy, but drop trailing whitespace
+ */
+static void
+trim_name(char *name, size_t len, const char *src)
+{
+	size_t i, last = ~0U;
+
+	for (i = 0; i < len && src[i]; i++) {
+		if (isspace((unsigned int)src[i]))
+			last = i;
+		else
+			last = ~0U;
+		name[i] = src[i];
+	}
+	if (i >= len)
+		i = len-1;
+	if (last < i)
+		name[last] = 0;
+	else
+		name[i] = 0;
+}
+
 /* from src/sbin/atactl/atactl.c
  * extract_string: copy a block of bytes out of ataparams and make
  * a proper string out of it, truncating trailing spaces and preserving
@@ -335,7 +358,7 @@ get_descr_drvctl(struct disk_desc *dd)
 	int8_t perr;
 	int error, fd;
 	bool rv;
-	char size[5];
+	char size[5], name[sizeof(dd->dd_descr)];
 	const char *model;
 
 	fd = open("/dev/drvctl", O_RDONLY);
@@ -377,13 +400,14 @@ get_descr_drvctl(struct disk_desc *dd)
 		prop_object_release(results_dict);
 		return 0;
 	}
+	trim_name(name, sizeof name, model);
 
 	humanize_number(size, sizeof(size),
 	(uint64_t)dd->dd_secsize * (uint64_t)dd->dd_totsec,
 	"", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL);
 
 	snprintf(dd->dd_descr, sizeof(dd->dd_descr), "%s (%s, %s)",
-	dd->dd_name, size, model);
+	dd->dd_name, size, name);
 
 	prop_object_release(results_dict);
 



CVS commit: src/usr.sbin/sysinst

2022-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Aug 29 17:35:15 UTC 2022

Modified Files:
src/usr.sbin/sysinst: disks.c

Log Message:
Trim trailing whitespace from disk names we got via drvctl.


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 src/usr.sbin/sysinst/disks.c

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



CVS commit: [netbsd-9] src/doc

2022-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Aug 29 16:22:05 UTC 2022

Modified Files:
src/doc [netbsd-9]: CHANGES-9.4

Log Message:
Tickets #1503 - #1510


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/doc/CHANGES-9.4

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-9.4
diff -u src/doc/CHANGES-9.4:1.1.2.5 src/doc/CHANGES-9.4:1.1.2.6
--- src/doc/CHANGES-9.4:1.1.2.5	Sun Aug 28 13:30:53 2022
+++ src/doc/CHANGES-9.4	Mon Aug 29 16:22:05 2022
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.5 2022/08/28 13:30:53 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.6 2022/08/29 16:22:05 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -46,3 +46,50 @@ libexec/telnetd/utility.c			1.34
 	telnetd(8): fix CVE-2020-10188.
 	[hgutch, ticket #1502]
 
+external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c 1.6,1.7
+
+	Enable zpool(8) to reliably find components on dk(4) wedges.
+	[riastradh, ticket #1503]
+
+sys/fs/ptyfs/ptyfs_vnops.c			1.69
+
+	ptyfs: fix buffer overrun.
+	[riastradh, ticket #1504]
+
+sys/dev/ic/tpm.c1.20
+sys/dev/isa/tpm_isa.c1.8
+
+	tpm(4): kernel attach messages cosmetics.
+	[riastradh, ticket #1505]
+
+sys/dev/raidframe/rf_netbsdkintf.c		1.409
+
+	raid(4): reject the RAIDFRAME_SET_LAST_UNIT and RAIDFRAME_SHUTDOWN
+	ioctls when RAIDframe is not initialized.
+	[oster, ticket #1506]
+
+bin/test/test.c	1.45
+
+	PR 56983: fix confusing message in test(1).
+	[dholland, ticket #1507]
+
+libexec/telnetd/telnetd.c			1.58 (patch)
+
+	telnetd(8): fix a crash accessing the slc table before initialization.
+	[dholland, ticket #1508]
+
+sys/dev/scsipi/sd.c1.335
+sys/dev/scsipi/sdvar.h1.40
+
+	sd(4): fix buffer over-read leading to garbage appended
+	to the device type string and possible information disclosure.
+	[mlelstv, ticket #1509]
+
+
+external/mit/xorg/bin/xdm/Makefile		1.18,1.19
+external/mit/xorg/bin/xdm/Makefile.xdm		1.11
+
+	PR 54851: xdm(8): fix the man page generation, and include
+	"sbin" directories (and games) in DEF_USER_PATH.
+	[nia, ticket #1510]
+



CVS commit: [netbsd-9] src/doc

2022-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Aug 29 16:22:05 UTC 2022

Modified Files:
src/doc [netbsd-9]: CHANGES-9.4

Log Message:
Tickets #1503 - #1510


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/doc/CHANGES-9.4

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



CVS commit: [netbsd-9] src/external/mit/xorg/bin/xdm

2022-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Aug 29 16:20:45 UTC 2022

Modified Files:
src/external/mit/xorg/bin/xdm [netbsd-9]: Makefile Makefile.xdm

Log Message:
Pull up following revision(s) (requested by nia in ticket #1510):

external/mit/xorg/bin/xdm/Makefile.xdm: revision 1.11
external/mit/xorg/bin/xdm/Makefile: revision 1.18
external/mit/xorg/bin/xdm/Makefile: revision 1.19

fix the man page generation, noted by uwe@

xdm: Include "sbin" directories (and games) in DEF_USER_PATH.
Upstream's configure.ac picks a DEF_USER_PATH on a per-OS basis.
Most of these include the "sbin" directories, with NetBSD being the
(only?) exception.

However, this is inconsistent with the way a typical login shell is
initialized (when using the default skeleton files).  To avoid user
confusion, harmonize DEF_USER_PATH with our other defaults and with
other OSes.

PR xsrc/54851


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.17.2.1 src/external/mit/xorg/bin/xdm/Makefile
cvs rdiff -u -r1.10 -r1.10.2.1 src/external/mit/xorg/bin/xdm/Makefile.xdm

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

Modified files:

Index: src/external/mit/xorg/bin/xdm/Makefile
diff -u src/external/mit/xorg/bin/xdm/Makefile:1.17 src/external/mit/xorg/bin/xdm/Makefile:1.17.2.1
--- src/external/mit/xorg/bin/xdm/Makefile:1.17	Wed Mar  6 12:40:23 2019
+++ src/external/mit/xorg/bin/xdm/Makefile	Mon Aug 29 16:20:45 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.17 2019/03/06 12:40:23 nakayama Exp $
+#	$NetBSD: Makefile,v 1.17.2.1 2022/08/29 16:20:45 martin Exp $
 
 .include 
 
@@ -13,6 +13,9 @@ SRCS+=		Login.c greet.c verify.c
 CPPFLAGS+=	-DSTATIC_GREETER_LIB
 .endif
 
+DEF_USER_PATH=	/sbin:/usr/sbin:/bin:/usr/bin:/usr/games:/usr/pkg/sbin:/usr/pkg/bin:/usr/local/sbin:/usr/local/bin:${X11BINDIR}
+DEF_SYSTEM_PATH=/sbin:/usr/sbin:/bin:/usr/bin:${X11BINDIR}
+
 CPPFLAGS+=		-DRETSIGTYPE=void
 CPPFLAGS.auth.c+=	-DBSD44SOCKETS
 CPPFLAGS.socket.c+=	-DBSD44SOCKETS
@@ -22,8 +25,8 @@ CPPFLAGS.resource.c+=	\
 	-DDEF_SERVER_LINE="\":0 local ${X11BINDIR}/X :0\"" \
 	-DXRDB_PROGRAM=\"${X11BINDIR}/xrdb\" \
 	-DDEF_SESSION="\"${X11BINDIR}/xterm -ls\"" \
-	-DDEF_USER_PATH=\"/bin:/usr/bin:/usr/pkg/bin:/usr/local/bin:${X11BINDIR}\" \
-	-DDEF_SYSTEM_PATH=\"/sbin:/usr/sbin:/bin:/usr/bin:${X11BINDIR}\" \
+	-DDEF_USER_PATH=\"${DEF_USER_PATH}\" \
+	-DDEF_SYSTEM_PATH=\"${DEF_SYSTEM_PATH}\" \
 	-DDEF_SYSTEM_SHELL=\"/bin/sh\" \
 	-DDEF_FAILSAFE_CLIENT=\"${X11BINDIR}/xterm\" \
 	-DDEF_XDM_CONFIG=\"${XDMDIR}/xdm-config\" \
@@ -52,14 +55,17 @@ CPPFLAGS.resource.c+=	-DDEF_CHOOSER=\"${
 .include "../../xorg-pkg-ver.mk"
 
 X11EXTRAMANDEFS+= \
-		-e 's,ARC4_RANDOM,1,' \
-		-e 's,BINDIR,$(X11BINDIR),' \
-		-e 's,CHOOSERPATH,$(XDMCHOOSERPATH),' \
-		-e 's,DGREETERLIBPATH,$(XDMGREETERLIB),' \
-		-e 's,XDMDIR,$(XDMDIR),' \
-		-e 's,XDMXAUTHDIR,$(XDMVARDIR),' \
-		-e 's,XDMLOGDIR,$(XDMLOGDIR),' \
-		-e 's,XDMPIDDIR,$(XDMPIDDIR),'
+		-e 's,CHOOSERPATH,${XDMCHOOSERPATH},' \
+		-e 's,XDMLOGDIR,${XDMLOGDIR},' \
+		-e 's,XDMDIR,${XDMDIR},' \
+		-e 's,BINDIR,${X11BINDIR},' \
+		-e 's,XDMPIDDIR,${XDMPIDDIR},' \
+		-e 's,XDMXAUTHDIR,${XDMVARDIR},' \
+		-e 's,DEF_USER_PATH,${DEF_USER_PATH},' \
+		-e 's,DEF_SYSTEM_PATH,${DEF_SYSTEM_PATH},' \
+		-e 's,DEF_GREETER_LIB,${XDMGREETERLIB},' \
+		-e 's,DEV_RANDOM,${DEV_RANDOM},' \
+		-e 's,ARC4_RANDOM,1,'
 
 .include 
 .include 

Index: src/external/mit/xorg/bin/xdm/Makefile.xdm
diff -u src/external/mit/xorg/bin/xdm/Makefile.xdm:1.10 src/external/mit/xorg/bin/xdm/Makefile.xdm:1.10.2.1
--- src/external/mit/xorg/bin/xdm/Makefile.xdm:1.10	Wed Mar  6 12:40:23 2019
+++ src/external/mit/xorg/bin/xdm/Makefile.xdm	Mon Aug 29 16:20:45 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.xdm,v 1.10 2019/03/06 12:40:23 nakayama Exp $
+#	$NetBSD: Makefile.xdm,v 1.10.2.1 2022/08/29 16:20:45 martin Exp $
 
 XDMVARDIR=	/var/db/xdm
 XDMDIR=		${X11ETCDIR}/xdm
@@ -6,12 +6,13 @@ XDMCHOOSERPATH=	${X11ROOTDIR}/libexec/ch
 XDMGREETERLIB=	${X11ROOTDIR}/lib/libXdmGreet.so
 XDMLOGDIR=	/var/log
 XDMPIDDIR=	/var/run
+DEV_RANDOM=	/dev/urandom
 
 CPPFLAGS+=	-DBINDIR=\"${X11BINDIR}\" -DXDMDIR=\"${XDMDIR}\" \
 		-DHASXDMAUTH ${X11FLAGS.CONNECTION} \
 		-DBSD44SOCKETS \
 		-DFRAGILE_DEV_MEM -DARC4_RANDOM \
-		-DDEV_RANDOM=\"dev/urandom\" \
+		-DDEV_RANDOM=\"${DEV_RANDOM}\" \
 		-DXPM -DUSE_XFT \
 		-DHAVE_GETIFADDRS \
 		-DHAVE_MKSTEMP \



CVS commit: [netbsd-9] src/external/mit/xorg/bin/xdm

2022-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Aug 29 16:20:45 UTC 2022

Modified Files:
src/external/mit/xorg/bin/xdm [netbsd-9]: Makefile Makefile.xdm

Log Message:
Pull up following revision(s) (requested by nia in ticket #1510):

external/mit/xorg/bin/xdm/Makefile.xdm: revision 1.11
external/mit/xorg/bin/xdm/Makefile: revision 1.18
external/mit/xorg/bin/xdm/Makefile: revision 1.19

fix the man page generation, noted by uwe@

xdm: Include "sbin" directories (and games) in DEF_USER_PATH.
Upstream's configure.ac picks a DEF_USER_PATH on a per-OS basis.
Most of these include the "sbin" directories, with NetBSD being the
(only?) exception.

However, this is inconsistent with the way a typical login shell is
initialized (when using the default skeleton files).  To avoid user
confusion, harmonize DEF_USER_PATH with our other defaults and with
other OSes.

PR xsrc/54851


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.17.2.1 src/external/mit/xorg/bin/xdm/Makefile
cvs rdiff -u -r1.10 -r1.10.2.1 src/external/mit/xorg/bin/xdm/Makefile.xdm

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



CVS commit: [netbsd-9] src/sys/dev/scsipi

2022-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Aug 29 16:18:10 UTC 2022

Modified Files:
src/sys/dev/scsipi [netbsd-9]: sd.c sdvar.h

Log Message:
Pull up following revision(s) (requested by mlelstv in ticket #1509):

sys/dev/scsipi/sdvar.h: revision 1.40
sys/dev/scsipi/sd.c: revision 1.335

Don't fetch data beyond end of inquiry buffer, which, here, is not
NUL-terminated.

Reduce target buffer to needed size (product name + NUL terminator).


To generate a diff of this commit:
cvs rdiff -u -r1.327.4.2 -r1.327.4.3 src/sys/dev/scsipi/sd.c
cvs rdiff -u -r1.39 -r1.39.4.1 src/sys/dev/scsipi/sdvar.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/dev/scsipi/sd.c
diff -u src/sys/dev/scsipi/sd.c:1.327.4.2 src/sys/dev/scsipi/sd.c:1.327.4.3
--- src/sys/dev/scsipi/sd.c:1.327.4.2	Thu Feb 11 12:53:28 2021
+++ src/sys/dev/scsipi/sd.c	Mon Aug 29 16:18:10 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: sd.c,v 1.327.4.2 2021/02/11 12:53:28 martin Exp $	*/
+/*	$NetBSD: sd.c,v 1.327.4.3 2022/08/29 16:18:10 martin Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2003, 2004 The NetBSD Foundation, Inc.
@@ -47,7 +47,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.327.4.2 2021/02/11 12:53:28 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.327.4.3 2022/08/29 16:18:10 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_scsi.h"
@@ -254,9 +254,8 @@ sdattach(device_t parent, device_t self,
 	SC_DEBUG(periph, SCSIPI_DB2, ("sdattach: "));
 
 	sd->type = (sa->sa_inqbuf.type & SID_TYPE);
-	strncpy(sd->name, sa->sa_inqbuf.product, sizeof(sd->name));
-
-	strncpy(sd->typename, sa->sa_inqbuf.product, sizeof(sd->typename));
+	memcpy(sd->name, sa->sa_inqbuf.product, uimin(16, sizeof(sd->name)));
+	memcpy(sd->typename, sa->sa_inqbuf.product, uimin(16, sizeof(sd->typename)));
 
 	if (sd->type == T_SIMPLE_DIRECT)
 		periph->periph_quirks |= PQUIRK_ONLYBIG | PQUIRK_NOBIGMODESENSE;

Index: src/sys/dev/scsipi/sdvar.h
diff -u src/sys/dev/scsipi/sdvar.h:1.39 src/sys/dev/scsipi/sdvar.h:1.39.4.1
--- src/sys/dev/scsipi/sdvar.h:1.39	Tue Mar 19 06:59:40 2019
+++ src/sys/dev/scsipi/sdvar.h	Mon Aug 29 16:18:10 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdvar.h,v 1.39 2019/03/19 06:59:40 mlelstv Exp $	*/
+/*	$NetBSD: sdvar.h,v 1.39.4.1 2022/08/29 16:18:10 martin Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@@ -88,7 +88,7 @@ struct sd_softc {
 	callout_t sc_callout;
 	u_int8_t type;
 	char name[16]; /* product name, for default disklabel */
-	char typename[128+4+1]; /* stored in disk info */
+	char typename[16+1]; /* stored in disk info */
 };
 
 #define	SDGP_RESULT_OK		0	/* parameters obtained */



CVS commit: [netbsd-9] src/sys/dev/scsipi

2022-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Aug 29 16:18:10 UTC 2022

Modified Files:
src/sys/dev/scsipi [netbsd-9]: sd.c sdvar.h

Log Message:
Pull up following revision(s) (requested by mlelstv in ticket #1509):

sys/dev/scsipi/sdvar.h: revision 1.40
sys/dev/scsipi/sd.c: revision 1.335

Don't fetch data beyond end of inquiry buffer, which, here, is not
NUL-terminated.

Reduce target buffer to needed size (product name + NUL terminator).


To generate a diff of this commit:
cvs rdiff -u -r1.327.4.2 -r1.327.4.3 src/sys/dev/scsipi/sd.c
cvs rdiff -u -r1.39 -r1.39.4.1 src/sys/dev/scsipi/sdvar.h

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



CVS commit: [netbsd-8] src/doc

2022-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Aug 29 16:15:42 UTC 2022

Modified Files:
src/doc [netbsd-8]: CHANGES-8.3

Log Message:
Ticket #1757


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.143 -r1.1.2.144 src/doc/CHANGES-8.3

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-8.3
diff -u src/doc/CHANGES-8.3:1.1.2.143 src/doc/CHANGES-8.3:1.1.2.144
--- src/doc/CHANGES-8.3:1.1.2.143	Sun Aug 28 13:32:34 2022
+++ src/doc/CHANGES-8.3	Mon Aug 29 16:15:42 2022
@@ -1,4 +1,4 @@
- $NetBSD: CHANGES-8.3,v 1.1.2.143 2022/08/28 13:32:34 martin Exp $
+ $NetBSD: CHANGES-8.3,v 1.1.2.144 2022/08/29 16:15:42 martin Exp $
 
 A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3
 release:
@@ -2746,3 +2746,8 @@ libexec/telnetd/utility.c			1.34
 	telnetd(8): fix CVE-2020-10188.
 	[hgutch, ticket #1756]
 
+libexec/telnetd/telnetd.c			1.58 (patch)
+
+	telnetd(8): fix a crash accessing the slc table before initialization.
+	[dholland, ticket #1757]
+



CVS commit: [netbsd-8] src/doc

2022-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Aug 29 16:15:42 UTC 2022

Modified Files:
src/doc [netbsd-8]: CHANGES-8.3

Log Message:
Ticket #1757


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.143 -r1.1.2.144 src/doc/CHANGES-8.3

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



CVS commit: [netbsd-8] src/libexec/telnetd

2022-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Aug 29 16:14:57 UTC 2022

Modified Files:
src/libexec/telnetd [netbsd-8]: telnetd.c

Log Message:
Pull up following revision(s) (requested by dholland in ticket #1757):

libexec/telnetd/telnetd.c: revision 1.58 (via patch)

telnetd: fix the crash that's been talked about the past couple days.

(Move initialization of the slc table earlier so it doesn't get
accessed before that happens.)

Calling the crash a DoS or security problem is a bit overwrought; it's
just a bug.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.55.18.1 src/libexec/telnetd/telnetd.c

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

Modified files:

Index: src/libexec/telnetd/telnetd.c
diff -u src/libexec/telnetd/telnetd.c:1.55 src/libexec/telnetd/telnetd.c:1.55.18.1
--- src/libexec/telnetd/telnetd.c:1.55	Thu Feb 27 18:20:21 2014
+++ src/libexec/telnetd/telnetd.c	Mon Aug 29 16:14:57 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: telnetd.c,v 1.55 2014/02/27 18:20:21 joerg Exp $	*/
+/*	$NetBSD: telnetd.c,v 1.55.18.1 2022/08/29 16:14:57 martin Exp $	*/
 
 /*
  * Copyright (C) 1997 and 1998 WIDE Project.
@@ -65,7 +65,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19
 #if 0
 static char sccsid[] = "@(#)telnetd.c	8.4 (Berkeley) 5/30/95";
 #else
-__RCSID("$NetBSD: telnetd.c,v 1.55 2014/02/27 18:20:21 joerg Exp $");
+__RCSID("$NetBSD: telnetd.c,v 1.55.18.1 2022/08/29 16:14:57 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -682,6 +682,11 @@ doit(struct sockaddr *who)
 	char user_name[256];
 
 	/*
+	 * Initialize the slc mapping table.
+	 */
+	get_slc_defaults();
+
+	/*
 	 * Find an available pty to use.
 	 */
 	pty = getpty();
@@ -748,11 +753,6 @@ telnet(int f, int p)
 	struct pollfd set[2];
 
 	/*
-	 * Initialize the slc mapping table.
-	 */
-	get_slc_defaults();
-
-	/*
 	 * Do some tests where it is desireable to wait for a response.
 	 * Rather than doing them slowly, one at a time, do them all
 	 * at once.



CVS commit: [netbsd-8] src/libexec/telnetd

2022-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Aug 29 16:14:57 UTC 2022

Modified Files:
src/libexec/telnetd [netbsd-8]: telnetd.c

Log Message:
Pull up following revision(s) (requested by dholland in ticket #1757):

libexec/telnetd/telnetd.c: revision 1.58 (via patch)

telnetd: fix the crash that's been talked about the past couple days.

(Move initialization of the slc table earlier so it doesn't get
accessed before that happens.)

Calling the crash a DoS or security problem is a bit overwrought; it's
just a bug.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.55.18.1 src/libexec/telnetd/telnetd.c

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



CVS commit: [netbsd-9] src/libexec/telnetd

2022-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Aug 29 16:13:25 UTC 2022

Modified Files:
src/libexec/telnetd [netbsd-9]: telnetd.c

Log Message:
Pull up following revision(s) (requested by dholland in ticket #1508):

libexec/telnetd/telnetd.c: revision 1.58 (via patch)

telnetd: fix the crash that's been talked about the past couple days.

(Move initialization of the slc table earlier so it doesn't get
accessed before that happens.)

Calling the crash a DoS or security problem is a bit overwrought; it's
just a bug.


To generate a diff of this commit:
cvs rdiff -u -r1.55.28.1 -r1.55.28.2 src/libexec/telnetd/telnetd.c

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



CVS commit: [netbsd-9] src/libexec/telnetd

2022-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Aug 29 16:13:25 UTC 2022

Modified Files:
src/libexec/telnetd [netbsd-9]: telnetd.c

Log Message:
Pull up following revision(s) (requested by dholland in ticket #1508):

libexec/telnetd/telnetd.c: revision 1.58 (via patch)

telnetd: fix the crash that's been talked about the past couple days.

(Move initialization of the slc table earlier so it doesn't get
accessed before that happens.)

Calling the crash a DoS or security problem is a bit overwrought; it's
just a bug.


To generate a diff of this commit:
cvs rdiff -u -r1.55.28.1 -r1.55.28.2 src/libexec/telnetd/telnetd.c

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

Modified files:

Index: src/libexec/telnetd/telnetd.c
diff -u src/libexec/telnetd/telnetd.c:1.55.28.1 src/libexec/telnetd/telnetd.c:1.55.28.2
--- src/libexec/telnetd/telnetd.c:1.55.28.1	Fri Aug 16 19:12:46 2019
+++ src/libexec/telnetd/telnetd.c	Mon Aug 29 16:13:25 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: telnetd.c,v 1.55.28.1 2019/08/16 19:12:46 martin Exp $	*/
+/*	$NetBSD: telnetd.c,v 1.55.28.2 2022/08/29 16:13:25 martin Exp $	*/
 
 /*
  * Copyright (C) 1997 and 1998 WIDE Project.
@@ -65,7 +65,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19
 #if 0
 static char sccsid[] = "@(#)telnetd.c	8.4 (Berkeley) 5/30/95";
 #else
-__RCSID("$NetBSD: telnetd.c,v 1.55.28.1 2019/08/16 19:12:46 martin Exp $");
+__RCSID("$NetBSD: telnetd.c,v 1.55.28.2 2022/08/29 16:13:25 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -678,6 +678,11 @@ doit(struct sockaddr *who)
 	char user_name[256];
 
 	/*
+	 * Initialize the slc mapping table.
+	 */
+	get_slc_defaults();
+
+	/*
 	 * Find an available pty to use.
 	 */
 	pty = getpty();
@@ -744,11 +749,6 @@ telnet(int f, int p)
 	struct pollfd set[2];
 
 	/*
-	 * Initialize the slc mapping table.
-	 */
-	get_slc_defaults();
-
-	/*
 	 * Do some tests where it is desireable to wait for a response.
 	 * Rather than doing them slowly, one at a time, do them all
 	 * at once.



CVS commit: [netbsd-9] src/bin/test

2022-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Aug 29 16:04:26 UTC 2022

Modified Files:
src/bin/test [netbsd-9]: test.c

Log Message:
Pull up following revision(s) (requested by dholland in ticket #1507):

bin/test/test.c: revision 1.45

PR 56983 Izumi Tsutsui: fix confusing message in test(1) with -DSMALL


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.43.2.1 src/bin/test/test.c

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

Modified files:

Index: src/bin/test/test.c
diff -u src/bin/test/test.c:1.43 src/bin/test/test.c:1.43.2.1
--- src/bin/test/test.c:1.43	Thu Sep 13 22:00:58 2018
+++ src/bin/test/test.c	Mon Aug 29 16:04:26 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: test.c,v 1.43 2018/09/13 22:00:58 kre Exp $ */
+/* $NetBSD: test.c,v 1.43.2.1 2022/08/29 16:04:26 martin Exp $ */
 
 /*
  * test(1); version 7-like  --  author Erik Baalbergen
@@ -12,7 +12,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: test.c,v 1.43 2018/09/13 22:00:58 kre Exp $");
+__RCSID("$NetBSD: test.c,v 1.43.2.1 2022/08/29 16:04:26 martin Exp $");
 #endif
 
 #include 
@@ -306,7 +306,7 @@ main(int argc, char *argv[])
 	 */
 
 #ifdef SMALL
-	error("SMALL test, no fallback usage");
+	error("unsupported expression when built with -DSMALL");
 #else
 
 	t_wp = [1];



CVS commit: [netbsd-9] src/bin/test

2022-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Aug 29 16:04:26 UTC 2022

Modified Files:
src/bin/test [netbsd-9]: test.c

Log Message:
Pull up following revision(s) (requested by dholland in ticket #1507):

bin/test/test.c: revision 1.45

PR 56983 Izumi Tsutsui: fix confusing message in test(1) with -DSMALL


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.43.2.1 src/bin/test/test.c

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



CVS commit: [netbsd-9] src/sys/dev/raidframe

2022-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Aug 29 16:02:34 UTC 2022

Modified Files:
src/sys/dev/raidframe [netbsd-9]: rf_netbsdkintf.c

Log Message:
Pull up following revision(s) (requested by oster in ticket #1506):

sys/dev/raidframe/rf_netbsdkintf.c: revision 1.409

RAIDframe must be initialized for the RAIDFRAME_SET_LAST_UNIT
and RAIDFRAME_SHUTDOWN ioctls.


To generate a diff of this commit:
cvs rdiff -u -r1.376.4.3 -r1.376.4.4 src/sys/dev/raidframe/rf_netbsdkintf.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/raidframe/rf_netbsdkintf.c
diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.376.4.3 src/sys/dev/raidframe/rf_netbsdkintf.c:1.376.4.4
--- src/sys/dev/raidframe/rf_netbsdkintf.c:1.376.4.3	Fri Aug 12 15:18:13 2022
+++ src/sys/dev/raidframe/rf_netbsdkintf.c	Mon Aug 29 16:02:34 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_netbsdkintf.c,v 1.376.4.3 2022/08/12 15:18:13 martin Exp $	*/
+/*	$NetBSD: rf_netbsdkintf.c,v 1.376.4.4 2022/08/29 16:02:34 martin Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
  ***/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.376.4.3 2022/08/12 15:18:13 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.376.4.4 2022/08/29 16:02:34 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_raid_autoconfig.h"
@@ -1066,7 +1066,9 @@ rf_must_be_initialized(const struct raid
 	case RAIDFRAME_REWRITEPARITY:
 	case RAIDFRAME_SET_AUTOCONFIG:
 	case RAIDFRAME_SET_COMPONENT_LABEL:
+	case RAIDFRAME_SET_LAST_UNIT:
 	case RAIDFRAME_SET_ROOT:
+	case RAIDFRAME_SHUTDOWN:
 		return (rs->sc_flags & RAIDF_INITED) == 0;
 	}
 	return false;



CVS commit: [netbsd-9] src/sys/dev/raidframe

2022-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Aug 29 16:02:34 UTC 2022

Modified Files:
src/sys/dev/raidframe [netbsd-9]: rf_netbsdkintf.c

Log Message:
Pull up following revision(s) (requested by oster in ticket #1506):

sys/dev/raidframe/rf_netbsdkintf.c: revision 1.409

RAIDframe must be initialized for the RAIDFRAME_SET_LAST_UNIT
and RAIDFRAME_SHUTDOWN ioctls.


To generate a diff of this commit:
cvs rdiff -u -r1.376.4.3 -r1.376.4.4 src/sys/dev/raidframe/rf_netbsdkintf.c

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



CVS commit: [netbsd-9] src/sys/dev

2022-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Aug 29 15:48:31 UTC 2022

Modified Files:
src/sys/dev/ic [netbsd-9]: tpm.c
src/sys/dev/isa [netbsd-9]: tpm_isa.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1505):

sys/dev/isa/tpm_isa.c: revision 1.8
sys/dev/ic/tpm.c: revision 1.20

Add missing printing-of-newlines in the attach routine.

Remove extra newline from boot messages (isa and acpi front-ends
already provide the newline).


To generate a diff of this commit:
cvs rdiff -u -r1.13.2.2 -r1.13.2.3 src/sys/dev/ic/tpm.c
cvs rdiff -u -r1.4.2.1 -r1.4.2.2 src/sys/dev/isa/tpm_isa.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/ic/tpm.c
diff -u src/sys/dev/ic/tpm.c:1.13.2.2 src/sys/dev/ic/tpm.c:1.13.2.3
--- src/sys/dev/ic/tpm.c:1.13.2.2	Wed Aug  3 16:00:47 2022
+++ src/sys/dev/ic/tpm.c	Mon Aug 29 15:48:31 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: tpm.c,v 1.13.2.2 2022/08/03 16:00:47 martin Exp $	*/
+/*	$NetBSD: tpm.c,v 1.13.2.3 2022/08/29 15:48:31 martin Exp $	*/
 
 /*
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tpm.c,v 1.13.2.2 2022/08/03 16:00:47 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tpm.c,v 1.13.2.3 2022/08/29 15:48:31 martin Exp $");
 
 #include 
 #include 
@@ -821,9 +821,6 @@ tpm_tis12_init(struct tpm_softc *sc)
 {
 	int rv;
 
-	aprint_naive("\n");
-	aprint_normal("\n");
-
 	sc->sc_caps = bus_space_read_4(sc->sc_bt, sc->sc_bh,
 	TPM_INTF_CAPABILITY);
 	sc->sc_devid = bus_space_read_4(sc->sc_bt, sc->sc_bh, TPM_ID);

Index: src/sys/dev/isa/tpm_isa.c
diff -u src/sys/dev/isa/tpm_isa.c:1.4.2.1 src/sys/dev/isa/tpm_isa.c:1.4.2.2
--- src/sys/dev/isa/tpm_isa.c:1.4.2.1	Wed Oct 16 09:52:38 2019
+++ src/sys/dev/isa/tpm_isa.c	Mon Aug 29 15:48:30 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: tpm_isa.c,v 1.4.2.1 2019/10/16 09:52:38 martin Exp $	*/
+/*	$NetBSD: tpm_isa.c,v 1.4.2.2 2022/08/29 15:48:30 martin Exp $	*/
 
 /*
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tpm_isa.c,v 1.4.2.1 2019/10/16 09:52:38 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tpm_isa.c,v 1.4.2.2 2022/08/29 15:48:30 martin Exp $");
 
 #include 
 #include 
@@ -113,6 +113,9 @@ tpm_isa_attach(device_t parent, device_t
 	base = (unsigned int)ia->ia_iomem[0].ir_addr;
 	size = TPM_SPACE_SIZE;
 
+	aprint_normal("\n");
+	aprint_naive("\n");
+
 	sc->sc_dev = self;
 	sc->sc_ver = TPM_1_2;
 	mutex_init(>sc_lock, MUTEX_DEFAULT, IPL_NONE);



CVS commit: [netbsd-9] src/sys/dev

2022-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Aug 29 15:48:31 UTC 2022

Modified Files:
src/sys/dev/ic [netbsd-9]: tpm.c
src/sys/dev/isa [netbsd-9]: tpm_isa.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1505):

sys/dev/isa/tpm_isa.c: revision 1.8
sys/dev/ic/tpm.c: revision 1.20

Add missing printing-of-newlines in the attach routine.

Remove extra newline from boot messages (isa and acpi front-ends
already provide the newline).


To generate a diff of this commit:
cvs rdiff -u -r1.13.2.2 -r1.13.2.3 src/sys/dev/ic/tpm.c
cvs rdiff -u -r1.4.2.1 -r1.4.2.2 src/sys/dev/isa/tpm_isa.c

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



CVS commit: [netbsd-9] src/sys/fs/ptyfs

2022-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Aug 29 15:45:10 UTC 2022

Modified Files:
src/sys/fs/ptyfs [netbsd-9]: ptyfs_vnops.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1504):

sys/fs/ptyfs/ptyfs_vnops.c: revision 1.69

ptyfs: Don't copy out cookies past end of buffer.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.55.4.1 src/sys/fs/ptyfs/ptyfs_vnops.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/fs/ptyfs/ptyfs_vnops.c
diff -u src/sys/fs/ptyfs/ptyfs_vnops.c:1.55 src/sys/fs/ptyfs/ptyfs_vnops.c:1.55.4.1
--- src/sys/fs/ptyfs/ptyfs_vnops.c:1.55	Mon Sep  3 16:29:35 2018
+++ src/sys/fs/ptyfs/ptyfs_vnops.c	Mon Aug 29 15:45:10 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: ptyfs_vnops.c,v 1.55 2018/09/03 16:29:35 riastradh Exp $	*/
+/*	$NetBSD: ptyfs_vnops.c,v 1.55.4.1 2022/08/29 15:45:10 martin Exp $	*/
 
 /*
  * Copyright (c) 1993, 1995
@@ -76,7 +76,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.55 2018/09/03 16:29:35 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.55.4.1 2022/08/29 15:45:10 martin Exp $");
 
 #include 
 #include 
@@ -716,7 +716,7 @@ ptyfs_readdir(void *v)
 		*ap->a_cookies = cookies;
 	}
 
-	for (; i < 2; i++) {
+	for (; i < 2 && uio->uio_resid >= UIO_MX; i++) {
 		/* `.' and/or `..' */
 		dp->d_fileno = PTYFS_FILENO(0, PTYFSroot);
 		dp->d_namlen = i + 1;



CVS commit: [netbsd-9] src/sys/fs/ptyfs

2022-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Aug 29 15:45:10 UTC 2022

Modified Files:
src/sys/fs/ptyfs [netbsd-9]: ptyfs_vnops.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1504):

sys/fs/ptyfs/ptyfs_vnops.c: revision 1.69

ptyfs: Don't copy out cookies past end of buffer.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.55.4.1 src/sys/fs/ptyfs/ptyfs_vnops.c

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



CVS commit: [netbsd-9] src/external/cddl/osnet/dist/lib/libzfs/common

2022-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Aug 29 15:39:40 UTC 2022

Modified Files:
src/external/cddl/osnet/dist/lib/libzfs/common [netbsd-9]:
libzfs_import.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1503):

external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c: revision 1.7
external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c: revision 1.6

When collecting zpool devices, skip disks with wedges so that a
concurrent test of a wedge on that disk doesn't fail.

libzfs: Zero DIOCLWEDGES input before ioctl.

Otherwise we ask the kernel to write over whatever random pointer was
in the stack garbage here, when all we wanted was to learn whether
dkwl_nwedges is zero or nonzero.

XXX pullup-9


To generate a diff of this commit:
cvs rdiff -u -r1.4.4.1 -r1.4.4.2 \
src/external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c

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



CVS commit: [netbsd-9] src/external/cddl/osnet/dist/lib/libzfs/common

2022-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Aug 29 15:39:40 UTC 2022

Modified Files:
src/external/cddl/osnet/dist/lib/libzfs/common [netbsd-9]:
libzfs_import.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1503):

external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c: revision 1.7
external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c: revision 1.6

When collecting zpool devices, skip disks with wedges so that a
concurrent test of a wedge on that disk doesn't fail.

libzfs: Zero DIOCLWEDGES input before ioctl.

Otherwise we ask the kernel to write over whatever random pointer was
in the stack garbage here, when all we wanted was to learn whether
dkwl_nwedges is zero or nonzero.

XXX pullup-9


To generate a diff of this commit:
cvs rdiff -u -r1.4.4.1 -r1.4.4.2 \
src/external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c

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

Modified files:

Index: src/external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c
diff -u src/external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c:1.4.4.1 src/external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c:1.4.4.2
--- src/external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c:1.4.4.1	Tue Aug 20 11:42:35 2019
+++ src/external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c	Mon Aug 29 15:39:39 2022
@@ -1095,8 +1095,17 @@ zpool_open_func(void *arg)
 	}
 #endif /* __FreeBSD__ */
 #ifdef __NetBSD__
+	struct dkwedge_list dkwl;
 	off_t size;
 
+	/* skip devices with wedges */
+	memset(, 0, sizeof(dkwl));
+	if (native_ioctl(fd, DIOCLWEDGES, ) == 0 &&
+	dkwl.dkwl_nwedges > 0) {
+		(void) close(fd);
+		return;
+	}
+
 	if (native_ioctl(fd, DIOCGMEDIASIZE, ) < 0 ||
 	size < SPA_MINDEVSIZE) {
 		(void) close(fd);



CVS commit: src/etc

2022-08-29 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Mon Aug 29 15:39:19 UTC 2022

Modified Files:
src/etc: wscons.conf

Log Message:
wscons.conf: add commented out config examples for the Terminus font


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/etc/wscons.conf

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



CVS commit: src/etc

2022-08-29 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Mon Aug 29 15:39:19 UTC 2022

Modified Files:
src/etc: wscons.conf

Log Message:
wscons.conf: add commented out config examples for the Terminus font


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/etc/wscons.conf

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

Modified files:

Index: src/etc/wscons.conf
diff -u src/etc/wscons.conf:1.21 src/etc/wscons.conf:1.22
--- src/etc/wscons.conf:1.21	Mon Jul 13 11:17:54 2020
+++ src/etc/wscons.conf	Mon Aug 29 15:39:19 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: wscons.conf,v 1.21 2020/07/13 11:17:54 nia Exp $
+#	$NetBSD: wscons.conf,v 1.22 2022/08/29 15:39:19 uwe Exp $
 #
 # workstation console configuration
 
@@ -16,6 +16,15 @@
 #  Uncomment to load. Needs to be explicitly enabled (see below).
 #font	latin2	-	16	iso	/usr/share/wscons/fonts/latin2.816
 
+# Terminus at different sizes (the wsf files carry all the necessary
+# information but rc.d/wscons wants the name to be specified).
+#font	Terminus16B-ISO8859-1	- - -	/usr/share/wscons/fonts/ter-116b.wsf
+#font	Terminus20-ISO8859-1	- - -	/usr/share/wscons/fonts/ter-120n.wsf
+#font	Terminus24-ISO8859-1	- - -	/usr/share/wscons/fonts/ter-124n.wsf
+#font	Terminus28-ISO8859-1	- - -	/usr/share/wscons/fonts/ter-128n.wsf
+#font	Terminus32-ISO8859-1	- - -	/usr/share/wscons/fonts/ter-132n.wsf
+
+
 # screens to create
 #	idx	screen	emul
 # Screen 0 is already configured as console in most cases.
@@ -54,6 +63,12 @@ screen	4	-	-
 #setvar	ttyE2	font		latin2
 #setvar	ttyE3	font		latin2
 
+# Use Terminus (see above for available sizes)
+#setvar	ttyE0	font		Terminus32-ISO8859-1
+#setvar	ttyE1	font		Terminus32-ISO8859-1
+#setvar	ttyE2	font		Terminus32-ISO8859-1
+#setvar	ttyE3	font		Terminus32-ISO8859-1
+
 # Change keyboard repeat speed to faster settings.
 #setvar	wskbd	repeat.del1	250
 #setvar	wskbd	repeat.deln	30



CVS commit: xsrc/local/programs/bdfload

2022-08-29 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Mon Aug 29 14:54:04 UTC 2022

Modified Files:
xsrc/local/programs/bdfload: bdfload.c

Log Message:
add -N option to override the font's name


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 xsrc/local/programs/bdfload/bdfload.c

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

Modified files:

Index: xsrc/local/programs/bdfload/bdfload.c
diff -u xsrc/local/programs/bdfload/bdfload.c:1.11 xsrc/local/programs/bdfload/bdfload.c:1.12
--- xsrc/local/programs/bdfload/bdfload.c:1.11	Tue Aug 23 19:09:15 2022
+++ xsrc/local/programs/bdfload/bdfload.c	Mon Aug 29 14:54:04 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: bdfload.c,v 1.11 2022/08/23 19:09:15 macallan Exp $	*/
+/*	$NetBSD: bdfload.c,v 1.12 2022/08/29 14:54:04 macallan Exp $	*/
 
 /*
  * Copyright (c) 2018 Michael Lorenz
@@ -102,6 +102,7 @@ int dump = 0;
 int header = 0;
 char commentbuf[2048] = "";
 int commentptr = 0;
+char fontname[64] = "";
 
 void
 dump_line(char *gptr, int stride)
@@ -156,7 +157,7 @@ write_wsf(const char *oname, struct wsdi
 }
 
 int
-write_header(const char *filename, struct wsdisplay_font *f, char *name, 
+write_header(const char *filename, struct wsdisplay_font *f, 
  char *buffer, int buflen)
 {
 	FILE *output;
@@ -164,7 +165,7 @@ write_header(const char *filename, struc
 	char fontname[64], c, msk;
 	
 	/* now output as a header file */
-	snprintf(fontname, sizeof(fontname), "%s_%dx%d", name, 
+	snprintf(fontname, sizeof(fontname), "%s_%dx%d", f->name, 
 	f->fontwidth, f->fontheight);
 	for (i = 0; i < strlen(fontname); i++) {
 		if (isblank((int)fontname[i]))
@@ -183,7 +184,7 @@ write_header(const char *filename, struc
 	fprintf(output, "static u_char %s_data[];\n", fontname);
 	fprintf(output, "\n");
 	fprintf(output, "static struct wsdisplay_font %s = {\n", fontname);
-	fprintf(output, "\t\"%s\",\t\t\t/* typeface name */\n", name);
+	fprintf(output, "\t\"%s\",\t\t\t/* typeface name */\n", f->name);
 	fprintf(output, "\t%d,\t\t\t\t/* firstchar */\n", f->firstchar);
 	fprintf(output, "\t%d,\t\t\t\t/* numchars */\n", f->numchars);
 	fprintf(output, "\t%d,\t\t\t\t/* encoding */\n", f->encoding);
@@ -228,7 +229,7 @@ write_header(const char *filename, struc
 void
 interpret(FILE *foo)
 {
-	char line[128], *arg, name[64] = "foop", *buffer;
+	char line[128], *arg, name[64] = "foo", *buffer;
 	int buflen = -1;
 	int len, in_char = 0, current = -1, stride = 0, charsize = 0;
 	int width, height, x, y, num;
@@ -355,7 +356,9 @@ interpret(FILE *foo)
 	f.numchars = last - first + 1;
 	f.stride = stride;
 	f.encoding = encoding;
-	f.name = name;
+	if (fontname[0] == 0) {
+		f.name = name;
+	} else f.name = fontname;
 	f.bitorder = WSDISPLAY_FONTORDER_L2R;
 	f.byteorder = WSDISPLAY_FONTORDER_L2R;
 	f.data = [first * charsize];
@@ -373,14 +376,14 @@ interpret(FILE *foo)
 		if (header == 0) {
 			write_wsf(ofile, , buffer, buflen);
 		} else
-			write_header(ofile, , name, buffer, buflen);
+			write_header(ofile, , buffer, buflen);
 	}
 }
 
 __dead void
 usage()
 {
-	fprintf(stderr, "usage: bdfload [-vdh] [-e encoding] [-o ofile.wsf] font.bdf\n");
+	fprintf(stderr, "usage: bdfload [-vdh] [-e encoding] [-N name] [-o ofile.wsf] font.bdf\n");
 	exit(EXIT_FAILURE);
 }
 
@@ -391,7 +394,7 @@ main(int argc, char *argv[])
 	const char *encname = NULL;
 
 	int c;
-	while ((c = getopt(argc, argv, "e:o:vdh")) != -1) {
+	while ((c = getopt(argc, argv, "e:o:N:vdh")) != -1) {
 		switch (c) {
 
 		/* font encoding */
@@ -419,7 +422,10 @@ main(int argc, char *argv[])
 		case 'h':
 			header = 1;
 			break;
-
+		case 'N':
+			strncpy(fontname, optarg, 64);
+			printf("given name: %s\n", fontname);
+			break;
 		case '?':	/* FALLTHROUGH */
 		default:
 			usage();



CVS commit: xsrc/local/programs/bdfload

2022-08-29 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Mon Aug 29 14:54:04 UTC 2022

Modified Files:
xsrc/local/programs/bdfload: bdfload.c

Log Message:
add -N option to override the font's name


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 xsrc/local/programs/bdfload/bdfload.c

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



CVS commit: src

2022-08-29 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Mon Aug 29 09:14:02 UTC 2022

Modified Files:
src/share/man/man7: sysctl.7
src/sys/net: route.c route.h
src/sys/netinet: icmp6.h icmp_var.h in_pcb.c ip_icmp.c
src/sys/netinet6: icmp6.c in6_pcb.c

Log Message:
Add sysctl entry to control to send routing message for RTM_DYNAMIC.

Some routing daemons require such routing message to keep coherency.

If we want to let kernel send such message, set net.inet.icmp.dynamic_rt_msg=1
for IPv4, net.inet6.icmp6.dynamic_rt_msg=1 for IPv6.
Default(=0) is the same as before, that is, not send such routing message.


To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/share/man/man7/sysctl.7
cvs rdiff -u -r1.231 -r1.232 src/sys/net/route.c
cvs rdiff -u -r1.130 -r1.131 src/sys/net/route.h
cvs rdiff -u -r1.58 -r1.59 src/sys/netinet/icmp6.h
cvs rdiff -u -r1.31 -r1.32 src/sys/netinet/icmp_var.h
cvs rdiff -u -r1.189 -r1.190 src/sys/netinet/in_pcb.c
cvs rdiff -u -r1.177 -r1.178 src/sys/netinet/ip_icmp.c
cvs rdiff -u -r1.251 -r1.252 src/sys/netinet6/icmp6.c
cvs rdiff -u -r1.169 -r1.170 src/sys/netinet6/in6_pcb.c

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



CVS commit: src

2022-08-29 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Mon Aug 29 09:14:02 UTC 2022

Modified Files:
src/share/man/man7: sysctl.7
src/sys/net: route.c route.h
src/sys/netinet: icmp6.h icmp_var.h in_pcb.c ip_icmp.c
src/sys/netinet6: icmp6.c in6_pcb.c

Log Message:
Add sysctl entry to control to send routing message for RTM_DYNAMIC.

Some routing daemons require such routing message to keep coherency.

If we want to let kernel send such message, set net.inet.icmp.dynamic_rt_msg=1
for IPv4, net.inet6.icmp6.dynamic_rt_msg=1 for IPv6.
Default(=0) is the same as before, that is, not send such routing message.


To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/share/man/man7/sysctl.7
cvs rdiff -u -r1.231 -r1.232 src/sys/net/route.c
cvs rdiff -u -r1.130 -r1.131 src/sys/net/route.h
cvs rdiff -u -r1.58 -r1.59 src/sys/netinet/icmp6.h
cvs rdiff -u -r1.31 -r1.32 src/sys/netinet/icmp_var.h
cvs rdiff -u -r1.189 -r1.190 src/sys/netinet/in_pcb.c
cvs rdiff -u -r1.177 -r1.178 src/sys/netinet/ip_icmp.c
cvs rdiff -u -r1.251 -r1.252 src/sys/netinet6/icmp6.c
cvs rdiff -u -r1.169 -r1.170 src/sys/netinet6/in6_pcb.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/man7/sysctl.7
diff -u src/share/man/man7/sysctl.7:1.160 src/share/man/man7/sysctl.7:1.161
--- src/share/man/man7/sysctl.7:1.160	Mon Aug 22 09:25:55 2022
+++ src/share/man/man7/sysctl.7	Mon Aug 29 09:14:02 2022
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sysctl.7,v 1.160 2022/08/22 09:25:55 knakahara Exp $
+.\"	$NetBSD: sysctl.7,v 1.161 2022/08/29 09:14:02 knakahara 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 August 9, 2022
+.Dd August 29, 2022
 .Dt SYSCTL 7
 .Os
 .Sh NAME
@@ -1457,6 +1457,7 @@ The currently defined protocols and name
 .It icmp	rediraccept	integer	yes
 .It icmp	redirtimeout	integer	yes
 .It icmp	bmcastecho	integer	yes
+.It icmp	dynamic_rt_msg	boolean	yes
 .It ip	allowsrcrt	integer	yes
 .It ip 	anonportalgo.selected	string	yes
 .It ip 	anonportalgo.available	string	yes
@@ -1703,6 +1704,9 @@ Number of bytes to return in an ICMP err
 .It Li icmp.bmcastecho
 If set to 1, enables responding to ICMP echo or timestamp request to the
 broadcast address.
+.It Li icmp.dynamic_rt_msg
+A boolean that the kernel sends routing message for RTM_DYNAMIC or not.
+If set to true, sends such routing message.
 .It Li tcp.ack_on_push
 If set to 1, TCP is to immediately transmit an ACK upon reception of
 a packet with PUSH set.
@@ -1856,6 +1860,7 @@ The currently defined protocols and name
 .It icmp6	rediraccept	integer	yes
 .It icmp6	redirtimeout	integer	yes
 .It icmp6	reflect_pmtu	boolean	yes
+.It icmp6	dynamic_rt_msg	boolean	yes
 .It ip6	accept_rtadv	integer	yes
 .It ip6	addctlpolicy	struct in6_addrpolicy	no
 .It ip6	anonportalgo.selected	string	yes
@@ -2120,7 +2125,9 @@ ICMPv6 redirect.
 .It Li icmp6.reflect_pmtu
 A boolean that icmpv6 reflecting uses path MTU discovery or not.
 When not, icmpv6 reflecting uses IPV6_MINMTU.
-ICMPv6 redirect.
+.It Li icmp6.dynamic_rt_msg
+A boolean that the kernel sends routing message for RTM_DYNAMIC or not.
+If set to true, sends such routing message.
 .It Li udp6.do_loopback_cksum
 Perform UDP checksum on loopback.
 .It Li udp6.recvspace

Index: src/sys/net/route.c
diff -u src/sys/net/route.c:1.231 src/sys/net/route.c:1.232
--- src/sys/net/route.c:1.231	Fri Aug 26 08:32:22 2022
+++ src/sys/net/route.c	Mon Aug 29 09:14:02 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: route.c,v 1.231 2022/08/26 08:32:22 knakahara Exp $	*/
+/*	$NetBSD: route.c,v 1.232 2022/08/29 09:14:02 knakahara Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.231 2022/08/26 08:32:22 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.232 2022/08/29 09:14:02 knakahara Exp $");
 
 #include 
 #ifdef RTFLUSH_DEBUG
@@ -884,6 +884,8 @@ rtredirect(const struct sockaddr *dst, c
 			error = rtrequest1(RTM_ADD, , );
 			if (rt != NULL)
 flags = rt->rt_flags;
+			if (error == 0)
+rt_newmsg_dynamic(RTM_ADD, rt);
 			stat = _dynamic;
 		} else {
 			/*
@@ -1546,6 +1548,45 @@ rt_newmsg(const int cmd, const struct rt
 }
 
 /*
+ * Inform the routing socket of a route change for RTF_DYNAMIC.
+ */
+void
+rt_newmsg_dynamic(const int cmd, const struct rtentry *rt)
+{
+	extern bool icmp_dynamic_rt_msg;
+	extern bool icmp6_dynamic_rt_msg;
+	struct rt_addrinfo info;
+	struct sockaddr *gateway = rt->rt_gateway;
+
+	if (gateway == NULL)
+		return;
+
+	switch(gateway->sa_family){
+	case AF_INET:
+		if (!icmp_dynamic_rt_msg)
+			return;
+		break;
+	case AF_INET6:
+		if (!icmp6_dynamic_rt_msg)
+			return;
+		break;
+	default:
+		return;
+	}
+
+	memset((void *), 0, sizeof(info));
+	info.rti_info[RTAX_DST] = 

CVS commit: src/sys/dev/pci

2022-08-29 Thread Pierre Pronchery
Module Name:src
Committed By:   khorben
Date:   Mon Aug 29 09:04:27 UTC 2022

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

Log Message:
emuxki(4): add support for the Sound Blaster Audigy Rx

This is as per kern/56980. Confirmed working on one out of two different
computers, albeit with a strong hissing noise (same card, different
mainboard). The mixer settings seem to be irrelevant or not supported
though.

Original support inspired by the Linux driver, and confirmed with the
OpenBSD driver, itself originally from NetBSD.

Tested on NetBSD/amd64.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/pci/emuxki.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/emuxki.c
diff -u src/sys/dev/pci/emuxki.c:1.71 src/sys/dev/pci/emuxki.c:1.72
--- src/sys/dev/pci/emuxki.c:1.71	Sat Feb  6 05:15:03 2021
+++ src/sys/dev/pci/emuxki.c	Mon Aug 29 09:04:27 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: emuxki.c,v 1.71 2021/02/06 05:15:03 isaki Exp $	*/
+/*	$NetBSD: emuxki.c,v 1.72 2022/08/29 09:04:27 khorben Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2007 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: emuxki.c,v 1.71 2021/02/06 05:15:03 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: emuxki.c,v 1.72 2022/08/29 09:04:27 khorben Exp $");
 
 #include 
 #include 
@@ -139,8 +139,9 @@ struct emuxki_softc {
 		EMUXKI_SBLIVE = 0x00,
 		EMUXKI_AUDIGY = 0x01,
 		EMUXKI_AUDIGY2 = 0x02,
-		EMUXKI_LIVE_5_1 = 0x04,
-		EMUXKI_APS = 0x08
+		EMUXKI_AUDIGY2_VALUE = 0x04,
+		EMUXKI_LIVE_5_1 = 0x08,
+		EMUXKI_APS = 0x10
 	} sc_type;
 	audio_device_t		sc_audv;	/* for GETDEV */
 
@@ -475,6 +476,7 @@ emuxki_match(device_t parent, cfdata_t m
 	case PCI_PRODUCT_CREATIVELABS_SBLIVE:
 	case PCI_PRODUCT_CREATIVELABS_SBLIVE2:
 	case PCI_PRODUCT_CREATIVELABS_AUDIGY:
+	case PCI_PRODUCT_CREATIVELABS_SBAUDIGY4:
 		return 1;
 	default:
 		return 0;
@@ -534,7 +536,13 @@ emuxki_attach(device_t parent, device_t 
 	aprint_normal_dev(self, "interrupting at %s\n", intrstr);
 
 	/* XXX it's unknown whether APS is made from Audigy as well */
-	if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_CREATIVELABS_AUDIGY) {
+	if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_CREATIVELABS_SBAUDIGY4) {
+		sc->sc_type = EMUXKI_AUDIGY;
+		sc->sc_type |= EMUXKI_AUDIGY2;
+		sc->sc_type |= EMUXKI_AUDIGY2_VALUE;
+		strlcpy(sc->sc_audv.name, "Audigy2 (value)",
+		sizeof(sc->sc_audv.name));
+	} else if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_CREATIVELABS_AUDIGY) {
 		sc->sc_type = EMUXKI_AUDIGY;
 		if (PCI_REVISION(pa->pa_class) == 0x04) {
 			sc->sc_type |= EMUXKI_AUDIGY2;
@@ -703,7 +711,27 @@ emuxki_init(struct emuxki_softc *sc)
 	emuxki_write(sc, 0, EMU_SPCS1, spcs);
 	emuxki_write(sc, 0, EMU_SPCS2, spcs);
 
-	if (sc->sc_type & EMUXKI_AUDIGY2) {
+	if (sc->sc_type & EMUXKI_AUDIGY2_VALUE) {
+		/* Setup SRCMulti_I2S SamplingRate */
+		emuxki_write(sc, 0, EMU_A2_SPDIF_SAMPLERATE,
+		emuxki_read(sc, 0, EMU_A2_SPDIF_SAMPLERATE) & 0xf1ff);
+
+		/* Setup SRCSel (Enable SPDIF, I2S SRCMulti) */
+		emuxki_writeptr(sc, EMU_A2_PTR, EMU_A2_DATA, EMU_A2_SRCSEL,
+		EMU_A2_SRCSEL_ENABLE_SPDIF | EMU_A2_SRCSEL_ENABLE_SRCMULTI);
+
+		/* Setup SRCMulti Input Audio Enable */
+		emuxki_writeptr(sc, EMU_A2_PTR, EMU_A2_DATA,
+		0x7b, 0xff00);
+
+		/* Setup SPDIF Out Audio Enable
+		 * The Audigy 2 Value has a separate SPDIF out,
+		 * so no need for a mixer switch */
+		emuxki_writeptr(sc, EMU_A2_PTR, EMU_A2_DATA,
+		0x7a, 0xff00);
+		emuxki_writeio_4(sc, EMU_A_IOCFG,
+		emuxki_readio_4(sc, EMU_A_IOCFG) & ~0x8); /* clear bit 3 */
+	} else if (sc->sc_type & EMUXKI_AUDIGY2) {
 		emuxki_write(sc, 0, EMU_A2_SPDIF_SAMPLERATE,
 		EMU_A2_SPDIF_UNKNOWN);
 
@@ -735,10 +763,12 @@ emuxki_init(struct emuxki_softc *sc)
 	EMU_INTE_VOLDECRENABLE |
 	EMU_INTE_MUTEENABLE);
 
-	if (sc->sc_type & EMUXKI_AUDIGY2) {
+	if (sc->sc_type & EMUXKI_AUDIGY2_VALUE) {
+		emuxki_writeio_4(sc, EMU_A_IOCFG,
+		0x0060 | emuxki_readio_4(sc, EMU_A_IOCFG));
+	} else if (sc->sc_type & EMUXKI_AUDIGY2) {
 		emuxki_writeio_4(sc, EMU_A_IOCFG,
-		emuxki_readio_4(sc, EMU_A_IOCFG) |
-		EMU_A_IOCFG_GPOUT0);
+		EMU_A_IOCFG_GPOUT0 | emuxki_readio_4(sc, EMU_A_IOCFG));
 	}
 
 	/* enable AUDIO bit */



CVS commit: src/sys/dev/pci

2022-08-29 Thread Pierre Pronchery
Module Name:src
Committed By:   khorben
Date:   Mon Aug 29 09:04:27 UTC 2022

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

Log Message:
emuxki(4): add support for the Sound Blaster Audigy Rx

This is as per kern/56980. Confirmed working on one out of two different
computers, albeit with a strong hissing noise (same card, different
mainboard). The mixer settings seem to be irrelevant or not supported
though.

Original support inspired by the Linux driver, and confirmed with the
OpenBSD driver, itself originally from NetBSD.

Tested on NetBSD/amd64.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/pci/emuxki.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/scsipi

2022-08-29 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Aug 29 07:32:46 UTC 2022

Modified Files:
src/sys/dev/scsipi: if_se.c

Log Message:
Make this build again.  Sorry about that.


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/dev/scsipi/if_se.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/scsipi/if_se.c
diff -u src/sys/dev/scsipi/if_se.c:1.117 src/sys/dev/scsipi/if_se.c:1.118
--- src/sys/dev/scsipi/if_se.c:1.117	Sun Aug 28 09:48:12 2022
+++ src/sys/dev/scsipi/if_se.c	Mon Aug 29 07:32:46 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_se.c,v 1.117 2022/08/28 09:48:12 skrll Exp $	*/
+/*	$NetBSD: if_se.c,v 1.118 2022/08/29 07:32:46 skrll Exp $	*/
 
 /*
  * Copyright (c) 1997 Ian W. Dall 
@@ -59,7 +59,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_se.c,v 1.117 2022/08/28 09:48:12 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_se.c,v 1.118 2022/08/29 07:32:46 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -207,7 +207,9 @@ static void	se_ifstart(struct ifnet *);
 
 static void	sedone(struct scsipi_xfer *, int);
 static int	se_ioctl(struct ifnet *, u_long, void *);
+#if 0
 static void	sewatchdog(struct ifnet *);
+#endif
 
 #if 0
 static inline uint16_t ether_cmp(void *, void *);
@@ -217,7 +219,9 @@ static void	se_recv_worker(struct work *
 static void	se_recv(struct se_softc *);
 static struct mbuf *se_get(struct se_softc *, char *, int);
 static int	se_read(struct se_softc *, char *, int);
+#if 0
 static void	se_reset(struct se_softc *);
+#endif
 static int	se_add_proto(struct se_softc *, int);
 static int	se_get_addr(struct se_softc *, uint8_t *);
 static int	se_set_media(struct se_softc *, int);
@@ -778,7 +782,6 @@ sewatchdog(struct ifnet *ifp)
 
 	se_reset(sc);
 }
-#endif
 
 static void
 se_reset(struct se_softc *sc)
@@ -794,6 +797,7 @@ se_reset(struct se_softc *sc)
 #endif
 	se_init(sc);
 }
+#endif
 
 static int
 se_add_proto(struct se_softc *sc, int proto)



CVS commit: src/sys/dev/scsipi

2022-08-29 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Aug 29 07:32:46 UTC 2022

Modified Files:
src/sys/dev/scsipi: if_se.c

Log Message:
Make this build again.  Sorry about that.


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/dev/scsipi/if_se.c

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