CVS import: xsrc/external/mit/xorgproto/dist

2024-07-01 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Tue Jul  2 06:22:56 UTC 2024

Update of /cvsroot/xsrc/external/mit/xorgproto/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv16062

Log Message:
initial import of xorgproto-2024.1

Status:

Vendor Tag: xorg
Release Tags:   xorgproto-2024-1

U xsrc/external/mit/xorgproto/dist/Makefile.am
U xsrc/external/mit/xorgproto/dist/configure
U xsrc/external/mit/xorgproto/dist/configure.ac
U xsrc/external/mit/xorgproto/dist/aclocal.m4
U xsrc/external/mit/xorgproto/dist/compositeproto.txt
U xsrc/external/mit/xorgproto/dist/damageproto.txt
U xsrc/external/mit/xorgproto/dist/dri2proto.txt
U xsrc/external/mit/xorgproto/dist/dri3proto.txt
U xsrc/external/mit/xorgproto/dist/fixesproto.txt
U xsrc/external/mit/xorgproto/dist/presentproto.txt
U xsrc/external/mit/xorgproto/dist/randrproto.txt
U xsrc/external/mit/xorgproto/dist/renderproto.txt
U xsrc/external/mit/xorgproto/dist/resproto.txt
U xsrc/external/mit/xorgproto/dist/xv-protocol-v2.txt
U xsrc/external/mit/xorgproto/dist/xwaylandproto.txt
U xsrc/external/mit/xorgproto/dist/PM_spec
U xsrc/external/mit/xorgproto/dist/Makefile.in
U xsrc/external/mit/xorgproto/dist/applewmproto.pc.in
U xsrc/external/mit/xorgproto/dist/bigreqsproto.pc.in
U xsrc/external/mit/xorgproto/dist/compositeproto.pc.in
U xsrc/external/mit/xorgproto/dist/damageproto.pc.in
U xsrc/external/mit/xorgproto/dist/dmxproto.pc.in
U xsrc/external/mit/xorgproto/dist/dpmsproto.pc.in
U xsrc/external/mit/xorgproto/dist/dri2proto.pc.in
U xsrc/external/mit/xorgproto/dist/dri3proto.pc.in
U xsrc/external/mit/xorgproto/dist/evieproto.pc.in
U xsrc/external/mit/xorgproto/dist/fixesproto.pc.in
U xsrc/external/mit/xorgproto/dist/fontcacheproto.pc.in
U xsrc/external/mit/xorgproto/dist/fontsproto.pc.in
U xsrc/external/mit/xorgproto/dist/glproto.pc.in
U xsrc/external/mit/xorgproto/dist/inputproto.pc.in
U xsrc/external/mit/xorgproto/dist/kbproto.pc.in
U xsrc/external/mit/xorgproto/dist/lg3dproto.pc.in
U xsrc/external/mit/xorgproto/dist/presentproto.pc.in
U xsrc/external/mit/xorgproto/dist/printproto.pc.in
U xsrc/external/mit/xorgproto/dist/randrproto.pc.in
U xsrc/external/mit/xorgproto/dist/recordproto.pc.in
U xsrc/external/mit/xorgproto/dist/renderproto.pc.in
U xsrc/external/mit/xorgproto/dist/resourceproto.pc.in
U xsrc/external/mit/xorgproto/dist/scrnsaverproto.pc.in
U xsrc/external/mit/xorgproto/dist/trapproto.pc.in
U xsrc/external/mit/xorgproto/dist/videoproto.pc.in
U xsrc/external/mit/xorgproto/dist/windowswmproto.pc.in
U xsrc/external/mit/xorgproto/dist/xcalibrateproto.pc.in
U xsrc/external/mit/xorgproto/dist/xcmiscproto.pc.in
U xsrc/external/mit/xorgproto/dist/xextproto.pc.in
U xsrc/external/mit/xorgproto/dist/xf86bigfontproto.pc.in
U xsrc/external/mit/xorgproto/dist/xf86dgaproto.pc.in
U xsrc/external/mit/xorgproto/dist/xf86driproto.pc.in
U xsrc/external/mit/xorgproto/dist/xf86miscproto.pc.in
U xsrc/external/mit/xorgproto/dist/xf86rushproto.pc.in
U xsrc/external/mit/xorgproto/dist/xf86vidmodeproto.pc.in
U xsrc/external/mit/xorgproto/dist/xineramaproto.pc.in
U xsrc/external/mit/xorgproto/dist/xproto.pc.in
U xsrc/external/mit/xorgproto/dist/xproxymngproto.pc.in
U xsrc/external/mit/xorgproto/dist/xwaylandproto.pc.in
U xsrc/external/mit/xorgproto/dist/AUTHORS
U xsrc/external/mit/xorgproto/dist/INSTALL
U xsrc/external/mit/xorgproto/dist/README.md
U xsrc/external/mit/xorgproto/dist/compile
U xsrc/external/mit/xorgproto/dist/config.guess
U xsrc/external/mit/xorgproto/dist/config.sub
U xsrc/external/mit/xorgproto/dist/install-sh
U xsrc/external/mit/xorgproto/dist/missing
U xsrc/external/mit/xorgproto/dist/test-driver
U xsrc/external/mit/xorgproto/dist/COPYING-applewmproto
U xsrc/external/mit/xorgproto/dist/COPYING-bigreqsproto
U xsrc/external/mit/xorgproto/dist/COPYING-compositeproto
U xsrc/external/mit/xorgproto/dist/COPYING-damageproto
U xsrc/external/mit/xorgproto/dist/COPYING-dmxproto
U xsrc/external/mit/xorgproto/dist/COPYING-dri2proto
U xsrc/external/mit/xorgproto/dist/COPYING-dri3proto
U xsrc/external/mit/xorgproto/dist/COPYING-evieproto
U xsrc/external/mit/xorgproto/dist/COPYING-fixesproto
U xsrc/external/mit/xorgproto/dist/COPYING-fontcacheproto
U xsrc/external/mit/xorgproto/dist/COPYING-fontsproto
U xsrc/external/mit/xorgproto/dist/COPYING-glproto
U xsrc/external/mit/xorgproto/dist/COPYING-inputproto
U xsrc/external/mit/xorgproto/dist/COPYING-kbproto
U xsrc/external/mit/xorgproto/dist/COPYING-lg3dproto
U xsrc/external/mit/xorgproto/dist/COPYING-pmproto
U xsrc/external/mit/xorgproto/dist/COPYING-presentproto
U xsrc/external/mit/xorgproto/dist/COPYING-printproto
U xsrc/external/mit/xorgproto/dist/COPYING-randrproto
U xsrc/external/mit/xorgproto/dist/COPYING-recordproto
U xsrc/external/mit/xorgproto/dist/COPYING-renderproto
U xsrc/external/mit/xorgproto/dist/COPYING-resourceproto
U xsrc/external/mit/xorgproto/dist/COPYING-scrnsaverproto
U xsrc/external/mit/xorgproto/dist/COPYING-trapproto
U xsrc/external/mit/xorgproto/dist/COPYING-videoproto
U xsr

CVS import: xsrc/external/mit/xorgproto/dist

2024-07-01 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Tue Jul  2 06:22:56 UTC 2024

Update of /cvsroot/xsrc/external/mit/xorgproto/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv16062

Log Message:
initial import of xorgproto-2024.1

Status:

Vendor Tag: xorg
Release Tags:   xorgproto-2024-1

U xsrc/external/mit/xorgproto/dist/Makefile.am
U xsrc/external/mit/xorgproto/dist/configure
U xsrc/external/mit/xorgproto/dist/configure.ac
U xsrc/external/mit/xorgproto/dist/aclocal.m4
U xsrc/external/mit/xorgproto/dist/compositeproto.txt
U xsrc/external/mit/xorgproto/dist/damageproto.txt
U xsrc/external/mit/xorgproto/dist/dri2proto.txt
U xsrc/external/mit/xorgproto/dist/dri3proto.txt
U xsrc/external/mit/xorgproto/dist/fixesproto.txt
U xsrc/external/mit/xorgproto/dist/presentproto.txt
U xsrc/external/mit/xorgproto/dist/randrproto.txt
U xsrc/external/mit/xorgproto/dist/renderproto.txt
U xsrc/external/mit/xorgproto/dist/resproto.txt
U xsrc/external/mit/xorgproto/dist/xv-protocol-v2.txt
U xsrc/external/mit/xorgproto/dist/xwaylandproto.txt
U xsrc/external/mit/xorgproto/dist/PM_spec
U xsrc/external/mit/xorgproto/dist/Makefile.in
U xsrc/external/mit/xorgproto/dist/applewmproto.pc.in
U xsrc/external/mit/xorgproto/dist/bigreqsproto.pc.in
U xsrc/external/mit/xorgproto/dist/compositeproto.pc.in
U xsrc/external/mit/xorgproto/dist/damageproto.pc.in
U xsrc/external/mit/xorgproto/dist/dmxproto.pc.in
U xsrc/external/mit/xorgproto/dist/dpmsproto.pc.in
U xsrc/external/mit/xorgproto/dist/dri2proto.pc.in
U xsrc/external/mit/xorgproto/dist/dri3proto.pc.in
U xsrc/external/mit/xorgproto/dist/evieproto.pc.in
U xsrc/external/mit/xorgproto/dist/fixesproto.pc.in
U xsrc/external/mit/xorgproto/dist/fontcacheproto.pc.in
U xsrc/external/mit/xorgproto/dist/fontsproto.pc.in
U xsrc/external/mit/xorgproto/dist/glproto.pc.in
U xsrc/external/mit/xorgproto/dist/inputproto.pc.in
U xsrc/external/mit/xorgproto/dist/kbproto.pc.in
U xsrc/external/mit/xorgproto/dist/lg3dproto.pc.in
U xsrc/external/mit/xorgproto/dist/presentproto.pc.in
U xsrc/external/mit/xorgproto/dist/printproto.pc.in
U xsrc/external/mit/xorgproto/dist/randrproto.pc.in
U xsrc/external/mit/xorgproto/dist/recordproto.pc.in
U xsrc/external/mit/xorgproto/dist/renderproto.pc.in
U xsrc/external/mit/xorgproto/dist/resourceproto.pc.in
U xsrc/external/mit/xorgproto/dist/scrnsaverproto.pc.in
U xsrc/external/mit/xorgproto/dist/trapproto.pc.in
U xsrc/external/mit/xorgproto/dist/videoproto.pc.in
U xsrc/external/mit/xorgproto/dist/windowswmproto.pc.in
U xsrc/external/mit/xorgproto/dist/xcalibrateproto.pc.in
U xsrc/external/mit/xorgproto/dist/xcmiscproto.pc.in
U xsrc/external/mit/xorgproto/dist/xextproto.pc.in
U xsrc/external/mit/xorgproto/dist/xf86bigfontproto.pc.in
U xsrc/external/mit/xorgproto/dist/xf86dgaproto.pc.in
U xsrc/external/mit/xorgproto/dist/xf86driproto.pc.in
U xsrc/external/mit/xorgproto/dist/xf86miscproto.pc.in
U xsrc/external/mit/xorgproto/dist/xf86rushproto.pc.in
U xsrc/external/mit/xorgproto/dist/xf86vidmodeproto.pc.in
U xsrc/external/mit/xorgproto/dist/xineramaproto.pc.in
U xsrc/external/mit/xorgproto/dist/xproto.pc.in
U xsrc/external/mit/xorgproto/dist/xproxymngproto.pc.in
U xsrc/external/mit/xorgproto/dist/xwaylandproto.pc.in
U xsrc/external/mit/xorgproto/dist/AUTHORS
U xsrc/external/mit/xorgproto/dist/INSTALL
U xsrc/external/mit/xorgproto/dist/README.md
U xsrc/external/mit/xorgproto/dist/compile
U xsrc/external/mit/xorgproto/dist/config.guess
U xsrc/external/mit/xorgproto/dist/config.sub
U xsrc/external/mit/xorgproto/dist/install-sh
U xsrc/external/mit/xorgproto/dist/missing
U xsrc/external/mit/xorgproto/dist/test-driver
U xsrc/external/mit/xorgproto/dist/COPYING-applewmproto
U xsrc/external/mit/xorgproto/dist/COPYING-bigreqsproto
U xsrc/external/mit/xorgproto/dist/COPYING-compositeproto
U xsrc/external/mit/xorgproto/dist/COPYING-damageproto
U xsrc/external/mit/xorgproto/dist/COPYING-dmxproto
U xsrc/external/mit/xorgproto/dist/COPYING-dri2proto
U xsrc/external/mit/xorgproto/dist/COPYING-dri3proto
U xsrc/external/mit/xorgproto/dist/COPYING-evieproto
U xsrc/external/mit/xorgproto/dist/COPYING-fixesproto
U xsrc/external/mit/xorgproto/dist/COPYING-fontcacheproto
U xsrc/external/mit/xorgproto/dist/COPYING-fontsproto
U xsrc/external/mit/xorgproto/dist/COPYING-glproto
U xsrc/external/mit/xorgproto/dist/COPYING-inputproto
U xsrc/external/mit/xorgproto/dist/COPYING-kbproto
U xsrc/external/mit/xorgproto/dist/COPYING-lg3dproto
U xsrc/external/mit/xorgproto/dist/COPYING-pmproto
U xsrc/external/mit/xorgproto/dist/COPYING-presentproto
U xsrc/external/mit/xorgproto/dist/COPYING-printproto
U xsrc/external/mit/xorgproto/dist/COPYING-randrproto
U xsrc/external/mit/xorgproto/dist/COPYING-recordproto
U xsrc/external/mit/xorgproto/dist/COPYING-renderproto
U xsrc/external/mit/xorgproto/dist/COPYING-resourceproto
U xsrc/external/mit/xorgproto/dist/COPYING-scrnsaverproto
U xsrc/external/mit/xorgproto/dist/COPYING-trapproto
U xsrc/external/mit/xorgproto/dist/COPYING-videoproto
U xsr

CVS commit: src/sys/arch/rs6000/mca

2024-07-01 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jul  2 06:07:12 UTC 2024

Modified Files:
src/sys/arch/rs6000/mca: mca_machdep.c

Log Message:
rs6000: mca_machdep: Locally neglect GCC12 -Warray-bounds for 0-th page

as already done for, e.g., evbppc/wii.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/rs6000/mca/mca_machdep.c

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



CVS commit: src/sys/arch/rs6000/mca

2024-07-01 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jul  2 06:07:12 UTC 2024

Modified Files:
src/sys/arch/rs6000/mca: mca_machdep.c

Log Message:
rs6000: mca_machdep: Locally neglect GCC12 -Warray-bounds for 0-th page

as already done for, e.g., evbppc/wii.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/rs6000/mca/mca_machdep.c

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

Modified files:

Index: src/sys/arch/rs6000/mca/mca_machdep.c
diff -u src/sys/arch/rs6000/mca/mca_machdep.c:1.5 src/sys/arch/rs6000/mca/mca_machdep.c:1.6
--- src/sys/arch/rs6000/mca/mca_machdep.c:1.5	Sat Nov 21 15:52:32 2020
+++ src/sys/arch/rs6000/mca/mca_machdep.c	Tue Jul  2 06:07:12 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: mca_machdep.c,v 1.5 2020/11/21 15:52:32 thorpej Exp $	*/
+/*	$NetBSD: mca_machdep.c,v 1.6 2024/07/02 06:07:12 rin Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mca_machdep.c,v 1.5 2020/11/21 15:52:32 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mca_machdep.c,v 1.6 2024/07/02 06:07:12 rin Exp $");
 
 #include 
 #include 
@@ -172,6 +172,13 @@ mca_intr_disestablish(mca_chipset_tag_t 
 	
 
 /*
+ * GCC 12 blames pointer reference to 0-th page, [0, 0xfff].
+ * XXX map to higher address as done for, e.g., arm by devmap?
+ */
+#pragma GCC diagnostic push	/* XXX { */
+#pragma GCC diagnostic ignored "-Warray-bounds"
+
+/*
  * Handle a NMI.
  * return true to panic system, false to ignore.
  */
@@ -250,6 +257,8 @@ mca_disk_unbusy(void)
 	outb(PORT_DISKLED, inb(PORT_DISKLED) & ~DISKLED_ON);
 }
 
+#pragma GCC diagnostic pop	/* XXX } */
+
 /*
  * -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  * MCA DMA specific stuff. We use ISA routines for bulk of the work,



CVS commit: src/sys/arch/prep/stand/boot

2024-07-01 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jul  2 05:34:09 UTC 2024

Modified Files:
src/sys/arch/prep/stand/boot: sd.c siop.c

Log Message:
prep: stand: for previous, memset and style fix just for sure


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/prep/stand/boot/sd.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/prep/stand/boot/siop.c

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

Modified files:

Index: src/sys/arch/prep/stand/boot/sd.c
diff -u src/sys/arch/prep/stand/boot/sd.c:1.5 src/sys/arch/prep/stand/boot/sd.c:1.6
--- src/sys/arch/prep/stand/boot/sd.c:1.5	Tue Jul  2 05:26:40 2024
+++ src/sys/arch/prep/stand/boot/sd.c	Tue Jul  2 05:34:08 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: sd.c,v 1.5 2024/07/02 05:26:40 rin Exp $	*/
+/*	$NetBSD: sd.c,v 1.6 2024/07/02 05:34:08 rin Exp $	*/
 /*
  * Copyright (c) 2010 KIYOHARA Takashi
  * All rights reserved.
@@ -593,9 +593,11 @@ sdopen(struct open_file *f, ...)
 	sd->sc_target = target;
 	sd->sc_bus = bus;
 
-	error = scsi_inquire(sd, SCSIPI_INQUIRY_LENGTH_SCSI2, inqbuf);
+	memset(&buf, 0, sizeof(buf));
+	error = scsi_inquire(sd, SCSIPI_INQUIRY_LENGTH_SCSI2, &buf);
 	if (error != 0)
 		return error;
+	inqbuf = &buf;
 
 	sd->sc_type = inqbuf->device & SID_TYPE;
 

Index: src/sys/arch/prep/stand/boot/siop.c
diff -u src/sys/arch/prep/stand/boot/siop.c:1.9 src/sys/arch/prep/stand/boot/siop.c:1.10
--- src/sys/arch/prep/stand/boot/siop.c:1.9	Tue Jul  2 05:26:40 2024
+++ src/sys/arch/prep/stand/boot/siop.c	Tue Jul  2 05:34:08 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: siop.c,v 1.9 2024/07/02 05:26:40 rin Exp $	*/
+/*	$NetBSD: siop.c,v 1.10 2024/07/02 05:34:08 rin Exp $	*/
 /*
  * Copyright (c) 2010 KIYOHARA Takashi
  * All rights reserved.
@@ -1017,13 +1017,15 @@ scsi_probe(struct siop_adapter *adp)
 	uint8_t device;
 	char product[sizeof(inqbuf->product) + 1];
 
+	memset(&buf, 0, sizeof(buf));
+
 	found = 0;
 	for (t = 0; t < 8; t++) {
 		if (t == adp->id)
 			continue;
 		for (l = 0; l < 8; l++) {
 			if (_scsi_inquire(adp, t, l,
-			SCSIPI_INQUIRY_LENGTH_SCSI2, inqbuf) != 0)
+			SCSIPI_INQUIRY_LENGTH_SCSI2, &buf) != 0)
 continue;
 
 			device = inqbuf->device & SID_TYPE;



CVS commit: src/sys/arch/prep/stand/boot

2024-07-01 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jul  2 05:34:09 UTC 2024

Modified Files:
src/sys/arch/prep/stand/boot: sd.c siop.c

Log Message:
prep: stand: for previous, memset and style fix just for sure


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/prep/stand/boot/sd.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/prep/stand/boot/siop.c

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



CVS commit: src/sys/arch/prep/stand/boot

2024-07-01 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jul  2 05:26:40 UTC 2024

Modified Files:
src/sys/arch/prep/stand/boot: sd.c siop.c

Log Message:
prep: stand: Appease GCC12 -Warray-bounds, NFCI

except for additional 38-byte of stack being consumed.

Here, GCC12 complains buffer is smaller than
sizeof(*inqbuf) == SCSIPI_INQUIRY_LENGTH_SCSI3 == 74 bytes,
despite members within the first SCSIPI_INQUIRY_LENGTH_SCSI2 == 36 bytes
are actually dereferenced.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/prep/stand/boot/sd.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/prep/stand/boot/siop.c

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

Modified files:

Index: src/sys/arch/prep/stand/boot/sd.c
diff -u src/sys/arch/prep/stand/boot/sd.c:1.4 src/sys/arch/prep/stand/boot/sd.c:1.5
--- src/sys/arch/prep/stand/boot/sd.c:1.4	Tue Jan  8 19:41:09 2019
+++ src/sys/arch/prep/stand/boot/sd.c	Tue Jul  2 05:26:40 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: sd.c,v 1.4 2019/01/08 19:41:09 jdolecek Exp $	*/
+/*	$NetBSD: sd.c,v 1.5 2024/07/02 05:26:40 rin Exp $	*/
 /*
  * Copyright (c) 2010 KIYOHARA Takashi
  * All rights reserved.
@@ -568,10 +568,9 @@ sdopen(struct open_file *f, ...)
 {
 	struct sd_softc *sd;
 	struct scsi_test_unit_ready cmd;
-	struct scsipi_inquiry_data *inqbuf;
+	struct scsipi_inquiry_data buf, *inqbuf = &buf;
 	u_int bus, target, lun, part;
 	int error;
-	char buf[SCSIPI_INQUIRY_LENGTH_SCSI2];
 	va_list ap;
 
 	va_start(ap, f);
@@ -594,11 +593,10 @@ sdopen(struct open_file *f, ...)
 	sd->sc_target = target;
 	sd->sc_bus = bus;
 
-	if ((error = scsi_inquire(sd, sizeof(buf), buf)) != 0)
+	error = scsi_inquire(sd, SCSIPI_INQUIRY_LENGTH_SCSI2, inqbuf);
+	if (error != 0)
 		return error;
 
-	inqbuf = (struct scsipi_inquiry_data *)buf;
-
 	sd->sc_type = inqbuf->device & SID_TYPE;
 
 	/*

Index: src/sys/arch/prep/stand/boot/siop.c
diff -u src/sys/arch/prep/stand/boot/siop.c:1.8 src/sys/arch/prep/stand/boot/siop.c:1.9
--- src/sys/arch/prep/stand/boot/siop.c:1.8	Thu Feb  8 19:44:08 2024
+++ src/sys/arch/prep/stand/boot/siop.c	Tue Jul  2 05:26:40 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: siop.c,v 1.8 2024/02/08 19:44:08 andvar Exp $	*/
+/*	$NetBSD: siop.c,v 1.9 2024/07/02 05:26:40 rin Exp $	*/
 /*
  * Copyright (c) 2010 KIYOHARA Takashi
  * All rights reserved.
@@ -65,7 +65,7 @@ static void siop_xfer_setup(struct siop_
 static int siop_add_reselsw(struct siop_adapter *, int, int);
 static void siop_update_scntl3(struct siop_adapter *, int, int);
 
-static int _scsi_inquire(struct siop_adapter *, int, int, int, char *);
+static int _scsi_inquire(struct siop_adapter *, int, int, int, void *);
 static void scsi_request_sense(struct siop_adapter *, struct scsi_xfer *);
 static int scsi_interpret_sense(struct siop_adapter *, struct scsi_xfer *);
 static int scsi_probe(struct siop_adapter *);
@@ -764,7 +764,7 @@ siop_update_scntl3(struct siop_adapter *
  */
 
 static int
-_scsi_inquire(struct siop_adapter *adp, int t, int l, int buflen, char *buf)
+_scsi_inquire(struct siop_adapter *adp, int t, int l, int buflen, void *buf)
 {
 	struct scsipi_inquiry *cmd = (struct scsipi_inquiry *)adp->cmd;
 	struct scsipi_inquiry_data *inqbuf =
@@ -1012,21 +1012,20 @@ scsi_interpret_sense(struct siop_adapter
 static int
 scsi_probe(struct siop_adapter *adp)
 {
-	struct scsipi_inquiry_data *inqbuf;
+	struct scsipi_inquiry_data buf, *inqbuf = &buf;
 	int found, t, l;
 	uint8_t device;
-	char buf[SCSIPI_INQUIRY_LENGTH_SCSI2],
-	product[sizeof(inqbuf->product) + 1];
+	char product[sizeof(inqbuf->product) + 1];
 
 	found = 0;
 	for (t = 0; t < 8; t++) {
 		if (t == adp->id)
 			continue;
 		for (l = 0; l < 8; l++) {
-			if (_scsi_inquire(adp, t, l, sizeof(buf), buf) != 0)
+			if (_scsi_inquire(adp, t, l,
+			SCSIPI_INQUIRY_LENGTH_SCSI2, inqbuf) != 0)
 continue;
 
-			inqbuf = (struct scsipi_inquiry_data *)buf;
 			device = inqbuf->device & SID_TYPE;
 			if (device == T_NODEVICE)
 continue;



CVS commit: src/sys/arch/prep/stand/boot

2024-07-01 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jul  2 05:26:40 UTC 2024

Modified Files:
src/sys/arch/prep/stand/boot: sd.c siop.c

Log Message:
prep: stand: Appease GCC12 -Warray-bounds, NFCI

except for additional 38-byte of stack being consumed.

Here, GCC12 complains buffer is smaller than
sizeof(*inqbuf) == SCSIPI_INQUIRY_LENGTH_SCSI3 == 74 bytes,
despite members within the first SCSIPI_INQUIRY_LENGTH_SCSI2 == 36 bytes
are actually dereferenced.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/prep/stand/boot/sd.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/prep/stand/boot/siop.c

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



CVS commit: src/sys/ufs/ext2fs

2024-07-01 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jul  2 05:02:49 UTC 2024

Modified Files:
src/sys/ufs/ext2fs: ext2fs_vfsops.c

Log Message:
ext2fs: Fix copy-paste for PR kern/58388


To generate a diff of this commit:
cvs rdiff -u -r1.226 -r1.227 src/sys/ufs/ext2fs/ext2fs_vfsops.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/ufs/ext2fs/ext2fs_vfsops.c
diff -u src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.226 src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.227
--- src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.226	Mon Jul  1 22:12:56 2024
+++ src/sys/ufs/ext2fs/ext2fs_vfsops.c	Tue Jul  2 05:02:49 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: ext2fs_vfsops.c,v 1.226 2024/07/01 22:12:56 riastradh Exp $	*/
+/*	$NetBSD: ext2fs_vfsops.c,v 1.227 2024/07/02 05:02:49 rin Exp $	*/
 
 /*
  * Copyright (c) 1989, 1991, 1993, 1994
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.226 2024/07/01 22:12:56 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.227 2024/07/02 05:02:49 rin Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -1336,7 +1336,7 @@ ext2fs_cgupdate(struct ufsmount *mp, int
 		fs->e2fs.e2fs_first_dblock +
 		1 /* superblock */ + i), fs->e2fs_bsize, 0, 0);
 		e2fs_cgsave(&fs->e2fs_gd[i *
-			(m_fs->e2fs_bsize >> m_fs->e2fs_group_desc_shift)],
+			(fs->e2fs_bsize >> fs->e2fs_group_desc_shift)],
 		bp->b_data, fs->e2fs_bsize, fs->e2fs_group_desc_shift);
 		if (waitfor == MNT_WAIT)
 			error = bwrite(bp);



CVS commit: src/sys/ufs/ext2fs

2024-07-01 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jul  2 05:02:49 UTC 2024

Modified Files:
src/sys/ufs/ext2fs: ext2fs_vfsops.c

Log Message:
ext2fs: Fix copy-paste for PR kern/58388


To generate a diff of this commit:
cvs rdiff -u -r1.226 -r1.227 src/sys/ufs/ext2fs/ext2fs_vfsops.c

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



CVS commit: src/external/gpl3/gcc.old/lib

2024-07-01 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jul  2 04:51:41 UTC 2024

Modified Files:
src/external/gpl3/gcc.old/lib: Makefile

Log Message:
gcc.old: Skip sanitizers for `MKGCCCMDS=no` as done for gcc


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc.old/lib/Makefile

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

Modified files:

Index: src/external/gpl3/gcc.old/lib/Makefile
diff -u src/external/gpl3/gcc.old/lib/Makefile:1.11 src/external/gpl3/gcc.old/lib/Makefile:1.12
--- src/external/gpl3/gcc.old/lib/Makefile:1.11	Mon Feb 20 02:11:57 2023
+++ src/external/gpl3/gcc.old/lib/Makefile	Tue Jul  2 04:51:41 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.11 2023/02/20 02:11:57 mrg Exp $
+#	$NetBSD: Makefile,v 1.12 2024/07/02 04:51:41 rin Exp $
 
 .include 
 
@@ -11,6 +11,7 @@ SUBDIR+= liblto_plugin
 .if (${MKLIBSTDCXX} != "no") && (${MKCXX} != "no")
 SUBDIR+= libsupc++ libstdc++-v3
 
+.if ${MKGCCCMDS} != "no"
 SUBDIR+= .WAIT libasan liblsan libubsan
 
 # TSan does not work with 32bit address space and has not been ported
@@ -18,6 +19,7 @@ SUBDIR+= .WAIT libasan liblsan libubsan
 .if ${MACHINE} == "amd64"
 SUBDIR+= libtsan
 .endif
+.endif
 
 .endif
 



CVS commit: src/external/gpl3/gcc.old/lib

2024-07-01 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jul  2 04:51:41 UTC 2024

Modified Files:
src/external/gpl3/gcc.old/lib: Makefile

Log Message:
gcc.old: Skip sanitizers for `MKGCCCMDS=no` as done for gcc


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc.old/lib/Makefile

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



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

2024-07-01 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jul  2 04:38:56 UTC 2024

Modified Files:
src/distrib/sets/lists/debug32: ad.powerpc64

Log Message:
lists/debug32: Fix typo for powerpc64


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/distrib/sets/lists/debug32/ad.powerpc64

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



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

2024-07-01 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jul  2 04:38:56 UTC 2024

Modified Files:
src/distrib/sets/lists/debug32: ad.powerpc64

Log Message:
lists/debug32: Fix typo for powerpc64


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/distrib/sets/lists/debug32/ad.powerpc64

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

Modified files:

Index: src/distrib/sets/lists/debug32/ad.powerpc64
diff -u src/distrib/sets/lists/debug32/ad.powerpc64:1.10 src/distrib/sets/lists/debug32/ad.powerpc64:1.11
--- src/distrib/sets/lists/debug32/ad.powerpc64:1.10	Mon Jul  1 04:03:04 2024
+++ src/distrib/sets/lists/debug32/ad.powerpc64	Tue Jul  2 04:38:56 2024
@@ -1,4 +1,4 @@
-# $NetBSD: ad.powerpc64,v 1.10 2024/07/01 04:03:04 mrg Exp $
+# $NetBSD: ad.powerpc64,v 1.11 2024/07/02 04:38:56 rin Exp $
 ./usr/lib/powerpc/i18n/libBIG5_g.a			comp-c-debuglib	debuglib,compat
 ./usr/lib/powerpc/i18n/libDECHanyu_g.a			comp-c-debuglib	debuglib,compat
 ./usr/lib/powerpc/i18n/libEUCTW_g.a			comp-c-debuglib	debuglib,compat
@@ -255,7 +255,7 @@
 ./usr/libdata/debug/usr/lib/powerpc/libldap.so.6.0.debug	comp-sys-debug	debug,compat,ldap
 ./usr/libdata/debug/usr/lib/powerpc/libldap_r.so.6.0.debug	comp-sys-debug	debug,compat,ldap
 ./usr/libdata/debug/usr/lib/powerpc/liblsan.so.2.0.debug	comp-sys-debug	debug,compat,cxx,gcccmds,gcc=10
-./usr/libdata/debug/usr/lib/powerpc/liblsan.so.2.1.debug	comp-sys-debug	debug,compat,cxx,gcccmds,gcc=12
+./usr/libdata/debug/usr/lib/powerpc/liblsan.so.3.0.debug	comp-sys-debug	debug,compat,cxx,gcccmds,gcc=12
 ./usr/libdata/debug/usr/lib/powerpc/liblua.so.6.1.debug	comp-sys-debug	debug,compat
 ./usr/libdata/debug/usr/lib/powerpc/liblzf.so.1.0.debug	comp-sys-debug	debug,compat
 ./usr/libdata/debug/usr/lib/powerpc/liblzma.so.2.0.debug	comp-sys-debug	debug,compat



CVS commit: src/external/gpl3/gcc

2024-07-01 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jul  2 02:36:22 UTC 2024

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common:
sanitizer_atomic_clang.h
src/external/gpl3/gcc/lib: Makefile.sanitizer

Log Message:
gcc: lib*san: Enable built-in 64-bit atomic ops for !__HAVE_ATOMIC64_OPS

as already done for some mips platforms by upstream.

Now, libubsan (as well as libasan if platform itself is supported)
work on some ILP32 platforms.

Fix PR port-sparc/58352.

This may be slower than another possible fix where all 64-bit atomic
variables are replaced by 32-bit ones. But, it should still be better
than having relatively large diffs to upstream; sanitizers are not
enabled for normal use, anyway.

XXX
Note that filename confusion in upstream codes:
- "sanitizer_atomic_clang.h" is used also for GCC.
- "sanitizer_atomic_clang_mips.h" has no mips specific codes.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_atomic_clang.h
cvs rdiff -u -r1.18 -r1.19 src/external/gpl3/gcc/lib/Makefile.sanitizer

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



CVS commit: src/external/gpl3/gcc

2024-07-01 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jul  2 02:36:22 UTC 2024

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common:
sanitizer_atomic_clang.h
src/external/gpl3/gcc/lib: Makefile.sanitizer

Log Message:
gcc: lib*san: Enable built-in 64-bit atomic ops for !__HAVE_ATOMIC64_OPS

as already done for some mips platforms by upstream.

Now, libubsan (as well as libasan if platform itself is supported)
work on some ILP32 platforms.

Fix PR port-sparc/58352.

This may be slower than another possible fix where all 64-bit atomic
variables are replaced by 32-bit ones. But, it should still be better
than having relatively large diffs to upstream; sanitizers are not
enabled for normal use, anyway.

XXX
Note that filename confusion in upstream codes:
- "sanitizer_atomic_clang.h" is used also for GCC.
- "sanitizer_atomic_clang_mips.h" has no mips specific codes.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_atomic_clang.h
cvs rdiff -u -r1.18 -r1.19 src/external/gpl3/gcc/lib/Makefile.sanitizer

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

Modified files:

Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_atomic_clang.h
diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_atomic_clang.h:1.4 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_atomic_clang.h:1.5
--- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_atomic_clang.h:1.4	Mon Jul 31 01:44:56 2023
+++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_atomic_clang.h	Tue Jul  2 02:36:22 2024
@@ -94,11 +94,17 @@ inline bool atomic_compare_exchange_weak
 }  // namespace __sanitizer
 
 // This include provides explicit template instantiations for atomic_uint64_t
-// on MIPS32, which does not directly support 8 byte atomics. It has to
+// on platforms, which do not directly support 8 byte atomics. It has to
 // proceed the template definitions above.
 #if defined(_MIPS_SIM) && defined(_ABIO32) && _MIPS_SIM == _ABIO32
 #  include "sanitizer_atomic_clang_mips.h"
 #endif
+#if SANITIZER_NETBSD
+#  include 
+#  ifndef __HAVE_ATOMIC64_OPS
+#include "sanitizer_atomic_clang_mips.h"
+#  endif
+#endif
 
 #undef ATOMIC_ORDER
 

Index: src/external/gpl3/gcc/lib/Makefile.sanitizer
diff -u src/external/gpl3/gcc/lib/Makefile.sanitizer:1.18 src/external/gpl3/gcc/lib/Makefile.sanitizer:1.19
--- src/external/gpl3/gcc/lib/Makefile.sanitizer:1.18	Sun Feb 25 06:07:28 2024
+++ src/external/gpl3/gcc/lib/Makefile.sanitizer	Tue Jul  2 02:36:22 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.sanitizer,v 1.18 2024/02/25 06:07:28 mrg Exp $
+#	$NetBSD: Makefile.sanitizer,v 1.19 2024/07/02 02:36:22 rin Exp $
 
 SANITIZER=${GCCDIST}/libsanitizer
 .PATH: ${SANITIZER}/interception ${SANITIZER}/sanitizer_common
@@ -123,13 +123,3 @@ COPTS.sanitizer_symbolizer_report.cc += 
 COPTS.ubsan_diag.cc += -O1
 COPTS.ubsan_init.cc += -O1
 .endif
-
-# XXX GCC 12 sanitizers has higher minimal requirements upon some CPUs.
-# - 32-bit SPARC needs v8 to supply eg __sync_add_and_fetch_4
-# - i386 needs i586 for __sync_val_compare_and_swap_8.
-.if ${MACHINE_ARCH} == "sparc"
-COPTS+= -mcpu=v8
-.endif
-.if ${MACHINE_ARCH} == "i386"
-COPTS+= -march=i586
-.endif



CVS commit: [perseant-exfatfs] src/sys/fs/exfatfs

2024-07-01 Thread Konrad Schroder
Module Name:src
Committed By:   perseant
Date:   Mon Jul  1 22:15:22 UTC 2024

Modified Files:
src/sys/fs/exfatfs [perseant-exfatfs]: exfatfs.h exfatfs_cksum.c
exfatfs_cksum.h exfatfs_conv.c exfatfs_conv.h exfatfs_dirent.h
exfatfs_extern.c exfatfs_extern.h exfatfs_inode.h exfatfs_mount.h
exfatfs_rename.c exfatfs_rename.h exfatfs_tables.c exfatfs_tables.h
exfatfs_trie.c exfatfs_trie.h exfatfs_trie_basic.c
exfatfs_trie_basic.h exfatfs_vfsops.c exfatfs_vfsops.h
exfatfs_vnops.c exfatfs_vnops.h

Log Message:
Update to match the NetBSD style guide.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/fs/exfatfs/exfatfs.h \
src/sys/fs/exfatfs/exfatfs_cksum.c src/sys/fs/exfatfs/exfatfs_cksum.h \
src/sys/fs/exfatfs/exfatfs_conv.c src/sys/fs/exfatfs/exfatfs_conv.h \
src/sys/fs/exfatfs/exfatfs_dirent.h src/sys/fs/exfatfs/exfatfs_extern.c \
src/sys/fs/exfatfs/exfatfs_extern.h src/sys/fs/exfatfs/exfatfs_inode.h \
src/sys/fs/exfatfs/exfatfs_mount.h src/sys/fs/exfatfs/exfatfs_rename.c \
src/sys/fs/exfatfs/exfatfs_rename.h src/sys/fs/exfatfs/exfatfs_tables.c \
src/sys/fs/exfatfs/exfatfs_tables.h src/sys/fs/exfatfs/exfatfs_trie.c \
src/sys/fs/exfatfs/exfatfs_trie.h src/sys/fs/exfatfs/exfatfs_trie_basic.c \
src/sys/fs/exfatfs/exfatfs_trie_basic.h \
src/sys/fs/exfatfs/exfatfs_vfsops.c src/sys/fs/exfatfs/exfatfs_vfsops.h \
src/sys/fs/exfatfs/exfatfs_vnops.c src/sys/fs/exfatfs/exfatfs_vnops.h

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



CVS commit: [perseant-exfatfs] src/sys/fs/exfatfs

2024-07-01 Thread Konrad Schroder
Module Name:src
Committed By:   perseant
Date:   Mon Jul  1 22:15:22 UTC 2024

Modified Files:
src/sys/fs/exfatfs [perseant-exfatfs]: exfatfs.h exfatfs_cksum.c
exfatfs_cksum.h exfatfs_conv.c exfatfs_conv.h exfatfs_dirent.h
exfatfs_extern.c exfatfs_extern.h exfatfs_inode.h exfatfs_mount.h
exfatfs_rename.c exfatfs_rename.h exfatfs_tables.c exfatfs_tables.h
exfatfs_trie.c exfatfs_trie.h exfatfs_trie_basic.c
exfatfs_trie_basic.h exfatfs_vfsops.c exfatfs_vfsops.h
exfatfs_vnops.c exfatfs_vnops.h

Log Message:
Update to match the NetBSD style guide.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/fs/exfatfs/exfatfs.h \
src/sys/fs/exfatfs/exfatfs_cksum.c src/sys/fs/exfatfs/exfatfs_cksum.h \
src/sys/fs/exfatfs/exfatfs_conv.c src/sys/fs/exfatfs/exfatfs_conv.h \
src/sys/fs/exfatfs/exfatfs_dirent.h src/sys/fs/exfatfs/exfatfs_extern.c \
src/sys/fs/exfatfs/exfatfs_extern.h src/sys/fs/exfatfs/exfatfs_inode.h \
src/sys/fs/exfatfs/exfatfs_mount.h src/sys/fs/exfatfs/exfatfs_rename.c \
src/sys/fs/exfatfs/exfatfs_rename.h src/sys/fs/exfatfs/exfatfs_tables.c \
src/sys/fs/exfatfs/exfatfs_tables.h src/sys/fs/exfatfs/exfatfs_trie.c \
src/sys/fs/exfatfs/exfatfs_trie.h src/sys/fs/exfatfs/exfatfs_trie_basic.c \
src/sys/fs/exfatfs/exfatfs_trie_basic.h \
src/sys/fs/exfatfs/exfatfs_vfsops.c src/sys/fs/exfatfs/exfatfs_vfsops.h \
src/sys/fs/exfatfs/exfatfs_vnops.c src/sys/fs/exfatfs/exfatfs_vnops.h

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

Modified files:

Index: src/sys/fs/exfatfs/exfatfs.h
diff -u src/sys/fs/exfatfs/exfatfs.h:1.1.2.1 src/sys/fs/exfatfs/exfatfs.h:1.1.2.2
--- src/sys/fs/exfatfs/exfatfs.h:1.1.2.1	Sat Jun 29 19:43:26 2024
+++ src/sys/fs/exfatfs/exfatfs.h	Mon Jul  1 22:15:21 2024
@@ -1,4 +1,31 @@
-/* $NetBSD: exfatfs.h,v 1.1.2.1 2024/06/29 19:43:26 perseant Exp $ */
+/* $NetBSD: exfatfs.h,v 1.1.2.2 2024/07/01 22:15:21 perseant Exp $ */
+
+/*-
+ * Copyright (c) 2022, 2024 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #ifndef FS_EXFATFS_EXFATFS_H_
 #define FS_EXFATFS_EXFATFS_H_
 
@@ -63,7 +90,8 @@ struct exfatfs {
 #define xf_FatLength xf_exfatdfs.xdf_FatLength
 #define xf_ClusterHeapOffset xf_exfatdfs.xdf_ClusterHeapOffset
 #define xf_ClusterCount xf_exfatdfs.xdf_ClusterCount
-#define xf_FirstClusterOfRootDirectory xf_exfatdfs.xdf_FirstClusterOfRootDirectory
+#define xf_FirstClusterOfRootDirectory \
+		xf_exfatdfs.xdf_FirstClusterOfRootDirectory
 #define xf_VolumeSerialNumber xf_exfatdfs.xdf_VolumeSerialNumber
 #define xf_FileSystemRevision xf_exfatdfs.xdf_FileSystemRevision
 #define EXFATFS_MAJOR(fs) (((fs)->xf_FileSystemRevision & 0xFF00) >> 8)
@@ -108,7 +136,8 @@ struct exfatfs {
  * DEV_BSIZE is 512 bytes and cluster numbers are 4 bytes,
  * so there are 128 = 2**7 entries per DEV_BSIZE.
  */
-#define EXFATFS_FATBLK(fs, clust) (((fs)->xf_FatOffset >> ((fs)->xf_BytesPerSectorShift - DEV_BSHIFT)) + ((clust) >> 7))
+#define EXFATFS_FATBLK(fs, clust) (((fs)->xf_FatOffset >> 		\
+	((fs)->xf_BytesPerSectorShift - DEV_BSHIFT)) + ((clust) >> 7))
 #define EXFATFS_FATOFF(clust) ((clust) & 0x7F)
 
 #if 0
@@ -144,18 +173,26 @@ struct exfatfs_args {
 #define EXFATFS_DIRENT2BYTES(fs, e) ((e) << EXFATFS_DIRENT_BASESHIFT)
 
 /* Convert from sizeof(dirent) to cluster */
-#define EXFATFS_DIRENT_SHIFT(fs) ((fs)->xf_BytesPerSectorShift + (fs)->xf_SectorsPerClusterShift - EXFATFS_DIRENT_BASESHIFT)
+#define EXFATFS_DIRENT_SHIFT(fs) ((fs)->xf_BytesPerSectorShift + \
+	(fs)->xf_SectorsPerCluste

CVS commit: src/sys/ufs/ext2fs

2024-07-01 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jul  1 22:12:57 UTC 2024

Modified Files:
src/sys/ufs/ext2fs: ext2fs_vfsops.c

Log Message:
ext2fs: Fix indexing of group descriptors on disk.

XXX Evidently we need some more automatic tests for this!

PR kern/58388


To generate a diff of this commit:
cvs rdiff -u -r1.225 -r1.226 src/sys/ufs/ext2fs/ext2fs_vfsops.c

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



CVS commit: src/sys/ufs/ext2fs

2024-07-01 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jul  1 22:12:57 UTC 2024

Modified Files:
src/sys/ufs/ext2fs: ext2fs_vfsops.c

Log Message:
ext2fs: Fix indexing of group descriptors on disk.

XXX Evidently we need some more automatic tests for this!

PR kern/58388


To generate a diff of this commit:
cvs rdiff -u -r1.225 -r1.226 src/sys/ufs/ext2fs/ext2fs_vfsops.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/ufs/ext2fs/ext2fs_vfsops.c
diff -u src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.225 src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.226
--- src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.225	Sun Aug 27 16:35:51 2023
+++ src/sys/ufs/ext2fs/ext2fs_vfsops.c	Mon Jul  1 22:12:56 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: ext2fs_vfsops.c,v 1.225 2023/08/27 16:35:51 christos Exp $	*/
+/*	$NetBSD: ext2fs_vfsops.c,v 1.226 2024/07/01 22:12:56 riastradh Exp $	*/
 
 /*
  * Copyright (c) 1989, 1991, 1993, 1994
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.225 2023/08/27 16:35:51 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.226 2024/07/01 22:12:56 riastradh Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -653,7 +653,8 @@ ext2fs_reload(struct mount *mp, kauth_cr
 			return error;
 		}
 		e2fs_cgload(bp->b_data,
-		&fs->e2fs_gd[i * fs->e2fs_bsize / sizeof(struct ext2_gd)],
+		&fs->e2fs_gd[i *
+			(fs->e2fs_bsize >> fs->e2fs_group_desc_shift)],
 		fs->e2fs_bsize, fs->e2fs_group_desc_shift);
 		brelse(bp, 0);
 	}
@@ -770,8 +771,8 @@ ext2fs_mountfs(struct vnode *devvp, stru
 		m_fs->e2fs_bsize, 0, &bp);
 		if (error)
 			goto out1;
-		e2fs_cgload(bp->b_data, &m_fs->e2fs_gd[i * m_fs->e2fs_bsize
-		/ sizeof(struct ext2_gd)],
+		e2fs_cgload(bp->b_data, &m_fs->e2fs_gd[i *
+			(m_fs->e2fs_bsize >> m_fs->e2fs_group_desc_shift)],
 		m_fs->e2fs_bsize, m_fs->e2fs_group_desc_shift);
 		brelse(bp, 0);
 		bp = NULL;
@@ -1334,8 +1335,8 @@ ext2fs_cgupdate(struct ufsmount *mp, int
 		bp = getblk(mp->um_devvp, EXT2_FSBTODB(fs,
 		fs->e2fs.e2fs_first_dblock +
 		1 /* superblock */ + i), fs->e2fs_bsize, 0, 0);
-		e2fs_cgsave(&fs->e2fs_gd[
-		i * fs->e2fs_bsize / sizeof(struct ext2_gd)],
+		e2fs_cgsave(&fs->e2fs_gd[i *
+			(m_fs->e2fs_bsize >> m_fs->e2fs_group_desc_shift)],
 		bp->b_data, fs->e2fs_bsize, fs->e2fs_group_desc_shift);
 		if (waitfor == MNT_WAIT)
 			error = bwrite(bp);



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

2024-07-01 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Jul  1 21:24:05 UTC 2024

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

Log Message:
tests/make: add newly added test to file list


To generate a diff of this commit:
cvs rdiff -u -r1.1324 -r1.1325 src/distrib/sets/lists/tests/mi

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



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

2024-07-01 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Jul  1 21:24:05 UTC 2024

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

Log Message:
tests/make: add newly added test to file list


To generate a diff of this commit:
cvs rdiff -u -r1.1324 -r1.1325 src/distrib/sets/lists/tests/mi

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.1324 src/distrib/sets/lists/tests/mi:1.1325
--- src/distrib/sets/lists/tests/mi:1.1324	Sun Jun 16 18:40:58 2024
+++ src/distrib/sets/lists/tests/mi	Mon Jul  1 21:24:05 2024
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1324 2024/06/16 18:40:58 rillig Exp $
+# $NetBSD: mi,v 1.1325 2024/07/01 21:24:05 rillig Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -6291,6 +6291,8 @@
 ./usr/tests/usr.bin/make/unit-tests/varmod-to-one-word.mk			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/varmod-to-separator.exp			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/varmod-to-separator.mk			tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/varmod-to-title.exptests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/varmod-to-title.mktests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/varmod-to-upper.exptests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/varmod-to-upper.mktests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/varmod-undefined.exp			tests-usr.bin-tests	compattestfile,atf



CVS commit: src/usr.bin/make

2024-07-01 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Mon Jul  1 21:02:26 UTC 2024

Modified Files:
src/usr.bin/make: make.1 var.c
src/usr.bin/make/unit-tests: Makefile
Added Files:
src/usr.bin/make/unit-tests: varmod-to-title.exp varmod-to-title.mk

Log Message:
make: add :tc to capitalize first letter of each word

This is very hard to do without :tc

Reviewed by: rillig


To generate a diff of this commit:
cvs rdiff -u -r1.377 -r1.378 src/usr.bin/make/make.1
cvs rdiff -u -r1.1125 -r1.1126 src/usr.bin/make/var.c
cvs rdiff -u -r1.347 -r1.348 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r0 -r1.1 src/usr.bin/make/unit-tests/varmod-to-title.exp \
src/usr.bin/make/unit-tests/varmod-to-title.mk

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

Modified files:

Index: src/usr.bin/make/make.1
diff -u src/usr.bin/make/make.1:1.377 src/usr.bin/make/make.1:1.378
--- src/usr.bin/make/make.1:1.377	Sat Jun  1 06:26:36 2024
+++ src/usr.bin/make/make.1	Mon Jul  1 21:02:26 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: make.1,v 1.377 2024/06/01 06:26:36 sjg Exp $
+.\"	$NetBSD: make.1,v 1.378 2024/07/01 21:02:26 sjg Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	from: @(#)make.1	8.4 (Berkeley) 3/19/94
 .\"
-.Dd June 1, 2024
+.Dd July 1, 2024
 .Dt MAKE 1
 .Os
 .Sh NAME
@@ -1574,6 +1574,9 @@ If
 .Ar c
 is omitted, no separator is used.
 The common escapes (including octal numeric codes) work as expected.
+.It Cm \&:tt
+Converts the first character of each word to upper-case,
+and the rest to lower-case letters.
 .It Cm \&:tu
 Converts the value to upper-case letters.
 .It Cm \&:tW

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.1125 src/usr.bin/make/var.c:1.1126
--- src/usr.bin/make/var.c:1.1125	Sun Jun 30 15:21:23 2024
+++ src/usr.bin/make/var.c	Mon Jul  1 21:02:26 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.1125 2024/06/30 15:21:23 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.1126 2024/07/01 21:02:26 sjg Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -132,7 +132,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.1125 2024/06/30 15:21:23 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.1126 2024/07/01 21:02:26 sjg Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -3142,6 +3142,21 @@ ok:
 }
 
 static char *
+str_totitle(const char *str)
+{
+	size_t i, n = strlen(str) + 1;
+	char *res = bmake_malloc(n);
+	for (i = 0; i < n; i++) {
+		if (i == 0 || ch_isspace(res[i - 1]))
+			res[i] = ch_toupper(str[i]);
+		else
+			res[i] = ch_tolower(str[i]);
+	}
+	return res;
+}
+
+
+static char *
 str_toupper(const char *str)
 {
 	size_t i, n = strlen(str) + 1;
@@ -3188,6 +3203,13 @@ ApplyModifier_To(const char **pp, ModCha
 		return AMR_OK;
 	}
 
+	if (mod[1] == 't') {/* :tt */
+		*pp = mod + 2;
+		if (Expr_ShouldEval(expr))
+			Expr_SetValueOwn(expr, str_totitle(Expr_Str(expr)));
+		return AMR_OK;
+	}
+	
 	if (mod[1] == 'u') {/* :tu */
 		*pp = mod + 2;
 		if (Expr_ShouldEval(expr))

Index: src/usr.bin/make/unit-tests/Makefile
diff -u src/usr.bin/make/unit-tests/Makefile:1.347 src/usr.bin/make/unit-tests/Makefile:1.348
--- src/usr.bin/make/unit-tests/Makefile:1.347	Sat Jun  1 15:54:40 2024
+++ src/usr.bin/make/unit-tests/Makefile	Mon Jul  1 21:02:26 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.347 2024/06/01 15:54:40 sjg Exp $
+# $NetBSD: Makefile,v 1.348 2024/07/01 21:02:26 sjg Exp $
 #
 # Unit tests for make(1)
 #
@@ -397,6 +397,7 @@ TESTS+=		varmod-to-lower
 TESTS+=		varmod-to-many-words
 TESTS+=		varmod-to-one-word
 TESTS+=		varmod-to-separator
+TESTS+=		varmod-to-title
 TESTS+=		varmod-to-upper
 TESTS+=		varmod-undefined
 TESTS+=		varmod-unique

Added files:

Index: src/usr.bin/make/unit-tests/varmod-to-title.exp
diff -u /dev/null src/usr.bin/make/unit-tests/varmod-to-title.exp:1.1
--- /dev/null	Mon Jul  1 21:02:26 2024
+++ src/usr.bin/make/unit-tests/varmod-to-title.exp	Mon Jul  1 21:02:26 2024
@@ -0,0 +1 @@
+exit status 0
Index: src/usr.bin/make/unit-tests/varmod-to-title.mk
diff -u /dev/null src/usr.bin/make/unit-tests/varmod-to-title.mk:1.1
--- /dev/null	Mon Jul  1 21:02:26 2024
+++ src/usr.bin/make/unit-tests/varmod-to-title.mk	Mon Jul  1 21:02:26 2024
@@ -0,0 +1,31 @@
+# $NetBSD: varmod-to-title.mk,v 1.1 2024/07/01 21:02:26 sjg Exp $
+#
+# Tests for the :tc variable modifier, which converts the expression value
+# to lowercase.
+#
+# TODO: What about non-ASCII characters? ISO-8859-1, UTF-8?
+
+.if ${:UUPPER:tt} != "Upper"
+.  error
+.endif
+
+.if ${:Ulower:tt} != "Lower"
+.  error
+.endif
+
+.if ${:UMixeD case.:tt} != "Mixed Case."
+.  error
+.endif
+
+# The ':tt' modifier works on the whole string, without splitting it into
+# words.
+.if ${:Umultiple   spaces:tt} != "Multiple   Spaces"
+.  error
+.endif
+
+# Note words only 

CVS commit: src/usr.bin/make

2024-07-01 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Mon Jul  1 21:02:26 UTC 2024

Modified Files:
src/usr.bin/make: make.1 var.c
src/usr.bin/make/unit-tests: Makefile
Added Files:
src/usr.bin/make/unit-tests: varmod-to-title.exp varmod-to-title.mk

Log Message:
make: add :tc to capitalize first letter of each word

This is very hard to do without :tc

Reviewed by: rillig


To generate a diff of this commit:
cvs rdiff -u -r1.377 -r1.378 src/usr.bin/make/make.1
cvs rdiff -u -r1.1125 -r1.1126 src/usr.bin/make/var.c
cvs rdiff -u -r1.347 -r1.348 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r0 -r1.1 src/usr.bin/make/unit-tests/varmod-to-title.exp \
src/usr.bin/make/unit-tests/varmod-to-title.mk

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-07-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jul  1 20:05:04 UTC 2024

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

Log Message:
Ticket #1854


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/doc/CHANGES-9.5

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-07-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jul  1 20:05:04 UTC 2024

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

Log Message:
Ticket #1854


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/doc/CHANGES-9.5

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.5
diff -u src/doc/CHANGES-9.5:1.1.2.7 src/doc/CHANGES-9.5:1.1.2.8
--- src/doc/CHANGES-9.5:1.1.2.7	Wed Jun 26 17:13:55 2024
+++ src/doc/CHANGES-9.5	Mon Jul  1 20:05:04 2024
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.5,v 1.1.2.7 2024/06/26 17:13:55 martin Exp $
+# $NetBSD: CHANGES-9.5,v 1.1.2.8 2024/07/01 20:05:04 martin Exp $
 
 A complete list of changes from the NetBSD 9.4 release to the NetBSD 9.5
 release:
@@ -95,3 +95,10 @@ usr.sbin/btpand/btpand.c			1.9
 	btpand(8): fix off-by-one bug causing out of bounds memory access.
 	[plunky, ticket #1851]
 
+crypto/external/bsd/openssh/dist/log.c		1.29
+crypto/external/bsd/openssh/dist/version.h	(patch)
+
+	sshd(8): PR 58386:  avoid strnvis and syslog_r in signal handler
+	context. Fixes CVE-2024-6387.
+	[riastradh, ticket #1854]
+



CVS commit: [netbsd-9] src/crypto/external/bsd/openssh/dist

2024-07-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jul  1 20:03:34 UTC 2024

Modified Files:
src/crypto/external/bsd/openssh/dist [netbsd-9]: log.c version.h

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

crypto/external/bsd/openssh/dist/log.c: revision 1.29
crypto/external/bsd/openssh/dist/version.h  (patch)

sshd(8): Avoid strnvis and syslog_r in signal handler context.
CVE-2024-6387

PR security/58386


To generate a diff of this commit:
cvs rdiff -u -r1.20.2.1 -r1.20.2.2 src/crypto/external/bsd/openssh/dist/log.c
cvs rdiff -u -r1.28.2.2 -r1.28.2.3 \
src/crypto/external/bsd/openssh/dist/version.h

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

Modified files:

Index: src/crypto/external/bsd/openssh/dist/log.c
diff -u src/crypto/external/bsd/openssh/dist/log.c:1.20.2.1 src/crypto/external/bsd/openssh/dist/log.c:1.20.2.2
--- src/crypto/external/bsd/openssh/dist/log.c:1.20.2.1	Mon Dec 25 12:31:05 2023
+++ src/crypto/external/bsd/openssh/dist/log.c	Mon Jul  1 20:03:34 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: log.c,v 1.20.2.1 2023/12/25 12:31:05 martin Exp $	*/
+/*	$NetBSD: log.c,v 1.20.2.2 2024/07/01 20:03:34 martin Exp $	*/
 /* $OpenBSD: log.c,v 1.61 2023/12/06 21:06:48 djm Exp $ */
 
 /*
@@ -37,7 +37,7 @@
  */
 
 #include "includes.h"
-__RCSID("$NetBSD: log.c,v 1.20.2.1 2023/12/25 12:31:05 martin Exp $");
+__RCSID("$NetBSD: log.c,v 1.20.2.2 2024/07/01 20:03:34 martin Exp $");
 #include 
 #include 
 
@@ -430,12 +430,14 @@ void
 sshsigdie(const char *file, const char *func, int line, int showfunc,
 LogLevel level, const char *suffix, const char *fmt, ...)
 {
+#ifdef SYSLOG_R_SAFE_IN_SIGHAND
 	va_list args;
 
 	va_start(args, fmt);
 	sshlogv(file, func, line, showfunc, SYSLOG_LEVEL_FATAL,
 	suffix, fmt, args);
 	va_end(args);
+#endif
 	_exit(1);
 }
 

Index: src/crypto/external/bsd/openssh/dist/version.h
diff -u src/crypto/external/bsd/openssh/dist/version.h:1.28.2.2 src/crypto/external/bsd/openssh/dist/version.h:1.28.2.3
--- src/crypto/external/bsd/openssh/dist/version.h:1.28.2.2	Mon Dec 25 12:31:10 2023
+++ src/crypto/external/bsd/openssh/dist/version.h	Mon Jul  1 20:03:34 2024
@@ -1,8 +1,8 @@
-/*	$NetBSD: version.h,v 1.28.2.2 2023/12/25 12:31:10 martin Exp $	*/
+/*	$NetBSD: version.h,v 1.28.2.3 2024/07/01 20:03:34 martin Exp $	*/
 /* $OpenBSD: version.h,v 1.100 2023/12/18 14:48:44 djm Exp $ */
 
 #define __OPENSSH_VERSION	"OpenSSH_9.6"
-#define __NETBSDSSH_VERSION	"NetBSD_Secure_Shell-20231220"
+#define __NETBSDSSH_VERSION	"NetBSD_Secure_Shell-20240701"
 #define SSH_HPN "-hpn13v14"
 #define SSH_LPK		"-lpk"
 /*



CVS commit: [netbsd-9] src/crypto/external/bsd/openssh/dist

2024-07-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jul  1 20:03:34 UTC 2024

Modified Files:
src/crypto/external/bsd/openssh/dist [netbsd-9]: log.c version.h

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

crypto/external/bsd/openssh/dist/log.c: revision 1.29
crypto/external/bsd/openssh/dist/version.h  (patch)

sshd(8): Avoid strnvis and syslog_r in signal handler context.
CVE-2024-6387

PR security/58386


To generate a diff of this commit:
cvs rdiff -u -r1.20.2.1 -r1.20.2.2 src/crypto/external/bsd/openssh/dist/log.c
cvs rdiff -u -r1.28.2.2 -r1.28.2.3 \
src/crypto/external/bsd/openssh/dist/version.h

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-07-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jul  1 19:58:15 UTC 2024

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

Log Message:
Ticket #737


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.15 -r1.1.2.16 src/doc/CHANGES-10.1

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.1
diff -u src/doc/CHANGES-10.1:1.1.2.15 src/doc/CHANGES-10.1:1.1.2.16
--- src/doc/CHANGES-10.1:1.1.2.15	Thu Jun 27 19:34:10 2024
+++ src/doc/CHANGES-10.1	Mon Jul  1 19:58:14 2024
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-10.1,v 1.1.2.15 2024/06/27 19:34:10 martin Exp $
+# $NetBSD: CHANGES-10.1,v 1.1.2.16 2024/07/01 19:58:14 martin Exp $
 
 A complete list of changes from the NetBSD 10.0 release on 2024-03-28
 until the 10.1 release:
@@ -603,3 +603,10 @@ sys/dev/pci/igc/if_igc.h			1.3
 	to detect atomic_loadstore(9) is applicable to 64-bit integers.
 	[rin, ticket #729]
 
+crypto/external/bsd/openssh/dist/log.c		1.29
+crypto/external/bsd/openssh/dist/version.h	(patch)
+
+	sshd(8): PR 58386:  avoid strnvis and syslog_r in signal handler
+	context. Fixes CVE-2024-6387.
+	[riastradh, ticket #737]
+



CVS commit: [netbsd-10] src/doc

2024-07-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jul  1 19:58:15 UTC 2024

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

Log Message:
Ticket #737


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.15 -r1.1.2.16 src/doc/CHANGES-10.1

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



CVS commit: [netbsd-10] src/crypto/external/bsd/openssh/dist

2024-07-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jul  1 19:55:47 UTC 2024

Modified Files:
src/crypto/external/bsd/openssh/dist [netbsd-10]: log.c version.h

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

crypto/external/bsd/openssh/dist/log.c: revision 1.29
crypto/external/bsd/openssh/dist/version.h  (patch)

sshd(8): Avoid strnvis and syslog_r in signal handler context.
CVE-2024-6387

PR security/58386


To generate a diff of this commit:
cvs rdiff -u -r1.26.2.1 -r1.26.2.2 src/crypto/external/bsd/openssh/dist/log.c
cvs rdiff -u -r1.41.2.3 -r1.41.2.4 \
src/crypto/external/bsd/openssh/dist/version.h

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

Modified files:

Index: src/crypto/external/bsd/openssh/dist/log.c
diff -u src/crypto/external/bsd/openssh/dist/log.c:1.26.2.1 src/crypto/external/bsd/openssh/dist/log.c:1.26.2.2
--- src/crypto/external/bsd/openssh/dist/log.c:1.26.2.1	Mon Dec 25 12:22:55 2023
+++ src/crypto/external/bsd/openssh/dist/log.c	Mon Jul  1 19:55:46 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: log.c,v 1.26.2.1 2023/12/25 12:22:55 martin Exp $	*/
+/*	$NetBSD: log.c,v 1.26.2.2 2024/07/01 19:55:46 martin Exp $	*/
 /* $OpenBSD: log.c,v 1.61 2023/12/06 21:06:48 djm Exp $ */
 
 /*
@@ -37,7 +37,7 @@
  */
 
 #include "includes.h"
-__RCSID("$NetBSD: log.c,v 1.26.2.1 2023/12/25 12:22:55 martin Exp $");
+__RCSID("$NetBSD: log.c,v 1.26.2.2 2024/07/01 19:55:46 martin Exp $");
 #include 
 #include 
 
@@ -430,12 +430,14 @@ void
 sshsigdie(const char *file, const char *func, int line, int showfunc,
 LogLevel level, const char *suffix, const char *fmt, ...)
 {
+#ifdef SYSLOG_R_SAFE_IN_SIGHAND
 	va_list args;
 
 	va_start(args, fmt);
 	sshlogv(file, func, line, showfunc, SYSLOG_LEVEL_FATAL,
 	suffix, fmt, args);
 	va_end(args);
+#endif
 	_exit(1);
 }
 

Index: src/crypto/external/bsd/openssh/dist/version.h
diff -u src/crypto/external/bsd/openssh/dist/version.h:1.41.2.3 src/crypto/external/bsd/openssh/dist/version.h:1.41.2.4
--- src/crypto/external/bsd/openssh/dist/version.h:1.41.2.3	Mon Dec 25 12:22:56 2023
+++ src/crypto/external/bsd/openssh/dist/version.h	Mon Jul  1 19:55:46 2024
@@ -1,8 +1,8 @@
-/*	$NetBSD: version.h,v 1.41.2.3 2023/12/25 12:22:56 martin Exp $	*/
+/*	$NetBSD: version.h,v 1.41.2.4 2024/07/01 19:55:46 martin Exp $	*/
 /* $OpenBSD: version.h,v 1.100 2023/12/18 14:48:44 djm Exp $ */
 
 #define __OPENSSH_VERSION	"OpenSSH_9.6"
-#define __NETBSDSSH_VERSION	"NetBSD_Secure_Shell-20231220"
+#define __NETBSDSSH_VERSION	"NetBSD_Secure_Shell-20240701"
 #define SSH_HPN "-hpn13v14"
 #define SSH_LPK		"-lpk"
 /*



CVS commit: [netbsd-10] src/crypto/external/bsd/openssh/dist

2024-07-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jul  1 19:55:47 UTC 2024

Modified Files:
src/crypto/external/bsd/openssh/dist [netbsd-10]: log.c version.h

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

crypto/external/bsd/openssh/dist/log.c: revision 1.29
crypto/external/bsd/openssh/dist/version.h  (patch)

sshd(8): Avoid strnvis and syslog_r in signal handler context.
CVE-2024-6387

PR security/58386


To generate a diff of this commit:
cvs rdiff -u -r1.26.2.1 -r1.26.2.2 src/crypto/external/bsd/openssh/dist/log.c
cvs rdiff -u -r1.41.2.3 -r1.41.2.4 \
src/crypto/external/bsd/openssh/dist/version.h

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



CVS commit: src/sys/arch/x86

2024-07-01 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Mon Jul  1 19:40:03 UTC 2024

Modified Files:
src/sys/arch/x86/include: specialreg.h
src/sys/arch/x86/x86: identcpu.c

Log Message:
Disable the VIA Alternate Instructions according the VIA documentation:
* C7 and above do not support ALTINST, do not check or attempt to disable them.
* For VIA C3 Nehemiah check extended feature flags for support and status,
do no attempt to disable when AIS is not supported or enabled.
* For pre-Nehemiah models explicitly disable, if they are in the range
of documented models, flags aren't present to check the status on these models.
Note: for pre-Nehemiah may be other functional side effects depdending
on the version and stepping.

Explicit disabling of ALTINST was introduced with rev. 1.84 following
the discovery of some VIA CPUs having these instructions enabled by default
leading to the potential backdoor (aka rosenbrindge).

Unfortunately, implementation used a wrong check (ACE supported flag),
which can be true for the later models, still supporting padlock features.
Setting ALTINST bit on those may have unexpected side effects like VIA C7 CPUID
instruction for temperature sensor not reporting correct value or
`cpuctl identify' not reporting certain CPU features. Similar side effects
can be observed even for Nehemiah models not supporting AIS instructions. This
change should limit possibility of such issues to only the pre-Nehemiah models,
not covered at all in the previous implementation.

Feature Control Register (FCR) macros were unified under one group and
consistent naming while implementing the change. Few comments updated as well.

patch reviewed by Riastradh@ (thank you)

need pullups to netbsd-9, 10.

PR kern/58370


To generate a diff of this commit:
cvs rdiff -u -r1.211 -r1.212 src/sys/arch/x86/include/specialreg.h
cvs rdiff -u -r1.129 -r1.130 src/sys/arch/x86/x86/identcpu.c

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

Modified files:

Index: src/sys/arch/x86/include/specialreg.h
diff -u src/sys/arch/x86/include/specialreg.h:1.211 src/sys/arch/x86/include/specialreg.h:1.212
--- src/sys/arch/x86/include/specialreg.h:1.211	Sun May 12 23:41:10 2024
+++ src/sys/arch/x86/include/specialreg.h	Mon Jul  1 19:40:03 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: specialreg.h,v 1.211 2024/05/12 23:41:10 msaitoh Exp $	*/
+/*	$NetBSD: specialreg.h,v 1.212 2024/07/01 19:40:03 andvar Exp $	*/
 
 /*
  * Copyright (c) 2014-2020 The NetBSD Foundation, Inc.
@@ -1099,8 +1099,12 @@
 
 /*
  * Centaur Extended Feature flags.
- * CPUID FnC000_0001
+ * CPUID FnC000_0001 (VIA "Nehemiah" or later)
  */
+#define CPUID_VIA_HAS_AIS	__BIT(0)	/* Alternate Instruction Set supported */
+		/* (VIA "Nehemiah" only) */
+#define CPUID_VIA_DO_AIS	__BIT(1)	/* Alternate Instruction Set enabled */
+		/* (VIA "Nehemiah" only) */
 #define CPUID_VIA_HAS_RNG	__BIT(2)	/* Random number generator */
 #define CPUID_VIA_DO_RNG	__BIT(3)
 #define CPUID_VIA_HAS_ACE	__BIT(6)	/* AES Encryption */
@@ -1288,7 +1292,7 @@
 #define  MSR_X2APIC_SELF_IPI		0x03f	/* SELF IPI (W) */
 
 /*
- * VIA "Nehemiah" MSRs
+ * VIA "Nehemiah" or later MSRs
  */
 #define MSR_VIA_RNG		0x110b
 #define MSR_VIA_RNG_ENABLE	0x0040
@@ -1296,15 +1300,10 @@
 #define MSR_VIA_RNG_NOISE_A	0x
 #define MSR_VIA_RNG_NOISE_B	0x0100
 #define MSR_VIA_RNG_2NOISE	0x0300
-#define MSR_VIA_ACE		0x1107
-#define 	VIA_ACE_ALTINST	0x0001
-#define 	VIA_ACE_ECX8	0x0002
-#define 	VIA_ACE_ENABLE	0x1000
-
-/*
- * VIA "Eden" MSRs
- */
-#define MSR_VIA_FCR		MSR_VIA_ACE
+#define MSR_VIA_FCR		0x1107	/* Feature Control Register */
+#define 	VIA_FCR_ACE_ENABLE	0x1000	/* Enable PadLock (ex. RNG) */
+#define 	VIA_FCR_CX8_REPORT	0x0002	/* Enable CX8 CPUID reporting */
+#define 	VIA_FCR_ALTINST_ENABLE	0x0001	/* Enable ALTINST (C3 only) */
 
 /*
  * AMD K6/K7 MSRs.

Index: src/sys/arch/x86/x86/identcpu.c
diff -u src/sys/arch/x86/x86/identcpu.c:1.129 src/sys/arch/x86/x86/identcpu.c:1.130
--- src/sys/arch/x86/x86/identcpu.c:1.129	Sun Jun 30 15:49:56 2024
+++ src/sys/arch/x86/x86/identcpu.c	Mon Jul  1 19:40:03 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: identcpu.c,v 1.129 2024/06/30 15:49:56 andvar Exp $	*/
+/*	$NetBSD: identcpu.c,v 1.130 2024/07/01 19:40:03 andvar Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.129 2024/06/30 15:49:56 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.130 2024/07/01 19:40:03 andvar Exp $");
 
 #include "opt_xen.h"
 
@@ -495,11 +495,45 @@ cpu_probe_c3(struct cpu_info *ci)
 		 *bit in the FCR MSR.
 		 */
 		ci->ci_feat_val[0] |= CPUID_CX8;
-		wrmsr(MSR_VIA_FCR, rdmsr(MSR_VIA_FCR) | VIA_ACE_ECX8);
+		wrmsr(MSR_VIA_FCR, rdmsr(MSR_VIA_FCR) | VIA_FCR_CX8_REPORT);
+
+		/*
+		 * For reference on VIA Alternate Instructions, see the VIA

CVS commit: src/sys/arch/x86

2024-07-01 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Mon Jul  1 19:40:03 UTC 2024

Modified Files:
src/sys/arch/x86/include: specialreg.h
src/sys/arch/x86/x86: identcpu.c

Log Message:
Disable the VIA Alternate Instructions according the VIA documentation:
* C7 and above do not support ALTINST, do not check or attempt to disable them.
* For VIA C3 Nehemiah check extended feature flags for support and status,
do no attempt to disable when AIS is not supported or enabled.
* For pre-Nehemiah models explicitly disable, if they are in the range
of documented models, flags aren't present to check the status on these models.
Note: for pre-Nehemiah may be other functional side effects depdending
on the version and stepping.

Explicit disabling of ALTINST was introduced with rev. 1.84 following
the discovery of some VIA CPUs having these instructions enabled by default
leading to the potential backdoor (aka rosenbrindge).

Unfortunately, implementation used a wrong check (ACE supported flag),
which can be true for the later models, still supporting padlock features.
Setting ALTINST bit on those may have unexpected side effects like VIA C7 CPUID
instruction for temperature sensor not reporting correct value or
`cpuctl identify' not reporting certain CPU features. Similar side effects
can be observed even for Nehemiah models not supporting AIS instructions. This
change should limit possibility of such issues to only the pre-Nehemiah models,
not covered at all in the previous implementation.

Feature Control Register (FCR) macros were unified under one group and
consistent naming while implementing the change. Few comments updated as well.

patch reviewed by Riastradh@ (thank you)

need pullups to netbsd-9, 10.

PR kern/58370


To generate a diff of this commit:
cvs rdiff -u -r1.211 -r1.212 src/sys/arch/x86/include/specialreg.h
cvs rdiff -u -r1.129 -r1.130 src/sys/arch/x86/x86/identcpu.c

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



CVS commit: src/crypto/external/bsd/openssh/dist

2024-07-01 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jul  1 17:47:24 UTC 2024

Modified Files:
src/crypto/external/bsd/openssh/dist: version.h

Log Message:
openssh: Bump __NETBSDSSH_VERSION.

PR security/58386


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/crypto/external/bsd/openssh/dist/version.h

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

Modified files:

Index: src/crypto/external/bsd/openssh/dist/version.h
diff -u src/crypto/external/bsd/openssh/dist/version.h:1.45 src/crypto/external/bsd/openssh/dist/version.h:1.46
--- src/crypto/external/bsd/openssh/dist/version.h:1.45	Tue Jun 25 16:36:54 2024
+++ src/crypto/external/bsd/openssh/dist/version.h	Mon Jul  1 17:47:24 2024
@@ -1,8 +1,8 @@
-/*	$NetBSD: version.h,v 1.45 2024/06/25 16:36:54 christos Exp $	*/
+/*	$NetBSD: version.h,v 1.46 2024/07/01 17:47:24 riastradh Exp $	*/
 /* $OpenBSD: version.h,v 1.101 2024/03/11 04:59:47 djm Exp $ */
 
 #define __OPENSSH_VERSION	"OpenSSH_9.7"
-#define __NETBSDSSH_VERSION	"NetBSD_Secure_Shell-20240625"
+#define __NETBSDSSH_VERSION	"NetBSD_Secure_Shell-20240701"
 #define SSH_HPN "-hpn13v14"
 #define SSH_LPK		"-lpk"
 /*



CVS commit: src/crypto/external/bsd/openssh/dist

2024-07-01 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jul  1 17:47:24 UTC 2024

Modified Files:
src/crypto/external/bsd/openssh/dist: version.h

Log Message:
openssh: Bump __NETBSDSSH_VERSION.

PR security/58386


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/crypto/external/bsd/openssh/dist/version.h

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



CVS commit: src/crypto/external/bsd/openssh/dist

2024-07-01 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jul  1 15:42:42 UTC 2024

Modified Files:
src/crypto/external/bsd/openssh/dist: log.c

Log Message:
sshd(8): Avoid strnvis and syslog_r in signal handler context.

CVE-2024-6387

PR security/58386


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/crypto/external/bsd/openssh/dist/log.c

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



CVS commit: src/crypto/external/bsd/openssh/dist

2024-07-01 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jul  1 15:42:42 UTC 2024

Modified Files:
src/crypto/external/bsd/openssh/dist: log.c

Log Message:
sshd(8): Avoid strnvis and syslog_r in signal handler context.

CVE-2024-6387

PR security/58386


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/crypto/external/bsd/openssh/dist/log.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/openssh/dist/log.c
diff -u src/crypto/external/bsd/openssh/dist/log.c:1.28 src/crypto/external/bsd/openssh/dist/log.c:1.29
--- src/crypto/external/bsd/openssh/dist/log.c:1.28	Sat Jun 29 18:03:32 2024
+++ src/crypto/external/bsd/openssh/dist/log.c	Mon Jul  1 15:42:42 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: log.c,v 1.28 2024/06/29 18:03:32 riastradh Exp $	*/
+/*	$NetBSD: log.c,v 1.29 2024/07/01 15:42:42 riastradh Exp $	*/
 /* $OpenBSD: log.c,v 1.61 2023/12/06 21:06:48 djm Exp $ */
 
 /*
@@ -37,7 +37,7 @@
  */
 
 #include "includes.h"
-__RCSID("$NetBSD: log.c,v 1.28 2024/06/29 18:03:32 riastradh Exp $");
+__RCSID("$NetBSD: log.c,v 1.29 2024/07/01 15:42:42 riastradh Exp $");
 #include 
 #include 
 
@@ -422,12 +422,14 @@ void
 sshsigdie(const char *file, const char *func, int line, int showfunc,
 LogLevel level, const char *suffix, const char *fmt, ...)
 {
+#ifdef SYSLOG_R_SAFE_IN_SIGHAND
 	va_list args;
 
 	va_start(args, fmt);
 	sshlogv(file, func, line, showfunc, SYSLOG_LEVEL_FATAL,
 	suffix, fmt, args);
 	va_end(args);
+#endif
 	_exit(1);
 }
 



CVS commit: src/sys/external/bsd/drm2/dist/drm/amd/amdgpu

2024-07-01 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jul  1 13:27:55 UTC 2024

Modified Files:
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu: amdgpu_gart.c

Log Message:
amdgpu: Map consecutive pages, not the same one over and over again.

PR kern/58385


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 \
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_gart.c

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

Modified files:

Index: src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_gart.c
diff -u src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_gart.c:1.11 src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_gart.c:1.12
--- src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_gart.c:1.11	Wed Mar  1 08:14:13 2023
+++ src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_gart.c	Mon Jul  1 13:27:55 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: amdgpu_gart.c,v 1.11 2023/03/01 08:14:13 riastradh Exp $	*/
+/*	$NetBSD: amdgpu_gart.c,v 1.12 2024/07/01 13:27:55 riastradh Exp $	*/
 
 /*
  * Copyright 2008 Advanced Micro Devices, Inc.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: amdgpu_gart.c,v 1.11 2023/03/01 08:14:13 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdgpu_gart.c,v 1.12 2024/07/01 13:27:55 riastradh Exp $");
 
 #include 
 #include 
@@ -440,7 +440,7 @@ int amdgpu_gart_map(struct amdgpu_device
 	t = gpu_start / AMDGPU_GPU_PAGE_SIZE;
 
 	for (i = 0; npages --> 0;) {
-		for (j = 0; j < AMDGPU_GPU_PAGES_IN_CPU_PAGE; j++) {
+		for (j = 0; j < AMDGPU_GPU_PAGES_IN_CPU_PAGE; j++, t++) {
 			KASSERT(i < dmamap->dm_nsegs);
 			KASSERT(seg_off < dmamap->dm_segs[i].ds_len);
 			amdgpu_gmc_set_pte_pde(adev, dst, t,



CVS commit: src/sys/external/bsd/drm2/dist/drm/amd/amdgpu

2024-07-01 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jul  1 13:27:55 UTC 2024

Modified Files:
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu: amdgpu_gart.c

Log Message:
amdgpu: Map consecutive pages, not the same one over and over again.

PR kern/58385


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 \
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_gart.c

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



CVS commit: src/sys/net

2024-07-01 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jul  1 13:13:37 UTC 2024

Modified Files:
src/sys/net: if_stats.h

Log Message:
if_stats(9): New dtrace probes on if_statinc/dec/add/sub_ref.

PR kern/58377


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/net/if_stats.h

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

Modified files:

Index: src/sys/net/if_stats.h
diff -u src/sys/net/if_stats.h:1.5 src/sys/net/if_stats.h:1.6
--- src/sys/net/if_stats.h:1.5	Sat Jun 29 12:11:12 2024
+++ src/sys/net/if_stats.h	Mon Jul  1 13:13:37 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_stats.h,v 1.5 2024/06/29 12:11:12 riastradh Exp $	*/
+/*	$NetBSD: if_stats.h,v 1.6 2024/07/01 13:13:37 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@ if_statinc(ifnet_t *ifp, if_stat_t x)
 static inline void
 if_statinc_ref(ifnet_t *ifp, net_stat_ref_t nsr, if_stat_t x)
 {
-	/* XXX sdt probe needs ifp */
+	SDT_PROBE3(sdt, net, interface, stat,  ifp, x, +1);
 	_NET_STATINC_REF(nsr, x);
 }
 
@@ -86,7 +86,7 @@ if_statdec(ifnet_t *ifp, if_stat_t x)
 static inline void
 if_statdec_ref(ifnet_t *ifp, net_stat_ref_t nsr, if_stat_t x)
 {
-	/* XXX sdt probe needs ifp */
+	SDT_PROBE3(sdt, net, interface, stat,  ifp, x, -1);
 	_NET_STATDEC_REF(nsr, x);
 }
 
@@ -100,7 +100,7 @@ if_statadd(ifnet_t *ifp, if_stat_t x, ui
 static inline void
 if_statadd_ref(ifnet_t *ifp, net_stat_ref_t nsr, if_stat_t x, uint64_t v)
 {
-	/* XXX sdt probe needs ifp */
+	SDT_PROBE3(sdt, net, interface, stat,  ifp, x, v);
 	_NET_STATADD_REF(nsr, x, v);
 }
 
@@ -125,7 +125,7 @@ if_statsub(ifnet_t *ifp, if_stat_t x, ui
 static inline void
 if_statsub_ref(ifnet_t *ifp, net_stat_ref_t nsr, if_stat_t x, uint64_t v)
 {
-	/* XXX sdt probe needs ifp */
+	SDT_PROBE3(sdt, net, interface, stat,  ifp, x, -v);
 	_NET_STATSUB_REF(nsr, x, v);
 }
 



CVS commit: src/sys/net

2024-07-01 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jul  1 13:13:37 UTC 2024

Modified Files:
src/sys/net: if_stats.h

Log Message:
if_stats(9): New dtrace probes on if_statinc/dec/add/sub_ref.

PR kern/58377


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/net/if_stats.h

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



CVS commit: src/sys/external/bsd/drm2/dist/drm/amd/amdgpu

2024-07-01 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jul  1 12:09:52 UTC 2024

Modified Files:
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu: amdgpu_device.c

Log Message:
amdgpu: Map BAR 2, not BAR 5, on pre-bonaire chips.

PR kern/58384


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 \
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_device.c

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



CVS commit: src/sys/external/bsd/drm2/dist/drm/amd/amdgpu

2024-07-01 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jul  1 12:09:52 UTC 2024

Modified Files:
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu: amdgpu_device.c

Log Message:
amdgpu: Map BAR 2, not BAR 5, on pre-bonaire chips.

PR kern/58384


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 \
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_device.c

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

Modified files:

Index: src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_device.c
diff -u src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_device.c:1.20 src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_device.c:1.21
--- src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_device.c:1.20	Sat Sep 30 10:46:45 2023
+++ src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_device.c	Mon Jul  1 12:09:52 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: amdgpu_device.c,v 1.20 2023/09/30 10:46:45 mrg Exp $	*/
+/*	$NetBSD: amdgpu_device.c,v 1.21 2024/07/01 12:09:52 riastradh Exp $	*/
 
 /*
  * Copyright 2008 Advanced Micro Devices, Inc.
@@ -28,7 +28,7 @@
  *  Jerome Glisse
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: amdgpu_device.c,v 1.20 2023/09/30 10:46:45 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdgpu_device.c,v 1.21 2024/07/01 12:09:52 riastradh Exp $");
 
 #include 
 #include 
@@ -3047,9 +3047,10 @@ int amdgpu_device_init(struct amdgpu_dev
 	}
 
 #ifdef __NetBSD__
-	if (pci_mapreg_map(&adev->pdev->pd_pa, PCI_BAR(5),
+	const int bar = (adev->asic_type >= CHIP_BONAIRE ? 5 : 2);
+	if (pci_mapreg_map(&adev->pdev->pd_pa, PCI_BAR(bar),
 		pci_mapreg_type(adev->pdev->pd_pa.pa_pc,
-		adev->pdev->pd_pa.pa_tag, PCI_BAR(5)),
+		adev->pdev->pd_pa.pa_tag, PCI_BAR(bar)),
 		0,
 		&adev->rmmiot, &adev->rmmioh,
 		&adev->rmmio_base, &adev->rmmio_size))



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

2024-07-01 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  1 10:35:36 UTC 2024

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

Log Message:
base/shl.mi: Correct typo to fix HAVE_GCC=10 build


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

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

Modified files:

Index: src/distrib/sets/lists/base/shl.mi
diff -u src/distrib/sets/lists/base/shl.mi:1.982 src/distrib/sets/lists/base/shl.mi:1.983
--- src/distrib/sets/lists/base/shl.mi:1.982	Mon Jul  1 04:03:04 2024
+++ src/distrib/sets/lists/base/shl.mi	Mon Jul  1 10:35:36 2024
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.982 2024/07/01 04:03:04 mrg Exp $
+# $NetBSD: shl.mi,v 1.983 2024/07/01 10:35:36 rin Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -210,7 +210,7 @@
 ./usr/lib/libarchive.so.5.1			base-sys-shlib
 ./usr/lib/libasan.sobase-sys-shlib		cxx,gcccmds
 ./usr/lib/libasan.so.5base-sys-shlib		cxx,gcccmds,gcc=10
-./usr/lib/libasan.so.5.0			base-sys-shlib		cxx,gccgcccmds,=10
+./usr/lib/libasan.so.5.0			base-sys-shlib		cxx,gcccmds,gcc=10
 ./usr/lib/libasan.so.6base-sys-shlib		cxx,gcccmds,gcc=12
 ./usr/lib/libasan.so.6.0			base-sys-shlib		cxx,gcccmds,gcc=12
 ./usr/lib/libasn1.sobase-krb5-shlib		kerberos



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

2024-07-01 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  1 10:35:36 UTC 2024

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

Log Message:
base/shl.mi: Correct typo to fix HAVE_GCC=10 build


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

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



CVS commit: src

2024-07-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jul  1 09:44:48 UTC 2024

Modified Files:
src: UPDATING

Log Message:
Fix date for binutils vs. binutils.old entry


To generate a diff of this commit:
cvs rdiff -u -r1.353 -r1.354 src/UPDATING

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

Modified files:

Index: src/UPDATING
diff -u src/UPDATING:1.353 src/UPDATING:1.354
--- src/UPDATING:1.353	Mon Jul  1 09:33:14 2024
+++ src/UPDATING	Mon Jul  1 09:44:48 2024
@@ -1,4 +1,4 @@
-$NetBSD: UPDATING,v 1.353 2024/07/01 09:33:14 martin Exp $
+$NetBSD: UPDATING,v 1.354 2024/07/01 09:44:48 martin Exp $
 
 This file (UPDATING) is intended to be a brief reference to recent
 changes that might cause problems in the build process, and a guide for
@@ -19,7 +19,7 @@ See also: BUILDING, build.sh, Makefile.
 Recent changes:
 ^^^
 
-20240628:
+20240630:
 	Update builds will require removing the tools objdir for binutils
 	(as most architectures should use binutils.old now).
 



CVS commit: src

2024-07-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jul  1 09:44:48 UTC 2024

Modified Files:
src: UPDATING

Log Message:
Fix date for binutils vs. binutils.old entry


To generate a diff of this commit:
cvs rdiff -u -r1.353 -r1.354 src/UPDATING

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



CVS commit: src

2024-07-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jul  1 09:33:14 UTC 2024

Modified Files:
src: UPDATING

Log Message:
Note update build lossage for binutils vs. binutils.old


To generate a diff of this commit:
cvs rdiff -u -r1.352 -r1.353 src/UPDATING

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

Modified files:

Index: src/UPDATING
diff -u src/UPDATING:1.352 src/UPDATING:1.353
--- src/UPDATING:1.352	Mon Jun 10 08:04:44 2024
+++ src/UPDATING	Mon Jul  1 09:33:14 2024
@@ -1,4 +1,4 @@
-$NetBSD: UPDATING,v 1.352 2024/06/10 08:04:44 kre Exp $
+$NetBSD: UPDATING,v 1.353 2024/07/01 09:33:14 martin Exp $
 
 This file (UPDATING) is intended to be a brief reference to recent
 changes that might cause problems in the build process, and a guide for
@@ -19,6 +19,10 @@ See also: BUILDING, build.sh, Makefile.
 Recent changes:
 ^^^
 
+20240628:
+	Update builds will require removing the tools objdir for binutils
+	(as most architectures should use binutils.old now).
+
 20240610:
 	Update builds are likely to require removing the objdir for
 	distrib//cdroms - or at least references to libarchive



CVS commit: src

2024-07-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jul  1 09:33:14 UTC 2024

Modified Files:
src: UPDATING

Log Message:
Note update build lossage for binutils vs. binutils.old


To generate a diff of this commit:
cvs rdiff -u -r1.352 -r1.353 src/UPDATING

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



CVS commit: src/doc

2024-07-01 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Jul  1 08:19:02 UTC 2024

Modified Files:
src/doc: 3RDPARTY

Log Message:
openssh 9.8 out


To generate a diff of this commit:
cvs rdiff -u -r1.2022 -r1.2023 src/doc/3RDPARTY

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



CVS commit: src/doc

2024-07-01 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Jul  1 08:19:02 UTC 2024

Modified Files:
src/doc: 3RDPARTY

Log Message:
openssh 9.8 out


To generate a diff of this commit:
cvs rdiff -u -r1.2022 -r1.2023 src/doc/3RDPARTY

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.2022 src/doc/3RDPARTY:1.2023
--- src/doc/3RDPARTY:1.2022	Mon Jul  1 02:26:51 2024
+++ src/doc/3RDPARTY	Mon Jul  1 08:19:01 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.2022 2024/07/01 02:26:51 mrg Exp $
+#	$NetBSD: 3RDPARTY,v 1.2023 2024/07/01 08:19:01 wiz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1083,7 +1083,7 @@ Patch applied after OpenSSH import.
 
 Package:	OpenSSH
 Version:	9.7
-Current Vers:	9.7 / portable 9.7p1
+Current Vers:	9.8 / portable 9.8p1
 Maintainer:	OpenSSH
 Archive Site:	http://www.openssh.com/ftp.html
 Home Page:	http://www.openssh.com/portable.html