CVS commit: [netbsd-9] src/doc

2022-09-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 29 18:27:42 UTC 2022

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

Log Message:
Ticket #1534


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.20 -r1.1.2.21 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.20 src/doc/CHANGES-9.4:1.1.2.21
--- src/doc/CHANGES-9.4:1.1.2.20	Sat Sep 24 08:11:46 2022
+++ src/doc/CHANGES-9.4	Thu Sep 29 18:27:41 2022
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.20 2022/09/24 08:11:46 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.21 2022/09/29 18:27:41 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -292,3 +292,9 @@ sys/arch/arm/sunxi/sunxi_can.c			1.10,1.
 	receive overrun, and improve receive overrun recovery.
 	[bouyer, ticket #1533]
 
+sys/dev/pci/mfii.c1.28
+
+	mfii(4): Convert from pci_intr_map() to pci_intr_alloc(); makes
+	the driver use MSI/MSI-x when available.
+	[bouyer, ticket #1534]
+



CVS commit: [netbsd-9] src/doc

2022-09-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 29 18:27:42 UTC 2022

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

Log Message:
Ticket #1534


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.20 -r1.1.2.21 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/sys/dev/pci

2022-09-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 29 18:26:42 UTC 2022

Modified Files:
src/sys/dev/pci [netbsd-9]: mfii.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1534):

sys/dev/pci/mfii.c: revision 1.28

Convert from pci_intr_map() to pci_intr_alloc(); makes the driver use
MSI/MSI-x when available. Tested by Edgar Fu?.


To generate a diff of this commit:
cvs rdiff -u -r1.4.4.2 -r1.4.4.3 src/sys/dev/pci/mfii.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/mfii.c
diff -u src/sys/dev/pci/mfii.c:1.4.4.2 src/sys/dev/pci/mfii.c:1.4.4.3
--- src/sys/dev/pci/mfii.c:1.4.4.2	Fri Sep 16 18:27:38 2022
+++ src/sys/dev/pci/mfii.c	Thu Sep 29 18:26:42 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: mfii.c,v 1.4.4.2 2022/09/16 18:27:38 martin Exp $ */
+/* $NetBSD: mfii.c,v 1.4.4.3 2022/09/29 18:26:42 martin Exp $ */
 /* $OpenBSD: mfii.c,v 1.58 2018/08/14 05:22:21 jmatthew Exp $ */
 
 /*
@@ -19,7 +19,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mfii.c,v 1.4.4.2 2022/09/16 18:27:38 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mfii.c,v 1.4.4.3 2022/09/29 18:26:42 martin Exp $");
 
 #include "bio.h"
 
@@ -655,7 +655,7 @@ mfii_attach(device_t parent, device_t se
 	struct mfii_softc *sc = device_private(self);
 	struct pci_attach_args *pa = aux;
 	pcireg_t memtype;
-	pci_intr_handle_t ih;
+	pci_intr_handle_t *ihp;
 	char intrbuf[PCI_INTRSTR_LEN];
 	const char *intrstr;
 	u_int32_t status, scpad2, scpad3;
@@ -705,12 +705,12 @@ mfii_attach(device_t parent, device_t se
 	/* disable interrupts */
 	mfii_write(sc, MFI_OMSK, 0x);
 
-	if (pci_intr_map(pa, ) != 0) {
+	if (pci_intr_alloc(pa, , NULL, 0)) {
 		aprint_error(": unable to map interrupt\n");
 		goto pci_unmap;
 	}
-	intrstr = pci_intr_string(pa->pa_pc, ih, intrbuf, sizeof(intrbuf));
-	pci_intr_setattr(pa->pa_pc, , PCI_INTR_MPSAFE, true);
+	intrstr = pci_intr_string(pa->pa_pc, ihp[0], intrbuf, sizeof(intrbuf));
+	pci_intr_setattr(pa->pa_pc, [0], PCI_INTR_MPSAFE, true);
 
 	/* lets get started */
 	if (mfii_transition_firmware(sc))
@@ -819,7 +819,7 @@ mfii_attach(device_t parent, device_t se
 	aprint_normal("\n");
 	aprint_naive("\n");
 
-	sc->sc_ih = pci_intr_establish_xname(sc->sc_pc, ih, IPL_BIO,
+	sc->sc_ih = pci_intr_establish_xname(sc->sc_pc, ihp[0], IPL_BIO,
 	mfii_intr, sc, DEVNAME(sc));
 	if (sc->sc_ih == NULL) {
 		aprint_error_dev(self, "can't establish interrupt");



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

2022-09-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 29 18:26:42 UTC 2022

Modified Files:
src/sys/dev/pci [netbsd-9]: mfii.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1534):

sys/dev/pci/mfii.c: revision 1.28

Convert from pci_intr_map() to pci_intr_alloc(); makes the driver use
MSI/MSI-x when available. Tested by Edgar Fu?.


To generate a diff of this commit:
cvs rdiff -u -r1.4.4.2 -r1.4.4.3 src/sys/dev/pci/mfii.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-09-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Sep 24 08:11:46 UTC 2022

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

Log Message:
Ticket #1533


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.19 -r1.1.2.20 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.19 src/doc/CHANGES-9.4:1.1.2.20
--- src/doc/CHANGES-9.4:1.1.2.19	Fri Sep 23 10:07:36 2022
+++ src/doc/CHANGES-9.4	Sat Sep 24 08:11:46 2022
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.19 2022/09/23 10:07:36 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.20 2022/09/24 08:11:46 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -286,3 +286,9 @@ external/cddl/osnet/dist/uts/common/fs/z
 	-current in rev 1.73.
 	[dholland, ticket #1532]
 
+sys/arch/arm/sunxi/sunxi_can.c			1.10,1.11
+
+	Improve sunxican(4) RX interrupt handling to reduce the risk of
+	receive overrun, and improve receive overrun recovery.
+	[bouyer, ticket #1533]
+



CVS commit: [netbsd-9] src/doc

2022-09-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Sep 24 08:11:46 UTC 2022

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

Log Message:
Ticket #1533


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.19 -r1.1.2.20 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/sys/arch/arm/sunxi

2022-09-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Sep 24 08:10:26 UTC 2022

Modified Files:
src/sys/arch/arm/sunxi [netbsd-9]: sunxi_can.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1533):

sys/arch/arm/sunxi/sunxi_can.c: revision 1.10,1.11 (via patch)

Don't process RX if SUNXI_CAN_INT_DATA_OR is pending. Seems to fix occasional
RX stalls

Just skipping sunxi_can_rx_intr() if the DATA_OR flag is set isn't enough
to properly recover from overrrun in all case. So go the linux way and reset
the hardware.

Don't write SUNXI_CAN_INT_RX_FLAG to SUNXI_CAN_INT_REG, this could race
with hardware and clear the interrupt while there are new packets received.
SUNXI_CAN_INT_RX_FLAG clears automatically when all pending packets have been
read, so when no more packets are pending just read SUNXI_CAN_INT_REG again
and process other interrupts, if any (or RX if there are new packets pending).

With this change it seems I get overruns less often in my use case.


To generate a diff of this commit:
cvs rdiff -u -r1.1.8.1 -r1.1.8.2 src/sys/arch/arm/sunxi/sunxi_can.c

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

Modified files:

Index: src/sys/arch/arm/sunxi/sunxi_can.c
diff -u src/sys/arch/arm/sunxi/sunxi_can.c:1.1.8.1 src/sys/arch/arm/sunxi/sunxi_can.c:1.1.8.2
--- src/sys/arch/arm/sunxi/sunxi_can.c:1.1.8.1	Wed Oct 23 19:43:25 2019
+++ src/sys/arch/arm/sunxi/sunxi_can.c	Sat Sep 24 08:10:26 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: sunxi_can.c,v 1.1.8.1 2019/10/23 19:43:25 martin Exp $	*/
+/*	$NetBSD: sunxi_can.c,v 1.1.8.2 2022/09/24 08:10:26 martin Exp $	*/
 
 /*-
  * Copyright (c) 2017,2018 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: sunxi_can.c,v 1.1.8.1 2019/10/23 19:43:25 martin Exp $");
+__KERNEL_RCSID(1, "$NetBSD: sunxi_can.c,v 1.1.8.2 2022/09/24 08:10:26 martin Exp $");
 
 #include 
 #include 
@@ -101,6 +101,8 @@ static void sunxi_can_ifwatchdog(struct 
 
 static void sunxi_can_enter_reset(struct sunxi_can_softc *);
 static void sunxi_can_exit_reset(struct sunxi_can_softc *);
+static void sunxi_can_ifdown(struct sunxi_can_softc * const);
+static int sunxi_can_ifup(struct sunxi_can_softc * const);
 
 CFATTACH_DECL_NEW(sunxi_can, sizeof(struct sunxi_can_softc),
 	sunxi_can_match, sunxi_can_attach, NULL, NULL);
@@ -347,7 +349,9 @@ sunxi_can_err_intr(struct sunxi_can_soft
 
 	if (irq & SUNXI_CAN_INT_DATA_OR) {
 		ifp->if_ierrors++;
+		sunxi_can_ifdown(sc);
 		sunxi_can_write(sc, SUNXI_CAN_CMD_REG, SUNXI_CAN_CMD_CLR_OR);
+		sunxi_can_ifup(sc);
 	}
 	if (irq & SUNXI_CAN_INT_ERR) {
 		reg = sunxi_can_read(sc, SUNXI_CAN_REC_REG);
@@ -386,21 +390,31 @@ sunxi_can_intr(void *arg)
 	while ((irq = sunxi_can_read(sc, SUNXI_CAN_INT_REG)) != 0) {
 		uint32_t sts = sunxi_can_read(sc, SUNXI_CAN_STA_REG);
 		rv = 1;
+rnd_add_uint32(>sc_rnd_source, irq);
 
-		if (irq & SUNXI_CAN_INT_TX_FLAG) {
-			sunxi_can_tx_intr(sc);
-		}
-		if (irq & SUNXI_CAN_INT_RX_FLAG) {
+		if ((irq & (SUNXI_CAN_INT_RX_FLAG | SUNXI_CAN_INT_DATA_OR)) ==
+		SUNXI_CAN_INT_RX_FLAG) {
 			while (sts & SUNXI_CAN_STA_RX_RDY) {
 sunxi_can_rx_intr(sc);
 sts = sunxi_can_read(sc, SUNXI_CAN_STA_REG);
 			}
+			/*
+			 * Don't write SUNXI_CAN_INT_RX_FLAG to the interrupt
+			 * register, this may clear the RX pending flag
+			 * while there is indeed a packet pending.
+			 * Reading packets should have cleared the RX interrupt,
+			 * so just restart the loop and re-read the interrupt
+			 * register. In the common case irq will now be 0.
+			 */
+			continue;
+		}
+		if (irq & SUNXI_CAN_INT_TX_FLAG) {
+			sunxi_can_tx_intr(sc);
 		}
 		if (irq & SUNXI_CAN_INT_ALLERRS) {
 			sunxi_can_err_intr(sc, irq, sts);
 		}
 		sunxi_can_write(sc, SUNXI_CAN_INT_REG, irq);
-rnd_add_uint32(>sc_rnd_source, irq);
 
 	}
 	mutex_exit(>sc_intr_lock);



CVS commit: [netbsd-9] src/sys/arch/arm/sunxi

2022-09-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Sep 24 08:10:26 UTC 2022

Modified Files:
src/sys/arch/arm/sunxi [netbsd-9]: sunxi_can.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1533):

sys/arch/arm/sunxi/sunxi_can.c: revision 1.10,1.11 (via patch)

Don't process RX if SUNXI_CAN_INT_DATA_OR is pending. Seems to fix occasional
RX stalls

Just skipping sunxi_can_rx_intr() if the DATA_OR flag is set isn't enough
to properly recover from overrrun in all case. So go the linux way and reset
the hardware.

Don't write SUNXI_CAN_INT_RX_FLAG to SUNXI_CAN_INT_REG, this could race
with hardware and clear the interrupt while there are new packets received.
SUNXI_CAN_INT_RX_FLAG clears automatically when all pending packets have been
read, so when no more packets are pending just read SUNXI_CAN_INT_REG again
and process other interrupts, if any (or RX if there are new packets pending).

With this change it seems I get overruns less often in my use case.


To generate a diff of this commit:
cvs rdiff -u -r1.1.8.1 -r1.1.8.2 src/sys/arch/arm/sunxi/sunxi_can.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-09-23 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep 23 10:07:36 UTC 2022

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

Log Message:
Ticket #1532


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.18 -r1.1.2.19 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.18 src/doc/CHANGES-9.4:1.1.2.19
--- src/doc/CHANGES-9.4:1.1.2.18	Sun Sep 18 13:37:42 2022
+++ src/doc/CHANGES-9.4	Fri Sep 23 10:07:36 2022
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.18 2022/09/18 13:37:42 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.19 2022/09/23 10:07:36 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -279,3 +279,10 @@ sys/crypto/nist_hash_drbg/nist_hash_drbg
 	Fix negative-length variable-length array.
 	[msaitoh, ticket #1530]
 
+external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c	(apply patch)
+
+	Fix mounting of wapbl volumes when the block device node is on
+	a zfs volume. Fixed differently as part of a bigger change in
+	-current in rev 1.73.
+	[dholland, ticket #1532]
+



CVS commit: [netbsd-9] src/doc

2022-09-23 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep 23 10:07:36 UTC 2022

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

Log Message:
Ticket #1532


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.18 -r1.1.2.19 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/cddl/osnet/dist/uts/common/fs/zfs

2022-09-23 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep 23 10:05:13 UTC 2022

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs [netbsd-9]: zfs_vnops.c

Log Message:
Apply patch, requested by dholland in ticket #1532:

external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c  (apply patch)

Fix mounting of wapbl volumes when the block device node is on a zfs volume.
Fixed differently as part of a bigger change in -current in rev 1.73.


To generate a diff of this commit:
cvs rdiff -u -r1.50.2.10 -r1.50.2.11 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_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/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.50.2.10 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.50.2.11
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.50.2.10	Tue Jul  6 04:22:34 2021
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c	Fri Sep 23 10:05:13 2022
@@ -6394,6 +6394,7 @@ const struct vnodeopv_entry_desc zfs_spe
 	{ _bwrite_desc,		spec_bwrite },
 	{ _print_desc,		zfs_netbsd_print },
 	{ _fcntl_desc,		zfs_netbsd_fcntl },
+	{ _bmap_desc,		spec_bmap },
 	{ NULL, NULL }
 };
 



CVS commit: [netbsd-9] src/external/cddl/osnet/dist/uts/common/fs/zfs

2022-09-23 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep 23 10:05:13 UTC 2022

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs [netbsd-9]: zfs_vnops.c

Log Message:
Apply patch, requested by dholland in ticket #1532:

external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c  (apply patch)

Fix mounting of wapbl volumes when the block device node is on a zfs volume.
Fixed differently as part of a bigger change in -current in rev 1.73.


To generate a diff of this commit:
cvs rdiff -u -r1.50.2.10 -r1.50.2.11 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_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/doc

2022-09-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 18 13:37:42 UTC 2022

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

Log Message:
Tickets #1527 - #1530


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.17 -r1.1.2.18 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.17 src/doc/CHANGES-9.4:1.1.2.18
--- src/doc/CHANGES-9.4:1.1.2.17	Sun Sep 18 00:12:43 2022
+++ src/doc/CHANGES-9.4	Sun Sep 18 13:37:42 2022
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.17 2022/09/18 00:12:43 msaitoh Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.18 2022/09/18 13:37:42 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -258,3 +258,24 @@ libexec/ld.elf_so/arch/powerpc/ppc_reloc
 	Fix copy & pasto: DTPREL relocations do not need to allocate a static
 	TLS index.
 	[martin, ticket #1531]
+
+sys/external/bsd/acpica/dist/dispatcher/dswexec.c 1.2
+
+	Fix out of range access in AcpiDsExecEndOp().
+	[msaitoh, ticket #1527]
+
+sys/dev/usb/if_ure.c1.58 (via patch)
+
+	ure(4): use unsigned to avoid undefined behavior in ure_uno_mcast().
+	[msaitoh, ticket #1528]
+
+sys/dev/usb/usb.h1.121
+
+	Cast to uint32_t to avoid undefined behavior in UGETDW().
+	[msaitoh, ticket #1529]
+
+sys/crypto/nist_hash_drbg/nist_hash_drbg.c	1.2,1.3
+
+	Fix negative-length variable-length array.
+	[msaitoh, ticket #1530]
+



CVS commit: [netbsd-9] src/doc

2022-09-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 18 13:37:42 UTC 2022

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

Log Message:
Tickets #1527 - #1530


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.17 -r1.1.2.18 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/sys/crypto/nist_hash_drbg

2022-09-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 18 13:36:29 UTC 2022

Modified Files:
src/sys/crypto/nist_hash_drbg [netbsd-9]: nist_hash_drbg.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1530):

sys/crypto/nist_hash_drbg/nist_hash_drbg.c: revision 1.2
sys/crypto/nist_hash_drbg/nist_hash_drbg.c: revision 1.3

Use CTASSERT where possible, run-time assertion where not.

Should fix negative-length variable-length array found by kamil.

Use an explicit run-time assertion where compile-time doesn't work.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 \
src/sys/crypto/nist_hash_drbg/nist_hash_drbg.c

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

Modified files:

Index: src/sys/crypto/nist_hash_drbg/nist_hash_drbg.c
diff -u src/sys/crypto/nist_hash_drbg/nist_hash_drbg.c:1.1.2.2 src/sys/crypto/nist_hash_drbg/nist_hash_drbg.c:1.1.2.3
--- src/sys/crypto/nist_hash_drbg/nist_hash_drbg.c:1.1.2.2	Tue Sep  3 07:47:59 2019
+++ src/sys/crypto/nist_hash_drbg/nist_hash_drbg.c	Sun Sep 18 13:36:29 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: nist_hash_drbg.c,v 1.1.2.2 2019/09/03 07:47:59 martin Exp $	*/
+/*	$NetBSD: nist_hash_drbg.c,v 1.1.2.3 2022/09/18 13:36:29 martin Exp $	*/
 
 /*-
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -49,7 +49,7 @@
 
 #ifdef _KERNEL
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nist_hash_drbg.c,v 1.1.2.2 2019/09/03 07:47:59 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nist_hash_drbg.c,v 1.1.2.3 2022/09/18 13:36:29 martin Exp $");
 #endif
 
 #include 
@@ -1087,7 +1087,9 @@ nist_hash_drbg_initialize(void)
 			kat[i].reseed ? 0 : kat[i].additional[0]->hv_len);
 			reseed_counter++;
 			CHECK(i, "V[1]", D->V, kat[i].V[1], SEEDLEN_BYTES);
-			CHECK(i, "rnd_val[0]", rnd_val, kat[i].rnd_val[0],
+			ASSERT(sizeof(kat[i].rnd_val[0]) - trunc <=
+			sizeof rnd_val);
+			check(i, "rnd_val[0]", rnd_val, kat[i].rnd_val[0],
 			sizeof(kat[i].rnd_val[0]) - trunc);
 			if (D->reseed_counter != reseed_counter) {
 DPRINTF("bad reseed counter: %u, expected %u",
@@ -1109,7 +,9 @@ nist_hash_drbg_initialize(void)
 			kat[i].reseed ? 0 : kat[i].additional[1]->hv_len);
 			reseed_counter++;
 			CHECK(i, "V[2]", D->V, kat[i].V[2], SEEDLEN_BYTES);
-			CHECK(i, "rnd_val[1]", rnd_val, kat[i].rnd_val[1],
+			ASSERT(sizeof(kat[i].rnd_val[1]) - trunc <=
+			sizeof rnd_val);
+			check(i, "rnd_val[1]", rnd_val, kat[i].rnd_val[1],
 			sizeof(kat[i].rnd_val[1]) - trunc);
 			if (D->reseed_counter != reseed_counter) {
 DPRINTF("bad reseed counter: %u, expected %u",



CVS commit: [netbsd-9] src/sys/crypto/nist_hash_drbg

2022-09-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 18 13:36:29 UTC 2022

Modified Files:
src/sys/crypto/nist_hash_drbg [netbsd-9]: nist_hash_drbg.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1530):

sys/crypto/nist_hash_drbg/nist_hash_drbg.c: revision 1.2
sys/crypto/nist_hash_drbg/nist_hash_drbg.c: revision 1.3

Use CTASSERT where possible, run-time assertion where not.

Should fix negative-length variable-length array found by kamil.

Use an explicit run-time assertion where compile-time doesn't work.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 \
src/sys/crypto/nist_hash_drbg/nist_hash_drbg.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/usb

2022-09-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 18 13:34:07 UTC 2022

Modified Files:
src/sys/dev/usb [netbsd-9]: usb.h

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1529):

sys/dev/usb/usb.h: revision 1.121

Cast to uint32_t to avoid undefined behavior in UGETDW(). Found by kUBSan.


To generate a diff of this commit:
cvs rdiff -u -r1.116.6.1 -r1.116.6.2 src/sys/dev/usb/usb.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/usb/usb.h
diff -u src/sys/dev/usb/usb.h:1.116.6.1 src/sys/dev/usb/usb.h:1.116.6.2
--- src/sys/dev/usb/usb.h:1.116.6.1	Sun Sep  1 13:00:37 2019
+++ src/sys/dev/usb/usb.h	Sun Sep 18 13:34:06 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: usb.h,v 1.116.6.1 2019/09/01 13:00:37 martin Exp $	*/
+/*	$NetBSD: usb.h,v 1.116.6.2 2022/09/18 13:34:06 martin Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -78,7 +78,8 @@ typedef uint8_t uDWord[4];
 #define UGETW(w) ((w)[0] | ((w)[1] << 8))
 #define USETW(w,v) ((w)[0] = (uint8_t)(v), (w)[1] = (uint8_t)((v) >> 8))
 #define USETWD(val) { (uint8_t)(val), (uint8_t)((val) >> 8) }
-#define UGETDW(w) ((w)[0] | ((w)[1] << 8) | ((w)[2] << 16) | ((w)[3] << 24))
+#define UGETDW(w) ((w)[0] | ((w)[1] << 8) | ((w)[2] << 16) |	\
+	((uint32_t)(w)[3] << 24))
 #define USETDW(w,v) ((w)[0] = (uint8_t)(v), \
 		 (w)[1] = (uint8_t)((v) >> 8), \
 		 (w)[2] = (uint8_t)((v) >> 16), \



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

2022-09-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 18 13:34:07 UTC 2022

Modified Files:
src/sys/dev/usb [netbsd-9]: usb.h

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1529):

sys/dev/usb/usb.h: revision 1.121

Cast to uint32_t to avoid undefined behavior in UGETDW(). Found by kUBSan.


To generate a diff of this commit:
cvs rdiff -u -r1.116.6.1 -r1.116.6.2 src/sys/dev/usb/usb.h

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/usb

2022-09-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 18 13:32:27 UTC 2022

Modified Files:
src/sys/dev/usb [netbsd-9]: if_ure.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1528):

sys/dev/usb/if_ure.c: revision 1.58 (via patch)

Use unsigned to avoid undefined behavior in ure_uno_mcast(). Found by kUBSan.


To generate a diff of this commit:
cvs rdiff -u -r1.14.2.2 -r1.14.2.3 src/sys/dev/usb/if_ure.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/usb/if_ure.c
diff -u src/sys/dev/usb/if_ure.c:1.14.2.2 src/sys/dev/usb/if_ure.c:1.14.2.3
--- src/sys/dev/usb/if_ure.c:1.14.2.2	Thu Oct 17 18:53:25 2019
+++ src/sys/dev/usb/if_ure.c	Sun Sep 18 13:32:27 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ure.c,v 1.14.2.2 2019/10/17 18:53:25 martin Exp $	*/
+/*	$NetBSD: if_ure.c,v 1.14.2.3 2022/09/18 13:32:27 martin Exp $	*/
 /*	$OpenBSD: if_ure.c,v 1.10 2018/11/02 21:32:30 jcs Exp $	*/
 
 /*-
@@ -30,7 +30,7 @@
 /* RealTek RTL8152/RTL8153 10/100/Gigabit USB Ethernet device */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ure.c,v 1.14.2.2 2019/10/17 18:53:25 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ure.c,v 1.14.2.3 2022/09/18 13:32:27 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -381,7 +381,7 @@ allmulti:	
 			hash = ether_crc32_be(enm->enm_addrlo, ETHER_ADDR_LEN)
 			>> 26;
 			if (hash < 32)
-hashes[0] |= (1 << hash);
+hashes[0] |= (1U << hash);
 			else
 hashes[1] |= (1 << (hash - 32));
 



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

2022-09-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 18 13:32:27 UTC 2022

Modified Files:
src/sys/dev/usb [netbsd-9]: if_ure.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1528):

sys/dev/usb/if_ure.c: revision 1.58 (via patch)

Use unsigned to avoid undefined behavior in ure_uno_mcast(). Found by kUBSan.


To generate a diff of this commit:
cvs rdiff -u -r1.14.2.2 -r1.14.2.3 src/sys/dev/usb/if_ure.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/external/bsd/acpica/dist/dispatcher

2022-09-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 18 13:28:49 UTC 2022

Modified Files:
src/sys/external/bsd/acpica/dist/dispatcher [netbsd-9]: dswexec.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1527):

sys/external/bsd/acpica/dist/dispatcher/dswexec.c: revision 1.2

Fix out of range access in AcpiDsExecEndOp().

 - Found by kUBSan.
 - See: https://github.com/acpica/acpica/pull/745


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.12 -r1.1.1.12.2.1 \
src/sys/external/bsd/acpica/dist/dispatcher/dswexec.c

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

Modified files:

Index: src/sys/external/bsd/acpica/dist/dispatcher/dswexec.c
diff -u src/sys/external/bsd/acpica/dist/dispatcher/dswexec.c:1.1.1.12 src/sys/external/bsd/acpica/dist/dispatcher/dswexec.c:1.1.1.12.2.1
--- src/sys/external/bsd/acpica/dist/dispatcher/dswexec.c:1.1.1.12	Mon Apr 29 00:29:54 2019
+++ src/sys/external/bsd/acpica/dist/dispatcher/dswexec.c	Sun Sep 18 13:28:49 2022
@@ -456,9 +456,11 @@ AcpiDsExecEndOp (
 
 /*
  * All opcodes require operand resolution, with the only exceptions
- * being the ObjectType and SizeOf operators.
+ * being the ObjectType and SizeOf operators as well as operands that
+	 * take no arguments.
  */
-if (!(WalkState->OpInfo->Flags & AML_NO_OPERAND_RESOLVE))
+if (!(WalkState->OpInfo->Flags & AML_NO_OPERAND_RESOLVE) &&
+	(WalkState->OpInfo->Flags & AML_HAS_ARGS))
 {
 /* Resolve all operands */
 



CVS commit: [netbsd-9] src/sys/external/bsd/acpica/dist/dispatcher

2022-09-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 18 13:28:49 UTC 2022

Modified Files:
src/sys/external/bsd/acpica/dist/dispatcher [netbsd-9]: dswexec.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1527):

sys/external/bsd/acpica/dist/dispatcher/dswexec.c: revision 1.2

Fix out of range access in AcpiDsExecEndOp().

 - Found by kUBSan.
 - See: https://github.com/acpica/acpica/pull/745


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.12 -r1.1.1.12.2.1 \
src/sys/external/bsd/acpica/dist/dispatcher/dswexec.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-09-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Sep 18 00:12:43 UTC 2022

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

Log Message:
Ticket #1531.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.16 -r1.1.2.17 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.16 src/doc/CHANGES-9.4:1.1.2.17
--- src/doc/CHANGES-9.4:1.1.2.16	Fri Sep 16 18:37:48 2022
+++ src/doc/CHANGES-9.4	Sun Sep 18 00:12:43 2022
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.16 2022/09/16 18:37:48 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.17 2022/09/18 00:12:43 msaitoh Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -253,3 +253,8 @@ sys/arch/x86/x86/procfs_machdep.c		1.45
 	and amx_int8.
 	[msaitoh, ticket #1526]
 
+libexec/ld.elf_so/arch/powerpc/ppc_reloc.c	1.62
+
+	Fix copy & pasto: DTPREL relocations do not need to allocate a static
+	TLS index.
+	[martin, ticket #1531]



CVS commit: [netbsd-9] src/doc

2022-09-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Sep 18 00:12:43 UTC 2022

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

Log Message:
Ticket #1531.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.16 -r1.1.2.17 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/libexec/ld.elf_so/arch/powerpc

2022-09-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Sep 18 00:09:52 UTC 2022

Modified Files:
src/libexec/ld.elf_so/arch/powerpc [netbsd-9]: ppc_reloc.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #1531):
libexec/ld.elf_so/arch/powerpc/ppc_reloc.c: revision 1.62
Fix copy & pasto: DTPREL relocations do not need to allocate a static
TLS index. Patch from joerg@


To generate a diff of this commit:
cvs rdiff -u -r1.58.2.1 -r1.58.2.2 \
src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.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/ld.elf_so/arch/powerpc/ppc_reloc.c
diff -u src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c:1.58.2.1 src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c:1.58.2.2
--- src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c:1.58.2.1	Mon Dec  9 16:14:10 2019
+++ src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c	Sun Sep 18 00:09:52 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: ppc_reloc.c,v 1.58.2.1 2019/12/09 16:14:10 martin Exp $	*/
+/*	$NetBSD: ppc_reloc.c,v 1.58.2.2 2022/09/18 00:09:52 msaitoh Exp $	*/
 
 /*-
  * Copyright (C) 1998	Tsubai Masanari
@@ -30,7 +30,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: ppc_reloc.c,v 1.58.2.1 2019/12/09 16:14:10 martin Exp $");
+__RCSID("$NetBSD: ppc_reloc.c,v 1.58.2.2 2022/09/18 00:09:52 msaitoh Exp $");
 #endif /* not lint */
 
 #include 
@@ -311,9 +311,6 @@ _rtld_relocate_nonplt_objects(Obj_Entry 
 			break;
 
 		case R_TYPE(DTPREL):
-			if (!defobj->tls_done && _rtld_tls_offset_allocate(obj))
-return -1;
-
 			*where = (Elf_Addr)(def->st_value + rela->r_addend
 			- TLS_DTV_OFFSET);
 			rdbg(("DTPREL32 %s in %s --> %p in %s",



CVS commit: [netbsd-9] src/libexec/ld.elf_so/arch/powerpc

2022-09-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Sep 18 00:09:52 UTC 2022

Modified Files:
src/libexec/ld.elf_so/arch/powerpc [netbsd-9]: ppc_reloc.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #1531):
libexec/ld.elf_so/arch/powerpc/ppc_reloc.c: revision 1.62
Fix copy & pasto: DTPREL relocations do not need to allocate a static
TLS index. Patch from joerg@


To generate a diff of this commit:
cvs rdiff -u -r1.58.2.1 -r1.58.2.2 \
src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.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-09-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep 16 18:37:48 UTC 2022

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

Log Message:
Tickets #1524 - #1526


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.15 -r1.1.2.16 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.15 src/doc/CHANGES-9.4:1.1.2.16
--- src/doc/CHANGES-9.4:1.1.2.15	Mon Sep 12 17:12:39 2022
+++ src/doc/CHANGES-9.4	Fri Sep 16 18:37:48 2022
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.15 2022/09/12 17:12:39 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.16 2022/09/16 18:37:48 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -230,3 +230,26 @@ usr.bin/ftp/version.h   
 	ftp(1): PR 57003: Support relative redirects.
 	[christos, #1523]
 
+sys/dev/ic/mfireg.h1.22
+sys/dev/pci/mfii.c1.16-1.22,1.27 via patch
+share/man/man4/mfii.41.3 via patch
+
+	- Fix wrong access in mfii_start().
+	- Add SAS3216,SAS3224,SAS3316 and SAS3324 support.
+	- Add CVPM02 BBU support.
+	- Use bus_space_write_8() if available.
+	- Don't panic on detach if no any sensor device.
+	- Add comment. Sort entries. KNF.
+	[msaitoh, #1524]
+
+sys/dev/usb/xhci.c1.154
+
+	Accept USB 3.2 in xhci_id_protocols().
+	[msaitoh, ticket #1525]
+
+sys/arch/x86/x86/procfs_machdep.c		1.45
+
+	procfs: on x86 add tdx_guest, brs, hfi, ibt, amx_bf16, amx_tile
+	and amx_int8.
+	[msaitoh, ticket #1526]
+



CVS commit: [netbsd-9] src/doc

2022-09-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep 16 18:37:48 UTC 2022

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

Log Message:
Tickets #1524 - #1526


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.15 -r1.1.2.16 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/sys/arch/x86/x86

2022-09-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep 16 18:36:43 UTC 2022

Modified Files:
src/sys/arch/x86/x86 [netbsd-9]: procfs_machdep.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1526):

sys/arch/x86/x86/procfs_machdep.c: revision 1.45

Add tdx_guest, brs, hfi, ibt, amx_bf16, amx_tile and amx_int8.


To generate a diff of this commit:
cvs rdiff -u -r1.33.2.5 -r1.33.2.6 src/sys/arch/x86/x86/procfs_machdep.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/x86/x86/procfs_machdep.c
diff -u src/sys/arch/x86/x86/procfs_machdep.c:1.33.2.5 src/sys/arch/x86/x86/procfs_machdep.c:1.33.2.6
--- src/sys/arch/x86/x86/procfs_machdep.c:1.33.2.5	Mon Jan 31 17:54:59 2022
+++ src/sys/arch/x86/x86/procfs_machdep.c	Fri Sep 16 18:36:43 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: procfs_machdep.c,v 1.33.2.5 2022/01/31 17:54:59 martin Exp $ */
+/*	$NetBSD: procfs_machdep.c,v 1.33.2.6 2022/09/16 18:36:43 martin Exp $ */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.33.2.5 2022/01/31 17:54:59 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.33.2.6 2022/09/16 18:36:43 martin Exp $");
 
 #include 
 #include 
@@ -122,7 +122,7 @@ static const char * const x86_features[]
 	{ /* (8) Linux mapping */
 	"tpr_shadow", "vnmi", "flexpriority", "ept", "vpid", NULL, NULL, NULL,
 	NULL, NULL, NULL, NULL, NULL, NULL, NULL, "vmmcall",
-	NULL, "ept_ad", NULL, NULL, NULL, NULL, NULL, NULL,
+	NULL, "ept_ad", NULL, NULL, NULL, NULL, "tdx_guest", NULL,
 	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL},
 
 	{ /* (9) Intel-defined: 0007 ebx */
@@ -157,13 +157,13 @@ static const char * const x86_features[]
 	"clzero", "irperf", "xsaveerptr", NULL, "rdpru", NULL, NULL, NULL,
 	NULL, "wbnoinvd", NULL, NULL, NULL, NULL, NULL, NULL,
 	NULL, NULL, NULL, NULL, NULL, NULL, NULL, "ppin",
-	NULL, "virt_ssbd", NULL, "cppc", NULL, NULL, NULL, NULL},
+	NULL, "virt_ssbd", NULL, "cppc", NULL, NULL, NULL, "brs"},
 
 	{ /* (14) 0x0006 eax */
 	"dtherm", "ida", "arat", NULL, "pln", NULL, "pts", "hwp",
 	"hwp_notify", "hwp_act_window", "hwp_epp","hwp_pkg_req",
 	NULL, NULL, NULL, NULL,
-	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+	NULL, NULL, NULL, "hfi", NULL, NULL, NULL, NULL,
 	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL},
 
 	{ /* (15) AMD 0x800a edx */
@@ -193,8 +193,8 @@ static const char * const x86_features[]
 	NULL, NULL, "avx512_4vnniw", "avx512_4fmaps", "fsrm", NULL, NULL, NULL,
 	"vp2intersect", NULL, "md_clear", NULL, NULL, NULL, "serialize", NULL,
 	"tsxldtrk", NULL, "pconfig", "arch_lbr",
-	NULL, NULL, NULL, "avx512_fp16",
-	NULL, NULL, NULL, NULL,
+	"ibt", NULL, "amx_bf16", "avx512_fp16",
+	"amx_tile", "amx_int8", NULL, NULL,
 	"flush_l1d", "arch_capabilities", NULL, "ssbd"},
 
 	{ /* (19) AMD 0x801f eax */



CVS commit: [netbsd-9] src/sys/arch/x86/x86

2022-09-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep 16 18:36:43 UTC 2022

Modified Files:
src/sys/arch/x86/x86 [netbsd-9]: procfs_machdep.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1526):

sys/arch/x86/x86/procfs_machdep.c: revision 1.45

Add tdx_guest, brs, hfi, ibt, amx_bf16, amx_tile and amx_int8.


To generate a diff of this commit:
cvs rdiff -u -r1.33.2.5 -r1.33.2.6 src/sys/arch/x86/x86/procfs_machdep.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/usb

2022-09-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep 16 18:32:49 UTC 2022

Modified Files:
src/sys/dev/usb [netbsd-9]: xhci.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1525):

sys/dev/usb/xhci.c: revision 1.154

Accept USB 3.2 in xhci_id_protocols().


To generate a diff of this commit:
cvs rdiff -u -r1.107.2.9 -r1.107.2.10 src/sys/dev/usb/xhci.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/usb/xhci.c
diff -u src/sys/dev/usb/xhci.c:1.107.2.9 src/sys/dev/usb/xhci.c:1.107.2.10
--- src/sys/dev/usb/xhci.c:1.107.2.9	Tue Jun 22 05:10:50 2021
+++ src/sys/dev/usb/xhci.c	Fri Sep 16 18:32:49 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: xhci.c,v 1.107.2.9 2021/06/22 05:10:50 martin Exp $	*/
+/*	$NetBSD: xhci.c,v 1.107.2.10 2022/09/16 18:32:49 martin Exp $	*/
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.107.2.9 2021/06/22 05:10:50 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.107.2.10 2022/09/16 18:32:49 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -1175,6 +1175,7 @@ xhci_id_protocols(struct xhci_softc *sc,
 	case 0x0300:
 	case 0x0301:
 	case 0x0310:
+	case 0x0320:
 		aprint_debug_dev(sc->sc_dev, " %s ports %d - %d\n",
 		major == 3 ? "ss" : "hs", cpo, cpo + cpc -1);
 		break;



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

2022-09-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep 16 18:32:49 UTC 2022

Modified Files:
src/sys/dev/usb [netbsd-9]: xhci.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1525):

sys/dev/usb/xhci.c: revision 1.154

Accept USB 3.2 in xhci_id_protocols().


To generate a diff of this commit:
cvs rdiff -u -r1.107.2.9 -r1.107.2.10 src/sys/dev/usb/xhci.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

2022-09-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep 16 18:27:38 UTC 2022

Modified Files:
src/share/man/man4 [netbsd-9]: mfii.4
src/sys/dev/ic [netbsd-9]: mfireg.h
src/sys/dev/pci [netbsd-9]: mfii.c

Log Message:
Pull up the following, requested by msaitoh in ticket #1524:

sys/dev/ic/mfireg.h 1.22
sys/dev/pci/mfii.c  1.16-1.22,1.27 via patch
share/man/man4/mfii.4   1.3 via patch

- Fix wrong access in mfii_start().
- Add SAS3216,SAS3224,SAS3316 and SAS3324 support.
- Add CVPM02 BBU support.
- Use bus_space_write_8() if available.
- Don't panic on detach if no any sensor device.
- Add comment. Sort entries. KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.8.1 src/share/man/man4/mfii.4
cvs rdiff -u -r1.9.4.1 -r1.9.4.2 src/sys/dev/ic/mfireg.h
cvs rdiff -u -r1.4.4.1 -r1.4.4.2 src/sys/dev/pci/mfii.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

2022-09-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep 16 18:27:38 UTC 2022

Modified Files:
src/share/man/man4 [netbsd-9]: mfii.4
src/sys/dev/ic [netbsd-9]: mfireg.h
src/sys/dev/pci [netbsd-9]: mfii.c

Log Message:
Pull up the following, requested by msaitoh in ticket #1524:

sys/dev/ic/mfireg.h 1.22
sys/dev/pci/mfii.c  1.16-1.22,1.27 via patch
share/man/man4/mfii.4   1.3 via patch

- Fix wrong access in mfii_start().
- Add SAS3216,SAS3224,SAS3316 and SAS3324 support.
- Add CVPM02 BBU support.
- Use bus_space_write_8() if available.
- Don't panic on detach if no any sensor device.
- Add comment. Sort entries. KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.8.1 src/share/man/man4/mfii.4
cvs rdiff -u -r1.9.4.1 -r1.9.4.2 src/sys/dev/ic/mfireg.h
cvs rdiff -u -r1.4.4.1 -r1.4.4.2 src/sys/dev/pci/mfii.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/man4/mfii.4
diff -u src/share/man/man4/mfii.4:1.2 src/share/man/man4/mfii.4:1.2.8.1
--- src/share/man/man4/mfii.4:1.2	Sat Nov 24 20:31:29 2018
+++ src/share/man/man4/mfii.4	Fri Sep 16 18:27:38 2022
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mfii.4,v 1.2 2018/11/24 20:31:29 wiz Exp $
+.\"	$NetBSD: mfii.4,v 1.2.8.1 2022/09/16 18:27:38 martin Exp $
 .\"	$OpenBSD: mfii.4,v 1.7 2018/03/27 07:01:42 jsg Exp $
 .\"
 .\" Copyright (c) 2012 David Gwynne 
@@ -15,7 +15,7 @@
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd March 27, 2018
+.Dd July 16, 2022
 .Dt MFII 4
 .Os
 .Sh NAME
@@ -37,6 +37,14 @@ SAS3008
 .It
 SAS3108
 .It
+SAS3216
+.It
+SAS3224
+.It
+SAS3316
+.It
+SAS3324
+.It
 SAS3404
 .It
 SAS3408

Index: src/sys/dev/ic/mfireg.h
diff -u src/sys/dev/ic/mfireg.h:1.9.4.1 src/sys/dev/ic/mfireg.h:1.9.4.2
--- src/sys/dev/ic/mfireg.h:1.9.4.1	Tue May 17 10:29:47 2022
+++ src/sys/dev/ic/mfireg.h	Fri Sep 16 18:27:38 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: mfireg.h,v 1.9.4.1 2022/05/17 10:29:47 bouyer Exp $ */
+/* $NetBSD: mfireg.h,v 1.9.4.2 2022/09/16 18:27:38 martin Exp $ */
 /* $OpenBSD: mfireg.h,v 1.24 2006/06/19 19:05:45 marco Exp $ */
 /*
  * Copyright (c) 2006 Marco Peereboom 
@@ -1268,6 +1268,7 @@ struct mfi_bbu_status {
 #define MFI_BBU_TYPE_IBBU	1
 #define MFI_BBU_TYPE_BBU	2
 #define MFI_BBU_TYPE_IBBU09	5
+#define MFI_BBU_TYPE_CVPM02	6
 	uint8_t			reserved;
 	uint16_t		voltage; /* mV */
 	int16_t			current; /* mA */

Index: src/sys/dev/pci/mfii.c
diff -u src/sys/dev/pci/mfii.c:1.4.4.1 src/sys/dev/pci/mfii.c:1.4.4.2
--- src/sys/dev/pci/mfii.c:1.4.4.1	Tue May 17 10:29:47 2022
+++ src/sys/dev/pci/mfii.c	Fri Sep 16 18:27:38 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: mfii.c,v 1.4.4.1 2022/05/17 10:29:47 bouyer Exp $ */
+/* $NetBSD: mfii.c,v 1.4.4.2 2022/09/16 18:27:38 martin Exp $ */
 /* $OpenBSD: mfii.c,v 1.58 2018/08/14 05:22:21 jmatthew Exp $ */
 
 /*
@@ -19,7 +19,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mfii.c,v 1.4.4.1 2022/05/17 10:29:47 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mfii.c,v 1.4.4.2 2022/09/16 18:27:38 martin Exp $");
 
 #include "bio.h"
 
@@ -587,23 +587,40 @@ struct mfii_device {
 };
 
 static const struct mfii_device mfii_devices[] = {
+	/* Fusion */
 	{ PCI_VENDOR_SYMBIOS,	PCI_PRODUCT_SYMBIOS_MEGARAID_2208,
 	_iop_thunderbolt },
+	/* Fury */
 	{ PCI_VENDOR_SYMBIOS,	PCI_PRODUCT_SYMBIOS_MEGARAID_3008,
 	_iop_25 },
+	/* Invader */
 	{ PCI_VENDOR_SYMBIOS,	PCI_PRODUCT_SYMBIOS_MEGARAID_3108,
 	_iop_25 },
+	/* Intruder */
+	{ PCI_VENDOR_SYMBIOS,	PCI_PRODUCT_SYMBIOS_MEGARAID_3316,
+	_iop_25 },
+	{ PCI_VENDOR_SYMBIOS,	PCI_PRODUCT_SYMBIOS_MEGARAID_3324,
+	_iop_25 },
+	/* Cutlass */
+	{ PCI_VENDOR_SYMBIOS,	PCI_PRODUCT_SYMBIOS_MEGARAID_32XX_1,
+	_iop_25 },
+	{ PCI_VENDOR_SYMBIOS,	PCI_PRODUCT_SYMBIOS_MEGARAID_32XX_2,
+	_iop_25 },
+	/* Crusader */
 	{ PCI_VENDOR_SYMBIOS,	PCI_PRODUCT_SYMBIOS_MEGARAID_3404,
 	_iop_35 },
+	{ PCI_VENDOR_SYMBIOS,	PCI_PRODUCT_SYMBIOS_MEGARAID_3416,
+	_iop_35 },
+	/* Ventura */
 	{ PCI_VENDOR_SYMBIOS,	PCI_PRODUCT_SYMBIOS_MEGARAID_3504,
 	_iop_35 },
+	{ PCI_VENDOR_SYMBIOS,	PCI_PRODUCT_SYMBIOS_MEGARAID_3516,
+	_iop_35 },
+	/* Tomcat */
 	{ PCI_VENDOR_SYMBIOS,	PCI_PRODUCT_SYMBIOS_MEGARAID_3408,
 	_iop_35 },
+	/* Harpoon */
 	{ PCI_VENDOR_SYMBIOS,	PCI_PRODUCT_SYMBIOS_MEGARAID_3508,
-	_iop_35 },
-	{ PCI_VENDOR_SYMBIOS,	PCI_PRODUCT_SYMBIOS_MEGARAID_3416,
-	_iop_35 },
-	{ PCI_VENDOR_SYMBIOS,	PCI_PRODUCT_SYMBIOS_MEGARAID_3516,
 	_iop_35 }
 };
 
@@ -991,8 +1008,8 @@ mfii_rescan(device_t self, const char *i
 	if (sc->sc_child != NULL)
 		return 0;
 
-	sc->sc_child = config_found_sm_loc(self, ifattr, locators, >sc_chan,
-	scsiprint, NULL);
+	sc->sc_child = config_found_sm_loc(self, ifattr, locators,
+	>sc_chan, scsiprint, NULL);
 	return 

CVS commit: [netbsd-9] src/doc

2022-09-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Sep 12 17:12:39 UTC 2022

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

Log Message:
Ticket #1523 has been re-instated


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.14 -r1.1.2.15 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/doc

2022-09-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Sep 12 17:12:39 UTC 2022

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

Log Message:
Ticket #1523 has been re-instated


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.14 -r1.1.2.15 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.14 src/doc/CHANGES-9.4:1.1.2.15
--- src/doc/CHANGES-9.4:1.1.2.14	Mon Sep 12 15:03:25 2022
+++ src/doc/CHANGES-9.4	Mon Sep 12 17:12:39 2022
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.14 2022/09/12 15:03:25 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.15 2022/09/12 17:12:39 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -218,3 +218,15 @@ usr.bin/netstat/vtw.c		1.11,1.13
 	- KNF. Style fixes.
 	[msaitoh, ticket #1522]
 
+usr.bin/ftp/Makefileup to 1.39
+usr.bin/ftp/fetch.c up to 1.235
+usr.bin/ftp/ftp.1   up to 1.147
+usr.bin/ftp/ftp_var.h   up to 1.86
+usr.bin/ftp/main.c  up to 1.128
+usr.bin/ftp/ssl.c   up to 1.12
+usr.bin/ftp/util.c  up to 1.164
+usr.bin/ftp/version.h   up to 1.94
+
+	ftp(1): PR 57003: Support relative redirects.
+	[christos, #1523]
+



CVS commit: [netbsd-9] src/usr.bin/ftp

2022-09-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Sep 12 17:06:56 UTC 2022

Modified Files:
src/usr.bin/ftp [netbsd-9]: Makefile cmds.c fetch.c ftp.1 ftp.c
ftp_var.h main.c progressbar.c progressbar.h ssl.c ssl.h util.c
version.h

Log Message:
Catch up to current, requested by christos in ticket #1523

usr.bin/ftp/Makefileup to 1.39
usr.bin/ftp/fetch.c up to 1.235
usr.bin/ftp/ftp.1   up to 1.147
usr.bin/ftp/ftp_var.h   up to 1.86
usr.bin/ftp/main.c  up to 1.128
usr.bin/ftp/ssl.c   up to 1.12
usr.bin/ftp/util.c  up to 1.164
usr.bin/ftp/version.h   up to 1.94

PR 57003: Support relative redirects.


To generate a diff of this commit:
cvs rdiff -u -r1.37.12.3 -r1.37.12.4 src/usr.bin/ftp/Makefile
cvs rdiff -u -r1.140.2.1 -r1.140.2.2 src/usr.bin/ftp/cmds.c
cvs rdiff -u -r1.231.2.4 -r1.231.2.5 src/usr.bin/ftp/fetch.c
cvs rdiff -u -r1.136.8.3 -r1.136.8.4 src/usr.bin/ftp/ftp.1
cvs rdiff -u -r1.168.2.6 -r1.168.2.7 src/usr.bin/ftp/ftp.c
cvs rdiff -u -r1.85.6.2 -r1.85.6.3 src/usr.bin/ftp/ftp_var.h
cvs rdiff -u -r1.126.2.2 -r1.126.2.3 src/usr.bin/ftp/main.c
cvs rdiff -u -r1.23.2.1 -r1.23.2.2 src/usr.bin/ftp/progressbar.c
cvs rdiff -u -r1.8.48.1 -r1.8.48.2 src/usr.bin/ftp/progressbar.h
cvs rdiff -u -r1.8.2.4 -r1.8.2.5 src/usr.bin/ftp/ssl.c
cvs rdiff -u -r1.4.2.1 -r1.4.2.2 src/usr.bin/ftp/ssl.h
cvs rdiff -u -r1.160.2.3 -r1.160.2.4 src/usr.bin/ftp/util.c
cvs rdiff -u -r1.87.18.5 -r1.87.18.6 src/usr.bin/ftp/version.h

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



CVS commit: [netbsd-9] src/usr.bin/ftp

2022-09-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Sep 12 17:06:56 UTC 2022

Modified Files:
src/usr.bin/ftp [netbsd-9]: Makefile cmds.c fetch.c ftp.1 ftp.c
ftp_var.h main.c progressbar.c progressbar.h ssl.c ssl.h util.c
version.h

Log Message:
Catch up to current, requested by christos in ticket #1523

usr.bin/ftp/Makefileup to 1.39
usr.bin/ftp/fetch.c up to 1.235
usr.bin/ftp/ftp.1   up to 1.147
usr.bin/ftp/ftp_var.h   up to 1.86
usr.bin/ftp/main.c  up to 1.128
usr.bin/ftp/ssl.c   up to 1.12
usr.bin/ftp/util.c  up to 1.164
usr.bin/ftp/version.h   up to 1.94

PR 57003: Support relative redirects.


To generate a diff of this commit:
cvs rdiff -u -r1.37.12.3 -r1.37.12.4 src/usr.bin/ftp/Makefile
cvs rdiff -u -r1.140.2.1 -r1.140.2.2 src/usr.bin/ftp/cmds.c
cvs rdiff -u -r1.231.2.4 -r1.231.2.5 src/usr.bin/ftp/fetch.c
cvs rdiff -u -r1.136.8.3 -r1.136.8.4 src/usr.bin/ftp/ftp.1
cvs rdiff -u -r1.168.2.6 -r1.168.2.7 src/usr.bin/ftp/ftp.c
cvs rdiff -u -r1.85.6.2 -r1.85.6.3 src/usr.bin/ftp/ftp_var.h
cvs rdiff -u -r1.126.2.2 -r1.126.2.3 src/usr.bin/ftp/main.c
cvs rdiff -u -r1.23.2.1 -r1.23.2.2 src/usr.bin/ftp/progressbar.c
cvs rdiff -u -r1.8.48.1 -r1.8.48.2 src/usr.bin/ftp/progressbar.h
cvs rdiff -u -r1.8.2.4 -r1.8.2.5 src/usr.bin/ftp/ssl.c
cvs rdiff -u -r1.4.2.1 -r1.4.2.2 src/usr.bin/ftp/ssl.h
cvs rdiff -u -r1.160.2.3 -r1.160.2.4 src/usr.bin/ftp/util.c
cvs rdiff -u -r1.87.18.5 -r1.87.18.6 src/usr.bin/ftp/version.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.bin/ftp/Makefile
diff -u src/usr.bin/ftp/Makefile:1.37.12.3 src/usr.bin/ftp/Makefile:1.37.12.4
--- src/usr.bin/ftp/Makefile:1.37.12.3	Mon Sep 12 15:02:47 2022
+++ src/usr.bin/ftp/Makefile	Mon Sep 12 17:06:56 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.37.12.3 2022/09/12 15:02:47 martin Exp $
+#	$NetBSD: Makefile,v 1.37.12.4 2022/09/12 17:06:56 martin Exp $
 #	from: @(#)Makefile	8.2 (Berkeley) 4/3/94
 
 .include 
@@ -31,4 +31,6 @@ CPPFLAGS+= -DINET6
 cmds.o fetch.o: version.h
 main.o:	ftp_var.h
 
+CWARNFLAGS.gcc+=	${GCC_NO_FORMAT_OVERFLOW}
+
 .include 

Index: src/usr.bin/ftp/cmds.c
diff -u src/usr.bin/ftp/cmds.c:1.140.2.1 src/usr.bin/ftp/cmds.c:1.140.2.2
--- src/usr.bin/ftp/cmds.c:1.140.2.1	Mon Jun 14 11:52:52 2021
+++ src/usr.bin/ftp/cmds.c	Mon Sep 12 17:06:56 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: cmds.c,v 1.140.2.1 2021/06/14 11:52:52 martin Exp $	*/
+/*	$NetBSD: cmds.c,v 1.140.2.2 2022/09/12 17:06:56 martin Exp $	*/
 
 /*-
  * Copyright (c) 1996-2021 The NetBSD Foundation, Inc.
@@ -96,7 +96,7 @@
 #if 0
 static char sccsid[] = "@(#)cmds.c	8.6 (Berkeley) 10/9/94";
 #else
-__RCSID("$NetBSD: cmds.c,v 1.140.2.1 2021/06/14 11:52:52 martin Exp $");
+__RCSID("$NetBSD: cmds.c,v 1.140.2.2 2022/09/12 17:06:56 martin Exp $");
 #endif
 #endif /* not lint */
 

Index: src/usr.bin/ftp/fetch.c
diff -u src/usr.bin/ftp/fetch.c:1.231.2.4 src/usr.bin/ftp/fetch.c:1.231.2.5
--- src/usr.bin/ftp/fetch.c:1.231.2.4	Mon Sep 12 15:02:47 2022
+++ src/usr.bin/ftp/fetch.c	Mon Sep 12 17:06:56 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: fetch.c,v 1.231.2.4 2022/09/12 15:02:47 martin Exp $	*/
+/*	$NetBSD: fetch.c,v 1.231.2.5 2022/09/12 17:06:56 martin Exp $	*/
 
 /*-
  * Copyright (c) 1997-2015 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: fetch.c,v 1.231.2.4 2022/09/12 15:02:47 martin Exp $");
+__RCSID("$NetBSD: fetch.c,v 1.231.2.5 2022/09/12 17:06:56 martin Exp $");
 #endif /* not lint */
 
 /*
@@ -106,12 +106,13 @@ __dead static void	timeouthttp(int);
 static int	auth_url(const char *, char **, const struct authinfo *);
 static void	base64_encode(const unsigned char *, size_t, unsigned char *);
 #endif
-static int	go_fetch(const char *);
+static int	go_fetch(const char *, struct urlinfo *);
 static int	fetch_ftp(const char *);
-static int	fetch_url(const char *, const char *, char *, char *);
+static int	fetch_url(const char *, const char *, char *, char *,
+struct urlinfo *);
 static const char *match_token(const char **, const char *);
 static int	parse_url(const char *, const char *, struct urlinfo *,
-struct authinfo *);
+struct authinfo *, struct urlinfo *);
 static void	url_decode(char *);
 static void	freeauthinfo(struct authinfo *);
 static void	freeurlinfo(struct urlinfo *);
@@ -274,7 +275,7 @@ auth_url(const char *challenge, char **r
 	scheme = "Basic";	/* only support Basic authentication */
 	gotpass = NULL;
 
-	DPRINTF("auth_url: challenge `%s'\n", challenge);
+	DPRINTF("%s: challenge `%s'\n", __func__, challenge);
 
 	if (! match_token(, scheme)) {
 		warnx("Unsupported authentication challenge `%s'",
@@ -336,7 

CVS commit: [netbsd-9] src/doc

2022-09-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Sep 12 15:03:25 UTC 2022

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

Log Message:
backout of #1523


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.13 -r1.1.2.14 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.13 src/doc/CHANGES-9.4:1.1.2.14
--- src/doc/CHANGES-9.4:1.1.2.13	Mon Sep 12 14:44:35 2022
+++ src/doc/CHANGES-9.4	Mon Sep 12 15:03:25 2022
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.13 2022/09/12 14:44:35 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.14 2022/09/12 15:03:25 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -218,14 +218,3 @@ usr.bin/netstat/vtw.c		1.11,1.13
 	- KNF. Style fixes.
 	[msaitoh, ticket #1522]
 
-usr.bin/ftp/Makefileup to 1.39
-usr.bin/ftp/fetch.c up to 1.235
-usr.bin/ftp/ftp.1   up to 1.147
-usr.bin/ftp/ftp_var.h   up to 1.86
-usr.bin/ftp/main.c  up to 1.128
-usr.bin/ftp/ssl.c   up to 1.11
-usr.bin/ftp/util.c  up to 1.164
-usr.bin/ftp/version.h   up to 1.94
-
-	ftp(1): PR 57003: Support relative redirects.
-	[christos, #1523]



CVS commit: [netbsd-9] src/doc

2022-09-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Sep 12 15:03:25 UTC 2022

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

Log Message:
backout of #1523


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.13 -r1.1.2.14 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/usr.bin/ftp

2022-09-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Sep 12 15:02:47 UTC 2022

Modified Files:
src/usr.bin/ftp [netbsd-9]: Makefile fetch.c ftp.1 ftp_var.h main.c
ssl.c util.c version.h

Log Message:
Back out ticket #1523 for now - trust anchor validation is not solved.


To generate a diff of this commit:
cvs rdiff -u -r1.37.12.2 -r1.37.12.3 src/usr.bin/ftp/Makefile
cvs rdiff -u -r1.231.2.3 -r1.231.2.4 src/usr.bin/ftp/fetch.c
cvs rdiff -u -r1.136.8.2 -r1.136.8.3 src/usr.bin/ftp/ftp.1
cvs rdiff -u -r1.85.6.1 -r1.85.6.2 src/usr.bin/ftp/ftp_var.h
cvs rdiff -u -r1.126.2.1 -r1.126.2.2 src/usr.bin/ftp/main.c
cvs rdiff -u -r1.8.2.3 -r1.8.2.4 src/usr.bin/ftp/ssl.c
cvs rdiff -u -r1.160.2.2 -r1.160.2.3 src/usr.bin/ftp/util.c
cvs rdiff -u -r1.87.18.4 -r1.87.18.5 src/usr.bin/ftp/version.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.bin/ftp/Makefile
diff -u src/usr.bin/ftp/Makefile:1.37.12.2 src/usr.bin/ftp/Makefile:1.37.12.3
--- src/usr.bin/ftp/Makefile:1.37.12.2	Mon Sep 12 14:42:55 2022
+++ src/usr.bin/ftp/Makefile	Mon Sep 12 15:02:47 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.37.12.2 2022/09/12 14:42:55 martin Exp $
+#	$NetBSD: Makefile,v 1.37.12.3 2022/09/12 15:02:47 martin Exp $
 #	from: @(#)Makefile	8.2 (Berkeley) 4/3/94
 
 .include 
@@ -31,6 +31,4 @@ CPPFLAGS+= -DINET6
 cmds.o fetch.o: version.h
 main.o:	ftp_var.h
 
-CWARNFLAGS.gcc+=	${GCC_NO_FORMAT_OVERFLOW}
-
 .include 

Index: src/usr.bin/ftp/fetch.c
diff -u src/usr.bin/ftp/fetch.c:1.231.2.3 src/usr.bin/ftp/fetch.c:1.231.2.4
--- src/usr.bin/ftp/fetch.c:1.231.2.3	Mon Sep 12 14:42:55 2022
+++ src/usr.bin/ftp/fetch.c	Mon Sep 12 15:02:47 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: fetch.c,v 1.231.2.3 2022/09/12 14:42:55 martin Exp $	*/
+/*	$NetBSD: fetch.c,v 1.231.2.4 2022/09/12 15:02:47 martin Exp $	*/
 
 /*-
  * Copyright (c) 1997-2015 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: fetch.c,v 1.231.2.3 2022/09/12 14:42:55 martin Exp $");
+__RCSID("$NetBSD: fetch.c,v 1.231.2.4 2022/09/12 15:02:47 martin Exp $");
 #endif /* not lint */
 
 /*
@@ -106,13 +106,12 @@ __dead static void	timeouthttp(int);
 static int	auth_url(const char *, char **, const struct authinfo *);
 static void	base64_encode(const unsigned char *, size_t, unsigned char *);
 #endif
-static int	go_fetch(const char *, struct urlinfo *);
+static int	go_fetch(const char *);
 static int	fetch_ftp(const char *);
-static int	fetch_url(const char *, const char *, char *, char *,
-struct urlinfo *);
+static int	fetch_url(const char *, const char *, char *, char *);
 static const char *match_token(const char **, const char *);
 static int	parse_url(const char *, const char *, struct urlinfo *,
-struct authinfo *, struct urlinfo *);
+struct authinfo *);
 static void	url_decode(char *);
 static void	freeauthinfo(struct authinfo *);
 static void	freeurlinfo(struct urlinfo *);
@@ -275,7 +274,7 @@ auth_url(const char *challenge, char **r
 	scheme = "Basic";	/* only support Basic authentication */
 	gotpass = NULL;
 
-	DPRINTF("%s: challenge `%s'\n", __func__, challenge);
+	DPRINTF("auth_url: challenge `%s'\n", challenge);
 
 	if (! match_token(, scheme)) {
 		warnx("Unsupported authentication challenge `%s'",
@@ -337,7 +336,7 @@ auth_url(const char *challenge, char **r
 	*response = ftp_malloc(rlen);
 	(void)strlcpy(*response, scheme, rlen);
 	len = strlcat(*response, " ", rlen);
-			/* use	`clen - 1'  to not encode the trailing NUL */
+			/* use  `clen - 1'  to not encode the trailing NUL */
 	base64_encode((unsigned char *)clear, clen - 1,
 	(unsigned char *)*response + len);
 	memset(clear, 0, clen);
@@ -368,7 +367,7 @@ base64_encode(const unsigned char *clear
 			| ((clear[i + 1] >> 4) & 0x0f)];
 		*(cp++) = enc[((clear[i + 1] << 2) & 0x3c)
 			| ((clear[i + 2] >> 6) & 0x03)];
-		*(cp++) = enc[((clear[i + 2]	 ) & 0x3f)];
+		*(cp++) = enc[((clear[i + 2] ) & 0x3f)];
 	}
 	*cp = '\0';
 	while (i-- > len)
@@ -401,42 +400,6 @@ url_decode(char *url)
 	*q = '\0';
 }
 
-static const char *
-get_port(const struct urlinfo *ui)
-{
-
-	switch(ui->utype) {
-	case HTTP_URL_T:
-		return httpport;
-	case FTP_URL_T:
-		return ftpport;
-	case FILE_URL_T:
-		return "";
-#ifdef WITH_SSL
-	case HTTPS_URL_T:
-		return httpsport;
-#endif
-	default:
-		return NULL;
-	}
-}
-
-static int
-use_relative(const struct urlinfo *ui)
-{
-	if (ui == NULL)
-		return 0;
-	switch (ui->utype) {
-	case HTTP_URL_T:
-	case FILE_URL_T:
-#ifdef WITH_SSL
-	case HTTPS_URL_T:
-#endif
-		return 1;
-	default:
-		return 0;
-	}
-}
 
 /*
  * Parse URL of form (per RFC 3986):
@@ -472,7 +435,7 @@ use_relative(const struct urlinfo *ui)
 
 static int
 parse_url(const char *url, const char *desc, struct urlinfo *ui,
-struct authinfo *auth, struct urlinfo *rui)
+struct authinfo *auth) 
 {
 	const char	*origurl, *tport;
 	char		*cp, *ep, *thost;
@@ -483,26 

CVS commit: [netbsd-9] src/usr.bin/ftp

2022-09-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Sep 12 15:02:47 UTC 2022

Modified Files:
src/usr.bin/ftp [netbsd-9]: Makefile fetch.c ftp.1 ftp_var.h main.c
ssl.c util.c version.h

Log Message:
Back out ticket #1523 for now - trust anchor validation is not solved.


To generate a diff of this commit:
cvs rdiff -u -r1.37.12.2 -r1.37.12.3 src/usr.bin/ftp/Makefile
cvs rdiff -u -r1.231.2.3 -r1.231.2.4 src/usr.bin/ftp/fetch.c
cvs rdiff -u -r1.136.8.2 -r1.136.8.3 src/usr.bin/ftp/ftp.1
cvs rdiff -u -r1.85.6.1 -r1.85.6.2 src/usr.bin/ftp/ftp_var.h
cvs rdiff -u -r1.126.2.1 -r1.126.2.2 src/usr.bin/ftp/main.c
cvs rdiff -u -r1.8.2.3 -r1.8.2.4 src/usr.bin/ftp/ssl.c
cvs rdiff -u -r1.160.2.2 -r1.160.2.3 src/usr.bin/ftp/util.c
cvs rdiff -u -r1.87.18.4 -r1.87.18.5 src/usr.bin/ftp/version.h

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-09-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Sep 12 14:44:35 UTC 2022

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

Log Message:
Tickets #1522 and #1523


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.12 -r1.1.2.13 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.12 src/doc/CHANGES-9.4:1.1.2.13
--- src/doc/CHANGES-9.4:1.1.2.12	Sun Sep 11 18:26:10 2022
+++ src/doc/CHANGES-9.4	Mon Sep 12 14:44:35 2022
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.12 2022/09/11 18:26:10 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.13 2022/09/12 14:44:35 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -188,3 +188,44 @@ sys/arch/atari/conf/SMALL030			(regen)
 	Improve VGA console settings for Milan, especially for sysinst.
 	[tsutsui, ticket #1521]
 
+usr.bin/netstat/atalk.c		1.18,1.20-1.21
+usr.bin/netstat/bpf.c		1.16 via patch
+usr.bin/netstat/fast_ipsec.c	1.24
+usr.bin/netstat/if.c		1.97-1.99,1.101-1.104 via patch
+usr.bin/netstat/inet.c		1.111,1.115-1.116 via patch
+usr.bin/netstat/inet6.c		1.74-1.75,1.80-1.81 via patch
+usr.bin/netstat/main.c		1.100-1.103
+usr.bin/netstat/mbuf.c		1.35
+usr.bin/netstat/mroute.c	1.26-1.27
+usr.bin/netstat/mroute6.c	1.16
+usr.bin/netstat/netstat.h	1.52-1.53
+usr.bin/netstat/pfkey.c		1.4-1.5 via patch
+usr.bin/netstat/pfsync.c	1.4-1.5 via patch
+usr.bin/netstat/route.c		1.86-1.88
+usr.bin/netstat/unix.c		1.36-1.37
+usr.bin/netstat/vtw.c		1.11,1.13
+
+	- sprintf() -> snprintf(), and adjust a buffer size to avoid any
+	  potential for overflow.
+	- Fix netstat -rs to print it correctly.
+	- Add missing {IP,IP6}_STAT_NOIPSEC to netstat.
+	- Don't show any of the completely and utterly undocumented VTW info
+	  if the feature isn't enabled.
+	- Print oqdrops correctly.
+	- Remove Network ATM soft intr queue reporting, we don't have that
+	  in the kernel anymore.
+	- netstat.1: Add various xrefs present in the body to "See Also".
+	- KNF. Style fixes.
+	[msaitoh, ticket #1522]
+
+usr.bin/ftp/Makefileup to 1.39
+usr.bin/ftp/fetch.c up to 1.235
+usr.bin/ftp/ftp.1   up to 1.147
+usr.bin/ftp/ftp_var.h   up to 1.86
+usr.bin/ftp/main.c  up to 1.128
+usr.bin/ftp/ssl.c   up to 1.11
+usr.bin/ftp/util.c  up to 1.164
+usr.bin/ftp/version.h   up to 1.94
+
+	ftp(1): PR 57003: Support relative redirects.
+	[christos, #1523]



CVS commit: [netbsd-9] src/doc

2022-09-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Sep 12 14:44:35 UTC 2022

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

Log Message:
Tickets #1522 and #1523


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.12 -r1.1.2.13 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/usr.bin/ftp

2022-09-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Sep 12 14:42:56 UTC 2022

Modified Files:
src/usr.bin/ftp [netbsd-9]: Makefile fetch.c ftp.1 ftp_var.h main.c
ssl.c util.c version.h

Log Message:
Catch up to current, requested by christos in ticket #1523

usr.bin/ftp/Makefileup to 1.39
usr.bin/ftp/fetch.c up to 1.235
usr.bin/ftp/ftp.1   up to 1.147
usr.bin/ftp/ftp_var.h   up to 1.86
usr.bin/ftp/main.c  up to 1.128
usr.bin/ftp/ssl.c   up to 1.11
usr.bin/ftp/util.c  up to 1.164
usr.bin/ftp/version.h   up to 1.94

PR 57003: Support relative redirects.


To generate a diff of this commit:
cvs rdiff -u -r1.37.12.1 -r1.37.12.2 src/usr.bin/ftp/Makefile
cvs rdiff -u -r1.231.2.2 -r1.231.2.3 src/usr.bin/ftp/fetch.c
cvs rdiff -u -r1.136.8.1 -r1.136.8.2 src/usr.bin/ftp/ftp.1
cvs rdiff -u -r1.85 -r1.85.6.1 src/usr.bin/ftp/ftp_var.h
cvs rdiff -u -r1.126 -r1.126.2.1 src/usr.bin/ftp/main.c
cvs rdiff -u -r1.8.2.2 -r1.8.2.3 src/usr.bin/ftp/ssl.c
cvs rdiff -u -r1.160.2.1 -r1.160.2.2 src/usr.bin/ftp/util.c
cvs rdiff -u -r1.87.18.3 -r1.87.18.4 src/usr.bin/ftp/version.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.bin/ftp/Makefile
diff -u src/usr.bin/ftp/Makefile:1.37.12.1 src/usr.bin/ftp/Makefile:1.37.12.2
--- src/usr.bin/ftp/Makefile:1.37.12.1	Mon Jun 14 11:57:39 2021
+++ src/usr.bin/ftp/Makefile	Mon Sep 12 14:42:55 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.37.12.1 2021/06/14 11:57:39 martin Exp $
+#	$NetBSD: Makefile,v 1.37.12.2 2022/09/12 14:42:55 martin Exp $
 #	from: @(#)Makefile	8.2 (Berkeley) 4/3/94
 
 .include 
@@ -31,4 +31,6 @@ CPPFLAGS+= -DINET6
 cmds.o fetch.o: version.h
 main.o:	ftp_var.h
 
+CWARNFLAGS.gcc+=	${GCC_NO_FORMAT_OVERFLOW}
+
 .include 

Index: src/usr.bin/ftp/fetch.c
diff -u src/usr.bin/ftp/fetch.c:1.231.2.2 src/usr.bin/ftp/fetch.c:1.231.2.3
--- src/usr.bin/ftp/fetch.c:1.231.2.2	Sun Oct 24 10:13:40 2021
+++ src/usr.bin/ftp/fetch.c	Mon Sep 12 14:42:55 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: fetch.c,v 1.231.2.2 2021/10/24 10:13:40 martin Exp $	*/
+/*	$NetBSD: fetch.c,v 1.231.2.3 2022/09/12 14:42:55 martin Exp $	*/
 
 /*-
  * Copyright (c) 1997-2015 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: fetch.c,v 1.231.2.2 2021/10/24 10:13:40 martin Exp $");
+__RCSID("$NetBSD: fetch.c,v 1.231.2.3 2022/09/12 14:42:55 martin Exp $");
 #endif /* not lint */
 
 /*
@@ -106,12 +106,13 @@ __dead static void	timeouthttp(int);
 static int	auth_url(const char *, char **, const struct authinfo *);
 static void	base64_encode(const unsigned char *, size_t, unsigned char *);
 #endif
-static int	go_fetch(const char *);
+static int	go_fetch(const char *, struct urlinfo *);
 static int	fetch_ftp(const char *);
-static int	fetch_url(const char *, const char *, char *, char *);
+static int	fetch_url(const char *, const char *, char *, char *,
+struct urlinfo *);
 static const char *match_token(const char **, const char *);
 static int	parse_url(const char *, const char *, struct urlinfo *,
-struct authinfo *);
+struct authinfo *, struct urlinfo *);
 static void	url_decode(char *);
 static void	freeauthinfo(struct authinfo *);
 static void	freeurlinfo(struct urlinfo *);
@@ -274,7 +275,7 @@ auth_url(const char *challenge, char **r
 	scheme = "Basic";	/* only support Basic authentication */
 	gotpass = NULL;
 
-	DPRINTF("auth_url: challenge `%s'\n", challenge);
+	DPRINTF("%s: challenge `%s'\n", __func__, challenge);
 
 	if (! match_token(, scheme)) {
 		warnx("Unsupported authentication challenge `%s'",
@@ -336,7 +337,7 @@ auth_url(const char *challenge, char **r
 	*response = ftp_malloc(rlen);
 	(void)strlcpy(*response, scheme, rlen);
 	len = strlcat(*response, " ", rlen);
-			/* use  `clen - 1'  to not encode the trailing NUL */
+			/* use	`clen - 1'  to not encode the trailing NUL */
 	base64_encode((unsigned char *)clear, clen - 1,
 	(unsigned char *)*response + len);
 	memset(clear, 0, clen);
@@ -367,7 +368,7 @@ base64_encode(const unsigned char *clear
 			| ((clear[i + 1] >> 4) & 0x0f)];
 		*(cp++) = enc[((clear[i + 1] << 2) & 0x3c)
 			| ((clear[i + 2] >> 6) & 0x03)];
-		*(cp++) = enc[((clear[i + 2] ) & 0x3f)];
+		*(cp++) = enc[((clear[i + 2]	 ) & 0x3f)];
 	}
 	*cp = '\0';
 	while (i-- > len)
@@ -400,6 +401,42 @@ url_decode(char *url)
 	*q = '\0';
 }
 
+static const char *
+get_port(const struct urlinfo *ui)
+{
+
+	switch(ui->utype) {
+	case HTTP_URL_T:
+		return httpport;
+	case FTP_URL_T:
+		return ftpport;
+	case FILE_URL_T:
+		return "";
+#ifdef WITH_SSL
+	case HTTPS_URL_T:
+		return httpsport;
+#endif
+	default:
+		return NULL;
+	}
+}
+
+static int

CVS commit: [netbsd-9] src/usr.bin/ftp

2022-09-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Sep 12 14:42:56 UTC 2022

Modified Files:
src/usr.bin/ftp [netbsd-9]: Makefile fetch.c ftp.1 ftp_var.h main.c
ssl.c util.c version.h

Log Message:
Catch up to current, requested by christos in ticket #1523

usr.bin/ftp/Makefileup to 1.39
usr.bin/ftp/fetch.c up to 1.235
usr.bin/ftp/ftp.1   up to 1.147
usr.bin/ftp/ftp_var.h   up to 1.86
usr.bin/ftp/main.c  up to 1.128
usr.bin/ftp/ssl.c   up to 1.11
usr.bin/ftp/util.c  up to 1.164
usr.bin/ftp/version.h   up to 1.94

PR 57003: Support relative redirects.


To generate a diff of this commit:
cvs rdiff -u -r1.37.12.1 -r1.37.12.2 src/usr.bin/ftp/Makefile
cvs rdiff -u -r1.231.2.2 -r1.231.2.3 src/usr.bin/ftp/fetch.c
cvs rdiff -u -r1.136.8.1 -r1.136.8.2 src/usr.bin/ftp/ftp.1
cvs rdiff -u -r1.85 -r1.85.6.1 src/usr.bin/ftp/ftp_var.h
cvs rdiff -u -r1.126 -r1.126.2.1 src/usr.bin/ftp/main.c
cvs rdiff -u -r1.8.2.2 -r1.8.2.3 src/usr.bin/ftp/ssl.c
cvs rdiff -u -r1.160.2.1 -r1.160.2.2 src/usr.bin/ftp/util.c
cvs rdiff -u -r1.87.18.3 -r1.87.18.4 src/usr.bin/ftp/version.h

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



CVS commit: [netbsd-9] src/usr.bin/netstat

2022-09-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Sep 12 14:23:41 UTC 2022

Modified Files:
src/usr.bin/netstat [netbsd-9]: atalk.c bpf.c fast_ipsec.c if.c inet.c
inet6.c main.c mbuf.c mroute.c mroute6.c netstat.1 netstat.h
pfkey.c pfsync.c route.c unix.c vtw.c

Log Message:
Pull up the following, requested by msaitoh in ticket #1522:

usr.bin/netstat/atalk.c 1.18,1.20-1.21
usr.bin/netstat/bpf.c   1.16 via patch
usr.bin/netstat/fast_ipsec.c1.24
usr.bin/netstat/if.c1.97-1.99,1.101-1.104 via patch
usr.bin/netstat/inet.c  1.111,1.115-1.116 via patch
usr.bin/netstat/inet6.c 1.74-1.75,1.80-1.81 via patch
usr.bin/netstat/main.c  1.100-1.103
usr.bin/netstat/mbuf.c  1.35
usr.bin/netstat/mroute.c1.26-1.27
usr.bin/netstat/mroute6.c   1.16
usr.bin/netstat/netstat.h   1.52-1.53
usr.bin/netstat/pfkey.c 1.4-1.5 via patch
usr.bin/netstat/pfsync.c1.4-1.5 via patch
usr.bin/netstat/route.c 1.86-1.88
usr.bin/netstat/unix.c  1.36-1.37
usr.bin/netstat/vtw.c   1.11,1.13

- sprintf() -> snprintf(), and adjust a buffer size to avoid any
  potential for overflow.
- Fix netstat -rs to print it correctly.
- Add missing {IP,IP6}_STAT_NOIPSEC to netstat.
- Don't show any of the completely and utterly undocumented VTW info
  if the feature isn't enabled.
- Print oqdrops correctly.
- Remove Network ATM soft intr queue reporting, we don't have that
  in the kernel anymore.
- netstat.1: Add various xrefs present in the body to "See Also".
- KNF. Style fixes.


To generate a diff of this commit:
cvs rdiff -u -r1.16.18.1 -r1.16.18.2 src/usr.bin/netstat/atalk.c
cvs rdiff -u -r1.13.4.1 -r1.13.4.2 src/usr.bin/netstat/bpf.c
cvs rdiff -u -r1.22.8.1 -r1.22.8.2 src/usr.bin/netstat/fast_ipsec.c
cvs rdiff -u -r1.95 -r1.95.2.1 src/usr.bin/netstat/if.c
cvs rdiff -u -r1.109.2.1 -r1.109.2.2 src/usr.bin/netstat/inet.c
cvs rdiff -u -r1.72.2.1 -r1.72.2.2 src/usr.bin/netstat/inet6.c
cvs rdiff -u -r1.99 -r1.99.18.1 src/usr.bin/netstat/main.c
cvs rdiff -u -r1.34 -r1.34.2.1 src/usr.bin/netstat/mbuf.c
cvs rdiff -u -r1.25 -r1.25.18.1 src/usr.bin/netstat/mroute.c
cvs rdiff -u -r1.15 -r1.15.18.1 src/usr.bin/netstat/mroute6.c
cvs rdiff -u -r1.73 -r1.73.18.1 src/usr.bin/netstat/netstat.1
cvs rdiff -u -r1.51 -r1.51.18.1 src/usr.bin/netstat/netstat.h
cvs rdiff -u -r1.1.44.1 -r1.1.44.2 src/usr.bin/netstat/pfkey.c
cvs rdiff -u -r1.1.48.1 -r1.1.48.2 src/usr.bin/netstat/pfsync.c
cvs rdiff -u -r1.85 -r1.85.18.1 src/usr.bin/netstat/route.c
cvs rdiff -u -r1.35 -r1.35.16.1 src/usr.bin/netstat/unix.c
cvs rdiff -u -r1.10 -r1.10.4.1 src/usr.bin/netstat/vtw.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/usr.bin/netstat

2022-09-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Sep 12 14:23:41 UTC 2022

Modified Files:
src/usr.bin/netstat [netbsd-9]: atalk.c bpf.c fast_ipsec.c if.c inet.c
inet6.c main.c mbuf.c mroute.c mroute6.c netstat.1 netstat.h
pfkey.c pfsync.c route.c unix.c vtw.c

Log Message:
Pull up the following, requested by msaitoh in ticket #1522:

usr.bin/netstat/atalk.c 1.18,1.20-1.21
usr.bin/netstat/bpf.c   1.16 via patch
usr.bin/netstat/fast_ipsec.c1.24
usr.bin/netstat/if.c1.97-1.99,1.101-1.104 via patch
usr.bin/netstat/inet.c  1.111,1.115-1.116 via patch
usr.bin/netstat/inet6.c 1.74-1.75,1.80-1.81 via patch
usr.bin/netstat/main.c  1.100-1.103
usr.bin/netstat/mbuf.c  1.35
usr.bin/netstat/mroute.c1.26-1.27
usr.bin/netstat/mroute6.c   1.16
usr.bin/netstat/netstat.h   1.52-1.53
usr.bin/netstat/pfkey.c 1.4-1.5 via patch
usr.bin/netstat/pfsync.c1.4-1.5 via patch
usr.bin/netstat/route.c 1.86-1.88
usr.bin/netstat/unix.c  1.36-1.37
usr.bin/netstat/vtw.c   1.11,1.13

- sprintf() -> snprintf(), and adjust a buffer size to avoid any
  potential for overflow.
- Fix netstat -rs to print it correctly.
- Add missing {IP,IP6}_STAT_NOIPSEC to netstat.
- Don't show any of the completely and utterly undocumented VTW info
  if the feature isn't enabled.
- Print oqdrops correctly.
- Remove Network ATM soft intr queue reporting, we don't have that
  in the kernel anymore.
- netstat.1: Add various xrefs present in the body to "See Also".
- KNF. Style fixes.


To generate a diff of this commit:
cvs rdiff -u -r1.16.18.1 -r1.16.18.2 src/usr.bin/netstat/atalk.c
cvs rdiff -u -r1.13.4.1 -r1.13.4.2 src/usr.bin/netstat/bpf.c
cvs rdiff -u -r1.22.8.1 -r1.22.8.2 src/usr.bin/netstat/fast_ipsec.c
cvs rdiff -u -r1.95 -r1.95.2.1 src/usr.bin/netstat/if.c
cvs rdiff -u -r1.109.2.1 -r1.109.2.2 src/usr.bin/netstat/inet.c
cvs rdiff -u -r1.72.2.1 -r1.72.2.2 src/usr.bin/netstat/inet6.c
cvs rdiff -u -r1.99 -r1.99.18.1 src/usr.bin/netstat/main.c
cvs rdiff -u -r1.34 -r1.34.2.1 src/usr.bin/netstat/mbuf.c
cvs rdiff -u -r1.25 -r1.25.18.1 src/usr.bin/netstat/mroute.c
cvs rdiff -u -r1.15 -r1.15.18.1 src/usr.bin/netstat/mroute6.c
cvs rdiff -u -r1.73 -r1.73.18.1 src/usr.bin/netstat/netstat.1
cvs rdiff -u -r1.51 -r1.51.18.1 src/usr.bin/netstat/netstat.h
cvs rdiff -u -r1.1.44.1 -r1.1.44.2 src/usr.bin/netstat/pfkey.c
cvs rdiff -u -r1.1.48.1 -r1.1.48.2 src/usr.bin/netstat/pfsync.c
cvs rdiff -u -r1.85 -r1.85.18.1 src/usr.bin/netstat/route.c
cvs rdiff -u -r1.35 -r1.35.16.1 src/usr.bin/netstat/unix.c
cvs rdiff -u -r1.10 -r1.10.4.1 src/usr.bin/netstat/vtw.c

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

Modified files:

Index: src/usr.bin/netstat/atalk.c
diff -u src/usr.bin/netstat/atalk.c:1.16.18.1 src/usr.bin/netstat/atalk.c:1.16.18.2
--- src/usr.bin/netstat/atalk.c:1.16.18.1	Mon Aug 19 15:56:49 2019
+++ src/usr.bin/netstat/atalk.c	Mon Sep 12 14:23:41 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: atalk.c,v 1.16.18.1 2019/08/19 15:56:49 martin Exp $	*/
+/*	$NetBSD: atalk.c,v 1.16.18.2 2022/09/12 14:23:41 martin Exp $	*/
 
 /*
  * Copyright (c) 1983, 1988, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "from @(#)atalk.c	1.1 (Whistle) 6/6/96";
 #else
-__RCSID("$NetBSD: atalk.c,v 1.16.18.1 2019/08/19 15:56:49 martin Exp $");
+__RCSID("$NetBSD: atalk.c,v 1.16.18.2 2022/09/12 14:23:41 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -63,9 +63,6 @@ __RCSID("$NetBSD: atalk.c,v 1.16.18.1 20
 #include "netstat.h"
 #include "prog_ops.h"
 
-struct ddpcbddpcb;
-struct socket   sockb;
-
 static int first = 1;
 
 /*
@@ -85,11 +82,12 @@ at_pr_net(const struct sockaddr_at *sat,
 		case 0x:
 			return "";
 		case ATADDR_ANYNET:
-			return ("*");
+			return "*";
 		}
 	}
-	(void)snprintf(mybuf, sizeof(mybuf), "%hu", ntohs(sat->sat_addr.s_net));
-	return (mybuf);
+	(void)snprintf(mybuf, sizeof(mybuf), "%hu",
+	ntohs(sat->sat_addr.s_net));
+	return mybuf;
 }
 
 static const char *
@@ -102,12 +100,12 @@ at_pr_host(const struct sockaddr_at *sat
 		case ATADDR_BCAST:
 			return "bcast";
 		case ATADDR_ANYNODE:
-			return ("*");
+			return "*";
 		}
 	}
-	(void)snprintf(mybuf, sizeof(mybuf), "%d", 
+	(void)snprintf(mybuf, sizeof(mybuf), "%d",
 	(unsigned int)sat->sat_addr.s_node);
-	return (mybuf);
+	return mybuf;
 }
 
 static const char *
@@ -117,13 +115,13 @@ at_pr_port(const struct sockaddr_at *sat
 
 	switch (sat->sat_port) {
 	case ATADDR_ANYPORT:
-		return ("*");
+		return "*";
 	case 0xff:
 		return "";
 	default:
 		(void)snprintf(mybuf, sizeof(mybuf), "%d",
 		(unsigned int)sat->sat_port);
-		return (mybuf);
+		return mybuf;
 	}
 }
 
@@ -141,7 +139,7 @@ at_pr_range(const struct sockaddr_at *sa
 		

CVS commit: [netbsd-9] src/doc

2022-09-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 11 18:26:10 UTC 2022

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

Log Message:
Tickets #1518 - #1521


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.11 -r1.1.2.12 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.11 src/doc/CHANGES-9.4:1.1.2.12
--- src/doc/CHANGES-9.4:1.1.2.11	Sat Sep 10 08:21:01 2022
+++ src/doc/CHANGES-9.4	Sun Sep 11 18:26:10 2022
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.11 2022/09/10 08:21:01 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.12 2022/09/11 18:26:10 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -147,3 +147,44 @@ sys/kern/kern_core.c1.37
 	Avoid a GCC warning.
 	[mrg, ticket #1517]
 
+sys/arch/atari/dev/ite.c			1.82
+sys/arch/atari/dev/ite_cc.c			1.45
+sys/arch/atari/dev/ite_et.c			1.36
+sys/arch/atari/dev/itevar.h			1.15
+
+	Add a minimum DEC special graphics character support
+	for atari ite(4).
+	[tsutsui, ticket #1518]
+
+sys/arch/atari/atari/atari_init.c		1.105
+sys/arch/atari/conf/GENERIC.in			1.123
+sys/arch/atari/conf/files.atari			1.124
+sys/arch/atari/conf/ATARITT			(regen)
+sys/arch/atari/conf/FALCON			(regen)
+sys/arch/atari/conf/HADES			(regen)
+sys/arch/atari/conf/MILAN-ISAIDE		(regen)
+sys/arch/atari/conf/MILAN-PCIIDE		(regen)
+sys/arch/atari/conf/SMALL030			(regen)
+
+	Improve the Atari ST-RAM reservation to make the old Xserver
+	work by default.
+	[tsutsui, ticket #1519]
+
+sys/arch/atari/vme/if_le_vme.c			1.32,1.33
+
+	le(4): fix a long-standing "leprobe: cannot map memory-area"
+	error during probe.
+	[tsutsui, ticket #1520]
+
+sys/arch/atari/conf/MILAN.in			1.30
+sys/arch/atari/pci/pci_vga.c			1.19
+sys/arch/atari/conf/ATARITT			(regen)
+sys/arch/atari/conf/FALCON			(regen)
+sys/arch/atari/conf/HADES			(regen)
+sys/arch/atari/conf/MILAN-ISAIDE		(regen)
+sys/arch/atari/conf/MILAN-PCIIDE		(regen)
+sys/arch/atari/conf/SMALL030			(regen)
+
+	Improve VGA console settings for Milan, especially for sysinst.
+	[tsutsui, ticket #1521]
+



CVS commit: [netbsd-9] src/doc

2022-09-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 11 18:26:10 UTC 2022

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

Log Message:
Tickets #1518 - #1521


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.11 -r1.1.2.12 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/sys/arch/atari/conf

2022-09-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 11 18:24:18 UTC 2022

Modified Files:
src/sys/arch/atari/conf [netbsd-9]: ATARITT FALCON HADES MILAN-ISAIDE
MILAN-PCIIDE SMALL030

Log Message:
regen (ticket #1521)


To generate a diff of this commit:
cvs rdiff -u -r1.120.4.1 -r1.120.4.2 src/sys/arch/atari/conf/ATARITT
cvs rdiff -u -r1.117.4.1 -r1.117.4.2 src/sys/arch/atari/conf/FALCON
cvs rdiff -u -r1.115.4.1 -r1.115.4.2 src/sys/arch/atari/conf/HADES
cvs rdiff -u -r1.93.2.1 -r1.93.2.2 src/sys/arch/atari/conf/MILAN-ISAIDE
cvs rdiff -u -r1.97.2.1 -r1.97.2.2 src/sys/arch/atari/conf/MILAN-PCIIDE
cvs rdiff -u -r1.23.6.1 -r1.23.6.2 src/sys/arch/atari/conf/SMALL030

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/atari/conf/ATARITT
diff -u src/sys/arch/atari/conf/ATARITT:1.120.4.1 src/sys/arch/atari/conf/ATARITT:1.120.4.2
--- src/sys/arch/atari/conf/ATARITT:1.120.4.1	Sun Sep 11 18:17:02 2022
+++ src/sys/arch/atari/conf/ATARITT	Sun Sep 11 18:24:18 2022
@@ -1,5 +1,5 @@
 #
-# $NetBSD: ATARITT,v 1.120.4.1 2022/09/11 18:17:02 martin Exp $
+# $NetBSD: ATARITT,v 1.120.4.2 2022/09/11 18:24:18 martin Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.

Index: src/sys/arch/atari/conf/FALCON
diff -u src/sys/arch/atari/conf/FALCON:1.117.4.1 src/sys/arch/atari/conf/FALCON:1.117.4.2
--- src/sys/arch/atari/conf/FALCON:1.117.4.1	Sun Sep 11 18:17:02 2022
+++ src/sys/arch/atari/conf/FALCON	Sun Sep 11 18:24:18 2022
@@ -1,5 +1,5 @@
 #
-# $NetBSD: FALCON,v 1.117.4.1 2022/09/11 18:17:02 martin Exp $
+# $NetBSD: FALCON,v 1.117.4.2 2022/09/11 18:24:18 martin Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.

Index: src/sys/arch/atari/conf/HADES
diff -u src/sys/arch/atari/conf/HADES:1.115.4.1 src/sys/arch/atari/conf/HADES:1.115.4.2
--- src/sys/arch/atari/conf/HADES:1.115.4.1	Sun Sep 11 18:17:02 2022
+++ src/sys/arch/atari/conf/HADES	Sun Sep 11 18:24:18 2022
@@ -1,5 +1,5 @@
 #
-# $NetBSD: HADES,v 1.115.4.1 2022/09/11 18:17:02 martin Exp $
+# $NetBSD: HADES,v 1.115.4.2 2022/09/11 18:24:18 martin Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.

Index: src/sys/arch/atari/conf/MILAN-ISAIDE
diff -u src/sys/arch/atari/conf/MILAN-ISAIDE:1.93.2.1 src/sys/arch/atari/conf/MILAN-ISAIDE:1.93.2.2
--- src/sys/arch/atari/conf/MILAN-ISAIDE:1.93.2.1	Sun Sep 11 18:17:02 2022
+++ src/sys/arch/atari/conf/MILAN-ISAIDE	Sun Sep 11 18:24:18 2022
@@ -1,11 +1,11 @@
 #
-# $NetBSD: MILAN-ISAIDE,v 1.93.2.1 2022/09/11 18:17:02 martin Exp $
+# $NetBSD: MILAN-ISAIDE,v 1.93.2.2 2022/09/11 18:24:18 martin Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.
 #
 # Created from:
-#		NetBSD: MILAN.in,v 1.29 2019/05/04 13:12:03 tsutsui Exp $
+#		NetBSD: MILAN.in,v 1.29.2.1 2022/09/11 18:23:30 martin Exp $
 #		NetBSD: GENERIC.in,v 1.118.4.1 2022/09/11 18:14:55 martin Exp $
 include "arch/atari/conf/std.milan"
 options INCLUDE_CONFIG_FILE # embed config file in kernel binary
@@ -83,6 +83,7 @@ options WS_KERNEL_BG=WSCOL_BLACK
 options WSDISPLAY_COMPAT_USL # wsconscfg VT handling
 options WSDISPLAY_DEFAULTSCREENS=4
 options PCDISPLAY_SOFTCURSOR
+options FONT_VT220L8x16
 isab0 at mainbus0 # ISA-bus
 isa0 at isab0
 pcib0 at mainbus0 # PCI-bus

Index: src/sys/arch/atari/conf/MILAN-PCIIDE
diff -u src/sys/arch/atari/conf/MILAN-PCIIDE:1.97.2.1 src/sys/arch/atari/conf/MILAN-PCIIDE:1.97.2.2
--- src/sys/arch/atari/conf/MILAN-PCIIDE:1.97.2.1	Sun Sep 11 18:17:02 2022
+++ src/sys/arch/atari/conf/MILAN-PCIIDE	Sun Sep 11 18:24:18 2022
@@ -1,11 +1,11 @@
 #
-# $NetBSD: MILAN-PCIIDE,v 1.97.2.1 2022/09/11 18:17:02 martin Exp $
+# $NetBSD: MILAN-PCIIDE,v 1.97.2.2 2022/09/11 18:24:18 martin Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.
 #
 # Created from:
-#		NetBSD: MILAN.in,v 1.29 2019/05/04 13:12:03 tsutsui Exp $
+#		NetBSD: MILAN.in,v 1.29.2.1 2022/09/11 18:23:30 martin Exp $
 #		NetBSD: GENERIC.in,v 1.118.4.1 2022/09/11 18:14:55 martin Exp $
 include "arch/atari/conf/std.milan"
 options INCLUDE_CONFIG_FILE # embed config file in kernel binary
@@ -83,6 +83,7 @@ options WS_KERNEL_BG=WSCOL_BLACK
 options WSDISPLAY_COMPAT_USL # wsconscfg VT handling
 options WSDISPLAY_DEFAULTSCREENS=4
 options PCDISPLAY_SOFTCURSOR
+options FONT_VT220L8x16
 isab0 at mainbus0 # ISA-bus
 isa0 at isab0
 pcib0 at mainbus0 # PCI-bus

Index: src/sys/arch/atari/conf/SMALL030
diff -u src/sys/arch/atari/conf/SMALL030:1.23.6.1 src/sys/arch/atari/conf/SMALL030:1.23.6.2
--- src/sys/arch/atari/conf/SMALL030:1.23.6.1	Sun Sep 11 18:17:02 2022
+++ src/sys/arch/atari/conf/SMALL030	Sun Sep 11 18:24:18 2022
@@ -1,5 +1,5 @@
 #
-# $NetBSD: SMALL030,v 1.23.6.1 2022/09/11 18:17:02 

CVS commit: [netbsd-9] src/sys/arch/atari/conf

2022-09-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 11 18:24:18 UTC 2022

Modified Files:
src/sys/arch/atari/conf [netbsd-9]: ATARITT FALCON HADES MILAN-ISAIDE
MILAN-PCIIDE SMALL030

Log Message:
regen (ticket #1521)


To generate a diff of this commit:
cvs rdiff -u -r1.120.4.1 -r1.120.4.2 src/sys/arch/atari/conf/ATARITT
cvs rdiff -u -r1.117.4.1 -r1.117.4.2 src/sys/arch/atari/conf/FALCON
cvs rdiff -u -r1.115.4.1 -r1.115.4.2 src/sys/arch/atari/conf/HADES
cvs rdiff -u -r1.93.2.1 -r1.93.2.2 src/sys/arch/atari/conf/MILAN-ISAIDE
cvs rdiff -u -r1.97.2.1 -r1.97.2.2 src/sys/arch/atari/conf/MILAN-PCIIDE
cvs rdiff -u -r1.23.6.1 -r1.23.6.2 src/sys/arch/atari/conf/SMALL030

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/arch/atari

2022-09-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 11 18:23:30 UTC 2022

Modified Files:
src/sys/arch/atari/conf [netbsd-9]: MILAN.in
src/sys/arch/atari/pci [netbsd-9]: pci_vga.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1521):

sys/arch/atari/pci/pci_vga.c: revision 1.19
sys/arch/atari/conf/MILAN.in: revision 1.30

Improve VGA console settings for Milan, especially for sysinst.
- use explicit WSDISPLAY_FONTENC_IBM font that MI vga(4) assumes
  (so that box drawing characters are rendered properly)
- set ATC and DAC palette settings for proper colors
  (copied from MI vga_subr.c for now because HADES doesn't use mi vga(4))

Tested on Milan with S3 Trio64.  (XXX: needs working HADES with ET4000)

Specify options FONT_VT220L8x16 to get similar glyphs as past font_8x16.c.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.29.2.1 src/sys/arch/atari/conf/MILAN.in
cvs rdiff -u -r1.17 -r1.17.2.1 src/sys/arch/atari/pci/pci_vga.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/atari/conf/MILAN.in
diff -u src/sys/arch/atari/conf/MILAN.in:1.29 src/sys/arch/atari/conf/MILAN.in:1.29.2.1
--- src/sys/arch/atari/conf/MILAN.in:1.29	Sat May  4 13:12:03 2019
+++ src/sys/arch/atari/conf/MILAN.in	Sun Sep 11 18:23:30 2022
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: MILAN.in,v 1.29 2019/05/04 13:12:03 tsutsui Exp $
+#	$NetBSD: MILAN.in,v 1.29.2.1 2022/09/11 18:23:30 martin Exp $
 #
 # Milan
 #
@@ -34,6 +34,8 @@ options 	WSDISPLAY_DEFAULTSCREENS=4
 options 	PCDISPLAY_SOFTCURSOR
 # modify the screen type of the console; defaults to "80x25"
 #options 	VGA_CONSOLE_SCREENTYPE="\"80x25\""
+# use explicit WSDISPLAY_FONTENC_IBM font that MI vga(4) assumes
+options 	FONT_VT220L8x16
 
 #
 # The following sections describe various hardware options.

Index: src/sys/arch/atari/pci/pci_vga.c
diff -u src/sys/arch/atari/pci/pci_vga.c:1.17 src/sys/arch/atari/pci/pci_vga.c:1.17.2.1
--- src/sys/arch/atari/pci/pci_vga.c:1.17	Sat May  4 09:03:08 2019
+++ src/sys/arch/atari/pci/pci_vga.c	Sun Sep 11 18:23:30 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_vga.c,v 1.17 2019/05/04 09:03:08 tsutsui Exp $	*/
+/*	$NetBSD: pci_vga.c,v 1.17.2.1 2022/09/11 18:23:30 martin Exp $	*/
 
 /*
  * Copyright (c) 1999 Leo Weppelman.  All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pci_vga.c,v 1.17 2019/05/04 09:03:08 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_vga.c,v 1.17.2.1 2022/09/11 18:23:30 martin Exp $");
 
 #include 
 #include 
@@ -55,11 +55,51 @@ extern font_info	font_info_8x8;
 extern font_info	font_info_8x16;
 
 /* Console colors */
-static const uint8_t conscolors[3][3] = {
-	/* background, foreground, hilite */
-	{ 0x00, 0x00, 0x00 },
-	{ 0x30, 0x30, 0x30 },
-	{ 0x3f, 0x3f, 0x3f }
+/* attribute controller registers */
+static const uint8_t vga_atc[] = {
+	0x00,	/* 00: internal palette  0 */
+	0x01,	/* 01: internal palette  1 */
+	0x02,	/* 02: internal palette  2 */
+	0x03,	/* 03: internal palette  3 */
+	0x04,	/* 04: internal palette  4 */
+	0x05,	/* 05: internal palette  5 */
+	0x14,	/* 06: internal palette  6 */
+	0x07,	/* 07: internal palette  7 */
+	0x38,	/* 08: internal palette  8 */
+	0x39,	/* 09: internal palette  9 */
+	0x3a,	/* 0A: internal palette 10 */
+	0x3b,	/* 0B: internal palette 11 */
+	0x3c,	/* 0C: internal palette 12 */
+	0x3d,	/* 0D: internal palette 13 */
+	0x3e,	/* 0E: internal palette 14 */
+	0x3f,	/* 0F: internal palette 15 */
+	0x0c,	/* 10: attribute mode control */
+	0x00,	/* 11: overscan color */
+	0x0f,	/* 12: color plane enable */
+	0x08,	/* 13: horizontal PEL panning */
+	0x00	/* 14: color select */
+};
+
+/* video DAC palette registers */
+/* XXX only set up 16 colors used by internal palette in ATC regsters */
+static const uint8_t vga_dacpal[] = {
+	/* R G B */
+	0x00, 0x00, 0x00,	/* BLACK*/
+	0x00, 0x00, 0x2a,	/* BLUE	*/
+	0x00, 0x2a, 0x00,	/* GREEN*/
+	0x00, 0x2a, 0x2a,	/* CYAN */
+	0x2a, 0x00, 0x00,	/* RED  */
+	0x2a, 0x00, 0x2a,	/* MAGENTA  */
+	0x2a, 0x15, 0x00,	/* BROWN*/
+	0x2a, 0x2a, 0x2a,	/* LIGHTGREY*/
+	0x15, 0x15, 0x15,	/* DARKGREY */
+	0x15, 0x15, 0x3f,	/* LIGHTBLUE*/
+	0x15, 0x3f, 0x15,	/* LIGHTGREEN   */
+	0x15, 0x3f, 0x3f,	/* LIGHTCYAN*/
+	0x3f, 0x15, 0x15,	/* LIGHTRED */
+	0x3f, 0x15, 0x3f,	/* LIGHTMAGENTA */
+	0x3f, 0x3f, 0x15,	/* YELLOW   */
+	0x3f, 0x3f, 0x3f	/* WHITE*/
 };
 
 static bus_space_tag_t	vga_iot, vga_memt;
@@ -79,7 +119,7 @@ check_for_vga(bus_space_tag_t iot, bus_s
 	pci_chipset_tag_t	pc = NULL; /* XXX */
 	bus_space_handle_t	ioh_regs, memh_fb;
 	pcitag_t		tag;
-	int			device, found, maxndevs, i, j;
+	int			device, found, maxndevs, i;
 	int			got_ioh, got_memh, rv;
 	uint32_t		id, class;
 	volatile uint8_t	*regs;
@@ -176,16 +216,23 @@ check_for_vga(bus_space_tag_t iot, bus_s
 	 * Generic 

CVS commit: [netbsd-9] src/sys/arch/atari

2022-09-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 11 18:23:30 UTC 2022

Modified Files:
src/sys/arch/atari/conf [netbsd-9]: MILAN.in
src/sys/arch/atari/pci [netbsd-9]: pci_vga.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1521):

sys/arch/atari/pci/pci_vga.c: revision 1.19
sys/arch/atari/conf/MILAN.in: revision 1.30

Improve VGA console settings for Milan, especially for sysinst.
- use explicit WSDISPLAY_FONTENC_IBM font that MI vga(4) assumes
  (so that box drawing characters are rendered properly)
- set ATC and DAC palette settings for proper colors
  (copied from MI vga_subr.c for now because HADES doesn't use mi vga(4))

Tested on Milan with S3 Trio64.  (XXX: needs working HADES with ET4000)

Specify options FONT_VT220L8x16 to get similar glyphs as past font_8x16.c.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.29.2.1 src/sys/arch/atari/conf/MILAN.in
cvs rdiff -u -r1.17 -r1.17.2.1 src/sys/arch/atari/pci/pci_vga.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/arch/atari/vme

2022-09-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 11 18:21:56 UTC 2022

Modified Files:
src/sys/arch/atari/vme [netbsd-9]: if_le_vme.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1520):

sys/arch/atari/vme/if_le_vme.c: revision 1.32
sys/arch/atari/vme/if_le_vme.c: revision 1.33

Fix a long-standing "leprobe: cannot map memory-area" error during probe.

PAM and ROTHRON VME LANCE seem to have 64KB RAM, but the register
address region are overwrapped, so we cannot map both of them via
bus_space_map(9) that checks regions using extent(9).

To work around this, just use only 32KB RAM for buffers.

XXX: not sure if anyone tried these VME LANCE variants

No need to print errors via aprint_error(9) in probe/match function.

Note aprint_error(9) triggers "WARNING: 1 error while detecting hardware"
message after device configuration, so it's a bit confusing for users.

Also check all possible variants even if bus_space_map(9) fails
(though now it shouldn't fail).


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.31.58.1 src/sys/arch/atari/vme/if_le_vme.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/atari/vme/if_le_vme.c
diff -u src/sys/arch/atari/vme/if_le_vme.c:1.31 src/sys/arch/atari/vme/if_le_vme.c:1.31.58.1
--- src/sys/arch/atari/vme/if_le_vme.c:1.31	Fri Jul  1 20:34:06 2011
+++ src/sys/arch/atari/vme/if_le_vme.c	Sun Sep 11 18:21:56 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_le_vme.c,v 1.31 2011/07/01 20:34:06 dyoung Exp $	*/
+/*	$NetBSD: if_le_vme.c,v 1.31.58.1 2022/09/11 18:21:56 martin Exp $	*/
 
 /*-
  * Copyright (c) 1998 maximum entropy.  All rights reserved.
@@ -74,7 +74,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_le_vme.c,v 1.31 2011/07/01 20:34:06 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_le_vme.c,v 1.31.58.1 2022/09/11 18:21:56 martin Exp $");
 
 #include "opt_inet.h"
 
@@ -111,8 +111,11 @@ __KERNEL_RCSID(0, "$NetBSD: if_le_vme.c,
 #include 
 
 /*
- * All cards except BVME410 have 64KB RAM. However On the Riebl cards the
- * area between the offsets 0xee70-0xeec0 is used to store config data.
+ * All cards except BVME410 have 64KB RAM. However,
+ *  - On the Riebl cards the area between the offsets 0xee70-0xeec0 is used
+ *to store config data.
+ *  - On PAM and ROTHRON, mem_addr cannot be mapped if reg_addr is already
+ *mapped because they are overwrapped. Just use 32KB as Linux does.
  */
 struct le_addresses {
 	u_long	reg_addr;
@@ -124,9 +127,9 @@ struct le_addresses {
 } lestd[] = {
 	{ 0xfe00fff0, 0xfe01, IRQUNK, 16, 64*1024,
 LE_OLD_RIEBL|LE_NEW_RIEBL }, /* Riebl	*/
-	{ 0xfec0, 0xfecf,  5, 16, 64*1024,
+	{ 0xfec0, 0xfecf,  5, 16, 32*1024,
 LE_PAM },		 /* PAM	*/
-	{ 0xfec0, 0xfecf,  5, 16, 64*1024,
+	{ 0xfec0, 0xfecf,  5, 16, 32*1024,
 LE_ROTHRON },		 /* Rhotron	*/
 	{ 0xfeff4100, 0xfe00,  4,  8, VMECF_MEMSIZ_DEFAULT,
 LE_BVME410 }		 /* BVME410 */
@@ -230,8 +233,7 @@ le_vme_match(device_t parent, cfdata_t c
 
 		if (bus_space_map(iot, le_ap->reg_addr, le_ap->reg_size, 0,
 		)) {
-			aprint_error("leprobe: cannot map io-area\n");
-			return 0;
+			continue;
 		}
 		if (le_ap->mem_size == VMECF_MEMSIZ_DEFAULT) {
 			if (bvme410_probe(iot, ioh)) {
@@ -249,8 +251,7 @@ le_vme_match(device_t parent, cfdata_t c
 		if (bus_space_map(memt, le_ap->mem_addr, le_ap->mem_size, 0,
 		)) {
 			bus_space_unmap(iot, ioh, le_ap->reg_size);
-			aprint_error("leprobe: cannot map memory-area\n");
-			return 0;
+			continue;
 		}
 		found = probe_addresses(, , , );
 		bus_space_unmap(iot, ioh, le_ap->reg_size);



CVS commit: [netbsd-9] src/sys/arch/atari/vme

2022-09-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 11 18:21:56 UTC 2022

Modified Files:
src/sys/arch/atari/vme [netbsd-9]: if_le_vme.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1520):

sys/arch/atari/vme/if_le_vme.c: revision 1.32
sys/arch/atari/vme/if_le_vme.c: revision 1.33

Fix a long-standing "leprobe: cannot map memory-area" error during probe.

PAM and ROTHRON VME LANCE seem to have 64KB RAM, but the register
address region are overwrapped, so we cannot map both of them via
bus_space_map(9) that checks regions using extent(9).

To work around this, just use only 32KB RAM for buffers.

XXX: not sure if anyone tried these VME LANCE variants

No need to print errors via aprint_error(9) in probe/match function.

Note aprint_error(9) triggers "WARNING: 1 error while detecting hardware"
message after device configuration, so it's a bit confusing for users.

Also check all possible variants even if bus_space_map(9) fails
(though now it shouldn't fail).


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.31.58.1 src/sys/arch/atari/vme/if_le_vme.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/arch/atari/conf

2022-09-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 11 18:17:02 UTC 2022

Modified Files:
src/sys/arch/atari/conf [netbsd-9]: ATARITT FALCON HADES MILAN-ISAIDE
MILAN-PCIIDE SMALL030

Log Message:
regen (ticket #1519)


To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.120.4.1 src/sys/arch/atari/conf/ATARITT
cvs rdiff -u -r1.117 -r1.117.4.1 src/sys/arch/atari/conf/FALCON
cvs rdiff -u -r1.115 -r1.115.4.1 src/sys/arch/atari/conf/HADES
cvs rdiff -u -r1.93 -r1.93.2.1 src/sys/arch/atari/conf/MILAN-ISAIDE
cvs rdiff -u -r1.97 -r1.97.2.1 src/sys/arch/atari/conf/MILAN-PCIIDE
cvs rdiff -u -r1.23 -r1.23.6.1 src/sys/arch/atari/conf/SMALL030

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/atari/conf/ATARITT
diff -u src/sys/arch/atari/conf/ATARITT:1.120 src/sys/arch/atari/conf/ATARITT:1.120.4.1
--- src/sys/arch/atari/conf/ATARITT:1.120	Sat Apr 13 08:26:14 2019
+++ src/sys/arch/atari/conf/ATARITT	Sun Sep 11 18:17:02 2022
@@ -1,11 +1,11 @@
 #
-# $NetBSD: ATARITT,v 1.120 2019/04/13 08:26:14 isaki Exp $
+# $NetBSD: ATARITT,v 1.120.4.1 2022/09/11 18:17:02 martin Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.
 #
 # Created from:
-#		NetBSD: GENERIC.in,v 1.118 2019/04/13 08:22:59 isaki Exp $
+#		NetBSD: GENERIC.in,v 1.118.4.1 2022/09/11 18:14:55 martin Exp $
 include "arch/atari/conf/std.atari"
 options INCLUDE_CONFIG_FILE # embed config file in kernel binary
 makeoptions COPTS="-O2 -fno-reorder-blocks" # see share/mk/sys.mk
@@ -44,7 +44,7 @@ options KTRACE # Add kernel tracing syst
 options USERCONF # userconf(4) support
 options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel
 options MODULAR # new style module(7) framework
-options ST_POOL_SIZE=24 # smallest that allows TT-HIGH
+options ST_POOL_SIZE=56 # for SCSI, FDC, and Xserver
 options TT_SCSI # SCSI-support for TT
 options TT_VIDEO # Graphics support for TT
 options MEMORY_DISK_HOOKS # Boot RAM-disk

Index: src/sys/arch/atari/conf/FALCON
diff -u src/sys/arch/atari/conf/FALCON:1.117 src/sys/arch/atari/conf/FALCON:1.117.4.1
--- src/sys/arch/atari/conf/FALCON:1.117	Sat Apr 13 08:26:14 2019
+++ src/sys/arch/atari/conf/FALCON	Sun Sep 11 18:17:02 2022
@@ -1,11 +1,11 @@
 #
-# $NetBSD: FALCON,v 1.117 2019/04/13 08:26:14 isaki Exp $
+# $NetBSD: FALCON,v 1.117.4.1 2022/09/11 18:17:02 martin Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.
 #
 # Created from:
-#		NetBSD: GENERIC.in,v 1.118 2019/04/13 08:22:59 isaki Exp $
+#		NetBSD: GENERIC.in,v 1.118.4.1 2022/09/11 18:14:55 martin Exp $
 include "arch/atari/conf/std.atari"
 options INCLUDE_CONFIG_FILE # embed config file in kernel binary
 makeoptions COPTS="-O2 -fno-reorder-blocks" # see share/mk/sys.mk
@@ -49,7 +49,7 @@ options KTRACE # Add kernel tracing syst
 options USERCONF # userconf(4) support
 options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel
 options MODULAR # new style module(7) framework
-options ST_POOL_SIZE=24 # smallest that allows TT-HIGH
+options ST_POOL_SIZE=56 # for SCSI, FDC, and Xserver
 options FALCON_SCSI # SCSI-support for Falcon
 options FALCON_VIDEO # Graphics support for FALCON
 options MEMORY_DISK_HOOKS # Boot RAM-disk

Index: src/sys/arch/atari/conf/HADES
diff -u src/sys/arch/atari/conf/HADES:1.115 src/sys/arch/atari/conf/HADES:1.115.4.1
--- src/sys/arch/atari/conf/HADES:1.115	Sat Apr 13 08:26:14 2019
+++ src/sys/arch/atari/conf/HADES	Sun Sep 11 18:17:02 2022
@@ -1,12 +1,12 @@
 #
-# $NetBSD: HADES,v 1.115 2019/04/13 08:26:14 isaki Exp $
+# $NetBSD: HADES,v 1.115.4.1 2022/09/11 18:17:02 martin Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.
 #
 # Created from:
 #		NetBSD: HADES.in,v 1.16 2018/03/31 04:19:41 tsutsui Exp $
-#		NetBSD: GENERIC.in,v 1.118 2019/04/13 08:22:59 isaki Exp $
+#		NetBSD: GENERIC.in,v 1.118.4.1 2022/09/11 18:14:55 martin Exp $
 include "arch/atari/conf/std.hades"
 options INCLUDE_CONFIG_FILE # embed config file in kernel binary
 makeoptions COPTS="-O2 -fno-reorder-blocks" # see share/mk/sys.mk
@@ -48,7 +48,7 @@ options KTRACE # Add kernel tracing syst
 options USERCONF # userconf(4) support
 options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel
 options MODULAR # new style module(7) framework
-options ST_POOL_SIZE=24 # smallest that allows TT-HIGH
+options ST_POOL_SIZE=56 # for SCSI, FDC, and Xserver
 options TT_SCSI # SCSI-support for TT
 options TT_VIDEO # Graphics support for TT
 options MEMORY_DISK_HOOKS # Boot RAM-disk

Index: src/sys/arch/atari/conf/MILAN-ISAIDE
diff -u src/sys/arch/atari/conf/MILAN-ISAIDE:1.93 src/sys/arch/atari/conf/MILAN-ISAIDE:1.93.2.1
--- src/sys/arch/atari/conf/MILAN-ISAIDE:1.93	Sat May  4 13:14:18 2019
+++ src/sys/arch/atari/conf/MILAN-ISAIDE	Sun Sep 11 18:17:02 

CVS commit: [netbsd-9] src/sys/arch/atari/conf

2022-09-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 11 18:17:02 UTC 2022

Modified Files:
src/sys/arch/atari/conf [netbsd-9]: ATARITT FALCON HADES MILAN-ISAIDE
MILAN-PCIIDE SMALL030

Log Message:
regen (ticket #1519)


To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.120.4.1 src/sys/arch/atari/conf/ATARITT
cvs rdiff -u -r1.117 -r1.117.4.1 src/sys/arch/atari/conf/FALCON
cvs rdiff -u -r1.115 -r1.115.4.1 src/sys/arch/atari/conf/HADES
cvs rdiff -u -r1.93 -r1.93.2.1 src/sys/arch/atari/conf/MILAN-ISAIDE
cvs rdiff -u -r1.97 -r1.97.2.1 src/sys/arch/atari/conf/MILAN-PCIIDE
cvs rdiff -u -r1.23 -r1.23.6.1 src/sys/arch/atari/conf/SMALL030

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/arch/atari

2022-09-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 11 18:14:55 UTC 2022

Modified Files:
src/sys/arch/atari/atari [netbsd-9]: atari_init.c
src/sys/arch/atari/conf [netbsd-9]: GENERIC.in files.atari

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1519):

sys/arch/atari/conf/GENERIC.in: revision 1.123
sys/arch/atari/conf/files.atari: revision 1.124
sys/arch/atari/atari/atari_init.c: revision 1.105

Allocalte enough reserved ST-RAM to make the old Xserver work by default.

Instead, check ST-RAM size and TT-RAM size on startup and restrict
size of reserved ST memory on lower RAM machines.

Closes PR port-atari/41002 from David Ross.

While here, make options ST_POOL_SIZE defparam'ed to make sure to
reflect config(5) changes on each build.


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.101.8.1 src/sys/arch/atari/atari/atari_init.c
cvs rdiff -u -r1.118 -r1.118.4.1 src/sys/arch/atari/conf/GENERIC.in
cvs rdiff -u -r1.123 -r1.123.4.1 src/sys/arch/atari/conf/files.atari

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/atari/atari/atari_init.c
diff -u src/sys/arch/atari/atari/atari_init.c:1.101 src/sys/arch/atari/atari/atari_init.c:1.101.8.1
--- src/sys/arch/atari/atari/atari_init.c:1.101	Mon Feb 26 15:11:12 2018
+++ src/sys/arch/atari/atari/atari_init.c	Sun Sep 11 18:14:55 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: atari_init.c,v 1.101 2018/02/26 15:11:12 tsutsui Exp $	*/
+/*	$NetBSD: atari_init.c,v 1.101.8.1 2022/09/11 18:14:55 martin Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman
@@ -33,12 +33,13 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.101 2018/02/26 15:11:12 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.101.8.1 2022/09/11 18:14:55 martin Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mbtype.h"
 #include "opt_m060sp.h"
 #include "opt_m68k_arch.h"
+#include "opt_st_pool_size.h"
 
 #include 
 #include 
@@ -145,18 +146,29 @@ extern struct pcb	*curpcb;
 vaddr_t	page_zero;
 
 /*
- * Crude support for allocation in ST-ram. Currently only used to allocate
- * video ram.
+ * Simple support for allocation in ST-ram.
+ * Currently 16 bit ST-ram is required to allocate DMA buffers for SCSI and
+ * FDC transfers, and video memory for the XFree68 based Xservers.
  * The physical address is also returned because the video init needs it to
  * setup the controller at the time the vm-system is not yet operational so
  * 'kvtop()' cannot be used.
  */
+#define	ST_POOL_SIZE_MIN	24	/* for DMA bounce buffers */
 #ifndef ST_POOL_SIZE
-#define	ST_POOL_SIZE	40			/* XXX: enough? */
+#define	ST_POOL_SIZE		56	/* Xserver requires 320KB (40 pages) */
 #endif
 
-u_long	st_pool_size = ST_POOL_SIZE * PAGE_SIZE; /* Patchable	*/
-u_long	st_pool_virt, st_pool_phys;
+psize_t	st_pool_size = ST_POOL_SIZE * PAGE_SIZE; /* Patchable	*/
+vaddr_t	st_pool_virt;
+paddr_t	st_pool_phys;
+
+/*
+ * Thresholds to restrict size of reserved ST memory to make sure
+ * the kernel at least boot even on lower memory machines.
+ * Nowadays we could assume most users have 4MB ST-RAM and 16MB TT-RAM.
+ */
+#define	STRAM_MINTHRESH		(2 * 1024 * 1024)
+#define	TTRAM_MINTHRESH		(4 * 1024 * 1024)
 
 /* I/O address space variables */
 vaddr_t	stio_addr;		/* Where the st io-area is mapped	*/
@@ -284,12 +296,20 @@ start_c(int id, u_int ttphystart, u_int 
 #endif
 
 	/*
-	 * The following is a hack. We do not know how much ST memory we
-	 * really need until after configuration has finished. At this
-	 * time I have no idea how to grab ST memory at that time.
+	 * We do not know how much ST memory we really need until after
+	 * configuration has finished, but typical users of ST memory
+	 * are bounce buffers DMA against TT-RAM for SCSI and FDC,
+	 * and video memory for the Xserver.
+	 * If we have enough RAMs reserve ST memory including for the Xserver.
+	 * Otherwise just allocate minimum one for SCSI and FDC.
+	 *
 	 * The round_page() call is ment to correct errors made by
 	 * binpatching!
 	 */
+	if (st_pool_size > ST_POOL_SIZE_MIN * PAGE_SIZE &&
+	(stphysize <= STRAM_MINTHRESH || ttphysize <= TTRAM_MINTHRESH)) {
+		st_pool_size = ST_POOL_SIZE_MIN * PAGE_SIZE;
+	}
 	st_pool_size   = m68k_round_page(st_pool_size);
 	st_pool_phys   = stphysize - st_pool_size;
 	stphysize  = st_pool_phys;

Index: src/sys/arch/atari/conf/GENERIC.in
diff -u src/sys/arch/atari/conf/GENERIC.in:1.118 src/sys/arch/atari/conf/GENERIC.in:1.118.4.1
--- src/sys/arch/atari/conf/GENERIC.in:1.118	Sat Apr 13 08:22:59 2019
+++ src/sys/arch/atari/conf/GENERIC.in	Sun Sep 11 18:14:55 2022
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: GENERIC.in,v 1.118 2019/04/13 08:22:59 isaki Exp $
+#	$NetBSD: GENERIC.in,v 1.118.4.1 2022/09/11 18:14:55 martin Exp $
 #
 # Generic atari
 #
@@ -204,7 +204,7 @@ options		PIPE_SOCKETPAIR	# smaller, but 
 # Atari specific options
 #
 #options 	

CVS commit: [netbsd-9] src/sys/arch/atari

2022-09-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 11 18:14:55 UTC 2022

Modified Files:
src/sys/arch/atari/atari [netbsd-9]: atari_init.c
src/sys/arch/atari/conf [netbsd-9]: GENERIC.in files.atari

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1519):

sys/arch/atari/conf/GENERIC.in: revision 1.123
sys/arch/atari/conf/files.atari: revision 1.124
sys/arch/atari/atari/atari_init.c: revision 1.105

Allocalte enough reserved ST-RAM to make the old Xserver work by default.

Instead, check ST-RAM size and TT-RAM size on startup and restrict
size of reserved ST memory on lower RAM machines.

Closes PR port-atari/41002 from David Ross.

While here, make options ST_POOL_SIZE defparam'ed to make sure to
reflect config(5) changes on each build.


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.101.8.1 src/sys/arch/atari/atari/atari_init.c
cvs rdiff -u -r1.118 -r1.118.4.1 src/sys/arch/atari/conf/GENERIC.in
cvs rdiff -u -r1.123 -r1.123.4.1 src/sys/arch/atari/conf/files.atari

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/arch/atari/dev

2022-09-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 11 18:10:23 UTC 2022

Modified Files:
src/sys/arch/atari/dev [netbsd-9]: ite.c ite_cc.c ite_et.c itevar.h

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1518):

sys/arch/atari/dev/ite.c: revision 1.82
sys/arch/atari/dev/ite_cc.c: revision 1.45
sys/arch/atari/dev/ite_et.c: revision 1.36
sys/arch/atari/dev/itevar.h: revision 1.15

Add a minimum DEC special graphics character support for atari ite(4).

This closes PR port-atari/46647 (Menu borders in sysinst appear as
characters with diacritical marks instead of graphics characters).

Switching encoding support by "ESC ( " sequence for vt220 was
pulled from x68k ite(4) (that already supports ISO-2022-JP and EUC-JP).

Note atari's fonts already include DEC special graphics characters.
ET4000 on Hades is untested due to long-term lack of hardware.

Discussed on port-atari@ etc.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.79.2.1 src/sys/arch/atari/dev/ite.c
cvs rdiff -u -r1.40 -r1.40.2.1 src/sys/arch/atari/dev/ite_cc.c
cvs rdiff -u -r1.31 -r1.31.2.1 src/sys/arch/atari/dev/ite_et.c
cvs rdiff -u -r1.14 -r1.14.58.1 src/sys/arch/atari/dev/itevar.h

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/arch/atari/dev

2022-09-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 11 18:10:23 UTC 2022

Modified Files:
src/sys/arch/atari/dev [netbsd-9]: ite.c ite_cc.c ite_et.c itevar.h

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1518):

sys/arch/atari/dev/ite.c: revision 1.82
sys/arch/atari/dev/ite_cc.c: revision 1.45
sys/arch/atari/dev/ite_et.c: revision 1.36
sys/arch/atari/dev/itevar.h: revision 1.15

Add a minimum DEC special graphics character support for atari ite(4).

This closes PR port-atari/46647 (Menu borders in sysinst appear as
characters with diacritical marks instead of graphics characters).

Switching encoding support by "ESC ( " sequence for vt220 was
pulled from x68k ite(4) (that already supports ISO-2022-JP and EUC-JP).

Note atari's fonts already include DEC special graphics characters.
ET4000 on Hades is untested due to long-term lack of hardware.

Discussed on port-atari@ etc.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.79.2.1 src/sys/arch/atari/dev/ite.c
cvs rdiff -u -r1.40 -r1.40.2.1 src/sys/arch/atari/dev/ite_cc.c
cvs rdiff -u -r1.31 -r1.31.2.1 src/sys/arch/atari/dev/ite_et.c
cvs rdiff -u -r1.14 -r1.14.58.1 src/sys/arch/atari/dev/itevar.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/atari/dev/ite.c
diff -u src/sys/arch/atari/dev/ite.c:1.79 src/sys/arch/atari/dev/ite.c:1.79.2.1
--- src/sys/arch/atari/dev/ite.c:1.79	Sat Jun 29 16:41:19 2019
+++ src/sys/arch/atari/dev/ite.c	Sun Sep 11 18:10:23 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: ite.c,v 1.79 2019/06/29 16:41:19 tsutsui Exp $	*/
+/*	$NetBSD: ite.c,v 1.79.2.1 2022/09/11 18:10:23 martin Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -44,7 +44,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.79 2019/06/29 16:41:19 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.79.2.1 2022/09/11 18:10:23 martin Exp $");
 
 #include "opt_ddb.h"
 
@@ -736,6 +736,12 @@ ite_reset(struct ite_softc *sc)
 	sc->keypad_appmode = 0;
 	sc->imode = 0;
 	sc->key_repeat = 1;
+	sc->G0 = CSET_ASCII;
+	sc->G1 = CSET_DECGRAPH;
+	sc->G2 = 0;
+	sc->G3 = 0;
+	sc->GL = >G0;
+	sc->GR = >G1;
 	memset(sc->tabs, 0, sc->cols);
 	for (i = 0; i < sc->cols; i++)
 		sc->tabs[i] = ((i & 7) == 0);
@@ -1247,6 +1253,14 @@ ite_lf (struct ite_softc *sc)
 }
   SUBR_CURSOR(sc, MOVE_CURSOR);
   clr_attr(sc, ATTR_INV);
+
+  /* reset character set */
+  sc->G0 = CSET_ASCII;
+  sc->G1 = CSET_DECGRAPH;
+  sc->G2 = 0;
+  sc->G3 = 0;
+  sc->GL = >G0;
+  sc->GR = >G1;
 }
 
 static inline void
@@ -1446,7 +1460,7 @@ iteputchar(register int c, struct ite_so
 		  case 'B':	/* ASCII */
 		  case 'A':	/* ISO latin 1 */
 		  case '<':	/* user preferred suplemental */
-		  case '0':	/* dec special graphics */
+		  case '0':	/* DEC special graphics */
 		  
 		  /* 96-character sets: */
 		  case '-':	/* G1 */
@@ -1471,27 +1485,32 @@ iteputchar(register int c, struct ite_so
 		  
 		  /* locking shift modes (as you might guess, not yet supported..) */
 		  case '`':
-		sc->GR = sc->G1;
+		sc->GR = >G1;
 		sc->escape = 0;
 		return;
 		
 		  case 'n':
-		sc->GL = sc->G2;
+		sc->GL = >G2;
 		sc->escape = 0;
 		return;
 		
 		  case '}':
-		sc->GR = sc->G2;
+		sc->GR = >G2;
 		sc->escape = 0;
 		return;
 		
 		  case 'o':
-		sc->GL = sc->G3;
+		sc->GL = >G3;
 		sc->escape = 0;
 		return;
 		
 		  case '|':
-		sc->GR = sc->G3;
+		sc->GR = >G3;
+		sc->escape = 0;
+		return;
+
+		  case '~':
+		sc->GR = >G1;
 		sc->escape = 0;
 		return;
 		
@@ -1511,16 +1530,30 @@ iteputchar(register int c, struct ite_so
 
 
 		  case '7':
+		/* save cursor */
 		sc->save_curx = sc->curx;
 		sc->save_cury = sc->cury;
 		sc->save_attribute = sc->attribute;
+		sc->sc_G0 = sc->G0;
+		sc->sc_G1 = sc->G1;
+		sc->sc_G2 = sc->G2;
+		sc->sc_G3 = sc->G3;
+		sc->sc_GL = sc->GL;
+		sc->sc_GR = sc->GR;
 		sc->escape = 0;
 		return;
 		
 		  case '8':
+		/* restore cursor */
 		sc->curx = sc->save_curx;
 		sc->cury = sc->save_cury;
 		sc->attribute = sc->save_attribute;
+		sc->G0 = sc->sc_G0;
+		sc->G1 = sc->sc_G1;
+		sc->G2 = sc->sc_G2;
+		sc->G3 = sc->sc_G3;
+		sc->GL = sc->sc_GL;
+		sc->GR = sc->sc_GR;
 		SUBR_CURSOR(sc, MOVE_CURSOR);
 		sc->escape = 0;
 		return;
@@ -1551,8 +1584,22 @@ iteputchar(register int c, struct ite_so
 		break;
 
 
-	  case '(':
-	  case ')':
+	  case '(': /* designated G0 */
+		switch (c) {
+		case 'B': /* US-ASCII */
+		  sc->G0 = CSET_ASCII;
+		  sc->escape = 0;
+		  return;
+		case '0': /* DEC special graphics */
+		  sc->G0 = CSET_DECGRAPH;
+		  sc->escape = 0;
+		  return;
+		default:
+		  /* not supported */
+		  sc->escape = 0;
+		  return;
+		}
+	  case ')': /* 

CVS commit: [netbsd-9] src/doc

2022-09-10 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Sep 10 08:21:01 UTC 2022

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

Log Message:
Ticket #1517


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.10 -r1.1.2.11 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.10 src/doc/CHANGES-9.4:1.1.2.11
--- src/doc/CHANGES-9.4:1.1.2.10	Fri Sep  9 18:21:47 2022
+++ src/doc/CHANGES-9.4	Sat Sep 10 08:21:01 2022
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.10 2022/09/09 18:21:47 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.11 2022/09/10 08:21:01 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -142,3 +142,8 @@ sys/kern/kern_core.c1.36
 	Fix kauth credential reference leak.
 	[christos, ticket #1516]
 
+sys/kern/kern_core.c1.37
+
+	Avoid a GCC warning.
+	[mrg, ticket #1517]
+



CVS commit: [netbsd-9] src/doc

2022-09-10 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Sep 10 08:21:01 UTC 2022

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

Log Message:
Ticket #1517


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.10 -r1.1.2.11 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/sys/kern

2022-09-10 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Sep 10 08:19:35 UTC 2022

Modified Files:
src/sys/kern [netbsd-9]: kern_core.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1517):

sys/kern/kern_core.c: revision 1.37

avoid a GCC warning (happens on -current, -9, and -8.)


To generate a diff of this commit:
cvs rdiff -u -r1.24.22.2 -r1.24.22.3 src/sys/kern/kern_core.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/kern/kern_core.c
diff -u src/sys/kern/kern_core.c:1.24.22.2 src/sys/kern/kern_core.c:1.24.22.3
--- src/sys/kern/kern_core.c:1.24.22.2	Fri Sep  9 18:20:51 2022
+++ src/sys/kern/kern_core.c	Sat Sep 10 08:19:34 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_core.c,v 1.24.22.2 2022/09/09 18:20:51 martin Exp $	*/
+/*	$NetBSD: kern_core.c,v 1.24.22.3 2022/09/10 08:19:34 martin Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_core.c,v 1.24.22.2 2022/09/09 18:20:51 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_core.c,v 1.24.22.3 2022/09/10 08:19:34 martin Exp $");
 
 #include 
 #include 
@@ -104,7 +104,7 @@ coredump(struct lwp *l, const char *patt
 	struct coredump_iostate	io;
 	struct plimit		*lim;
 	int			error, error1;
-	char			*name, *lastslash;
+	char			*name, *lastslash = NULL /* XXXgcc */;
 
 	name = PNBUF_GET();
 



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

2022-09-10 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Sep 10 08:19:35 UTC 2022

Modified Files:
src/sys/kern [netbsd-9]: kern_core.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1517):

sys/kern/kern_core.c: revision 1.37

avoid a GCC warning (happens on -current, -9, and -8.)


To generate a diff of this commit:
cvs rdiff -u -r1.24.22.2 -r1.24.22.3 src/sys/kern/kern_core.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-09-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  9 18:21:47 UTC 2022

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

Log Message:
Ticket #1516


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.9 -r1.1.2.10 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.9 src/doc/CHANGES-9.4:1.1.2.10
--- src/doc/CHANGES-9.4:1.1.2.9	Wed Sep  7 10:07:43 2022
+++ src/doc/CHANGES-9.4	Fri Sep  9 18:21:47 2022
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.9 2022/09/07 10:07:43 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.10 2022/09/09 18:21:47 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -137,3 +137,8 @@ sys/dev/pci/if_wmreg.h1.126-1.127
 	  - KNF.
 	[msaitoh, ticket #1515]
 
+sys/kern/kern_core.c1.36
+
+	Fix kauth credential reference leak.
+	[christos, ticket #1516]
+



CVS commit: [netbsd-9] src/doc

2022-09-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  9 18:21:47 UTC 2022

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

Log Message:
Ticket #1516


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.9 -r1.1.2.10 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/sys/kern

2022-09-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  9 18:20:51 UTC 2022

Modified Files:
src/sys/kern [netbsd-9]: kern_core.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1516):

sys/kern/kern_core.c: revision 1.36

Don't forget to free the cred we just held.
Thanks to Chris J-D (chris at accessvector dot net)

While here, de-duplicate the mutex exit sequence.


To generate a diff of this commit:
cvs rdiff -u -r1.24.22.1 -r1.24.22.2 src/sys/kern/kern_core.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/kern

2022-09-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  9 18:20:51 UTC 2022

Modified Files:
src/sys/kern [netbsd-9]: kern_core.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1516):

sys/kern/kern_core.c: revision 1.36

Don't forget to free the cred we just held.
Thanks to Chris J-D (chris at accessvector dot net)

While here, de-duplicate the mutex exit sequence.


To generate a diff of this commit:
cvs rdiff -u -r1.24.22.1 -r1.24.22.2 src/sys/kern/kern_core.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/kern/kern_core.c
diff -u src/sys/kern/kern_core.c:1.24.22.1 src/sys/kern/kern_core.c:1.24.22.2
--- src/sys/kern/kern_core.c:1.24.22.1	Mon Nov 11 17:11:07 2019
+++ src/sys/kern/kern_core.c	Fri Sep  9 18:20:51 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_core.c,v 1.24.22.1 2019/11/11 17:11:07 martin Exp $	*/
+/*	$NetBSD: kern_core.c,v 1.24.22.2 2022/09/09 18:20:51 martin Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_core.c,v 1.24.22.1 2019/11/11 17:11:07 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_core.c,v 1.24.22.2 2022/09/09 18:20:51 martin Exp $");
 
 #include 
 #include 
@@ -97,7 +97,7 @@ coredump(struct lwp *l, const char *patt
 	struct vnode		*vp;
 	struct proc		*p;
 	struct vmspace		*vm;
-	kauth_cred_t		cred;
+	kauth_cred_t		cred = NULL;
 	struct pathbuf		*pb;
 	struct nameidata	nd;
 	struct vattr		vattr;
@@ -122,9 +122,7 @@ coredump(struct lwp *l, const char *patt
 	if (USPACE + ctob(vm->vm_dsize + vm->vm_ssize) >=
 	p->p_rlimit[RLIMIT_CORE].rlim_cur) {
 		error = EFBIG;		/* better error code? */
-		mutex_exit(p->p_lock);
-		mutex_exit(proc_lock);
-		goto done;
+		goto release;
 	}
 
 	/*
@@ -141,9 +139,7 @@ coredump(struct lwp *l, const char *patt
 	if (p->p_flag & PK_SUGID) {
 		if (!security_setidcore_dump) {
 			error = EPERM;
-			mutex_exit(p->p_lock);
-			mutex_exit(proc_lock);
-			goto done;
+			goto release;
 		}
 		pattern = security_setidcore_path;
 	}
@@ -157,11 +153,8 @@ coredump(struct lwp *l, const char *patt
 	error = coredump_buildname(p, name, pattern, MAXPATHLEN);
 	mutex_exit(>pl_lock);
 
-	if (error) {
-		mutex_exit(p->p_lock);
-		mutex_exit(proc_lock);
-		goto done;
-	}
+	if (error)
+		goto release;
 
 	/*
 	 * On a simple filename, see if the filesystem allow us to write
@@ -175,6 +168,7 @@ coredump(struct lwp *l, const char *patt
 			error = EPERM;
 	}
 
+release:
 	mutex_exit(p->p_lock);
 	mutex_exit(proc_lock);
 	if (error)
@@ -262,6 +256,8 @@ coredump(struct lwp *l, const char *patt
 	if (error == 0)
 		error = error1;
 done:
+	if (cred != NULL)
+		kauth_cred_free(cred);
 	if (name != NULL)
 		PNBUF_PUT(name);
 	return error;



CVS commit: [netbsd-9] src/doc

2022-09-07 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Sep  7 10:07:43 UTC 2022

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

Log Message:
Ticket #1515


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.8 -r1.1.2.9 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.8 src/doc/CHANGES-9.4:1.1.2.9
--- src/doc/CHANGES-9.4:1.1.2.8	Tue Aug 30 18:36:21 2022
+++ src/doc/CHANGES-9.4	Wed Sep  7 10:07:43 2022
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.8 2022/08/30 18:36:21 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.9 2022/09/07 10:07:43 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -119,3 +119,21 @@ distrib/vax/inst-common/dot.commonutils	
 	being compiled without support for depracated test expressions.
 	[tsutsui, ticket #1514]
 
+sys/dev/pci/if_wm.c1.741-1.749,1.753-1.757,
+		1.762 via patch
+sys/dev/pci/if_wmreg.h1.126-1.127
+
+	- Fix I219 workaround in wm_flush_desc_rings().
+	- Add more statistics counters.
+	- To avoid releasing mutex temporally, use new
+	  wm_set_mdio_slow_mode_hv_locked().
+	- No functional changes:
+	  - Turn a locking botch (shouldn't drop lock on error) into a KASSERT
+	in wm_deferred_start_locked().
+	  - Remove unneeded header inclusion.
+	  - Use __BIT() a little.
+	  - Modify comment and debug messages.
+	  - Consistency use -1 instead of 1 for some error code.
+	  - KNF.
+	[msaitoh, ticket #1515]
+



CVS commit: [netbsd-9] src/doc

2022-09-07 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Sep  7 10:07:43 UTC 2022

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

Log Message:
Ticket #1515


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.8 -r1.1.2.9 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/sys/dev/pci

2022-09-07 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Sep  7 10:05:42 UTC 2022

Modified Files:
src/sys/dev/pci [netbsd-9]: if_wm.c if_wmreg.h

Log Message:
Pull up the following revisions, requested by msaitoh in ticket #1515:

sys/dev/pci/if_wm.c 1.741-1.749,
1.753-1.757,
1.762 via patch
sys/dev/pci/if_wmreg.h  1.126-1.127

- Fix I219 workaround in wm_flush_desc_rings().
- Add more statistics counters.
- To avoid releasing mutex temporally, use new
  wm_set_mdio_slow_mode_hv_locked().
- No functional changes:
  - Turn a locking botch (shouldn't drop lock on error) into a KASSERT
in wm_deferred_start_locked().
  - Remove unneeded header inclusion.
  - Use __BIT() a little.
  - Modify comment and debug messages.
  - Consistency use -1 instead of 1 for some error code.
  - KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.645.2.13 -r1.645.2.14 src/sys/dev/pci/if_wm.c
cvs rdiff -u -r1.115.2.5 -r1.115.2.6 src/sys/dev/pci/if_wmreg.h

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/pci

2022-09-07 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Sep  7 10:05:42 UTC 2022

Modified Files:
src/sys/dev/pci [netbsd-9]: if_wm.c if_wmreg.h

Log Message:
Pull up the following revisions, requested by msaitoh in ticket #1515:

sys/dev/pci/if_wm.c 1.741-1.749,
1.753-1.757,
1.762 via patch
sys/dev/pci/if_wmreg.h  1.126-1.127

- Fix I219 workaround in wm_flush_desc_rings().
- Add more statistics counters.
- To avoid releasing mutex temporally, use new
  wm_set_mdio_slow_mode_hv_locked().
- No functional changes:
  - Turn a locking botch (shouldn't drop lock on error) into a KASSERT
in wm_deferred_start_locked().
  - Remove unneeded header inclusion.
  - Use __BIT() a little.
  - Modify comment and debug messages.
  - Consistency use -1 instead of 1 for some error code.
  - KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.645.2.13 -r1.645.2.14 src/sys/dev/pci/if_wm.c
cvs rdiff -u -r1.115.2.5 -r1.115.2.6 src/sys/dev/pci/if_wmreg.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/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.645.2.13 src/sys/dev/pci/if_wm.c:1.645.2.14
--- src/sys/dev/pci/if_wm.c:1.645.2.13	Mon Jul 11 14:10:18 2022
+++ src/sys/dev/pci/if_wm.c	Wed Sep  7 10:05:42 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.645.2.13 2022/07/11 14:10:18 martin Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.645.2.14 2022/09/07 10:05:42 martin Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.645.2.13 2022/07/11 14:10:18 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.645.2.14 2022/09/07 10:05:42 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -90,26 +90,25 @@ __KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.
 #endif
 
 #include 
-#include 
+
+#include 
 #include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
+#include 
 #include 
-#include 
-#include 
+#include 
 #include 
-#include 
+#include 
+#include 
+#include 
+#include 
 #include 
+#include 
+#include 
+#include 
 #include 
+#include 
+#include 
 #include 
-#include 
-
-#include 
 
 #include 
 #include 
@@ -497,7 +496,7 @@ struct wm_queue {
 };
 
 struct wm_phyop {
-	int (*acquire)(struct wm_softc *);
+	int (*acquire)(struct wm_softc *) __attribute__((warn_unused_result));
 	void (*release)(struct wm_softc *);
 	int (*readreg_locked)(device_t, int, int, uint16_t *);
 	int (*writereg_locked)(device_t, int, int, uint16_t);
@@ -506,7 +505,7 @@ struct wm_phyop {
 };
 
 struct wm_nvmop {
-	int (*acquire)(struct wm_softc *);
+	int (*acquire)(struct wm_softc *) __attribute__((warn_unused_result));
 	void (*release)(struct wm_softc *);
 	int (*read)(struct wm_softc *, int, int, uint16_t *);
 };
@@ -597,12 +596,76 @@ struct wm_softc {
 	/* Event counters. */
 	struct evcnt sc_ev_linkintr;	/* Link interrupts */
 
-	/* WM_T_82542_2_1 only */
+	/* >= WM_T_82542_2_1 */
 	struct evcnt sc_ev_tx_xoff;	/* Tx PAUSE(!0) frames */
 	struct evcnt sc_ev_tx_xon;	/* Tx PAUSE(0) frames */
 	struct evcnt sc_ev_rx_xoff;	/* Rx PAUSE(!0) frames */
 	struct evcnt sc_ev_rx_xon;	/* Rx PAUSE(0) frames */
 	struct evcnt sc_ev_rx_macctl;	/* Rx Unsupported */
+
+	struct evcnt sc_ev_crcerrs;	/* CRC Error */
+	struct evcnt sc_ev_algnerrc;	/* Alignment Error */
+	struct evcnt sc_ev_symerrc;	/* Symbol Error */
+	struct evcnt sc_ev_rxerrc;	/* Receive Error */
+	struct evcnt sc_ev_mpc;		/* Missed Packets */
+	struct evcnt sc_ev_colc;	/* Collision */
+	struct evcnt sc_ev_sec;		/* Sequence Error */
+	struct evcnt sc_ev_cexterr;	/* Carrier Extension Error */
+	struct evcnt sc_ev_rlec;	/* Receive Length Error */
+	struct evcnt sc_ev_scc;		/* Single Collision */
+	struct evcnt sc_ev_ecol;	/* Excessive Collision */
+	struct evcnt sc_ev_mcc;		/* Multiple Collision */
+	struct evcnt sc_ev_latecol;	/* Late Collision */
+	struct evcnt sc_ev_dc;		/* Defer */
+	struct evcnt sc_ev_gprc;	/* Good Packets Rx */
+	struct evcnt sc_ev_bprc;	/* Broadcast Packets Rx */
+	struct evcnt sc_ev_mprc;	/* Multicast Packets Rx */
+	struct evcnt sc_ev_gptc;	/* Good Packets Tx */
+	struct evcnt sc_ev_gorc;	/* Good Octets Rx */
+	struct evcnt sc_ev_gotc;	/* Good Octets Tx */
+	struct evcnt sc_ev_rnbc;	/* Rx No Buffers */
+	struct evcnt sc_ev_ruc;		/* Rx Undersize */
+	struct evcnt sc_ev_rfc;		/* Rx Fragment */
+	struct evcnt sc_ev_roc;		/* Rx Oversize */
+	struct evcnt sc_ev_rjc;		/* Rx Jabber */
+	struct evcnt sc_ev_tor;		/* Total Octets Rx */
+	struct evcnt sc_ev_tot;		/* Total Octets Tx */
+	struct evcnt sc_ev_tpr;		/* Total Packets Rx */
+	struct evcnt sc_ev_tpt;		/* Total Packets Tx */
+	struct evcnt sc_ev_mptc;	/* Multicast Packets Tx */
+	struct evcnt sc_ev_bptc;	/* 

CVS commit: [netbsd-9] src/doc

2022-08-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Aug 30 18:36:21 UTC 2022

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

Log Message:
Tickets #1512 - #1514


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 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.7 src/doc/CHANGES-9.4:1.1.2.8
--- src/doc/CHANGES-9.4:1.1.2.7	Tue Aug 30 15:38:22 2022
+++ src/doc/CHANGES-9.4	Tue Aug 30 18:36:21 2022
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.7 2022/08/30 15:38:22 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.8 2022/08/30 18:36:21 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -98,3 +98,24 @@ external/mit/xorg/server/drivers/xf86-vi
 	wsfb(4): disable broken DGA extension for xf86-video-wsfb.
 	[rin, ticket #1511]
 
+sys/dev/ata/ata.c1.163
+
+	wd(4): fix verbose attach messages for ATA controllers w/o UltraDMA
+	support.
+	[tsutsui, ticket #1512]
+
+sys/arch/m68k/m68k/m68k_trap.c			1.3
+
+	m68k: make a DEBUG kernel compilable.
+	[tsutsui, ticket #1513]
+
+distrib/amiga/floppies/inst-common/dot.commonutils 1.9
+distrib/amiga/miniroot/dot.profile		1.11
+distrib/atari/floppies/common/dot.profile	1.9
+distrib/utils/script-installer/dot.commonutils	1.8
+distrib/vax/inst-common/dot.commonutils		1.6
+
+	PRs 54835, 54835, 56983: adapt install scripts to the shell
+	being compiled without support for depracated test expressions.
+	[tsutsui, ticket #1514]
+



CVS commit: [netbsd-9] src/doc

2022-08-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Aug 30 18:36:21 UTC 2022

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

Log Message:
Tickets #1512 - #1514


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 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/distrib

2022-08-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Aug 30 18:35:20 UTC 2022

Modified Files:
src/distrib/amiga/floppies/inst-common [netbsd-9]: dot.commonutils
src/distrib/amiga/miniroot [netbsd-9]: dot.profile
src/distrib/atari/floppies/common [netbsd-9]: dot.profile
src/distrib/utils/script-installer [netbsd-9]: dot.commonutils
src/distrib/vax/inst-common [netbsd-9]: dot.commonutils

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1514):

distrib/atari/floppies/common/dot.profile: revision 1.9
distrib/vax/inst-common/dot.commonutils: revision 1.6
distrib/amiga/miniroot/dot.profile: revision 1.11
distrib/utils/script-installer/dot.commonutils: revision 1.8
distrib/amiga/floppies/inst-common/dot.commonutils: revision 1.9

Fix yet another "[: SMALL test, no fallback usage" error on installation.

The same problem as PR/54835 of the miniroot scripts, i.e.
avoid and replace use of -o binary primary marked obsolescent
by POSIX.1-2017:
 https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html#tag_20_12
8_16

Noticed on installation of NetBSD 9.3 on TT030, and
maybe should be pulled up to netbsd-9.

Avoid more obsolescent binary primaries not supported by crunched test(1).

See PR/54835 and PR/56983 for details.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.8.102.1 \
src/distrib/amiga/floppies/inst-common/dot.commonutils
cvs rdiff -u -r1.10 -r1.10.64.1 src/distrib/amiga/miniroot/dot.profile
cvs rdiff -u -r1.7.6.1 -r1.7.6.2 \
src/distrib/atari/floppies/common/dot.profile
cvs rdiff -u -r1.7 -r1.7.102.1 \
src/distrib/utils/script-installer/dot.commonutils
cvs rdiff -u -r1.5 -r1.5.102.1 src/distrib/vax/inst-common/dot.commonutils

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

Modified files:

Index: src/distrib/amiga/floppies/inst-common/dot.commonutils
diff -u src/distrib/amiga/floppies/inst-common/dot.commonutils:1.8 src/distrib/amiga/floppies/inst-common/dot.commonutils:1.8.102.1
--- src/distrib/amiga/floppies/inst-common/dot.commonutils:1.8	Sat Jul 26 17:06:29 2003
+++ src/distrib/amiga/floppies/inst-common/dot.commonutils	Tue Aug 30 18:35:19 2022
@@ -1,4 +1,4 @@
-# $NetBSD: dot.commonutils,v 1.8 2003/07/26 17:06:29 salo Exp $
+# $NetBSD: dot.commonutils,v 1.8.102.1 2022/08/30 18:35:19 martin Exp $
 #
 # Copyright (c) 1994 Christopher G. Demetriou
 # All rights reserved.
@@ -49,7 +49,7 @@ GUNZIP=/usr/bin/gunzip
 Set_tmp_dir()
 {
 	def_tmp_dir=`pwd`
-	if [ "$def_tmp_dir" = "/" -o "$def_tmp_dir" = "/mnt" ]; then
+	if [ "$def_tmp_dir" = "/" ] || [ "$def_tmp_dir" = "/mnt" ]; then
 		def_tmp_dir="$dest_dir"usr/distrib
 	fi
 
@@ -78,7 +78,7 @@ Load_fd()
 {
 	Tmp_dir
 	which=
-	while [ "$which" != "a" -a "$which" != "b" ]; do
+	while [ "$which" != "a" ] && [ "$which" != "b" ]; do
 		echo -n	"Read from which floppy drive ('a' or 'b')? [a] "
 		read which
 		if [ "X$which" = "X" ]; then

Index: src/distrib/amiga/miniroot/dot.profile
diff -u src/distrib/amiga/miniroot/dot.profile:1.10 src/distrib/amiga/miniroot/dot.profile:1.10.64.1
--- src/distrib/amiga/miniroot/dot.profile:1.10	Sun Jul 27 19:55:19 2008
+++ src/distrib/amiga/miniroot/dot.profile	Tue Aug 30 18:35:19 2022
@@ -1,4 +1,4 @@
-# $NetBSD: dot.profile,v 1.10 2008/07/27 19:55:19 mlelstv Exp $
+# $NetBSD: dot.profile,v 1.10.64.1 2022/08/30 18:35:19 martin Exp $
 #
 # Copyright (c) 1995 Jason R. Thorpe
 # Copyright (c) 1994 Christopher G. Demetriou
@@ -71,7 +71,7 @@ if [ "X${DONEPROFILE}" = "X" ]; then
 		# Check if the answer is valid (in range). Note that an answer
 		# < 0 cannot happen because the sed(1) above also removes the
 		# sign.
-		if [ -z "$_ans" -o "$_ans" -ge $_num ]; then
+		if [ -z "$_ans" ] || [ "$_ans" -ge $_num ]; then
 		echo "You entered an invalid response, please try again."
 		continue
 		fi

Index: src/distrib/atari/floppies/common/dot.profile
diff -u src/distrib/atari/floppies/common/dot.profile:1.7.6.1 src/distrib/atari/floppies/common/dot.profile:1.7.6.2
--- src/distrib/atari/floppies/common/dot.profile:1.7.6.1	Tue Jan 28 10:20:28 2020
+++ src/distrib/atari/floppies/common/dot.profile	Tue Aug 30 18:35:18 2022
@@ -1,4 +1,4 @@
-# $NetBSD: dot.profile,v 1.7.6.1 2020/01/28 10:20:28 msaitoh Exp $
+# $NetBSD: dot.profile,v 1.7.6.2 2022/08/30 18:35:18 martin Exp $
 #
 # Copyright (c) 1995 Jason R. Thorpe
 # Copyright (c) 1994 Christopher G. Demetriou
@@ -95,7 +95,7 @@ if [ "X${DONEPROFILE}" = "X" ]; then
 		# Check if the answer is valid (in range). Note that an answer
 		# < 0 cannot happen because the sed(1) above also removes the
 		# sign.
-		if [ -z "$_ans" -o "$_ans" -ge $_num ]; then
+		if [ -z "$_ans" ] || [ "$_ans" -ge $_num ]; then
 		echo "You entered an invalid response, please try again."
 		continue
 		fi

Index: src/distrib/utils/script-installer/dot.commonutils
diff -u 

CVS commit: [netbsd-9] src/distrib

2022-08-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Aug 30 18:35:20 UTC 2022

Modified Files:
src/distrib/amiga/floppies/inst-common [netbsd-9]: dot.commonutils
src/distrib/amiga/miniroot [netbsd-9]: dot.profile
src/distrib/atari/floppies/common [netbsd-9]: dot.profile
src/distrib/utils/script-installer [netbsd-9]: dot.commonutils
src/distrib/vax/inst-common [netbsd-9]: dot.commonutils

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1514):

distrib/atari/floppies/common/dot.profile: revision 1.9
distrib/vax/inst-common/dot.commonutils: revision 1.6
distrib/amiga/miniroot/dot.profile: revision 1.11
distrib/utils/script-installer/dot.commonutils: revision 1.8
distrib/amiga/floppies/inst-common/dot.commonutils: revision 1.9

Fix yet another "[: SMALL test, no fallback usage" error on installation.

The same problem as PR/54835 of the miniroot scripts, i.e.
avoid and replace use of -o binary primary marked obsolescent
by POSIX.1-2017:
 https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html#tag_20_12
8_16

Noticed on installation of NetBSD 9.3 on TT030, and
maybe should be pulled up to netbsd-9.

Avoid more obsolescent binary primaries not supported by crunched test(1).

See PR/54835 and PR/56983 for details.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.8.102.1 \
src/distrib/amiga/floppies/inst-common/dot.commonutils
cvs rdiff -u -r1.10 -r1.10.64.1 src/distrib/amiga/miniroot/dot.profile
cvs rdiff -u -r1.7.6.1 -r1.7.6.2 \
src/distrib/atari/floppies/common/dot.profile
cvs rdiff -u -r1.7 -r1.7.102.1 \
src/distrib/utils/script-installer/dot.commonutils
cvs rdiff -u -r1.5 -r1.5.102.1 src/distrib/vax/inst-common/dot.commonutils

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/arch/m68k/m68k

2022-08-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Aug 30 18:31:49 UTC 2022

Modified Files:
src/sys/arch/m68k/m68k [netbsd-9]: m68k_trap.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1513):

sys/arch/m68k/m68k/m68k_trap.c: revision 1.3

Minimal (but hackish) change to make a DEBUG kernel compilable.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.6.1 src/sys/arch/m68k/m68k/m68k_trap.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/m68k/m68k/m68k_trap.c
diff -u src/sys/arch/m68k/m68k/m68k_trap.c:1.2 src/sys/arch/m68k/m68k/m68k_trap.c:1.2.6.1
--- src/sys/arch/m68k/m68k/m68k_trap.c:1.2	Sat Apr  6 03:06:26 2019
+++ src/sys/arch/m68k/m68k/m68k_trap.c	Tue Aug 30 18:31:49 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: m68k_trap.c,v 1.2 2019/04/06 03:06:26 thorpej Exp $	*/
+/*	$NetBSD: m68k_trap.c,v 1.2.6.1 2022/08/30 18:31:49 martin Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: m68k_trap.c,v 1.2 2019/04/06 03:06:26 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: m68k_trap.c,v 1.2.6.1 2022/08/30 18:31:49 martin Exp $");
 
 #include "opt_m68k_arch.h"
 
@@ -91,6 +91,15 @@ extern int suline(void *, void *);	/* lo
 #define	KDFAULT(c)	(KDFAULT_060(c) || KDFAULT_040(c) || KDFAULT_OTH(c))
 #define	WRFAULT(c)	(WRFAULT_060(c) || WRFAULT_040(c) || WRFAULT_OTH(c))
 
+
+#ifdef DEBUG
+extern int mmudebug, mmupid;
+#define MDB_FOLLOW	1
+#define MDB_WBFOLLOW	2
+#define MDB_WBFAILED	4
+#define MDB_ISPID(pid)	((pid) == mmupid)
+#endif
+
 #ifdef M68040
 #ifdef DEBUG
 struct writebackstats {



CVS commit: [netbsd-9] src/sys/arch/m68k/m68k

2022-08-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Aug 30 18:31:49 UTC 2022

Modified Files:
src/sys/arch/m68k/m68k [netbsd-9]: m68k_trap.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1513):

sys/arch/m68k/m68k/m68k_trap.c: revision 1.3

Minimal (but hackish) change to make a DEBUG kernel compilable.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.6.1 src/sys/arch/m68k/m68k/m68k_trap.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/ata

2022-08-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Aug 30 18:28:42 UTC 2022

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

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1512):

sys/dev/ata/ata.c: revision 1.163

Output missing '\n' for capability list when DMA support is not compiled in.


To generate a diff of this commit:
cvs rdiff -u -r1.149.2.1 -r1.149.2.2 src/sys/dev/ata/ata.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/ata/ata.c
diff -u src/sys/dev/ata/ata.c:1.149.2.1 src/sys/dev/ata/ata.c:1.149.2.2
--- src/sys/dev/ata/ata.c:1.149.2.1	Tue Mar 15 18:00:26 2022
+++ src/sys/dev/ata/ata.c	Tue Aug 30 18:28:42 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: ata.c,v 1.149.2.1 2022/03/15 18:00:26 martin Exp $	*/
+/*	$NetBSD: ata.c,v 1.149.2.2 2022/08/30 18:28:42 martin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.  All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.149.2.1 2022/03/15 18:00:26 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.149.2.2 2022/08/30 18:28:42 martin Exp $");
 
 #include "opt_ata.h"
 
@@ -2033,9 +2033,7 @@ ata_probe_caps(struct ata_drive_datas *d
 #if NATA_DMA
 	if ((atac->atac_cap & ATAC_CAP_DMA) == 0) {
 		/* don't care about DMA modes */
-		if (*sep != '\0')
-			aprint_verbose("\n");
-		return;
+		goto out;
 	}
 	if (cf_flags & ATA_CONFIG_DMA_SET) {
 		ata_channel_lock(chp);
@@ -2081,13 +2079,10 @@ ata_probe_caps(struct ata_drive_datas *d
 	}
 	ata_channel_unlock(chp);
 
-	if (*sep != '\0')
-		aprint_verbose("\n");
-
 #if NATA_UDMA
 	if ((atac->atac_cap & ATAC_CAP_UDMA) == 0) {
 		/* don't care about UDMA modes */
-		return;
+		goto out;
 	}
 	if (cf_flags & ATA_CONFIG_UDMA_SET) {
 		ata_channel_lock(chp);
@@ -2102,7 +2097,10 @@ ata_probe_caps(struct ata_drive_datas *d
 		ata_channel_unlock(chp);
 	}
 #endif	/* NATA_UDMA */
+out:
 #endif	/* NATA_DMA */
+	if (*sep != '\0')
+		aprint_verbose("\n");
 }
 
 /* management of the /dev/atabus* devices */



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

2022-08-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Aug 30 18:28:42 UTC 2022

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

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1512):

sys/dev/ata/ata.c: revision 1.163

Output missing '\n' for capability list when DMA support is not compiled in.


To generate a diff of this commit:
cvs rdiff -u -r1.149.2.1 -r1.149.2.2 src/sys/dev/ata/ata.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-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Aug 30 15:38:22 UTC 2022

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

Log Message:
Ticket #1511


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 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.6 src/doc/CHANGES-9.4:1.1.2.7
--- src/doc/CHANGES-9.4:1.1.2.6	Mon Aug 29 16:22:05 2022
+++ src/doc/CHANGES-9.4	Tue Aug 30 15:38:22 2022
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.6 2022/08/29 16:22:05 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.7 2022/08/30 15:38:22 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -93,3 +93,8 @@ external/mit/xorg/bin/xdm/Makefile.xdm		
 	"sbin" directories (and games) in DEF_USER_PATH.
 	[nia, ticket #1510]
 
+external/mit/xorg/server/drivers/xf86-video-wsfb/Makefile 1.6
+
+	wsfb(4): disable broken DGA extension for xf86-video-wsfb.
+	[rin, ticket #1511]
+



CVS commit: [netbsd-9] src/doc

2022-08-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Aug 30 15:38:22 UTC 2022

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

Log Message:
Ticket #1511


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 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/server/drivers/xf86-video-wsfb

2022-08-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Aug 30 15:37:27 UTC 2022

Modified Files:
src/external/mit/xorg/server/drivers/xf86-video-wsfb [netbsd-9]:
Makefile

Log Message:
Pull up following revision(s) (requested by rin in ticket #1511):

external/mit/xorg/server/drivers/xf86-video-wsfb/Makefile: revision 1.6

wsfb: Disable broken DGA support:
  - dga(1) crashes X server since pScrn->AdjustFrame is NULL.
  - If nop is provided as pScrn->AdjustFrame, dga(1) crashes X server *AND*
kernel. This is because DGA uses physical address of framebuffer via
/dev/mem (oops!), but we provide only mmap(2)'ed virtual address.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.2.1 \
src/external/mit/xorg/server/drivers/xf86-video-wsfb/Makefile

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/server/drivers/xf86-video-wsfb/Makefile
diff -u src/external/mit/xorg/server/drivers/xf86-video-wsfb/Makefile:1.5 src/external/mit/xorg/server/drivers/xf86-video-wsfb/Makefile:1.5.2.1
--- src/external/mit/xorg/server/drivers/xf86-video-wsfb/Makefile:1.5	Fri Aug  3 02:26:00 2018
+++ src/external/mit/xorg/server/drivers/xf86-video-wsfb/Makefile	Tue Aug 30 15:37:27 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2018/08/03 02:26:00 kamil Exp $
+#	$NetBSD: Makefile,v 1.5.2.1 2022/08/30 15:37:27 martin Exp $
 
 DRIVER=		xf86-video-wsfb
 DRIVER_NAME=	wsfb_drv
@@ -11,3 +11,11 @@ CPPFLAGS+=	-DHAVE_CONFIG_H -I${X11SRCDIR
 CWARNFLAGS.clang+=	-Wno-format
 
 .include "../Makefile.xf86-driver"
+
+# XXX
+# DGA support for this driver is broken:
+# - dga(1) crashes X server since pScrn->AdjustFrame is NULL.
+# - If nop is provided as pScrn->AdjustFrame, dga(1) crashes X server *AND*
+#   kernel. This is because DGA uses physical address of framebuffer via
+#   /dev/mem (oops!), but we provide only mmap(2)'ed virtual address.
+CPPFLAGS+=	-UXFreeXDGA



CVS commit: [netbsd-9] src/external/mit/xorg/server/drivers/xf86-video-wsfb

2022-08-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Aug 30 15:37:27 UTC 2022

Modified Files:
src/external/mit/xorg/server/drivers/xf86-video-wsfb [netbsd-9]:
Makefile

Log Message:
Pull up following revision(s) (requested by rin in ticket #1511):

external/mit/xorg/server/drivers/xf86-video-wsfb/Makefile: revision 1.6

wsfb: Disable broken DGA support:
  - dga(1) crashes X server since pScrn->AdjustFrame is NULL.
  - If nop is provided as pScrn->AdjustFrame, dga(1) crashes X server *AND*
kernel. This is because DGA uses physical address of framebuffer via
/dev/mem (oops!), but we provide only mmap(2)'ed virtual address.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.2.1 \
src/external/mit/xorg/server/drivers/xf86-video-wsfb/Makefile

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-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.



  1   2   3   4   5   6   7   8   9   10   >