CVS commit: src/sys/dev/usb

2024-03-25 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Mar 26 03:38:02 UTC 2024

Modified Files:
src/sys/dev/usb: uftdi.c usbdevices.config

Log Message:
Add a "match quirk" mechanism to the uftdi driver that allows it to
selectively reject individual interfaces based on the combination of
- Vendor ID
- Product ID
- Interface number
- Vendor string
- Product string

This is necessary[*] to allow some devices that would otherwise match
uftdi (and thus instantiate a ucom) to be matched by ugenif instead,
which is required to make the device available to libusb1.

[*] ...due to a deficiency in the USB stack that does not provide a
mechanism for a user-space driver to claim a device from a kernel driver
and then return it back at a later time.

Use this new match quirk mechanism to reject "interface 1" of the
FTDI 2232C-based Tigard debug board; On this board, "interface 0"
is brought out to regular TTL-level UART pins, but "interface 1" is
brought out to SWD and JTAG headers, and is really only useful when
used with something like openocd.  Because the FTDI 2232C on this board
just uses the standard FTDI vendor and product IDs, it can only be
distinguished by the strings, which cannot be specified usbdevices.config,
thus necessitating the match quirk entry (that works in combination
with the ugenif entry added in usbdevices.config).


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/dev/usb/uftdi.c
cvs rdiff -u -r1.42 -r1.43 src/sys/dev/usb/usbdevices.config

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/uftdi.c
diff -u src/sys/dev/usb/uftdi.c:1.76 src/sys/dev/usb/uftdi.c:1.77
--- src/sys/dev/usb/uftdi.c:1.76	Sat Aug  7 16:19:17 2021
+++ src/sys/dev/usb/uftdi.c	Tue Mar 26 03:38:02 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: uftdi.c,v 1.76 2021/08/07 16:19:17 thorpej Exp $	*/
+/*	$NetBSD: uftdi.c,v 1.77 2024/03/26 03:38:02 thorpej Exp $	*/
 
 /*
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uftdi.c,v 1.76 2021/08/07 16:19:17 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uftdi.c,v 1.77 2024/03/26 03:38:02 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -47,6 +47,7 @@ __KERNEL_RCSID(0, "$NetBSD: uftdi.c,v 1.
 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -184,10 +185,72 @@ static int	uftdi_detach(device_t, int);
 CFATTACH_DECL2_NEW(uftdi, sizeof(struct uftdi_softc), uftdi_match,
 uftdi_attach, uftdi_detach, NULL, NULL, uftdi_childdet);
 
+struct uftdi_match_quirk_entry {
+	uint16_t	vendor_id;
+	uint16_t	product_id;
+	int		iface_no;
+	const char *	vendor_str;
+	const char *	product_str;
+	int		match_ret;
+};
+
+static const struct uftdi_match_quirk_entry uftdi_match_quirks[] = {
+	/*
+	 * The Tigard board (https://github.com/tigard-tools/tigard)
+	 * has two interfaces, one of which is meant to act as a
+	 * regular USB serial port (interface 0), the other of which
+	 * is meant for other protocols (SWD, JTAG, etc.).  We must
+	 * reject interface 1 so that ugenif matches, thus allowing
+	 * full user-space control of that port.
+	 */
+	{
+	  .vendor_id	= USB_VENDOR_FTDI,
+	  .product_id	= USB_PRODUCT_FTDI_SERIAL_2232C,
+	  .iface_no	= 1,
+	  .vendor_str	= "SecuringHardware.com",
+	  .product_str	= "Tigard V1.1",
+	  .match_ret	= UMATCH_NONE,
+	}
+};
+
+static int
+uftdi_quirk_match(struct usbif_attach_arg *uiaa, int rv)
+{
+	struct usbd_device *dev = uiaa->uiaa_device;
+	const struct uftdi_match_quirk_entry *q;
+	int i;
+
+	for (i = 0; i < __arraycount(uftdi_match_quirks); i++) {
+		q = _match_quirks[i];
+		if (uiaa->uiaa_vendor != q->vendor_id ||
+		uiaa->uiaa_product != q->product_id ||
+		uiaa->uiaa_ifaceno != q->iface_no) {
+			continue;
+		}
+		if (q->vendor_str != NULL &&
+		(dev->ud_vendor == NULL ||
+		 strcmp(dev->ud_vendor, q->vendor_str) != 0)) {
+			continue;
+		}
+		if (q->product_str != NULL &&
+		(dev->ud_product == NULL ||
+		 strcmp(dev->ud_product, q->product_str) != 0)) {
+			continue;
+		}
+		/*
+		 * Got a match!
+		 */
+		rv = q->match_ret;
+		break;
+	}
+	return rv;
+}
+
 static int
 uftdi_match(device_t parent, cfdata_t match, void *aux)
 {
 	struct usbif_attach_arg *uiaa = aux;
+	int rv;
 
 	DPRINTFN(20,("uftdi: vendor=%#x, product=%#x\n",
 		 uiaa->uiaa_vendor, uiaa->uiaa_product));
@@ -195,8 +258,12 @@ uftdi_match(device_t parent, cfdata_t ma
 	if (uiaa->uiaa_configno != UFTDI_CONFIG_NO)
 		return UMATCH_NONE;
 
-	return uftdi_lookup(uiaa->uiaa_vendor, uiaa->uiaa_product) != NULL ?
+	rv = uftdi_lookup(uiaa->uiaa_vendor, uiaa->uiaa_product) != NULL ?
 		UMATCH_VENDOR_PRODUCT_CONF_IFACE : UMATCH_NONE;
+	if (rv != UMATCH_NONE) {
+		rv = uftdi_quirk_match(uiaa, rv);
+	}
+	return rv;
 }
 
 static void

Index: src/sys/dev/usb/usbdevices.config
diff -u src/sys/dev/usb/usbdevices.config:1.42 src/sys/dev/usb/usbdevices.config:1.43

CVS commit: src/sys/dev/usb

2024-03-25 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Mar 26 03:38:02 UTC 2024

Modified Files:
src/sys/dev/usb: uftdi.c usbdevices.config

Log Message:
Add a "match quirk" mechanism to the uftdi driver that allows it to
selectively reject individual interfaces based on the combination of
- Vendor ID
- Product ID
- Interface number
- Vendor string
- Product string

This is necessary[*] to allow some devices that would otherwise match
uftdi (and thus instantiate a ucom) to be matched by ugenif instead,
which is required to make the device available to libusb1.

[*] ...due to a deficiency in the USB stack that does not provide a
mechanism for a user-space driver to claim a device from a kernel driver
and then return it back at a later time.

Use this new match quirk mechanism to reject "interface 1" of the
FTDI 2232C-based Tigard debug board; On this board, "interface 0"
is brought out to regular TTL-level UART pins, but "interface 1" is
brought out to SWD and JTAG headers, and is really only useful when
used with something like openocd.  Because the FTDI 2232C on this board
just uses the standard FTDI vendor and product IDs, it can only be
distinguished by the strings, which cannot be specified usbdevices.config,
thus necessitating the match quirk entry (that works in combination
with the ugenif entry added in usbdevices.config).


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/dev/usb/uftdi.c
cvs rdiff -u -r1.42 -r1.43 src/sys/dev/usb/usbdevices.config

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



CVS commit: src

2024-03-25 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Mar 26 03:24:14 UTC 2024

Modified Files:
src/share/man/man4: ugen.4
src/sys/dev/usb: ugen.c

Log Message:
Define a "flags 1" config directive for ugenif, which is similar to ugen's,
but rather forces the ugenif to match at the *lowest* match priority rather
than the highest.  This allows ugenif to claim only otherwise unclaimed
interfaces.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/share/man/man4/ugen.4
cvs rdiff -u -r1.175 -r1.176 src/sys/dev/usb/ugen.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/ugen.4
diff -u src/share/man/man4/ugen.4:1.38 src/share/man/man4/ugen.4:1.39
--- src/share/man/man4/ugen.4:1.38	Fri Aug 28 16:07:49 2020
+++ src/share/man/man4/ugen.4	Tue Mar 26 03:24:14 2024
@@ -1,4 +1,4 @@
-.\" $NetBSD: ugen.4,v 1.38 2020/08/28 16:07:49 fcambus Exp $
+.\" $NetBSD: ugen.4,v 1.39 2024/03/26 03:24:14 thorpej Exp $
 .\"
 .\" Copyright (c) 1999 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd September 14, 2019
+.Dd March 25, 2024
 .Dt UGEN 4
 .Os
 .Sh NAME
@@ -37,6 +37,7 @@
 .Cd "ugen* at uhub? flags N"
 .Cd "ugen* at uhub? vendor V product P flags 1"
 .Cd "ugenif* at uhub? vendor V product P configuration C interface I"
+.Cd "ugenif* at uhub? vendor V product P configuration C interface I flags 1"
 .Sh DESCRIPTION
 The
 .Nm
@@ -62,7 +63,9 @@ locators this can be used to force the
 driver to be used for a certain
 device.
 .Pp
-The second form of attachment can be used to
+The
+.Sq ugenif
+form of attachment can be used to
 .Dq steal
 only one interface from some device for use by the
 .Nm
@@ -74,6 +77,12 @@ as otherwise the
 driver would capture all of your
 .Nm usb
 devices.
+If
+.Dq flags 1
+is specified, the
+.Sq ugenif
+form will match at the lowest priority, thus allowing it to match only
+otherwise unclaimed interfaces.
 .Em NOTE :
 You have to be extremely careful,
 when using this form,

Index: src/sys/dev/usb/ugen.c
diff -u src/sys/dev/usb/ugen.c:1.175 src/sys/dev/usb/ugen.c:1.176
--- src/sys/dev/usb/ugen.c:1.175	Mon Nov  6 12:16:52 2023
+++ src/sys/dev/usb/ugen.c	Tue Mar 26 03:24:14 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: ugen.c,v 1.175 2023/11/06 12:16:52 hannken Exp $	*/
+/*	$NetBSD: ugen.c,v 1.176 2024/03/26 03:24:14 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.175 2023/11/06 12:16:52 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.176 2024/03/26 03:24:14 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -367,8 +367,12 @@ ugen_match(device_t parent, cfdata_t mat
 static int
 ugenif_match(device_t parent, cfdata_t match, void *aux)
 {
-	/* Assume that they knew what they configured! (see ugenif(4)) */
-	return UMATCH_HIGHEST;
+	/*
+	 * Like ugen(4), ugenif(4) also has an override flag.  It has the
+	 * opposite effect, however, causing us to match with GENERIC
+	 * priority rather than HIGHEST.
+	 */
+	return (match->cf_flags & 1) ? UMATCH_GENERIC : UMATCH_HIGHEST;
 }
 
 static void



CVS commit: src

2024-03-25 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Mar 26 03:24:14 UTC 2024

Modified Files:
src/share/man/man4: ugen.4
src/sys/dev/usb: ugen.c

Log Message:
Define a "flags 1" config directive for ugenif, which is similar to ugen's,
but rather forces the ugenif to match at the *lowest* match priority rather
than the highest.  This allows ugenif to claim only otherwise unclaimed
interfaces.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/share/man/man4/ugen.4
cvs rdiff -u -r1.175 -r1.176 src/sys/dev/usb/ugen.c

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



CVS commit: src

2024-03-25 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Mar 25 23:39:14 UTC 2024

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_132.c
src/usr.bin/xlint/lint1: tree.c

Log Message:
lint: fix warnings about loss of accuracy on bit-field operations


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/tests/usr.bin/xlint/lint1/msg_132.c
cvs rdiff -u -r1.625 -r1.626 src/usr.bin/xlint/lint1/tree.c

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

Modified files:

Index: src/tests/usr.bin/xlint/lint1/msg_132.c
diff -u src/tests/usr.bin/xlint/lint1/msg_132.c:1.37 src/tests/usr.bin/xlint/lint1/msg_132.c:1.38
--- src/tests/usr.bin/xlint/lint1/msg_132.c:1.37	Mon Mar 25 22:46:23 2024
+++ src/tests/usr.bin/xlint/lint1/msg_132.c	Mon Mar 25 23:39:14 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_132.c,v 1.37 2024/03/25 22:46:23 rillig Exp $	*/
+/*	$NetBSD: msg_132.c,v 1.38 2024/03/25 23:39:14 rillig Exp $	*/
 # 3 "msg_132.c"
 
 // Test for message: conversion from '%s' to '%s' may lose accuracy [132]
@@ -428,19 +428,25 @@ compare_bit_field_to_integer_constant(vo
 	b = !b;
 }
 
-_Bool
+/*
+ * Before tree.c 1.626 from 2024-03-26, the usual arithmetic conversions for
+ * bit-field types with the same base type but different widths simply took
+ * the type of the left operand, leading to wrong warnings about loss of
+ * accuracy when the right operand was wider than the left operand.
+ */
+void
 binary_operators_on_bit_fields(void)
 {
 	struct {
-		unsigned long long u15:15;
-		unsigned long long u48:48;
-		unsigned long long u64;
+		u64_t u15:15;
+		u64_t u48:48;
+		u64_t u64;
 	} s = { 0, 0, 0 };
 
 	u64 = s.u15 | s.u48;
-	/* expect+1: warning: conversion from 'unsigned long long:16' to 'int:17' may lose accuracy [132] */
+	u64 = s.u48 | s.u15;
 	u64 = s.u15 | s.u48 | s.u64;
-	/* expect+2: warning: conversion from 'unsigned long long:16' to 'int:17' may lose accuracy [132] */
-	/* expect+1: warning: conversion from 'unsigned long long:17' to 'int:18' may lose accuracy [132] */
-	return (s.u15 | s.u48 | s.u64) != 0;
+	u64 = s.u64 | s.u48 | s.u15;
+	cond = (s.u15 | s.u48 | s.u64) != 0;
+	cond = (s.u64 | s.u48 | s.u15) != 0;
 }

Index: src/usr.bin/xlint/lint1/tree.c
diff -u src/usr.bin/xlint/lint1/tree.c:1.625 src/usr.bin/xlint/lint1/tree.c:1.626
--- src/usr.bin/xlint/lint1/tree.c:1.625	Tue Mar 19 23:19:04 2024
+++ src/usr.bin/xlint/lint1/tree.c	Mon Mar 25 23:39:13 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: tree.c,v 1.625 2024/03/19 23:19:04 rillig Exp $	*/
+/*	$NetBSD: tree.c,v 1.626 2024/03/25 23:39:13 rillig Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: tree.c,v 1.625 2024/03/19 23:19:04 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.626 2024/03/25 23:39:13 rillig Exp $");
 #endif
 
 #include 
@@ -762,6 +762,13 @@ balance(op_t op, tnode_t **lnp, tnode_t 
 		*lnp = apply_usual_arithmetic_conversions(op, *lnp, t);
 	if (t != rt)
 		*rnp = apply_usual_arithmetic_conversions(op, *rnp, t);
+
+	unsigned lw = (*lnp)->tn_type->t_bit_field_width;
+	unsigned rw = (*rnp)->tn_type->t_bit_field_width;
+	if (lw < rw)
+		*lnp = convert(NOOP, 0, (*rnp)->tn_type, *lnp);
+	if (rw < lw)
+		*rnp = convert(NOOP, 0, (*lnp)->tn_type, *rnp);
 }
 
 static tnode_t *



CVS commit: src

2024-03-25 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Mar 25 23:39:14 UTC 2024

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_132.c
src/usr.bin/xlint/lint1: tree.c

Log Message:
lint: fix warnings about loss of accuracy on bit-field operations


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/tests/usr.bin/xlint/lint1/msg_132.c
cvs rdiff -u -r1.625 -r1.626 src/usr.bin/xlint/lint1/tree.c

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



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

2024-03-25 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Mar 25 22:46:23 UTC 2024

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

Log Message:
tests/lint: demonstrate wrong warnings about lossy bit field operations


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/tests/usr.bin/xlint/lint1/msg_132.c

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

Modified files:

Index: src/tests/usr.bin/xlint/lint1/msg_132.c
diff -u src/tests/usr.bin/xlint/lint1/msg_132.c:1.36 src/tests/usr.bin/xlint/lint1/msg_132.c:1.37
--- src/tests/usr.bin/xlint/lint1/msg_132.c:1.36	Tue Mar 12 20:35:29 2024
+++ src/tests/usr.bin/xlint/lint1/msg_132.c	Mon Mar 25 22:46:23 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_132.c,v 1.36 2024/03/12 20:35:29 rillig Exp $	*/
+/*	$NetBSD: msg_132.c,v 1.37 2024/03/25 22:46:23 rillig Exp $	*/
 # 3 "msg_132.c"
 
 // Test for message: conversion from '%s' to '%s' may lose accuracy [132]
@@ -427,3 +427,20 @@ compare_bit_field_to_integer_constant(vo
 	b = s.u64 == 0;
 	b = !b;
 }
+
+_Bool
+binary_operators_on_bit_fields(void)
+{
+	struct {
+		unsigned long long u15:15;
+		unsigned long long u48:48;
+		unsigned long long u64;
+	} s = { 0, 0, 0 };
+
+	u64 = s.u15 | s.u48;
+	/* expect+1: warning: conversion from 'unsigned long long:16' to 'int:17' may lose accuracy [132] */
+	u64 = s.u15 | s.u48 | s.u64;
+	/* expect+2: warning: conversion from 'unsigned long long:16' to 'int:17' may lose accuracy [132] */
+	/* expect+1: warning: conversion from 'unsigned long long:17' to 'int:18' may lose accuracy [132] */
+	return (s.u15 | s.u48 | s.u64) != 0;
+}



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

2024-03-25 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Mar 25 22:46:23 UTC 2024

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

Log Message:
tests/lint: demonstrate wrong warnings about lossy bit field operations


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/tests/usr.bin/xlint/lint1/msg_132.c

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



CVS commit: src

2024-03-25 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Mar 25 22:37:43 UTC 2024

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_356.c msg_362.c msg_364.c msg_365.c
msg_366.c msg_368.c msg_374.c msg_377.c msg_378.c
src/usr.bin/xlint/lint1: cksnprintb.c err.c

Log Message:
lint: rename snprintb 'directives' to 'conversions'

This aligns the terminology with the snprintf function.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_356.c \
src/tests/usr.bin/xlint/lint1/msg_362.c \
src/tests/usr.bin/xlint/lint1/msg_364.c \
src/tests/usr.bin/xlint/lint1/msg_365.c
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_366.c \
src/tests/usr.bin/xlint/lint1/msg_377.c
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/msg_368.c \
src/tests/usr.bin/xlint/lint1/msg_378.c
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_374.c
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/xlint/lint1/cksnprintb.c
cvs rdiff -u -r1.232 -r1.233 src/usr.bin/xlint/lint1/err.c

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

Modified files:

Index: src/tests/usr.bin/xlint/lint1/msg_356.c
diff -u src/tests/usr.bin/xlint/lint1/msg_356.c:1.2 src/tests/usr.bin/xlint/lint1/msg_356.c:1.3
--- src/tests/usr.bin/xlint/lint1/msg_356.c:1.2	Fri Mar  1 17:22:55 2024
+++ src/tests/usr.bin/xlint/lint1/msg_356.c	Mon Mar 25 22:37:43 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_356.c,v 1.2 2024/03/01 17:22:55 rillig Exp $	*/
+/*	$NetBSD: msg_356.c,v 1.3 2024/03/25 22:37:43 rillig Exp $	*/
 # 3 "msg_356.c"
 
 // Test for message: short octal escape '%.*s' followed by digit '%c' [356]
@@ -6,8 +6,8 @@
 /* lint1-extra-flags: -X 351 */
 
 // When counting backwards in octal, the number before \040 is not \039 but
-// \037. This mistake sometimes happens while encoding the bit numbers for
-// snprintb(3) format directives.
+// \037. This mistake sometimes happens when encoding the bit numbers for
+// snprintb(3) format conversions.
 
 char snprintb_fmt[] = "\020"
 "\0040bit32"		// 3-digit octal escapes are fine
Index: src/tests/usr.bin/xlint/lint1/msg_362.c
diff -u src/tests/usr.bin/xlint/lint1/msg_362.c:1.2 src/tests/usr.bin/xlint/lint1/msg_362.c:1.3
--- src/tests/usr.bin/xlint/lint1/msg_362.c:1.2	Sun Mar  3 13:09:23 2024
+++ src/tests/usr.bin/xlint/lint1/msg_362.c	Mon Mar 25 22:37:43 2024
@@ -1,10 +1,10 @@
-/*	$NetBSD: msg_362.c,v 1.2 2024/03/03 13:09:23 rillig Exp $	*/
+/*	$NetBSD: msg_362.c,v 1.3 2024/03/25 22:37:43 rillig Exp $	*/
 # 3 "msg_362.c"
 
-// Test for message: directive '%.*s' should not be escaped [362]
+// Test for message: conversion '%.*s' should not be escaped [362]
 
 /*
- * Since the characters used for the directive type are chosen to be easily
+ * Since the characters used for the conversion type were chosen to be easily
  * readable, it doesn't make sense to obfuscate them.
  */
 
@@ -20,10 +20,10 @@ example(unsigned u32)
 {
 	char buf[64];
 
-	/* expect+9: warning: directive '\142' should not be escaped [362] */
+	/* expect+9: warning: conversion '\142' should not be escaped [362] */
 	/* expect+8: warning: bit position 'o' in '\142old-style-lsb\0' should be escaped as octal or hex [369] */
 	/* expect+7: warning: bit position 'o' (111) in '\142old-style-lsb\0' out of range 0..63 [371] */
-	/* expect+6: warning: unknown directive '\001', must be one of 'bfF=:*' [374] */
+	/* expect+6: warning: unknown conversion '\001', must be one of 'bfF=:*' [374] */
 	snprintb(buf, sizeof(buf),
 	"\177\020"
 	"\142old-style-lsb\0"
Index: src/tests/usr.bin/xlint/lint1/msg_364.c
diff -u src/tests/usr.bin/xlint/lint1/msg_364.c:1.2 src/tests/usr.bin/xlint/lint1/msg_364.c:1.3
--- src/tests/usr.bin/xlint/lint1/msg_364.c:1.2	Sun Mar  3 10:27:18 2024
+++ src/tests/usr.bin/xlint/lint1/msg_364.c	Mon Mar 25 22:37:43 2024
@@ -1,10 +1,10 @@
-/*	$NetBSD: msg_364.c,v 1.2 2024/03/03 10:27:18 rillig Exp $	*/
+/*	$NetBSD: msg_364.c,v 1.3 2024/03/25 22:37:43 rillig Exp $	*/
 # 3 "msg_364.c"
 
 // Test for message: missing bit position after '%.*s' [364]
 
 /*
- * The directives 'b', 'f' and 'F' require a bit position as their first
+ * The conversions 'b', 'f' and 'F' require a bit position as their first
  * argument.
  */
 
Index: src/tests/usr.bin/xlint/lint1/msg_365.c
diff -u src/tests/usr.bin/xlint/lint1/msg_365.c:1.2 src/tests/usr.bin/xlint/lint1/msg_365.c:1.3
--- src/tests/usr.bin/xlint/lint1/msg_365.c:1.2	Sun Mar  3 10:27:18 2024
+++ src/tests/usr.bin/xlint/lint1/msg_365.c	Mon Mar 25 22:37:43 2024
@@ -1,10 +1,10 @@
-/*	$NetBSD: msg_365.c,v 1.2 2024/03/03 10:27:18 rillig Exp $	*/
+/*	$NetBSD: msg_365.c,v 1.3 2024/03/25 22:37:43 rillig Exp $	*/
 # 3 "msg_365.c"
 
 // Test for message: missing field width after '%.*s' [365]
 
 /*
- * The directives 'f' and 'F' require a field width as their second argument.
+ * The conversions 'f' and 'F' require a field width as their second 

CVS commit: src

2024-03-25 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Mar 25 22:37:43 UTC 2024

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_356.c msg_362.c msg_364.c msg_365.c
msg_366.c msg_368.c msg_374.c msg_377.c msg_378.c
src/usr.bin/xlint/lint1: cksnprintb.c err.c

Log Message:
lint: rename snprintb 'directives' to 'conversions'

This aligns the terminology with the snprintf function.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_356.c \
src/tests/usr.bin/xlint/lint1/msg_362.c \
src/tests/usr.bin/xlint/lint1/msg_364.c \
src/tests/usr.bin/xlint/lint1/msg_365.c
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_366.c \
src/tests/usr.bin/xlint/lint1/msg_377.c
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/msg_368.c \
src/tests/usr.bin/xlint/lint1/msg_378.c
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_374.c
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/xlint/lint1/cksnprintb.c
cvs rdiff -u -r1.232 -r1.233 src/usr.bin/xlint/lint1/err.c

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



CVS commit: src

2024-03-25 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Mar 25 20:39:27 UTC 2024

Modified Files:
src/common/lib/libutil: snprintb.c
src/tests/lib/libutil: t_snprintb.c

Log Message:
snprintb: mark the end of the buffer if the buffer is too small

This avoids confusion in case the buffer ends with an incomplete number.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/common/lib/libutil/snprintb.c
cvs rdiff -u -r1.30 -r1.31 src/tests/lib/libutil/t_snprintb.c

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



CVS commit: src

2024-03-25 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Mar 25 20:39:27 UTC 2024

Modified Files:
src/common/lib/libutil: snprintb.c
src/tests/lib/libutil: t_snprintb.c

Log Message:
snprintb: mark the end of the buffer if the buffer is too small

This avoids confusion in case the buffer ends with an incomplete number.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/common/lib/libutil/snprintb.c
cvs rdiff -u -r1.30 -r1.31 src/tests/lib/libutil/t_snprintb.c

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

Modified files:

Index: src/common/lib/libutil/snprintb.c
diff -u src/common/lib/libutil/snprintb.c:1.43 src/common/lib/libutil/snprintb.c:1.44
--- src/common/lib/libutil/snprintb.c:1.43	Tue Mar  5 07:37:08 2024
+++ src/common/lib/libutil/snprintb.c	Mon Mar 25 20:39:26 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: snprintb.c,v 1.43 2024/03/05 07:37:08 rillig Exp $	*/
+/*	$NetBSD: snprintb.c,v 1.44 2024/03/25 20:39:26 rillig Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2024 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #  include 
 #  if defined(LIBC_SCCS)
-__RCSID("$NetBSD: snprintb.c,v 1.43 2024/03/05 07:37:08 rillig Exp $");
+__RCSID("$NetBSD: snprintb.c,v 1.44 2024/03/25 20:39:26 rillig Exp $");
 #  endif
 
 #  include 
@@ -46,7 +46,7 @@ __RCSID("$NetBSD: snprintb.c,v 1.43 2024
 #  include 
 # else /* ! _KERNEL */
 #  include 
-__KERNEL_RCSID(0, "$NetBSD: snprintb.c,v 1.43 2024/03/05 07:37:08 rillig Exp $");
+__KERNEL_RCSID(0, "$NetBSD: snprintb.c,v 1.44 2024/03/25 20:39:26 rillig Exp $");
 #  include 
 #  include 
 #  include 
@@ -231,12 +231,20 @@ finish_buffer(state *s)
 {
 	if (s->line_max > 0) {
 		store_eol(s);
-		if (s->bufsize >= 2 && s->total_len > s->bufsize - 2)
+		store(s, '\0');
+		if (s->bufsize >= 3 && s->total_len > s->bufsize)
+			s->buf[s->bufsize - 3] = '#';
+		if (s->bufsize >= 2 && s->total_len > s->bufsize)
 			s->buf[s->bufsize - 2] = '\0';
+		if (s->bufsize >= 1 && s->total_len > s->bufsize)
+			s->buf[s->bufsize - 1] = '\0';
+	} else {
+		store(s, '\0');
+		if (s->bufsize >= 2 && s->total_len > s->bufsize)
+			s->buf[s->bufsize - 2] = '#';
+		if (s->bufsize >= 1 && s->total_len > s->bufsize)
+			s->buf[s->bufsize - 1] = '\0';
 	}
-	store(s, '\0');
-	if (s->bufsize >= 1 && s->total_len > s->bufsize - 1)
-		s->buf[s->bufsize - 1] = '\0';
 }
 
 int

Index: src/tests/lib/libutil/t_snprintb.c
diff -u src/tests/lib/libutil/t_snprintb.c:1.30 src/tests/lib/libutil/t_snprintb.c:1.31
--- src/tests/lib/libutil/t_snprintb.c:1.30	Mon Mar  4 21:35:28 2024
+++ src/tests/lib/libutil/t_snprintb.c	Mon Mar 25 20:39:27 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: t_snprintb.c,v 1.30 2024/03/04 21:35:28 rillig Exp $ */
+/* $NetBSD: t_snprintb.c,v 1.31 2024/03/25 20:39:27 rillig Exp $ */
 
 /*
  * Copyright (c) 2002, 2004, 2008, 2010, 2024 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include 
 __COPYRIGHT("@(#) Copyright (c) 2008, 2010, 2024\
  The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_snprintb.c,v 1.30 2024/03/04 21:35:28 rillig Exp $");
+__RCSID("$NetBSD: t_snprintb.c,v 1.31 2024/03/25 20:39:27 rillig Exp $");
 
 #include 
 #include 
@@ -341,7 +341,7 @@ ATF_TC_BODY(snprintb, tc)
 	// old style, buffer too small for nonzero value
 	h_snprintb_len(
 	3, "\020", 0x07,
-	3, "0x");
+	3, "0#");
 
 	// old style, buffer large enough for nonzero value
 	h_snprintb_len(
@@ -351,17 +351,17 @@ ATF_TC_BODY(snprintb, tc)
 	// old style, buffer too small for '<'
 	h_snprintb_len(
 	4, "\020\001lsb", 0x07,
-	8, "0x7");
+	8, "0x#");
 
 	// old style, buffer too small for description
 	h_snprintb_len(
 	7, "\020\001lsb", 0x07,
-	8, "0x7'
 	h_snprintb_len(
 	8, "\020\001lsb", 0x07,
-	8, "0x7'
 	h_snprintb_len(
@@ -371,17 +371,17 @@ ATF_TC_BODY(snprintb, tc)
 	// old style, buffer too small for second description
 	h_snprintb_len(
 	9, "\020\001one\002two", 0x07,
-	12, "0x7' after second description
 	h_snprintb_len(
 	12, "\020\001one\002two", 0x07,
-	12, "0x7' after second description
 	h_snprintb_len(
@@ -1090,28 +1090,28 @@ ATF_TC_BODY(snprintb, tc)
 	1, "0");
 	h_snprintb_len(
 	3, "\177\020", 0x07,
-	3, "0x");
+	3, "0#");
 	h_snprintb_len(
 	4, "\177\020", 0x07,
 	3, "0x7");
 	h_snprintb_len(
 	7, "\177\020b\000lsb\0", 0x07,
-	8, "0x7");
 	h_snprintb_len(
 	9, "\177\020b\000one\0b\001two\0", 0x07,
-	12, "0x7");
@@ -1511,7 +1511,7 @@ ATF_TC_BODY(snprintb_m, tc)
 	11,
 	20,
 	"0xff\0"
-	"0xf\0");		// XXX: incomplete number may be misleading
+	"0x#\0");
 
 	// new-style format, buffer too small for '<' in line 2
 	h_snprintb_m_len(
@@ -1523,17 +1523,19 @@ ATF_TC_BODY(snprintb_m, tc)
 	11,
 	20,
 	"0xff\0"
-	"0xff\0");
+	"0xf#\0");
 
-	// new-style format, buffer too small for fallback
-	h_snprintb_m(
+	// new-style format, buffer too small for textual fallback
+	

CVS commit: [netbsd-8] src/doc

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:59:02 UTC 2024

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

Log Message:
Ticket #1952


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

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

Modified files:

Index: src/doc/CHANGES-8.3
diff -u src/doc/CHANGES-8.3:1.1.2.225 src/doc/CHANGES-8.3:1.1.2.226
--- src/doc/CHANGES-8.3:1.1.2.225	Mon Mar 25 15:55:32 2024
+++ src/doc/CHANGES-8.3	Mon Mar 25 15:59:02 2024
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES-8.3,v 1.1.2.225 2024/03/25 15:55:32 martin Exp $
+$NetBSD: CHANGES-8.3,v 1.1.2.226 2024/03/25 15:59:02 martin Exp $
 
 A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3
 release:
@@ -4384,3 +4384,9 @@ sys/dev/qbus/if_qe.c1.82
 	vax/qe(4): PR 58068: fix crash on various ifconfig operations.
 	[riastradh, ticket #1951]
 
+external/gpl2/groff/dist/tmac/doc.tmac		1.3
+
+	doc.tmac: PR 58074: .Lk - handle punctuation without anchor-text
+	correctly.
+	[uwe, ticket #1952]
+



CVS commit: [netbsd-8] src/doc

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:59:02 UTC 2024

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

Log Message:
Ticket #1952


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

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



CVS commit: [netbsd-8] src/external/gpl2/groff/dist/tmac

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:58:08 UTC 2024

Modified Files:
src/external/gpl2/groff/dist/tmac [netbsd-8]: doc.tmac

Log Message:
Pull up following revision(s) (requested by uwe in ticket #1952):

external/gpl2/groff/dist/tmac/doc.tmac: revision 1.3

doc.tmac: .Lk - handle punctuation without anchor-text correctly
doc-get-arg-type expects that doc-width is set beforehand, so call
doc-get-width to make sure doc-get-arg-type detects the trailing
punctuation correctly.

PR bin/58074


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.8.1 src/external/gpl2/groff/dist/tmac/doc.tmac

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



CVS commit: [netbsd-8] src/external/gpl2/groff/dist/tmac

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:58:08 UTC 2024

Modified Files:
src/external/gpl2/groff/dist/tmac [netbsd-8]: doc.tmac

Log Message:
Pull up following revision(s) (requested by uwe in ticket #1952):

external/gpl2/groff/dist/tmac/doc.tmac: revision 1.3

doc.tmac: .Lk - handle punctuation without anchor-text correctly
doc-get-arg-type expects that doc-width is set beforehand, so call
doc-get-width to make sure doc-get-arg-type detects the trailing
punctuation correctly.

PR bin/58074


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.8.1 src/external/gpl2/groff/dist/tmac/doc.tmac

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

Modified files:

Index: src/external/gpl2/groff/dist/tmac/doc.tmac
diff -u src/external/gpl2/groff/dist/tmac/doc.tmac:1.2 src/external/gpl2/groff/dist/tmac/doc.tmac:1.2.8.1
--- src/external/gpl2/groff/dist/tmac/doc.tmac:1.2	Wed Jan 13 19:01:59 2016
+++ src/external/gpl2/groff/dist/tmac/doc.tmac	Mon Mar 25 15:58:08 2024
@@ -6416,6 +6416,7 @@
 .  ds doc-str-Lk Sy \$@
 .
 .  ie (\n[.$] > 1) \{\
+.doc-get-width \$2
 .doc-get-arg-type \$2
 .ie (\n[doc-arg-type] < 3) \{\
 .  Em \)\$2:



CVS commit: [netbsd-8] src/doc

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:55:32 UTC 2024

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

Log Message:
Tickets #1949 - #1951


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

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

Modified files:

Index: src/doc/CHANGES-8.3
diff -u src/doc/CHANGES-8.3:1.1.2.224 src/doc/CHANGES-8.3:1.1.2.225
--- src/doc/CHANGES-8.3:1.1.2.224	Tue Mar 12 12:50:10 2024
+++ src/doc/CHANGES-8.3	Mon Mar 25 15:55:32 2024
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES-8.3,v 1.1.2.224 2024/03/12 12:50:10 martin Exp $
+$NetBSD: CHANGES-8.3,v 1.1.2.225 2024/03/25 15:55:32 martin Exp $
 
 A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3
 release:
@@ -4365,3 +4365,22 @@ usr.bin/audio/record/record.c   
 	- audioplay gains -n flag (no play, like make -n)
 	- audiorecord manual gained useful examples
 	[mrg, ticket #1948]
+
+usr.bin/audio/common/wav.c			1.24
+
+	audioplay(1): avoid errors when a file has zero-length data.
+	[mrg, ticket #1950]
+
+distrib/amd64/ramdisks/common/Makefile.ramdisk	1.17
+distrib/i386/ramdisks/common/Makefile.ramdisk	1.16
+etc/etc.amd64/Makefile.inc			1.17
+etc/etc.i386/Makefile.inc			1.70
+
+	x86: PR 57534: release the zfs and cgd ramdisks too.
+	[riastradh, ticket #1949]
+
+sys/dev/qbus/if_qe.c1.82
+
+	vax/qe(4): PR 58068: fix crash on various ifconfig operations.
+	[riastradh, ticket #1951]
+



CVS commit: [netbsd-8] src/doc

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:55:32 UTC 2024

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

Log Message:
Tickets #1949 - #1951


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

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



CVS commit: [netbsd-9] src/doc

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:54:20 UTC 2024

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

Log Message:
Tickets #1819 - #1823


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.141 -r1.1.2.142 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.141 src/doc/CHANGES-9.4:1.1.2.142
--- src/doc/CHANGES-9.4:1.1.2.141	Tue Mar 12 12:45:42 2024
+++ src/doc/CHANGES-9.4	Mon Mar 25 15:54:20 2024
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.141 2024/03/12 12:45:42 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.142 2024/03/25 15:54:20 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -13497,3 +13497,40 @@ usr.bin/audio/record/record.c   
 	- audiorecord manual gained useful examples
 	[mrg, ticket #1818]
 
+crypto/external/bsd/openssl/dist/include/crypto/sha.h 1.2 (patch)
+crypto/external/bsd/openssl/dist/providers/implementations/digests/sha2_prov.c 1.2 (patch)
+	(applied to crypto/external/bsd/openssl/dist/crypto/evp/m_sha1.c)
+crypto/external/bsd/openssl/lib/libcrypto/libc-sha2xx.c 1.4 (patch)
+distrib/sets/lists/debug/mi			1.430 (patch)
+distrib/sets/lists/tests/mi			1.1311 (patch)
+tests/crypto/libcrypto/Makefile			1.16 (patch)
+tests/crypto/libcrypto/t_sha512trunc.c		1.1,1.2 (patch)
+
+	openssl: PR 58039: avoid buffer overrun in SHA512/256 and
+	SHA512/224 output.
+	[riastradh, ticket #1819]
+
+usr.bin/audio/common/wav.c			1.24
+
+	audioplay(1): avoid errors when a file has zero-length data.
+	[mrg, ticket #1821]
+
+distrib/amd64/ramdisks/common/Makefile.ramdisk	1.17
+distrib/i386/ramdisks/common/Makefile.ramdisk	1.16
+etc/etc.amd64/Makefile.inc			1.17
+etc/etc.i386/Makefile.inc			1.70
+
+	x86: PR 57534: release the zfs and cgd ramdisks too.
+	[riastradh, ticket #1820]
+
+sys/dev/qbus/if_qe.c1.82
+
+	vax/qe(4): PR 58068: fix crash on various ifconfig operations.
+	[riastradh, ticket #1822]
+
+external/gpl2/groff/dist/tmac/doc.tmac		1.3
+
+	doc.tmac: PR 58074: .Lk - handle punctuation without anchor-text
+	correctly.
+	[uwe, ticket #1823]
+



CVS commit: [netbsd-9] src/doc

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:54:20 UTC 2024

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

Log Message:
Tickets #1819 - #1823


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.141 -r1.1.2.142 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/gpl2/groff/dist/tmac

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:51:47 UTC 2024

Modified Files:
src/external/gpl2/groff/dist/tmac [netbsd-9]: doc.tmac

Log Message:
Pull up following revision(s) (requested by uwe in ticket #1823):

external/gpl2/groff/dist/tmac/doc.tmac: revision 1.3

doc.tmac: .Lk - handle punctuation without anchor-text correctly
doc-get-arg-type expects that doc-width is set beforehand, so call
doc-get-width to make sure doc-get-arg-type detects the trailing
punctuation correctly.

PR bin/58074


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.18.1 src/external/gpl2/groff/dist/tmac/doc.tmac

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

Modified files:

Index: src/external/gpl2/groff/dist/tmac/doc.tmac
diff -u src/external/gpl2/groff/dist/tmac/doc.tmac:1.2 src/external/gpl2/groff/dist/tmac/doc.tmac:1.2.18.1
--- src/external/gpl2/groff/dist/tmac/doc.tmac:1.2	Wed Jan 13 19:01:59 2016
+++ src/external/gpl2/groff/dist/tmac/doc.tmac	Mon Mar 25 15:51:47 2024
@@ -6416,6 +6416,7 @@
 .  ds doc-str-Lk Sy \$@
 .
 .  ie (\n[.$] > 1) \{\
+.doc-get-width \$2
 .doc-get-arg-type \$2
 .ie (\n[doc-arg-type] < 3) \{\
 .  Em \)\$2:



CVS commit: [netbsd-9] src/external/gpl2/groff/dist/tmac

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:51:47 UTC 2024

Modified Files:
src/external/gpl2/groff/dist/tmac [netbsd-9]: doc.tmac

Log Message:
Pull up following revision(s) (requested by uwe in ticket #1823):

external/gpl2/groff/dist/tmac/doc.tmac: revision 1.3

doc.tmac: .Lk - handle punctuation without anchor-text correctly
doc-get-arg-type expects that doc-width is set beforehand, so call
doc-get-width to make sure doc-get-arg-type detects the trailing
punctuation correctly.

PR bin/58074


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.18.1 src/external/gpl2/groff/dist/tmac/doc.tmac

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



CVS commit: [netbsd-8] src/sys/dev/qbus

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:37:25 UTC 2024

Modified Files:
src/sys/dev/qbus [netbsd-8]: if_qe.c

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

sys/dev/qbus/if_qe.c: revision 1.82

vax/qe(4): supply an ipf->if_init() so that if_init() doesn't crash.

convert the existing qeinit() to one compatible with if_init.
should fix PR#58068.


To generate a diff of this commit:
cvs rdiff -u -r1.77.2.1 -r1.77.2.2 src/sys/dev/qbus/if_qe.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/qbus/if_qe.c
diff -u src/sys/dev/qbus/if_qe.c:1.77.2.1 src/sys/dev/qbus/if_qe.c:1.77.2.2
--- src/sys/dev/qbus/if_qe.c:1.77.2.1	Thu Jul 26 23:55:30 2018
+++ src/sys/dev/qbus/if_qe.c	Mon Mar 25 15:37:25 2024
@@ -1,4 +1,4 @@
-/*  $NetBSD: if_qe.c,v 1.77.2.1 2018/07/26 23:55:30 snj Exp $ */
+/*  $NetBSD: if_qe.c,v 1.77.2.2 2024/03/25 15:37:25 martin Exp $ */
 /*
  * Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved.
  *
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_qe.c,v 1.77.2.1 2018/07/26 23:55:30 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_qe.c,v 1.77.2.2 2024/03/25 15:37:25 martin Exp $");
 
 #include "opt_inet.h"
 
@@ -97,7 +97,7 @@ struct	qe_softc {
 
 static	int	qematch(device_t, cfdata_t, void *);
 static	void	qeattach(device_t, device_t, void *);
-static	void	qeinit(struct qe_softc *);
+static	int	qeinit(struct ifnet *);
 static	void	qestart(struct ifnet *);
 static	void	qeintr(void *);
 static	int	qeioctl(struct ifnet *, u_long, void *);
@@ -341,6 +341,7 @@ qeattach(device_t parent, device_t self,
 	ifp->if_softc = sc;
 	ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
 	ifp->if_start = qestart;
+	ifp->if_init = qeinit;
 	ifp->if_ioctl = qeioctl;
 	ifp->if_watchdog = qetimeout;
 	IFQ_SET_READY(>if_snd);
@@ -381,10 +382,10 @@ qeattach(device_t parent, device_t self,
 /*
  * Initialization of interface.
  */
-void
-qeinit(struct qe_softc *sc)
+int
+qeinit(struct ifnet *ifp)
 {
-	struct ifnet *ifp = (struct ifnet *)>sc_if;
+	struct qe_softc *sc = ifp->if_softc;
 	struct qe_cdata *qc = sc->sc_qedata;
 	int i;
 
@@ -411,7 +412,6 @@ qeinit(struct qe_softc *sc)
 		qc->qc_xmit[i].qe_status1 = qc->qc_xmit[i].qe_flag = QE_NOTYET;
 	}
 
-
 	/*
 	 * Init receive descriptors.
 	 */
@@ -436,6 +436,7 @@ qeinit(struct qe_softc *sc)
 	 */
 	qe_setup(sc);
 
+	return 0;
 }
 
 /*
@@ -651,7 +652,7 @@ qeioctl(struct ifnet *ifp, u_long cmd, v
 		switch(ifa->ifa_addr->sa_family) {
 #ifdef INET
 		case AF_INET:
-			qeinit(sc);
+			qeinit(ifp);
 			arp_ifinit(ifp, ifa);
 			break;
 #endif
@@ -677,7 +678,7 @@ qeioctl(struct ifnet *ifp, u_long cmd, v
 			 * If interface it marked up and it is stopped, then
 			 * start it.
 			 */
-			qeinit(sc);
+			qeinit(ifp);
 			break;
 		case IFF_UP|IFF_RUNNING:
 			/*
@@ -865,5 +866,5 @@ qetimeout(struct ifnet *ifp)
 	 * Do a reset of interface, to get it going again.
 	 * Will it work by just restart the transmit logic?
 	 */
-	qeinit(sc);
+	qeinit(ifp);
 }



CVS commit: [netbsd-8] src/sys/dev/qbus

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:37:25 UTC 2024

Modified Files:
src/sys/dev/qbus [netbsd-8]: if_qe.c

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

sys/dev/qbus/if_qe.c: revision 1.82

vax/qe(4): supply an ipf->if_init() so that if_init() doesn't crash.

convert the existing qeinit() to one compatible with if_init.
should fix PR#58068.


To generate a diff of this commit:
cvs rdiff -u -r1.77.2.1 -r1.77.2.2 src/sys/dev/qbus/if_qe.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/qbus

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:35:50 UTC 2024

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

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

sys/dev/qbus/if_qe.c: revision 1.82

vax/qe(4): supply an ipf->if_init() so that if_init() doesn't crash.

convert the existing qeinit() to one compatible with if_init.
should fix PR#58068.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.81.2.1 src/sys/dev/qbus/if_qe.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/qbus/if_qe.c
diff -u src/sys/dev/qbus/if_qe.c:1.81 src/sys/dev/qbus/if_qe.c:1.81.2.1
--- src/sys/dev/qbus/if_qe.c:1.81	Tue May 28 07:41:49 2019
+++ src/sys/dev/qbus/if_qe.c	Mon Mar 25 15:35:50 2024
@@ -1,4 +1,4 @@
-/*  $NetBSD: if_qe.c,v 1.81 2019/05/28 07:41:49 msaitoh Exp $ */
+/*  $NetBSD: if_qe.c,v 1.81.2.1 2024/03/25 15:35:50 martin Exp $ */
 /*
  * Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved.
  *
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_qe.c,v 1.81 2019/05/28 07:41:49 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_qe.c,v 1.81.2.1 2024/03/25 15:35:50 martin Exp $");
 
 #include "opt_inet.h"
 
@@ -97,7 +97,7 @@ struct	qe_softc {
 
 static	int	qematch(device_t, cfdata_t, void *);
 static	void	qeattach(device_t, device_t, void *);
-static	void	qeinit(struct qe_softc *);
+static	int	qeinit(struct ifnet *);
 static	void	qestart(struct ifnet *);
 static	void	qeintr(void *);
 static	int	qeioctl(struct ifnet *, u_long, void *);
@@ -341,6 +341,7 @@ qeattach(device_t parent, device_t self,
 	ifp->if_softc = sc;
 	ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
 	ifp->if_start = qestart;
+	ifp->if_init = qeinit;
 	ifp->if_ioctl = qeioctl;
 	ifp->if_watchdog = qetimeout;
 	IFQ_SET_READY(>if_snd);
@@ -381,10 +382,10 @@ qeattach(device_t parent, device_t self,
 /*
  * Initialization of interface.
  */
-void
-qeinit(struct qe_softc *sc)
+int
+qeinit(struct ifnet *ifp)
 {
-	struct ifnet *ifp = (struct ifnet *)>sc_if;
+	struct qe_softc *sc = ifp->if_softc;
 	struct qe_cdata *qc = sc->sc_qedata;
 	int i;
 
@@ -411,7 +412,6 @@ qeinit(struct qe_softc *sc)
 		qc->qc_xmit[i].qe_status1 = qc->qc_xmit[i].qe_flag = QE_NOTYET;
 	}
 
-
 	/*
 	 * Init receive descriptors.
 	 */
@@ -436,6 +436,7 @@ qeinit(struct qe_softc *sc)
 	 */
 	qe_setup(sc);
 
+	return 0;
 }
 
 /*
@@ -651,7 +652,7 @@ qeioctl(struct ifnet *ifp, u_long cmd, v
 		switch (ifa->ifa_addr->sa_family) {
 #ifdef INET
 		case AF_INET:
-			qeinit(sc);
+			qeinit(ifp);
 			arp_ifinit(ifp, ifa);
 			break;
 #endif
@@ -677,7 +678,7 @@ qeioctl(struct ifnet *ifp, u_long cmd, v
 			 * If interface it marked up and it is stopped, then
 			 * start it.
 			 */
-			qeinit(sc);
+			qeinit(ifp);
 			break;
 		case IFF_UP | IFF_RUNNING:
 			/*
@@ -868,5 +869,5 @@ qetimeout(struct ifnet *ifp)
 	 * Do a reset of interface, to get it going again.
 	 * Will it work by just restart the transmit logic?
 	 */
-	qeinit(sc);
+	qeinit(ifp);
 }



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

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:35:50 UTC 2024

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

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

sys/dev/qbus/if_qe.c: revision 1.82

vax/qe(4): supply an ipf->if_init() so that if_init() doesn't crash.

convert the existing qeinit() to one compatible with if_init.
should fix PR#58068.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.81.2.1 src/sys/dev/qbus/if_qe.c

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



CVS commit: [netbsd-10] src/doc

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:28:01 UTC 2024

Modified Files:
src/doc [netbsd-10]: CHANGES-10.0

Log Message:
Tickets #637 - #642, #646, #647


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.213 -r1.1.2.214 src/doc/CHANGES-10.0

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-10.0
diff -u src/doc/CHANGES-10.0:1.1.2.213 src/doc/CHANGES-10.0:1.1.2.214
--- src/doc/CHANGES-10.0:1.1.2.213	Sun Mar 24 20:27:33 2024
+++ src/doc/CHANGES-10.0	Mon Mar 25 15:28:00 2024
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-10.0,v 1.1.2.213 2024/03/24 20:27:33 bouyer Exp $
+# $NetBSD: CHANGES-10.0,v 1.1.2.214 2024/03/25 15:28:00 martin Exp $
 
 A complete list of changes from the initial NetBSD 10.0 branch on 2022-12-16
 until the 10.0 release:
@@ -21513,3 +21513,60 @@ usr.sbin/sysinst/gpt.c1.32
 	partition.
 	[martin, ticket #645]
 
+crypto/external/bsd/openssl/dist/crypto/evp/legacy_sha.c 1.2
+crypto/external/bsd/openssl/dist/include/crypto/sha.h 1.2
+crypto/external/bsd/openssl/dist/providers/implementations/digests/sha2_prov.c 1.2
+crypto/external/bsd/openssl/lib/libcrypto/libc-sha2xx.c 1.4
+distrib/sets/lists/debug/mi			1.430
+distrib/sets/lists/tests/mi			1.1311
+tests/crypto/libcrypto/Makefile			1.16
+tests/crypto/libcrypto/t_sha512trunc.c		1.1,1.2
+
+	openssl: PR 58039: avoid buffer overrun in SHA512/256 and
+	SHA512/224 output.
+	[riastradh, ticket #637]
+
+lib/libc/time/strptime.c			1.64,1.65
+tests/lib/libc/time/t_strptime.c		1.16
+
+	strptime(3): PR 58041: avoid arithmetic overflow.
+	[riastradh, ticket #638]
+
+sys/dev/acpi/acpi.c1.299
+sys/dev/acpi/acpivar.h1.90
+sys/dev/acpi/files.acpi1.129,1.130
+
+	acpi(4): PR 58046: add hook for future APEI driver.
+	[riastradh, ticket #639]
+
+usr.bin/audio/common/wav.c			1.24
+
+	audioplay(1): avoid errors when a file has zero-length data.
+	[mrg, ticket #640]
+
+usr.bin/kdump/kdump.c1.145
+
+	kdump(1): remove debug message.
+	[kre, ticket #641]
+
+distrib/amd64/ramdisks/common/Makefile.ramdisk	1.17
+distrib/i386/ramdisks/common/Makefile.ramdisk	1.16
+etc/etc.amd64/Makefile.inc			1.17
+etc/etc.i386/Makefile.inc			1.70
+
+	x86: PR 57534: release the zfs and cgd ramdisks too.
+	[riastradh, ticket #642]
+
+distrib/notes/common/main			1.575
+external/gpl2/groff/dist/tmac/doc.tmac		1.3
+
+	doc.tmac: PR 58074: .Lk - handle punctuation without anchor-text
+	correctly.
+	distrib/notes: add back the sentence final dot after .Lk.
+	[uwe, ticket #646]
+
+sys/dev/qbus/if_qe.c1.82
+
+	vax/qe(4): PR 58068: fix crash on various ifconfig operations.
+	[riastradh, ticket #647]
+



CVS commit: [netbsd-10] src/doc

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:28:01 UTC 2024

Modified Files:
src/doc [netbsd-10]: CHANGES-10.0

Log Message:
Tickets #637 - #642, #646, #647


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.213 -r1.1.2.214 src/doc/CHANGES-10.0

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



CVS commit: [netbsd-10] src/sys/dev/qbus

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:26:04 UTC 2024

Modified Files:
src/sys/dev/qbus [netbsd-10]: if_qe.c

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

sys/dev/qbus/if_qe.c: revision 1.82

vax/qe(4): supply an ipf->if_init() so that if_init() doesn't crash.

convert the existing qeinit() to one compatible with if_init.
should fix PR#58068.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.81.28.1 src/sys/dev/qbus/if_qe.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/qbus/if_qe.c
diff -u src/sys/dev/qbus/if_qe.c:1.81 src/sys/dev/qbus/if_qe.c:1.81.28.1
--- src/sys/dev/qbus/if_qe.c:1.81	Tue May 28 07:41:49 2019
+++ src/sys/dev/qbus/if_qe.c	Mon Mar 25 15:26:04 2024
@@ -1,4 +1,4 @@
-/*  $NetBSD: if_qe.c,v 1.81 2019/05/28 07:41:49 msaitoh Exp $ */
+/*  $NetBSD: if_qe.c,v 1.81.28.1 2024/03/25 15:26:04 martin Exp $ */
 /*
  * Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved.
  *
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_qe.c,v 1.81 2019/05/28 07:41:49 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_qe.c,v 1.81.28.1 2024/03/25 15:26:04 martin Exp $");
 
 #include "opt_inet.h"
 
@@ -97,7 +97,7 @@ struct	qe_softc {
 
 static	int	qematch(device_t, cfdata_t, void *);
 static	void	qeattach(device_t, device_t, void *);
-static	void	qeinit(struct qe_softc *);
+static	int	qeinit(struct ifnet *);
 static	void	qestart(struct ifnet *);
 static	void	qeintr(void *);
 static	int	qeioctl(struct ifnet *, u_long, void *);
@@ -341,6 +341,7 @@ qeattach(device_t parent, device_t self,
 	ifp->if_softc = sc;
 	ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
 	ifp->if_start = qestart;
+	ifp->if_init = qeinit;
 	ifp->if_ioctl = qeioctl;
 	ifp->if_watchdog = qetimeout;
 	IFQ_SET_READY(>if_snd);
@@ -381,10 +382,10 @@ qeattach(device_t parent, device_t self,
 /*
  * Initialization of interface.
  */
-void
-qeinit(struct qe_softc *sc)
+int
+qeinit(struct ifnet *ifp)
 {
-	struct ifnet *ifp = (struct ifnet *)>sc_if;
+	struct qe_softc *sc = ifp->if_softc;
 	struct qe_cdata *qc = sc->sc_qedata;
 	int i;
 
@@ -411,7 +412,6 @@ qeinit(struct qe_softc *sc)
 		qc->qc_xmit[i].qe_status1 = qc->qc_xmit[i].qe_flag = QE_NOTYET;
 	}
 
-
 	/*
 	 * Init receive descriptors.
 	 */
@@ -436,6 +436,7 @@ qeinit(struct qe_softc *sc)
 	 */
 	qe_setup(sc);
 
+	return 0;
 }
 
 /*
@@ -651,7 +652,7 @@ qeioctl(struct ifnet *ifp, u_long cmd, v
 		switch (ifa->ifa_addr->sa_family) {
 #ifdef INET
 		case AF_INET:
-			qeinit(sc);
+			qeinit(ifp);
 			arp_ifinit(ifp, ifa);
 			break;
 #endif
@@ -677,7 +678,7 @@ qeioctl(struct ifnet *ifp, u_long cmd, v
 			 * If interface it marked up and it is stopped, then
 			 * start it.
 			 */
-			qeinit(sc);
+			qeinit(ifp);
 			break;
 		case IFF_UP | IFF_RUNNING:
 			/*
@@ -868,5 +869,5 @@ qetimeout(struct ifnet *ifp)
 	 * Do a reset of interface, to get it going again.
 	 * Will it work by just restart the transmit logic?
 	 */
-	qeinit(sc);
+	qeinit(ifp);
 }



CVS commit: [netbsd-10] src/sys/dev/qbus

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:26:04 UTC 2024

Modified Files:
src/sys/dev/qbus [netbsd-10]: if_qe.c

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

sys/dev/qbus/if_qe.c: revision 1.82

vax/qe(4): supply an ipf->if_init() so that if_init() doesn't crash.

convert the existing qeinit() to one compatible with if_init.
should fix PR#58068.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.81.28.1 src/sys/dev/qbus/if_qe.c

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



CVS commit: [netbsd-10] src

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:23:50 UTC 2024

Modified Files:
src/distrib/notes/common [netbsd-10]: main
src/external/gpl2/groff/dist/tmac [netbsd-10]: doc.tmac

Log Message:
Pull up following revision(s) (requested by uwe in ticket #646):

external/gpl2/groff/dist/tmac/doc.tmac: revision 1.3
distrib/notes/common/main: revision 1.575

doc.tmac: .Lk - handle punctuation without anchor-text correctly
doc-get-arg-type expects that doc-width is set beforehand, so call
doc-get-width to make sure doc-get-arg-type detects the trailing
punctuation correctly.
PR bin/58074

distrib/notes: add back the sentence final dot after .Lk
It was omitted in previous b/c of a bug in .Lk that was fixed
in PR bin/58074


To generate a diff of this commit:
cvs rdiff -u -r1.570.2.4 -r1.570.2.5 src/distrib/notes/common/main
cvs rdiff -u -r1.2 -r1.2.26.1 src/external/gpl2/groff/dist/tmac/doc.tmac

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

Modified files:

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.570.2.4 src/distrib/notes/common/main:1.570.2.5
--- src/distrib/notes/common/main:1.570.2.4	Sun Mar 24 20:24:26 2024
+++ src/distrib/notes/common/main	Mon Mar 25 15:23:49 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: main,v 1.570.2.4 2024/03/24 20:24:26 bouyer Exp $
+.\"	$NetBSD: main,v 1.570.2.5 2024/03/25 15:23:49 martin Exp $
 .\"
 .\" Copyright (c) 1999-2012 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -482,7 +482,7 @@ The
 system architectures, with preliminary support for the others included in
 source form.
 For more information please visit
-.Lk https://www.NetBSD.org/
+.Lk https://www.NetBSD.org/ .
 .Pp
 .Nx
 is a completely integrated system.

Index: src/external/gpl2/groff/dist/tmac/doc.tmac
diff -u src/external/gpl2/groff/dist/tmac/doc.tmac:1.2 src/external/gpl2/groff/dist/tmac/doc.tmac:1.2.26.1
--- src/external/gpl2/groff/dist/tmac/doc.tmac:1.2	Wed Jan 13 19:01:59 2016
+++ src/external/gpl2/groff/dist/tmac/doc.tmac	Mon Mar 25 15:23:49 2024
@@ -6416,6 +6416,7 @@
 .  ds doc-str-Lk Sy \$@
 .
 .  ie (\n[.$] > 1) \{\
+.doc-get-width \$2
 .doc-get-arg-type \$2
 .ie (\n[doc-arg-type] < 3) \{\
 .  Em \)\$2:



CVS commit: [netbsd-10] src

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:23:50 UTC 2024

Modified Files:
src/distrib/notes/common [netbsd-10]: main
src/external/gpl2/groff/dist/tmac [netbsd-10]: doc.tmac

Log Message:
Pull up following revision(s) (requested by uwe in ticket #646):

external/gpl2/groff/dist/tmac/doc.tmac: revision 1.3
distrib/notes/common/main: revision 1.575

doc.tmac: .Lk - handle punctuation without anchor-text correctly
doc-get-arg-type expects that doc-width is set beforehand, so call
doc-get-width to make sure doc-get-arg-type detects the trailing
punctuation correctly.
PR bin/58074

distrib/notes: add back the sentence final dot after .Lk
It was omitted in previous b/c of a bug in .Lk that was fixed
in PR bin/58074


To generate a diff of this commit:
cvs rdiff -u -r1.570.2.4 -r1.570.2.5 src/distrib/notes/common/main
cvs rdiff -u -r1.2 -r1.2.26.1 src/external/gpl2/groff/dist/tmac/doc.tmac

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



CVS commit: [netbsd-8] src

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:21:05 UTC 2024

Modified Files:
src/distrib/amd64/ramdisks/common [netbsd-8]: Makefile.ramdisk
src/distrib/i386/ramdisks/common [netbsd-8]: Makefile.ramdisk
src/etc/etc.amd64 [netbsd-8]: Makefile.inc
src/etc/etc.i386 [netbsd-8]: Makefile.inc

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

etc/etc.amd64/Makefile.inc: revision 1.17
distrib/amd64/ramdisks/common/Makefile.ramdisk: revision 1.17
etc/etc.i386/Makefile.inc: revision 1.70
distrib/i386/ramdisks/common/Makefile.ramdisk: revision 1.16

x86: Release the ramdisks too.

This way we will get cgdroot.fs (and zfsroot.fs too) in the release.
PR misc/57534


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.8.1 \
src/distrib/amd64/ramdisks/common/Makefile.ramdisk
cvs rdiff -u -r1.12 -r1.12.8.1 \
src/distrib/i386/ramdisks/common/Makefile.ramdisk
cvs rdiff -u -r1.15 -r1.15.8.1 src/etc/etc.amd64/Makefile.inc
cvs rdiff -u -r1.68 -r1.68.8.1 src/etc/etc.i386/Makefile.inc

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

Modified files:

Index: src/distrib/amd64/ramdisks/common/Makefile.ramdisk
diff -u src/distrib/amd64/ramdisks/common/Makefile.ramdisk:1.11 src/distrib/amd64/ramdisks/common/Makefile.ramdisk:1.11.8.1
--- src/distrib/amd64/ramdisks/common/Makefile.ramdisk:1.11	Wed Oct  7 14:09:04 2015
+++ src/distrib/amd64/ramdisks/common/Makefile.ramdisk	Mon Mar 25 15:21:04 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.ramdisk,v 1.11 2015/10/07 14:09:04 martin Exp $
+#	$NetBSD: Makefile.ramdisk,v 1.11.8.1 2024/03/25 15:21:04 martin Exp $
 
 .include 
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -46,6 +46,8 @@ ${CRUNCHBIN}:	libhack.o
 .include "${DISTRIBDIR}/common/Makefile.makedev"
 .include "${DISTRIBDIR}/common/Makefile.image"
 
-release:
+release:	${IMAGE}
+	${HOST_INSTALL_FILE} -m ${NONBINMODE} ${IMAGE} \
+		${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/ramdisk/
 
 .include 

Index: src/distrib/i386/ramdisks/common/Makefile.ramdisk
diff -u src/distrib/i386/ramdisks/common/Makefile.ramdisk:1.12 src/distrib/i386/ramdisks/common/Makefile.ramdisk:1.12.8.1
--- src/distrib/i386/ramdisks/common/Makefile.ramdisk:1.12	Wed Oct  7 14:09:05 2015
+++ src/distrib/i386/ramdisks/common/Makefile.ramdisk	Mon Mar 25 15:21:04 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.ramdisk,v 1.12 2015/10/07 14:09:05 martin Exp $
+#	$NetBSD: Makefile.ramdisk,v 1.12.8.1 2024/03/25 15:21:04 martin Exp $
 
 .include 
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -53,6 +53,8 @@ ${CRUNCHBIN}:	libhack.o
 .include "${DISTRIBDIR}/common/Makefile.makedev"
 .include "${DISTRIBDIR}/common/Makefile.image"
 
-release:
+release:	${IMAGE}
+	${HOST_INSTALL_FILE} -m ${NONBINMODE} ${IMAGE} \
+		${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/ramdisk/
 
 .include 

Index: src/etc/etc.amd64/Makefile.inc
diff -u src/etc/etc.amd64/Makefile.inc:1.15 src/etc/etc.amd64/Makefile.inc:1.15.8.1
--- src/etc/etc.amd64/Makefile.inc:1.15	Sun Jan 11 04:03:47 2015
+++ src/etc/etc.amd64/Makefile.inc	Mon Mar 25 15:21:04 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.15 2015/01/11 04:03:47 snj Exp $
+#	$NetBSD: Makefile.inc,v 1.15.8.1 2024/03/25 15:21:04 martin Exp $
 #
 #	etc.amd64/Makefile.inc -- amd64-specific etc Makefile targets
 #
@@ -15,9 +15,11 @@ BUILD_KERNELS=		INSTALL INSTALL_XEN3_DOM
 INSTALLATION_DIRS+= 	installation/cdrom
 INSTALLATION_DIRS+= 	installation/misc
 INSTALLATION_DIRS+= 	installation/miniroot
+INSTALLATION_DIRS+= 	installation/ramdisk
 
 snap_md_post:
 	cd ${KERNSRCDIR}/arch/i386/stand/pxeboot && ${MAKE} release
 	${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/cdrom '*.iso'
 	${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/miniroot '*.*'
 	${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc '*.*'
+	${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/ramdisk '*.*'

Index: src/etc/etc.i386/Makefile.inc
diff -u src/etc/etc.i386/Makefile.inc:1.68 src/etc/etc.i386/Makefile.inc:1.68.8.1
--- src/etc/etc.i386/Makefile.inc:1.68	Sat Mar  7 07:28:37 2015
+++ src/etc/etc.i386/Makefile.inc	Mon Mar 25 15:21:04 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.68 2015/03/07 07:28:37 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.68.8.1 2024/03/25 15:21:04 martin Exp $
 #
 #	etc.i386/Makefile.inc -- i386-specific etc Makefile targets
 #
@@ -29,6 +29,7 @@ INSTALLATION_DIRS+=	installation/misc
 INSTALLATION_DIRS+=	installation/cdrom
 INSTALLATION_DIRS+=	installation/floppy
 INSTALLATION_DIRS+=	installation/miniroot
+INSTALLATION_DIRS+=	installation/ramdisk
 
 # i386 specific distrib stuff
 snap_md_post:
@@ -39,3 +40,4 @@ snap_md_post:
 	${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/floppy '*.fs'
 	${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/miniroot 

CVS commit: [netbsd-8] src

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:21:05 UTC 2024

Modified Files:
src/distrib/amd64/ramdisks/common [netbsd-8]: Makefile.ramdisk
src/distrib/i386/ramdisks/common [netbsd-8]: Makefile.ramdisk
src/etc/etc.amd64 [netbsd-8]: Makefile.inc
src/etc/etc.i386 [netbsd-8]: Makefile.inc

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

etc/etc.amd64/Makefile.inc: revision 1.17
distrib/amd64/ramdisks/common/Makefile.ramdisk: revision 1.17
etc/etc.i386/Makefile.inc: revision 1.70
distrib/i386/ramdisks/common/Makefile.ramdisk: revision 1.16

x86: Release the ramdisks too.

This way we will get cgdroot.fs (and zfsroot.fs too) in the release.
PR misc/57534


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.8.1 \
src/distrib/amd64/ramdisks/common/Makefile.ramdisk
cvs rdiff -u -r1.12 -r1.12.8.1 \
src/distrib/i386/ramdisks/common/Makefile.ramdisk
cvs rdiff -u -r1.15 -r1.15.8.1 src/etc/etc.amd64/Makefile.inc
cvs rdiff -u -r1.68 -r1.68.8.1 src/etc/etc.i386/Makefile.inc

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



CVS commit: [netbsd-9] src

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:19:44 UTC 2024

Modified Files:
src/distrib/amd64/ramdisks/common [netbsd-9]: Makefile.ramdisk
src/distrib/i386/ramdisks/common [netbsd-9]: Makefile.ramdisk
src/etc/etc.amd64 [netbsd-9]: Makefile.inc
src/etc/etc.i386 [netbsd-9]: Makefile.inc

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

etc/etc.amd64/Makefile.inc: revision 1.17
distrib/amd64/ramdisks/common/Makefile.ramdisk: revision 1.17
etc/etc.i386/Makefile.inc: revision 1.70
distrib/i386/ramdisks/common/Makefile.ramdisk: revision 1.16

x86: Release the ramdisks too.

This way we will get cgdroot.fs (and zfsroot.fs too) in the release.
PR misc/57534


To generate a diff of this commit:
cvs rdiff -u -r1.14.2.1 -r1.14.2.2 \
src/distrib/amd64/ramdisks/common/Makefile.ramdisk
cvs rdiff -u -r1.13.4.1 -r1.13.4.2 \
src/distrib/i386/ramdisks/common/Makefile.ramdisk
cvs rdiff -u -r1.16 -r1.16.2.1 src/etc/etc.amd64/Makefile.inc
cvs rdiff -u -r1.69 -r1.69.2.1 src/etc/etc.i386/Makefile.inc

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

Modified files:

Index: src/distrib/amd64/ramdisks/common/Makefile.ramdisk
diff -u src/distrib/amd64/ramdisks/common/Makefile.ramdisk:1.14.2.1 src/distrib/amd64/ramdisks/common/Makefile.ramdisk:1.14.2.2
--- src/distrib/amd64/ramdisks/common/Makefile.ramdisk:1.14.2.1	Wed Apr 13 03:39:23 2022
+++ src/distrib/amd64/ramdisks/common/Makefile.ramdisk	Mon Mar 25 15:19:44 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.ramdisk,v 1.14.2.1 2022/04/13 03:39:23 snj Exp $
+#	$NetBSD: Makefile.ramdisk,v 1.14.2.2 2024/03/25 15:19:44 martin Exp $
 
 NOSANITIZER=	# defined
 
@@ -50,6 +50,8 @@ ${CRUNCHBIN}:	libhack.o
 .include "${DISTRIBDIR}/common/Makefile.makedev"
 .include "${DISTRIBDIR}/common/Makefile.image"
 
-release:
+release:	${IMAGE}
+	${HOST_INSTALL_FILE} -m ${NONBINMODE} ${IMAGE} \
+		${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/ramdisk/
 
 .include 

Index: src/distrib/i386/ramdisks/common/Makefile.ramdisk
diff -u src/distrib/i386/ramdisks/common/Makefile.ramdisk:1.13.4.1 src/distrib/i386/ramdisks/common/Makefile.ramdisk:1.13.4.2
--- src/distrib/i386/ramdisks/common/Makefile.ramdisk:1.13.4.1	Thu Aug 29 16:48:44 2019
+++ src/distrib/i386/ramdisks/common/Makefile.ramdisk	Mon Mar 25 15:19:44 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.ramdisk,v 1.13.4.1 2019/08/29 16:48:44 martin Exp $
+#	$NetBSD: Makefile.ramdisk,v 1.13.4.2 2024/03/25 15:19:44 martin Exp $
 
 NOSANITIZER=	# defined
 
@@ -56,6 +56,8 @@ ${CRUNCHBIN}:	libhack.o
 .include "${DISTRIBDIR}/common/Makefile.makedev"
 .include "${DISTRIBDIR}/common/Makefile.image"
 
-release:
+release:	${IMAGE}
+	${HOST_INSTALL_FILE} -m ${NONBINMODE} ${IMAGE} \
+		${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/ramdisk/
 
 .include 

Index: src/etc/etc.amd64/Makefile.inc
diff -u src/etc/etc.amd64/Makefile.inc:1.16 src/etc/etc.amd64/Makefile.inc:1.16.2.1
--- src/etc/etc.amd64/Makefile.inc:1.16	Thu Aug  2 16:26:09 2018
+++ src/etc/etc.amd64/Makefile.inc	Mon Mar 25 15:19:44 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.16 2018/08/02 16:26:09 maxv Exp $
+#	$NetBSD: Makefile.inc,v 1.16.2.1 2024/03/25 15:19:44 martin Exp $
 #
 #	etc.amd64/Makefile.inc -- amd64-specific etc Makefile targets
 #
@@ -16,9 +16,11 @@ BUILD_KERNELS=		INSTALL INSTALL_XEN3_DOM
 INSTALLATION_DIRS+= 	installation/cdrom
 INSTALLATION_DIRS+= 	installation/misc
 INSTALLATION_DIRS+= 	installation/miniroot
+INSTALLATION_DIRS+= 	installation/ramdisk
 
 snap_md_post:
 	cd ${KERNSRCDIR}/arch/i386/stand/pxeboot && ${MAKE} release
 	${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/cdrom '*.iso'
 	${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/miniroot '*.*'
 	${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc '*.*'
+	${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/ramdisk '*.*'

Index: src/etc/etc.i386/Makefile.inc
diff -u src/etc/etc.i386/Makefile.inc:1.69 src/etc/etc.i386/Makefile.inc:1.69.2.1
--- src/etc/etc.i386/Makefile.inc:1.69	Thu Jul 26 16:22:49 2018
+++ src/etc/etc.i386/Makefile.inc	Mon Mar 25 15:19:44 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.69 2018/07/26 16:22:49 maxv Exp $
+#	$NetBSD: Makefile.inc,v 1.69.2.1 2024/03/25 15:19:44 martin Exp $
 #
 #	etc.i386/Makefile.inc -- i386-specific etc Makefile targets
 #
@@ -26,6 +26,7 @@ INSTALLATION_DIRS+=	installation/misc
 INSTALLATION_DIRS+=	installation/cdrom
 INSTALLATION_DIRS+=	installation/floppy
 INSTALLATION_DIRS+=	installation/miniroot
+INSTALLATION_DIRS+=	installation/ramdisk
 
 # i386 specific distrib stuff
 snap_md_post:
@@ -36,3 +37,4 @@ snap_md_post:
 	${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/floppy '*.fs'
 	${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/miniroot '*.*'
 	${MAKESUMS} -t 

CVS commit: [netbsd-9] src

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:19:44 UTC 2024

Modified Files:
src/distrib/amd64/ramdisks/common [netbsd-9]: Makefile.ramdisk
src/distrib/i386/ramdisks/common [netbsd-9]: Makefile.ramdisk
src/etc/etc.amd64 [netbsd-9]: Makefile.inc
src/etc/etc.i386 [netbsd-9]: Makefile.inc

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

etc/etc.amd64/Makefile.inc: revision 1.17
distrib/amd64/ramdisks/common/Makefile.ramdisk: revision 1.17
etc/etc.i386/Makefile.inc: revision 1.70
distrib/i386/ramdisks/common/Makefile.ramdisk: revision 1.16

x86: Release the ramdisks too.

This way we will get cgdroot.fs (and zfsroot.fs too) in the release.
PR misc/57534


To generate a diff of this commit:
cvs rdiff -u -r1.14.2.1 -r1.14.2.2 \
src/distrib/amd64/ramdisks/common/Makefile.ramdisk
cvs rdiff -u -r1.13.4.1 -r1.13.4.2 \
src/distrib/i386/ramdisks/common/Makefile.ramdisk
cvs rdiff -u -r1.16 -r1.16.2.1 src/etc/etc.amd64/Makefile.inc
cvs rdiff -u -r1.69 -r1.69.2.1 src/etc/etc.i386/Makefile.inc

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



CVS commit: [netbsd-10] src

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:18:22 UTC 2024

Modified Files:
src/distrib/amd64/ramdisks/common [netbsd-10]: Makefile.ramdisk
src/distrib/i386/ramdisks/common [netbsd-10]: Makefile.ramdisk
src/etc/etc.amd64 [netbsd-10]: Makefile.inc
src/etc/etc.i386 [netbsd-10]: Makefile.inc

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

etc/etc.amd64/Makefile.inc: revision 1.17
distrib/amd64/ramdisks/common/Makefile.ramdisk: revision 1.17
etc/etc.i386/Makefile.inc: revision 1.70
distrib/i386/ramdisks/common/Makefile.ramdisk: revision 1.16

x86: Release the ramdisks too.

This way we will get cgdroot.fs (and zfsroot.fs too) in the release.
PR misc/57534


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.16.2.1 \
src/distrib/amd64/ramdisks/common/Makefile.ramdisk
cvs rdiff -u -r1.14 -r1.14.8.1 \
src/distrib/i386/ramdisks/common/Makefile.ramdisk
cvs rdiff -u -r1.16 -r1.16.10.1 src/etc/etc.amd64/Makefile.inc
cvs rdiff -u -r1.69 -r1.69.10.1 src/etc/etc.i386/Makefile.inc

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

Modified files:

Index: src/distrib/amd64/ramdisks/common/Makefile.ramdisk
diff -u src/distrib/amd64/ramdisks/common/Makefile.ramdisk:1.16 src/distrib/amd64/ramdisks/common/Makefile.ramdisk:1.16.2.1
--- src/distrib/amd64/ramdisks/common/Makefile.ramdisk:1.16	Sun Apr 10 11:56:28 2022
+++ src/distrib/amd64/ramdisks/common/Makefile.ramdisk	Mon Mar 25 15:18:22 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.ramdisk,v 1.16 2022/04/10 11:56:28 martin Exp $
+#	$NetBSD: Makefile.ramdisk,v 1.16.2.1 2024/03/25 15:18:22 martin Exp $
 
 NOSANITIZER=	# defined
 
@@ -49,6 +49,8 @@ ${CRUNCHBIN}:	libhack.o
 .include "${DISTRIBDIR}/common/Makefile.makedev"
 .include "${DISTRIBDIR}/common/Makefile.image"
 
-release:
+release:	${IMAGE}
+	${HOST_INSTALL_FILE} -m ${NONBINMODE} ${IMAGE} \
+		${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/ramdisk/
 
 .include 

Index: src/distrib/i386/ramdisks/common/Makefile.ramdisk
diff -u src/distrib/i386/ramdisks/common/Makefile.ramdisk:1.14 src/distrib/i386/ramdisks/common/Makefile.ramdisk:1.14.8.1
--- src/distrib/i386/ramdisks/common/Makefile.ramdisk:1.14	Thu Aug 22 04:25:38 2019
+++ src/distrib/i386/ramdisks/common/Makefile.ramdisk	Mon Mar 25 15:18:22 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.ramdisk,v 1.14 2019/08/22 04:25:38 kamil Exp $
+#	$NetBSD: Makefile.ramdisk,v 1.14.8.1 2024/03/25 15:18:22 martin Exp $
 
 NOSANITIZER=	# defined
 
@@ -56,6 +56,8 @@ ${CRUNCHBIN}:	libhack.o
 .include "${DISTRIBDIR}/common/Makefile.makedev"
 .include "${DISTRIBDIR}/common/Makefile.image"
 
-release:
+release:	${IMAGE}
+	${HOST_INSTALL_FILE} -m ${NONBINMODE} ${IMAGE} \
+		${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/ramdisk/
 
 .include 

Index: src/etc/etc.amd64/Makefile.inc
diff -u src/etc/etc.amd64/Makefile.inc:1.16 src/etc/etc.amd64/Makefile.inc:1.16.10.1
--- src/etc/etc.amd64/Makefile.inc:1.16	Thu Aug  2 16:26:09 2018
+++ src/etc/etc.amd64/Makefile.inc	Mon Mar 25 15:18:21 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.16 2018/08/02 16:26:09 maxv Exp $
+#	$NetBSD: Makefile.inc,v 1.16.10.1 2024/03/25 15:18:21 martin Exp $
 #
 #	etc.amd64/Makefile.inc -- amd64-specific etc Makefile targets
 #
@@ -16,9 +16,11 @@ BUILD_KERNELS=		INSTALL INSTALL_XEN3_DOM
 INSTALLATION_DIRS+= 	installation/cdrom
 INSTALLATION_DIRS+= 	installation/misc
 INSTALLATION_DIRS+= 	installation/miniroot
+INSTALLATION_DIRS+= 	installation/ramdisk
 
 snap_md_post:
 	cd ${KERNSRCDIR}/arch/i386/stand/pxeboot && ${MAKE} release
 	${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/cdrom '*.iso'
 	${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/miniroot '*.*'
 	${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc '*.*'
+	${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/ramdisk '*.*'

Index: src/etc/etc.i386/Makefile.inc
diff -u src/etc/etc.i386/Makefile.inc:1.69 src/etc/etc.i386/Makefile.inc:1.69.10.1
--- src/etc/etc.i386/Makefile.inc:1.69	Thu Jul 26 16:22:49 2018
+++ src/etc/etc.i386/Makefile.inc	Mon Mar 25 15:18:22 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.69 2018/07/26 16:22:49 maxv Exp $
+#	$NetBSD: Makefile.inc,v 1.69.10.1 2024/03/25 15:18:22 martin Exp $
 #
 #	etc.i386/Makefile.inc -- i386-specific etc Makefile targets
 #
@@ -26,6 +26,7 @@ INSTALLATION_DIRS+=	installation/misc
 INSTALLATION_DIRS+=	installation/cdrom
 INSTALLATION_DIRS+=	installation/floppy
 INSTALLATION_DIRS+=	installation/miniroot
+INSTALLATION_DIRS+=	installation/ramdisk
 
 # i386 specific distrib stuff
 snap_md_post:
@@ -36,3 +37,4 @@ snap_md_post:
 	${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/floppy '*.fs'
 	${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/miniroot '*.*'
 	${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc '*.*'

CVS commit: [netbsd-10] src

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:18:22 UTC 2024

Modified Files:
src/distrib/amd64/ramdisks/common [netbsd-10]: Makefile.ramdisk
src/distrib/i386/ramdisks/common [netbsd-10]: Makefile.ramdisk
src/etc/etc.amd64 [netbsd-10]: Makefile.inc
src/etc/etc.i386 [netbsd-10]: Makefile.inc

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

etc/etc.amd64/Makefile.inc: revision 1.17
distrib/amd64/ramdisks/common/Makefile.ramdisk: revision 1.17
etc/etc.i386/Makefile.inc: revision 1.70
distrib/i386/ramdisks/common/Makefile.ramdisk: revision 1.16

x86: Release the ramdisks too.

This way we will get cgdroot.fs (and zfsroot.fs too) in the release.
PR misc/57534


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.16.2.1 \
src/distrib/amd64/ramdisks/common/Makefile.ramdisk
cvs rdiff -u -r1.14 -r1.14.8.1 \
src/distrib/i386/ramdisks/common/Makefile.ramdisk
cvs rdiff -u -r1.16 -r1.16.10.1 src/etc/etc.amd64/Makefile.inc
cvs rdiff -u -r1.69 -r1.69.10.1 src/etc/etc.i386/Makefile.inc

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



CVS commit: [netbsd-10] src/usr.bin/kdump

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:15:20 UTC 2024

Modified Files:
src/usr.bin/kdump [netbsd-10]: kdump.c

Log Message:
Pull up following revision(s) (requested by kre in ticket #641):

usr.bin/kdump/kdump.c: revision 1.145

Remove debug print


To generate a diff of this commit:
cvs rdiff -u -r1.140.2.1 -r1.140.2.2 src/usr.bin/kdump/kdump.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/kdump/kdump.c
diff -u src/usr.bin/kdump/kdump.c:1.140.2.1 src/usr.bin/kdump/kdump.c:1.140.2.2
--- src/usr.bin/kdump/kdump.c:1.140.2.1	Tue Mar 12 10:13:05 2024
+++ src/usr.bin/kdump/kdump.c	Mon Mar 25 15:15:20 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: kdump.c,v 1.140.2.1 2024/03/12 10:13:05 martin Exp $	*/
+/*	$NetBSD: kdump.c,v 1.140.2.2 2024/03/25 15:15:20 martin Exp $	*/
 
 /*-
  * Copyright (c) 1988, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19
 #if 0
 static char sccsid[] = "@(#)kdump.c	8.4 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: kdump.c,v 1.140.2.1 2024/03/12 10:13:05 martin Exp $");
+__RCSID("$NetBSD: kdump.c,v 1.140.2.2 2024/03/25 15:15:20 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -900,7 +900,6 @@ ktrsyscall(struct ktr_syscall *ktr)
 			ap++;
 			argcount--;
 			register_t level = *ap;
-			fprintf(stderr, "level=%jx\n", (intmax_t)level);
 			if ((cp = sockproto(level)) != NULL) {
 (void)printf(",%s", cp);
 			} else {



CVS commit: [netbsd-10] src/usr.bin/kdump

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:15:20 UTC 2024

Modified Files:
src/usr.bin/kdump [netbsd-10]: kdump.c

Log Message:
Pull up following revision(s) (requested by kre in ticket #641):

usr.bin/kdump/kdump.c: revision 1.145

Remove debug print


To generate a diff of this commit:
cvs rdiff -u -r1.140.2.1 -r1.140.2.2 src/usr.bin/kdump/kdump.c

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



CVS commit: [netbsd-8] src/usr.bin/audio/common

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:12:58 UTC 2024

Modified Files:
src/usr.bin/audio/common [netbsd-8]: wav.c

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

usr.bin/audio/common/wav.c: revision 1.24

audio_wav_parse_hdr: handle zero-length data files again
the previous clean up turns zero-length data into no data and thus
an error, instead of simply doing nothing.  noted by gson.


To generate a diff of this commit:
cvs rdiff -u -r1.13.8.2 -r1.13.8.3 src/usr.bin/audio/common/wav.c

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



CVS commit: [netbsd-8] src/usr.bin/audio/common

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:12:58 UTC 2024

Modified Files:
src/usr.bin/audio/common [netbsd-8]: wav.c

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

usr.bin/audio/common/wav.c: revision 1.24

audio_wav_parse_hdr: handle zero-length data files again
the previous clean up turns zero-length data into no data and thus
an error, instead of simply doing nothing.  noted by gson.


To generate a diff of this commit:
cvs rdiff -u -r1.13.8.2 -r1.13.8.3 src/usr.bin/audio/common/wav.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/audio/common/wav.c
diff -u src/usr.bin/audio/common/wav.c:1.13.8.2 src/usr.bin/audio/common/wav.c:1.13.8.3
--- src/usr.bin/audio/common/wav.c:1.13.8.2	Tue Mar 12 12:47:40 2024
+++ src/usr.bin/audio/common/wav.c	Mon Mar 25 15:12:58 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: wav.c,v 1.13.8.2 2024/03/12 12:47:40 martin Exp $	*/
+/*	$NetBSD: wav.c,v 1.13.8.3 2024/03/25 15:12:58 martin Exp $	*/
 
 /*
  * Copyright (c) 2002, 2009, 2013, 2015, 2019, 2024 Matthew R. Green
@@ -33,7 +33,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: wav.c,v 1.13.8.2 2024/03/12 12:47:40 martin Exp $");
+__RCSID("$NetBSD: wav.c,v 1.13.8.3 2024/03/25 15:12:58 martin Exp $");
 #endif
 
 
@@ -99,7 +99,7 @@ find_riff_chunk(const char search[4], si
 	*partlen = 0;
 
 #define ADJUST(l) do {\
-	if (l >= *(remainp))			\
+	if (l > *(remainp))			\
 		return false;			\
 	*(wherep) += (l);			\
 	*(remainp) -= (l);			\
@@ -158,7 +158,7 @@ audio_wav_parse_hdr(void *hdr, size_t sz
 		return (AUDIO_ENOENT);
 
 #define ADJUST(l) do {\
-	if (l >= remain)			\
+	if ((l) > remain)			\
 		return (AUDIO_ESHORTHDR);	\
 	where += (l);\
 	remain -= (l);\
@@ -279,20 +279,17 @@ audio_wav_parse_hdr(void *hdr, size_t sz
 	if (!found)
 		return (AUDIO_EWAVNODATA);
 
-	if (len) {
-		if (channels)
-			*channels = (u_int)getle16(fmt.channels);
-		if (sample)
-			*sample = getle32(fmt.sample_rate);
-		if (enc)
-			*enc = newenc;
-		if (prec)
-			*prec = newprec;
-		if (datasize)
-			*datasize = (off_t)len;
-		return (where - (char *)hdr);
-	}
-	return (AUDIO_EWAVNODATA);
+	if (channels)
+		*channels = (u_int)getle16(fmt.channels);
+	if (sample)
+		*sample = getle32(fmt.sample_rate);
+	if (enc)
+		*enc = newenc;
+	if (prec)
+		*prec = newprec;
+	if (datasize)
+		*datasize = (off_t)len;
+	return (where - (char *)hdr);
 
 #undef ADJUST
 }



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

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:11:33 UTC 2024

Modified Files:
src/usr.bin/audio/common [netbsd-9]: wav.c

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

usr.bin/audio/common/wav.c: revision 1.24

audio_wav_parse_hdr: handle zero-length data files again
the previous clean up turns zero-length data into no data and thus
an error, instead of simply doing nothing.  noted by gson.


To generate a diff of this commit:
cvs rdiff -u -r1.14.6.1 -r1.14.6.2 src/usr.bin/audio/common/wav.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/audio/common/wav.c
diff -u src/usr.bin/audio/common/wav.c:1.14.6.1 src/usr.bin/audio/common/wav.c:1.14.6.2
--- src/usr.bin/audio/common/wav.c:1.14.6.1	Tue Mar 12 12:41:38 2024
+++ src/usr.bin/audio/common/wav.c	Mon Mar 25 15:11:33 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: wav.c,v 1.14.6.1 2024/03/12 12:41:38 martin Exp $	*/
+/*	$NetBSD: wav.c,v 1.14.6.2 2024/03/25 15:11:33 martin Exp $	*/
 
 /*
  * Copyright (c) 2002, 2009, 2013, 2015, 2019, 2024 Matthew R. Green
@@ -33,7 +33,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: wav.c,v 1.14.6.1 2024/03/12 12:41:38 martin Exp $");
+__RCSID("$NetBSD: wav.c,v 1.14.6.2 2024/03/25 15:11:33 martin Exp $");
 #endif
 
 
@@ -99,7 +99,7 @@ find_riff_chunk(const char search[4], si
 	*partlen = 0;
 
 #define ADJUST(l) do {\
-	if (l >= *(remainp))			\
+	if (l > *(remainp))			\
 		return false;			\
 	*(wherep) += (l);			\
 	*(remainp) -= (l);			\
@@ -158,7 +158,7 @@ audio_wav_parse_hdr(void *hdr, size_t sz
 		return (AUDIO_ENOENT);
 
 #define ADJUST(l) do {\
-	if (l >= remain)			\
+	if ((l) > remain)			\
 		return (AUDIO_ESHORTHDR);	\
 	where += (l);\
 	remain -= (l);\
@@ -279,20 +279,17 @@ audio_wav_parse_hdr(void *hdr, size_t sz
 	if (!found)
 		return (AUDIO_EWAVNODATA);
 
-	if (len) {
-		if (channels)
-			*channels = (u_int)getle16(fmt.channels);
-		if (sample)
-			*sample = getle32(fmt.sample_rate);
-		if (enc)
-			*enc = newenc;
-		if (prec)
-			*prec = newprec;
-		if (datasize)
-			*datasize = (off_t)len;
-		return (where - (char *)hdr);
-	}
-	return (AUDIO_EWAVNODATA);
+	if (channels)
+		*channels = (u_int)getle16(fmt.channels);
+	if (sample)
+		*sample = getle32(fmt.sample_rate);
+	if (enc)
+		*enc = newenc;
+	if (prec)
+		*prec = newprec;
+	if (datasize)
+		*datasize = (off_t)len;
+	return (where - (char *)hdr);
 
 #undef ADJUST
 }



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

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:11:33 UTC 2024

Modified Files:
src/usr.bin/audio/common [netbsd-9]: wav.c

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

usr.bin/audio/common/wav.c: revision 1.24

audio_wav_parse_hdr: handle zero-length data files again
the previous clean up turns zero-length data into no data and thus
an error, instead of simply doing nothing.  noted by gson.


To generate a diff of this commit:
cvs rdiff -u -r1.14.6.1 -r1.14.6.2 src/usr.bin/audio/common/wav.c

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



CVS commit: [netbsd-10] src/usr.bin/audio/common

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:09:38 UTC 2024

Modified Files:
src/usr.bin/audio/common [netbsd-10]: wav.c

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

usr.bin/audio/common/wav.c: revision 1.24

audio_wav_parse_hdr: handle zero-length data files again
the previous clean up turns zero-length data into no data and thus
an error, instead of simply doing nothing.  noted by gson.


To generate a diff of this commit:
cvs rdiff -u -r1.15.8.1 -r1.15.8.2 src/usr.bin/audio/common/wav.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/audio/common/wav.c
diff -u src/usr.bin/audio/common/wav.c:1.15.8.1 src/usr.bin/audio/common/wav.c:1.15.8.2
--- src/usr.bin/audio/common/wav.c:1.15.8.1	Tue Mar 12 10:04:23 2024
+++ src/usr.bin/audio/common/wav.c	Mon Mar 25 15:09:38 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: wav.c,v 1.15.8.1 2024/03/12 10:04:23 martin Exp $	*/
+/*	$NetBSD: wav.c,v 1.15.8.2 2024/03/25 15:09:38 martin Exp $	*/
 
 /*
  * Copyright (c) 2002, 2009, 2013, 2015, 2019, 2024 Matthew R. Green
@@ -33,7 +33,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: wav.c,v 1.15.8.1 2024/03/12 10:04:23 martin Exp $");
+__RCSID("$NetBSD: wav.c,v 1.15.8.2 2024/03/25 15:09:38 martin Exp $");
 #endif
 
 
@@ -99,7 +99,7 @@ find_riff_chunk(const char search[4], si
 	*partlen = 0;
 
 #define ADJUST(l) do {\
-	if (l >= *(remainp))			\
+	if (l > *(remainp))			\
 		return false;			\
 	*(wherep) += (l);			\
 	*(remainp) -= (l);			\
@@ -158,7 +158,7 @@ audio_wav_parse_hdr(void *hdr, size_t sz
 		return (AUDIO_ENOENT);
 
 #define ADJUST(l) do {\
-	if (l >= remain)			\
+	if ((l) > remain)			\
 		return (AUDIO_ESHORTHDR);	\
 	where += (l);\
 	remain -= (l);\
@@ -279,20 +279,17 @@ audio_wav_parse_hdr(void *hdr, size_t sz
 	if (!found)
 		return (AUDIO_EWAVNODATA);
 
-	if (len) {
-		if (channels)
-			*channels = (u_int)getle16(fmt.channels);
-		if (sample)
-			*sample = getle32(fmt.sample_rate);
-		if (enc)
-			*enc = newenc;
-		if (prec)
-			*prec = newprec;
-		if (datasize)
-			*datasize = (off_t)len;
-		return (where - (char *)hdr);
-	}
-	return (AUDIO_EWAVNODATA);
+	if (channels)
+		*channels = (u_int)getle16(fmt.channels);
+	if (sample)
+		*sample = getle32(fmt.sample_rate);
+	if (enc)
+		*enc = newenc;
+	if (prec)
+		*prec = newprec;
+	if (datasize)
+		*datasize = (off_t)len;
+	return (where - (char *)hdr);
 
 #undef ADJUST
 }



CVS commit: [netbsd-10] src/usr.bin/audio/common

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:09:38 UTC 2024

Modified Files:
src/usr.bin/audio/common [netbsd-10]: wav.c

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

usr.bin/audio/common/wav.c: revision 1.24

audio_wav_parse_hdr: handle zero-length data files again
the previous clean up turns zero-length data into no data and thus
an error, instead of simply doing nothing.  noted by gson.


To generate a diff of this commit:
cvs rdiff -u -r1.15.8.1 -r1.15.8.2 src/usr.bin/audio/common/wav.c

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



CVS commit: [netbsd-10] src/sys/dev/acpi

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:05:17 UTC 2024

Modified Files:
src/sys/dev/acpi [netbsd-10]: acpi.c acpivar.h files.acpi

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

sys/dev/acpi/acpivar.h: revision 1.90
sys/dev/acpi/files.acpi: revision 1.129
sys/dev/acpi/acpi.c: revision 1.299
sys/dev/acpi/files.acpi: revision 1.130

acpi(4): New iattr `apeibus' for attaching an APEI driver.

APEI is the ACPI Platform Error Interface, a standard (if very
complicated) interface for reporting hardware errors to the OS.
Firmware support for APEI is presented through the ACPI tables BERT
(Boot Error Record Table), ERST (Error Record Serialization Table),
EINJ (Error Injection Table), and HEST (Hardware Error Source Table),
rather than through nodes in the ACPI device tree, so it can't just
attach through the existing acpinodebus iattr and instead requires a
special pseudo-bus like acpiwdrt(4).

No driver yet -- this is just the hook to attach one in a module.

The new member sc_apei of struct acpi_softc is placed at the end of
the structure so that this change can be safely pulled up to release
branches without risk to ABI compatibility in existing modules such
as acpiverbose.kmod which may rely on the layout (but not size) of
struct acpi_softc.

PR kern/58046

acpi(4): Make apeibus actually work as an iattr.
PR kern/58046


To generate a diff of this commit:
cvs rdiff -u -r1.298 -r1.298.4.1 src/sys/dev/acpi/acpi.c
cvs rdiff -u -r1.89 -r1.89.4.1 src/sys/dev/acpi/acpivar.h
cvs rdiff -u -r1.126.4.1 -r1.126.4.2 src/sys/dev/acpi/files.acpi

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/acpi/acpi.c
diff -u src/sys/dev/acpi/acpi.c:1.298 src/sys/dev/acpi/acpi.c:1.298.4.1
--- src/sys/dev/acpi/acpi.c:1.298	Tue May 31 20:28:57 2022
+++ src/sys/dev/acpi/acpi.c	Mon Mar 25 15:05:17 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi.c,v 1.298 2022/05/31 20:28:57 mrg Exp $	*/
+/*	$NetBSD: acpi.c,v 1.298.4.1 2024/03/25 15:05:17 martin Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -100,7 +100,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.298 2022/05/31 20:28:57 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.298.4.1 2024/03/25 15:05:17 martin Exp $");
 
 #include "pci.h"
 #include "opt_acpi.h"
@@ -636,6 +636,9 @@ acpi_childdet(device_t self, device_t ch
 	if (sc->sc_wdrt == child)
 		sc->sc_wdrt = NULL;
 
+	if (sc->sc_apei == child)
+		sc->sc_apei = NULL;
+
 	SIMPLEQ_FOREACH(ad, >sc_head, ad_list) {
 
 		if (ad->ad_device == child)
@@ -923,6 +926,11 @@ acpi_rescan(device_t self, const char *i
 	   CFARGS(.iattr = "acpiwdrtbus"));
 	}
 
+	if (ifattr_match(ifattr, "apeibus") && sc->sc_apei == NULL) {
+		sc->sc_apei = config_found(sc->sc_dev, NULL, NULL,
+	   CFARGS(.iattr = "apeibus"));
+	}
+
 	return 0;
 }
 

Index: src/sys/dev/acpi/acpivar.h
diff -u src/sys/dev/acpi/acpivar.h:1.89 src/sys/dev/acpi/acpivar.h:1.89.4.1
--- src/sys/dev/acpi/acpivar.h:1.89	Sun Dec 26 14:34:39 2021
+++ src/sys/dev/acpi/acpivar.h	Mon Mar 25 15:05:17 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpivar.h,v 1.89 2021/12/26 14:34:39 jmcneill Exp $	*/
+/*	$NetBSD: acpivar.h,v 1.89.4.1 2024/03/25 15:05:17 martin Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -177,6 +177,13 @@ struct acpi_softc {
 	struct sysmon_pswitch	 sc_smpsw_sleep;
 
 	SIMPLEQ_HEAD(, acpi_devnode)	sc_head;
+
+	/*
+	 * Move this section to the other pseudo-bus child pointers
+	 * after pullup -- putting it here avoids potential ABI
+	 * compatibility issues with kernel modules.
+	 */
+	device_t		 sc_apei;	/* apei(4) pseudo-bus */
 };
 
 /*

Index: src/sys/dev/acpi/files.acpi
diff -u src/sys/dev/acpi/files.acpi:1.126.4.1 src/sys/dev/acpi/files.acpi:1.126.4.2
--- src/sys/dev/acpi/files.acpi:1.126.4.1	Sun Jul 30 12:01:53 2023
+++ src/sys/dev/acpi/files.acpi	Mon Mar 25 15:05:17 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: files.acpi,v 1.126.4.1 2023/07/30 12:01:53 martin Exp $
+#	$NetBSD: files.acpi,v 1.126.4.2 2024/03/25 15:05:17 martin Exp $
 
 defflag	opt_acpi.h	ACPIVERBOSE ACPI_DEBUG ACPI_ACTIVATE_DEV
 			ACPI_DSDT_OVERRIDE ACPI_SCANPCI ACPI_BREAKPOINT
@@ -14,8 +14,9 @@ define	acpiwdrtbus { }
 define	acpisdtbus { }
 define	acpigtdtbus { }
 define	acpimadtbus { }
+define	apeibus { }
 
-device	acpi: acpica, acpiapmbus, acpinodebus, acpiecdtbus, acpisdtbus, acpigtdtbus, acpimadtbus, acpihpetbus, acpiwdrtbus, sysmon_power, sysmon_taskq
+device	acpi: acpica, acpiapmbus, acpinodebus, acpiecdtbus, acpisdtbus, acpigtdtbus, acpimadtbus, acpihpetbus, acpiwdrtbus, apeibus, sysmon_power, sysmon_taskq
 attach	acpi at acpibus
 file	dev/acpi/acpi.c			acpi
 file	dev/acpi/acpi_debug.c		acpi



CVS commit: [netbsd-10] src/sys/dev/acpi

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 15:05:17 UTC 2024

Modified Files:
src/sys/dev/acpi [netbsd-10]: acpi.c acpivar.h files.acpi

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

sys/dev/acpi/acpivar.h: revision 1.90
sys/dev/acpi/files.acpi: revision 1.129
sys/dev/acpi/acpi.c: revision 1.299
sys/dev/acpi/files.acpi: revision 1.130

acpi(4): New iattr `apeibus' for attaching an APEI driver.

APEI is the ACPI Platform Error Interface, a standard (if very
complicated) interface for reporting hardware errors to the OS.
Firmware support for APEI is presented through the ACPI tables BERT
(Boot Error Record Table), ERST (Error Record Serialization Table),
EINJ (Error Injection Table), and HEST (Hardware Error Source Table),
rather than through nodes in the ACPI device tree, so it can't just
attach through the existing acpinodebus iattr and instead requires a
special pseudo-bus like acpiwdrt(4).

No driver yet -- this is just the hook to attach one in a module.

The new member sc_apei of struct acpi_softc is placed at the end of
the structure so that this change can be safely pulled up to release
branches without risk to ABI compatibility in existing modules such
as acpiverbose.kmod which may rely on the layout (but not size) of
struct acpi_softc.

PR kern/58046

acpi(4): Make apeibus actually work as an iattr.
PR kern/58046


To generate a diff of this commit:
cvs rdiff -u -r1.298 -r1.298.4.1 src/sys/dev/acpi/acpi.c
cvs rdiff -u -r1.89 -r1.89.4.1 src/sys/dev/acpi/acpivar.h
cvs rdiff -u -r1.126.4.1 -r1.126.4.2 src/sys/dev/acpi/files.acpi

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



CVS commit: [netbsd-10] src

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 14:43:30 UTC 2024

Modified Files:
src/lib/libc/time [netbsd-10]: strptime.c
src/tests/lib/libc/time [netbsd-10]: t_strptime.c

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

lib/libc/time/strptime.c: revision 1.64
lib/libc/time/strptime.c: revision 1.65
tests/lib/libc/time/t_strptime.c: revision 1.16

strptime(3): Exercise some edge cases in the automatic tests.

Unfortunately, we can't quite use strptime as a black box to detect
the cases that triggered undefined behaviour, because strptime just
fails in that case anyway since the number that would go in .tm_year
is far out of the representable range.
PR lib/58041

strptime(3): Avoid arithmetic overflow.
PR lib/58041

strptime(3): Reduce unnecessary indentation.
Post-fix tidying.
No functional change intended.
PR lib/58041


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.63.6.1 src/lib/libc/time/strptime.c
cvs rdiff -u -r1.15 -r1.15.12.1 src/tests/lib/libc/time/t_strptime.c

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

Modified files:

Index: src/lib/libc/time/strptime.c
diff -u src/lib/libc/time/strptime.c:1.63 src/lib/libc/time/strptime.c:1.63.6.1
--- src/lib/libc/time/strptime.c:1.63	Mon Sep 21 15:31:54 2020
+++ src/lib/libc/time/strptime.c	Mon Mar 25 14:43:30 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: strptime.c,v 1.63 2020/09/21 15:31:54 ginsbach Exp $	*/
+/*	$NetBSD: strptime.c,v 1.63.6.1 2024/03/25 14:43:30 martin Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: strptime.c,v 1.63 2020/09/21 15:31:54 ginsbach Exp $");
+__RCSID("$NetBSD: strptime.c,v 1.63.6.1 2024/03/25 14:43:30 martin Exp $");
 #endif
 
 #include "namespace.h"
@@ -346,38 +346,40 @@ literal:
 			LEGAL_ALT(ALT_O);
 			continue;
 
-#ifndef TIME_MAX
-#define TIME_MAX	INT64_MAX
-#endif
-		case 's':	/* seconds since the epoch */
-			{
-time_t sse = 0;
-uint64_t rulim = TIME_MAX;
-
-if (*bp < '0' || *bp > '9') {
-	bp = NULL;
-	continue;
-}
+		case 's': {	/* seconds since the epoch */
+			const time_t TIME_MAX = __type_max(time_t);
+			time_t sse;
+			unsigned d;
 
-do {
-	sse *= 10;
-	sse += *bp++ - '0';
-	rulim /= 10;
-} while ((sse * 10 <= TIME_MAX) &&
-	 rulim && *bp >= '0' && *bp <= '9');
+			if (*bp < '0' || *bp > '9') {
+bp = NULL;
+continue;
+			}
 
-if (sse < 0 || (uint64_t)sse > TIME_MAX) {
+			sse = *bp++ - '0';
+			while (*bp >= '0' && *bp <= '9') {
+d = *bp++ - '0';
+if (sse > TIME_MAX/10) {
 	bp = NULL;
-	continue;
+	break;
 }
-
-if (localtime_r(, tm) == NULL)
+sse *= 10;
+if (sse > TIME_MAX - d) {
 	bp = NULL;
-else
-	state |= S_YDAY | S_WDAY |
-	S_MON | S_MDAY | S_YEAR;
+	break;
+}
+sse += d;
 			}
+			if (bp == NULL)
+continue;
+
+			if (localtime_r(, tm) == NULL)
+bp = NULL;
+			else
+state |= S_YDAY | S_WDAY |
+S_MON | S_MDAY | S_YEAR;
 			continue;
+		}
 
 		case 'U':	/* The week of year, beginning on sunday. */
 		case 'W':	/* The week of year, beginning on monday. */

Index: src/tests/lib/libc/time/t_strptime.c
diff -u src/tests/lib/libc/time/t_strptime.c:1.15 src/tests/lib/libc/time/t_strptime.c:1.15.12.1
--- src/tests/lib/libc/time/t_strptime.c:1.15	Sun Jun  3 08:48:37 2018
+++ src/tests/lib/libc/time/t_strptime.c	Mon Mar 25 14:43:30 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: t_strptime.c,v 1.15 2018/06/03 08:48:37 maya Exp $ */
+/* $NetBSD: t_strptime.c,v 1.15.12.1 2024/03/25 14:43:30 martin Exp $ */
 
 /*-
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -32,11 +32,13 @@
 #include 
 __COPYRIGHT("@(#) Copyright (c) 2008\
  The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_strptime.c,v 1.15 2018/06/03 08:48:37 maya Exp $");
+__RCSID("$NetBSD: t_strptime.c,v 1.15.12.1 2024/03/25 14:43:30 martin Exp $");
 
-#include 
-#include 
+#include 
+#include 
 #include 
+#include 
+#include 
 
 #include 
 
@@ -441,6 +443,151 @@ ATF_TC_BODY(Zone, tc)
 	ztest("%Z");
 }
 
+ATF_TC(posixtime_overflow);
+
+ATF_TC_HEAD(posixtime_overflow, tc)
+{
+
+	atf_tc_set_md_var(tc, "descr",
+	"Checks strptime(3) safely rejects POSIX time overfow");
+}
+
+ATF_TC_BODY(posixtime_overflow, tc)
+{
+	static const uint64_t P[] = { /* cases that should pass round-trip */
+		[0] = 0,
+		[1] = 1,
+		[2] = 2,
+		[3] = 0x7ffe,
+		[4] = 0x7fff,
+		[5] = 0x8000,
+		[6] = 0x8001,
+		[7] = 0xfffe,
+		[8] = 0x,
+		[9] = 0x1,
+		[10] = 0x10001,
+		[11] = 67767976233532799, /* 2147483647-12-31T23:59:59 */
+		/*
+		 * Beyond this point, the year (.tm_year + 1900)
+		 * overflows the signed 32-bit range, so we won't be
+		 * able to test round-trips:
+		 */
+		

CVS commit: [netbsd-10] src

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 14:43:30 UTC 2024

Modified Files:
src/lib/libc/time [netbsd-10]: strptime.c
src/tests/lib/libc/time [netbsd-10]: t_strptime.c

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

lib/libc/time/strptime.c: revision 1.64
lib/libc/time/strptime.c: revision 1.65
tests/lib/libc/time/t_strptime.c: revision 1.16

strptime(3): Exercise some edge cases in the automatic tests.

Unfortunately, we can't quite use strptime as a black box to detect
the cases that triggered undefined behaviour, because strptime just
fails in that case anyway since the number that would go in .tm_year
is far out of the representable range.
PR lib/58041

strptime(3): Avoid arithmetic overflow.
PR lib/58041

strptime(3): Reduce unnecessary indentation.
Post-fix tidying.
No functional change intended.
PR lib/58041


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.63.6.1 src/lib/libc/time/strptime.c
cvs rdiff -u -r1.15 -r1.15.12.1 src/tests/lib/libc/time/t_strptime.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

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 14:26:16 UTC 2024

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/evp [netbsd-9]: m_sha1.c
src/crypto/external/bsd/openssl/dist/include/crypto [netbsd-9]: sha.h
src/crypto/external/bsd/openssl/lib/libcrypto [netbsd-9]: libc-sha2xx.c
src/distrib/sets/lists/debug [netbsd-9]: mi
src/distrib/sets/lists/tests [netbsd-9]: mi
src/tests/crypto/libcrypto [netbsd-9]: Makefile
Added Files:
src/tests/crypto/libcrypto [netbsd-9]: t_sha512trunc.c

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


crypto/external/bsd/openssl/dist/providers/implementations/digests/sha2_prov.c: 
revision 1.2
  (applied to crypto/external/bsd/openssl/dist/crypto/evp/m_sha1.c)
tests/crypto/libcrypto/t_sha512trunc.c: revision 1.1
tests/crypto/libcrypto/t_sha512trunc.c: revision 1.2
tests/crypto/libcrypto/Makefile: revision 1.16
distrib/sets/lists/tests/mi: revision 1.1311
distrib/sets/lists/debug/mi: revision 1.430
crypto/external/bsd/openssl/dist/include/crypto/sha.h: revision 1.2
crypto/external/bsd/openssl/lib/libcrypto/libc-sha2xx.c: revision 1.4
(all via patch)

libcrypto: Add some trivial tests for truncated SHA-512 variants.
These should use more of the test vectors from
https://csrc.nist.gov/Projects/Cryptographic-Algorithm-Validation-Program/Secure-Hashing#Testing
but this will do for now to detect the buffer overrun rake we left
lying around for ourselves.
PR lib/58039

libcrypto: Fix buffer overrun in truncated SHA-512 functions.
Further fallout from the libc/openssl sha2 symbol collision.
PR lib/58039


To generate a diff of this commit:
cvs rdiff -u -r1.11.2.1 -r1.11.2.2 \
src/crypto/external/bsd/openssl/dist/crypto/evp/m_sha1.c
cvs rdiff -u -r1.1.1.1.4.2 -r1.1.1.1.4.3 \
src/crypto/external/bsd/openssl/dist/include/crypto/sha.h
cvs rdiff -u -r1.1.6.1 -r1.1.6.2 \
src/crypto/external/bsd/openssl/lib/libcrypto/libc-sha2xx.c
cvs rdiff -u -r1.285.2.6 -r1.285.2.7 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.818.2.4 -r1.818.2.5 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.14 -r1.14.2.1 src/tests/crypto/libcrypto/Makefile
cvs rdiff -u -r0 -r1.2.4.2 src/tests/crypto/libcrypto/t_sha512trunc.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

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 14:26:16 UTC 2024

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/evp [netbsd-9]: m_sha1.c
src/crypto/external/bsd/openssl/dist/include/crypto [netbsd-9]: sha.h
src/crypto/external/bsd/openssl/lib/libcrypto [netbsd-9]: libc-sha2xx.c
src/distrib/sets/lists/debug [netbsd-9]: mi
src/distrib/sets/lists/tests [netbsd-9]: mi
src/tests/crypto/libcrypto [netbsd-9]: Makefile
Added Files:
src/tests/crypto/libcrypto [netbsd-9]: t_sha512trunc.c

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


crypto/external/bsd/openssl/dist/providers/implementations/digests/sha2_prov.c: 
revision 1.2
  (applied to crypto/external/bsd/openssl/dist/crypto/evp/m_sha1.c)
tests/crypto/libcrypto/t_sha512trunc.c: revision 1.1
tests/crypto/libcrypto/t_sha512trunc.c: revision 1.2
tests/crypto/libcrypto/Makefile: revision 1.16
distrib/sets/lists/tests/mi: revision 1.1311
distrib/sets/lists/debug/mi: revision 1.430
crypto/external/bsd/openssl/dist/include/crypto/sha.h: revision 1.2
crypto/external/bsd/openssl/lib/libcrypto/libc-sha2xx.c: revision 1.4
(all via patch)

libcrypto: Add some trivial tests for truncated SHA-512 variants.
These should use more of the test vectors from
https://csrc.nist.gov/Projects/Cryptographic-Algorithm-Validation-Program/Secure-Hashing#Testing
but this will do for now to detect the buffer overrun rake we left
lying around for ourselves.
PR lib/58039

libcrypto: Fix buffer overrun in truncated SHA-512 functions.
Further fallout from the libc/openssl sha2 symbol collision.
PR lib/58039


To generate a diff of this commit:
cvs rdiff -u -r1.11.2.1 -r1.11.2.2 \
src/crypto/external/bsd/openssl/dist/crypto/evp/m_sha1.c
cvs rdiff -u -r1.1.1.1.4.2 -r1.1.1.1.4.3 \
src/crypto/external/bsd/openssl/dist/include/crypto/sha.h
cvs rdiff -u -r1.1.6.1 -r1.1.6.2 \
src/crypto/external/bsd/openssl/lib/libcrypto/libc-sha2xx.c
cvs rdiff -u -r1.285.2.6 -r1.285.2.7 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.818.2.4 -r1.818.2.5 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.14 -r1.14.2.1 src/tests/crypto/libcrypto/Makefile
cvs rdiff -u -r0 -r1.2.4.2 src/tests/crypto/libcrypto/t_sha512trunc.c

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

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/evp/m_sha1.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/evp/m_sha1.c:1.11.2.1 src/crypto/external/bsd/openssl/dist/crypto/evp/m_sha1.c:1.11.2.2
--- src/crypto/external/bsd/openssl/dist/crypto/evp/m_sha1.c:1.11.2.1	Mon Apr 27 14:47:22 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/evp/m_sha1.c	Mon Mar 25 14:26:15 2024
@@ -179,11 +179,21 @@ static int init512_224(EVP_MD_CTX *ctx)
 return sha512_224_init(EVP_MD_CTX_md_data(ctx));
 }
 
+static int final512_224(EVP_MD_CTX *ctx, unsigned char *md)
+{
+return sha512_224_final(md, EVP_MD_CTX_md_data(ctx));
+}
+
 static int init512_256(EVP_MD_CTX *ctx)
 {
 return sha512_256_init(EVP_MD_CTX_md_data(ctx));
 }
 
+static int final512_256(EVP_MD_CTX *ctx, unsigned char *md)
+{
+return sha512_256_final(md, EVP_MD_CTX_md_data(ctx));
+}
+
 static int init384(EVP_MD_CTX *ctx)
 {
 return SHA384_Init(EVP_MD_CTX_md_data(ctx));
@@ -222,7 +232,7 @@ static const EVP_MD sha512_224_md = {
 EVP_MD_FLAG_DIGALGID_ABSENT,
 init512_224,
 update512,
-final512,
+final512_224,
 NULL,
 NULL,
 SHA512_CBLOCK,
@@ -241,7 +251,7 @@ static const EVP_MD sha512_256_md = {
 EVP_MD_FLAG_DIGALGID_ABSENT,
 init512_256,
 update512,
-final512,
+final512_256,
 NULL,
 NULL,
 SHA512_CBLOCK,

Index: src/crypto/external/bsd/openssl/dist/include/crypto/sha.h
diff -u src/crypto/external/bsd/openssl/dist/include/crypto/sha.h:1.1.1.1.4.2 src/crypto/external/bsd/openssl/dist/include/crypto/sha.h:1.1.1.1.4.3
--- src/crypto/external/bsd/openssl/dist/include/crypto/sha.h:1.1.1.1.4.2	Mon Apr 27 14:47:32 2020
+++ src/crypto/external/bsd/openssl/dist/include/crypto/sha.h	Mon Mar 25 14:26:15 2024
@@ -15,5 +15,7 @@
 
 int sha512_224_init(SHA512_CTX *);
 int sha512_256_init(SHA512_CTX *);
+int sha512_224_final(unsigned char *, SHA512_CTX *); /* XXX NetBSD libc sha2 */
+int sha512_256_final(unsigned char *, SHA512_CTX *); /* XXX NetBSD libc sha2 */
 
 #endif

Index: src/crypto/external/bsd/openssl/lib/libcrypto/libc-sha2xx.c
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/libc-sha2xx.c:1.1.6.1 src/crypto/external/bsd/openssl/lib/libcrypto/libc-sha2xx.c:1.1.6.2
--- src/crypto/external/bsd/openssl/lib/libcrypto/libc-sha2xx.c:1.1.6.1	Mon Apr 27 14:47:36 2020
+++ src/crypto/external/bsd/openssl/lib/libcrypto/libc-sha2xx.c	Mon Mar 25 14:26:15 2024
@@ -46,6 +46,18 @@ sha512_224_init(SHA512_CTX *context)
 }
 
 int

CVS commit: [netbsd-10] src

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 14:14:56 UTC 2024

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/evp [netbsd-10]:
legacy_sha.c
src/crypto/external/bsd/openssl/dist/include/crypto [netbsd-10]: sha.h
src/crypto/external/bsd/openssl/dist/providers/implementations/digests 
[netbsd-10]:
sha2_prov.c
src/crypto/external/bsd/openssl/lib/libcrypto [netbsd-10]:
libc-sha2xx.c
src/distrib/sets/lists/debug [netbsd-10]: mi
src/distrib/sets/lists/tests [netbsd-10]: mi
src/tests/crypto/libcrypto [netbsd-10]: Makefile
Added Files:
src/tests/crypto/libcrypto [netbsd-10]: t_sha512trunc.c

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


crypto/external/bsd/openssl/dist/providers/implementations/digests/sha2_prov.c: 
revision 1.2
tests/crypto/libcrypto/t_sha512trunc.c: revision 1.1
tests/crypto/libcrypto/t_sha512trunc.c: revision 1.2
tests/crypto/libcrypto/Makefile: revision 1.16
distrib/sets/lists/tests/mi: revision 1.1311
crypto/external/bsd/openssl/dist/crypto/evp/legacy_sha.c: revision 1.2
distrib/sets/lists/debug/mi: revision 1.430
crypto/external/bsd/openssl/dist/include/crypto/sha.h: revision 1.2
crypto/external/bsd/openssl/lib/libcrypto/libc-sha2xx.c: revision 1.4

libcrypto: Add some trivial tests for truncated SHA-512 variants.
These should use more of the test vectors from
https://csrc.nist.gov/Projects/Cryptographic-Algorithm-Validation-Program/Secure-Hashing#Testing
but this will do for now to detect the buffer overrun rake we left
lying around for ourselves.
PR lib/58039

libcrypto: Fix buffer overrun in truncated SHA-512 functions.
Further fallout from the libc/openssl sha2 symbol collision.
PR lib/58039


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.2.3 -r1.1.1.1.2.4 \
src/crypto/external/bsd/openssl/dist/crypto/evp/legacy_sha.c
cvs rdiff -u -r1.1.1.1.10.1 -r1.1.1.1.10.2 \
src/crypto/external/bsd/openssl/dist/include/crypto/sha.h
cvs rdiff -u -r1.1.1.1.2.2 -r1.1.1.1.2.3 \

src/crypto/external/bsd/openssl/dist/providers/implementations/digests/sha2_prov.c
cvs rdiff -u -r1.2.6.1 -r1.2.6.2 \
src/crypto/external/bsd/openssl/lib/libcrypto/libc-sha2xx.c
cvs rdiff -u -r1.394.2.5 -r1.394.2.6 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.1238.2.5 -r1.1238.2.6 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.14.10.1 -r1.14.10.2 src/tests/crypto/libcrypto/Makefile
cvs rdiff -u -r0 -r1.2.2.2 src/tests/crypto/libcrypto/t_sha512trunc.c

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

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/evp/legacy_sha.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/evp/legacy_sha.c:1.1.1.1.2.3 src/crypto/external/bsd/openssl/dist/crypto/evp/legacy_sha.c:1.1.1.1.2.4
--- src/crypto/external/bsd/openssl/dist/crypto/evp/legacy_sha.c:1.1.1.1.2.3	Thu Nov  2 19:32:10 2023
+++ src/crypto/external/bsd/openssl/dist/crypto/evp/legacy_sha.c	Mon Mar 25 14:14:55 2024
@@ -49,9 +49,9 @@ static int nm##_init(EVP_MD_CTX *ctx)   
 #define sha512_256_Initsha512_256_init
 
 #define sha512_224_Update  SHA512_Update
-#define sha512_224_Final   SHA512_Final
+#define sha512_224_Final   sha512_224_final /* XXX NetBSD libc sha2 */
 #define sha512_256_Update  SHA512_Update
-#define sha512_256_Final   SHA512_Final
+#define sha512_256_Final   sha512_256_final /* XXX NetBSD libc sha2 */
 
 IMPLEMENT_LEGACY_EVP_MD_METH(sha1, SHA1)
 IMPLEMENT_LEGACY_EVP_MD_METH(sha224, SHA224)

Index: src/crypto/external/bsd/openssl/dist/include/crypto/sha.h
diff -u src/crypto/external/bsd/openssl/dist/include/crypto/sha.h:1.1.1.1.10.1 src/crypto/external/bsd/openssl/dist/include/crypto/sha.h:1.1.1.1.10.2
--- src/crypto/external/bsd/openssl/dist/include/crypto/sha.h:1.1.1.1.10.1	Fri Aug 11 13:41:10 2023
+++ src/crypto/external/bsd/openssl/dist/include/crypto/sha.h	Mon Mar 25 14:14:56 2024
@@ -16,6 +16,8 @@
 
 int sha512_224_init(SHA512_CTX *);
 int sha512_256_init(SHA512_CTX *);
+int sha512_224_final(unsigned char *, SHA512_CTX *); /* XXX NetBSD libc sha2 */
+int sha512_256_final(unsigned char *, SHA512_CTX *); /* XXX NetBSD libc sha2 */
 int ossl_sha1_ctrl(SHA_CTX *ctx, int cmd, int mslen, void *ms);
 unsigned char *ossl_sha1(const unsigned char *d, size_t n, unsigned char *md);
 

Index: src/crypto/external/bsd/openssl/dist/providers/implementations/digests/sha2_prov.c
diff -u src/crypto/external/bsd/openssl/dist/providers/implementations/digests/sha2_prov.c:1.1.1.1.2.2 src/crypto/external/bsd/openssl/dist/providers/implementations/digests/sha2_prov.c:1.1.1.1.2.3
--- src/crypto/external/bsd/openssl/dist/providers/implementations/digests/sha2_prov.c:1.1.1.1.2.2	Fri Aug 11 13:41:18 2023
+++ 

CVS commit: [netbsd-10] src

2024-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 25 14:14:56 UTC 2024

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/evp [netbsd-10]:
legacy_sha.c
src/crypto/external/bsd/openssl/dist/include/crypto [netbsd-10]: sha.h
src/crypto/external/bsd/openssl/dist/providers/implementations/digests 
[netbsd-10]:
sha2_prov.c
src/crypto/external/bsd/openssl/lib/libcrypto [netbsd-10]:
libc-sha2xx.c
src/distrib/sets/lists/debug [netbsd-10]: mi
src/distrib/sets/lists/tests [netbsd-10]: mi
src/tests/crypto/libcrypto [netbsd-10]: Makefile
Added Files:
src/tests/crypto/libcrypto [netbsd-10]: t_sha512trunc.c

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


crypto/external/bsd/openssl/dist/providers/implementations/digests/sha2_prov.c: 
revision 1.2
tests/crypto/libcrypto/t_sha512trunc.c: revision 1.1
tests/crypto/libcrypto/t_sha512trunc.c: revision 1.2
tests/crypto/libcrypto/Makefile: revision 1.16
distrib/sets/lists/tests/mi: revision 1.1311
crypto/external/bsd/openssl/dist/crypto/evp/legacy_sha.c: revision 1.2
distrib/sets/lists/debug/mi: revision 1.430
crypto/external/bsd/openssl/dist/include/crypto/sha.h: revision 1.2
crypto/external/bsd/openssl/lib/libcrypto/libc-sha2xx.c: revision 1.4

libcrypto: Add some trivial tests for truncated SHA-512 variants.
These should use more of the test vectors from
https://csrc.nist.gov/Projects/Cryptographic-Algorithm-Validation-Program/Secure-Hashing#Testing
but this will do for now to detect the buffer overrun rake we left
lying around for ourselves.
PR lib/58039

libcrypto: Fix buffer overrun in truncated SHA-512 functions.
Further fallout from the libc/openssl sha2 symbol collision.
PR lib/58039


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.2.3 -r1.1.1.1.2.4 \
src/crypto/external/bsd/openssl/dist/crypto/evp/legacy_sha.c
cvs rdiff -u -r1.1.1.1.10.1 -r1.1.1.1.10.2 \
src/crypto/external/bsd/openssl/dist/include/crypto/sha.h
cvs rdiff -u -r1.1.1.1.2.2 -r1.1.1.1.2.3 \

src/crypto/external/bsd/openssl/dist/providers/implementations/digests/sha2_prov.c
cvs rdiff -u -r1.2.6.1 -r1.2.6.2 \
src/crypto/external/bsd/openssl/lib/libcrypto/libc-sha2xx.c
cvs rdiff -u -r1.394.2.5 -r1.394.2.6 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.1238.2.5 -r1.1238.2.6 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.14.10.1 -r1.14.10.2 src/tests/crypto/libcrypto/Makefile
cvs rdiff -u -r0 -r1.2.2.2 src/tests/crypto/libcrypto/t_sha512trunc.c

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



CVS commit: xsrc/external/mit

2024-03-25 Thread Jukka Andberg
Module Name:xsrc
Committed By:   jandberg
Date:   Mon Mar 25 14:11:39 UTC 2024

Modified Files:
xsrc/external/mit/xf86-video-wsfb/dist/src: wsfb_driver.c
xsrc/external/mit/xorg-server/dist/miext/shadow: shadow.h shafb4.c

Log Message:
xf86-video-wsfb: Add support for 16 color mode on Amiga

- Sets up 8bpp shadow framebuffer with depth 4
- Bitplane conversion done in shadow update function
- Adds new shadow update function shadowUpdateAfb4x8,
  which is a slightly modified version of existing shadowUpdateAfb4/8.

Discussion on tech-x11: 
http://mail-index.netbsd.org/tech-x11/2024/02/29/msg002447.html


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 \
xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c
cvs rdiff -u -r1.1.1.5 -r1.2 \
xsrc/external/mit/xorg-server/dist/miext/shadow/shadow.h
cvs rdiff -u -r1.1.1.2 -r1.2 \
xsrc/external/mit/xorg-server/dist/miext/shadow/shafb4.c

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

Modified files:

Index: xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c
diff -u xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.49 xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.50
--- xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.49	Fri Jan 26 13:37:21 2024
+++ xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c	Mon Mar 25 14:11:39 2024
@@ -554,14 +554,20 @@ WsfbPreInit(ScrnInfoPtr pScrn, int flags
 	if (wstype == WSDISPLAY_TYPE_AMIGACC) {
 		/*
 		 * Video memory is organized in bitplanes.
-		 * 8bpp or 1bpp supported in this driver.
-		 * With 8bpp conversion to bitplane format
-		 * is done in shadow update proc.
+		 * 8bpp, 4bpp, and 1bpp supported in this driver.
+		 * With 8bpp/4bpp conversion to bitplane format
+		 * is done in shadow update proc. In both cases
+		 * shadow fb uses 8bpp memory layout and shadow
+		 * update proc ignores the possible extra bits.
 		 * With 1bpp no conversion needed.
 		 */
 #ifdef HAVE_SHADOW_AFB
 		if (bitsperpixel == 8) {
 			fPtr->planarAfb = TRUE;
+		} else if (bitsperpixel == 4) {
+			fPtr->planarAfb = TRUE;
+			default_depth = 4;
+			bitsperpixel = 8;
 		} else
 #endif
 		{
@@ -643,6 +649,16 @@ WsfbPreInit(ScrnInfoPtr pScrn, int flags
 		fPtr->fbi.fbi_pixeltype = WSFB_RGB;
 	}
 #endif
+#ifdef HAVE_SHADOW_AFB
+	if (fPtr->planarAfb)
+	{
+		if (!fPtr->shadowFB) {
+			xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+   "Shadow FB forced on for planar framebuffer\n");
+			fPtr->shadowFB = TRUE;
+		}
+	}
+#endif
 	/* Rotation */
 	fPtr->rotate = WSFB_ROTATE_NONE;
 	if ((s = xf86GetOptValString(fPtr->Options, OPTION_ROTATE))) {
@@ -891,9 +907,12 @@ WsfbCreateScreenResources(ScreenPtr pScr
 		shadowproc = wsfbUpdateRotatePacked;
 	} else
 #ifdef HAVE_SHADOW_AFB
-	if (fPtr->planarAfb) {
+	if (fPtr->planarAfb && fPtr->fbi.fbi_bitsperpixel == 8) {
 		shadowproc = shadowUpdateAfb8;
 		windowproc = WsfbWindowAfb;
+	} else if (fPtr->planarAfb && fPtr->fbi.fbi_bitsperpixel == 4) {
+		shadowproc = shadowUpdateAfb4x8;
+		windowproc = WsfbWindowAfb;
 	} else
 #endif
 	{

Index: xsrc/external/mit/xorg-server/dist/miext/shadow/shadow.h
diff -u xsrc/external/mit/xorg-server/dist/miext/shadow/shadow.h:1.1.1.5 xsrc/external/mit/xorg-server/dist/miext/shadow/shadow.h:1.2
--- xsrc/external/mit/xorg-server/dist/miext/shadow/shadow.h:1.1.1.5	Mon Dec 31 09:36:07 2018
+++ xsrc/external/mit/xorg-server/dist/miext/shadow/shadow.h	Mon Mar 25 14:11:39 2024
@@ -88,6 +88,9 @@ extern _X_EXPORT void
  shadowUpdateAfb8(ScreenPtr pScreen, shadowBufPtr pBuf);
 
 extern _X_EXPORT void
+ shadowUpdateAfb4x8(ScreenPtr pScreen, shadowBufPtr pBuf);
+
+extern _X_EXPORT void
  shadowUpdateIplan2p4(ScreenPtr pScreen, shadowBufPtr pBuf);
 
 extern _X_EXPORT void

Index: xsrc/external/mit/xorg-server/dist/miext/shadow/shafb4.c
diff -u xsrc/external/mit/xorg-server/dist/miext/shadow/shafb4.c:1.1.1.2 xsrc/external/mit/xorg-server/dist/miext/shadow/shafb4.c:1.2
--- xsrc/external/mit/xorg-server/dist/miext/shadow/shafb4.c:1.1.1.2	Mon Dec 31 09:36:07 2018
+++ xsrc/external/mit/xorg-server/dist/miext/shadow/shafb4.c	Mon Mar 25 14:11:39 2024
@@ -137,3 +137,70 @@ shadowUpdateAfb4(ScreenPtr pScreen, shad
 pbox++;
 }
 }
+
+/*
+ * Like above, except input is 8-bit chunky pixels (upper 4 bits zero)
+ */
+void
+shadowUpdateAfb4x8(ScreenPtr pScreen, shadowBufPtr pBuf)
+{
+RegionPtr damage = DamageRegion(pBuf->pDamage);
+PixmapPtr pShadow = pBuf->pPixmap;
+int nbox = RegionNumRects(damage);
+BoxPtr pbox = RegionRects(damage);
+FbBits *shaBase;
+CARD32 *shaLine, *sha;
+FbStride shaStride;
+int scrLine;
+_X_UNUSED int shaBpp, shaXoff, shaYoff;
+int x, y, w, h;
+int i, n;
+CARD32 *win;
+CARD32 off, winStride;
+CARD32 dwords[4];
+
+fbGetDrawable(>drawable, shaBase, shaStride, shaBpp, shaXoff,
+  shaYoff);
+if (sizeof(FbBits) != 

CVS commit: xsrc/external/mit

2024-03-25 Thread Jukka Andberg
Module Name:xsrc
Committed By:   jandberg
Date:   Mon Mar 25 14:11:39 UTC 2024

Modified Files:
xsrc/external/mit/xf86-video-wsfb/dist/src: wsfb_driver.c
xsrc/external/mit/xorg-server/dist/miext/shadow: shadow.h shafb4.c

Log Message:
xf86-video-wsfb: Add support for 16 color mode on Amiga

- Sets up 8bpp shadow framebuffer with depth 4
- Bitplane conversion done in shadow update function
- Adds new shadow update function shadowUpdateAfb4x8,
  which is a slightly modified version of existing shadowUpdateAfb4/8.

Discussion on tech-x11: 
http://mail-index.netbsd.org/tech-x11/2024/02/29/msg002447.html


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 \
xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c
cvs rdiff -u -r1.1.1.5 -r1.2 \
xsrc/external/mit/xorg-server/dist/miext/shadow/shadow.h
cvs rdiff -u -r1.1.1.2 -r1.2 \
xsrc/external/mit/xorg-server/dist/miext/shadow/shafb4.c

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



CVS commit: src/distrib/notes/common

2024-03-25 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Mon Mar 25 13:35:28 UTC 2024

Modified Files:
src/distrib/notes/common: main

Log Message:
distrib/notes: add back the sentence final dot after .Lk

It was omitted in previous b/c of a bug in .Lk that was fixed
in PR bin/58074


To generate a diff of this commit:
cvs rdiff -u -r1.574 -r1.575 src/distrib/notes/common/main

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

Modified files:

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.574 src/distrib/notes/common/main:1.575
--- src/distrib/notes/common/main:1.574	Sun Mar 24 13:18:02 2024
+++ src/distrib/notes/common/main	Mon Mar 25 13:35:28 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: main,v 1.574 2024/03/24 13:18:02 martin Exp $
+.\"	$NetBSD: main,v 1.575 2024/03/25 13:35:28 uwe Exp $
 .\"
 .\" Copyright (c) 1999-2012 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -482,7 +482,7 @@ The
 system architectures, with preliminary support for the others included in
 source form.
 For more information please visit
-.Lk https://www.NetBSD.org/
+.Lk https://www.NetBSD.org/ .
 .Pp
 .Nx
 is a completely integrated system.



CVS commit: src/distrib/notes/common

2024-03-25 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Mon Mar 25 13:35:28 UTC 2024

Modified Files:
src/distrib/notes/common: main

Log Message:
distrib/notes: add back the sentence final dot after .Lk

It was omitted in previous b/c of a bug in .Lk that was fixed
in PR bin/58074


To generate a diff of this commit:
cvs rdiff -u -r1.574 -r1.575 src/distrib/notes/common/main

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