CVS commit: src/sys/lib/libsa

2023-05-28 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon May 29 03:56:52 UTC 2023

Modified Files:
src/sys/lib/libsa: subr_prf.c

Log Message:
libsa/printf: Do not fetch long va_arg as long long.

This does real harm iff all of the following conditions are satisfied:

(1) On ILP32 architectures.
(2) Both LIBSA_PRINTF_LONGLONG_SUPPORT and LIBSA_PRINTF_WIDTH_SUPPORT
compile-time options are enabled.
(3) Width field is used with 'l' modifier.

This is an implicit-fallthrough bug, but unfortunately, GCC 10.4 cannot
find this out somehow...

XXX
Pull up to netbsd-10 and netbsd-9. netbsd-8 is not affected.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/lib/libsa/subr_prf.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/lib/libsa/subr_prf.c
diff -u src/sys/lib/libsa/subr_prf.c:1.29 src/sys/lib/libsa/subr_prf.c:1.30
--- src/sys/lib/libsa/subr_prf.c:1.29	Sat Jun  6 15:45:47 2020
+++ src/sys/lib/libsa/subr_prf.c	Mon May 29 03:56:52 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_prf.c,v 1.29 2020/06/06 15:45:47 thorpej Exp $	*/
+/*	$NetBSD: subr_prf.c,v 1.30 2023/05/29 03:56:52 rin Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -209,6 +209,7 @@ reswitch:
 	break;
 ++fmt;
 			}
+			goto reswitch;
 #endif
 		case 'l':
 #ifdef LIBSA_PRINTF_LONGLONG_SUPPORT



CVS commit: src/sys/lib/libsa

2023-05-28 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon May 29 03:56:52 UTC 2023

Modified Files:
src/sys/lib/libsa: subr_prf.c

Log Message:
libsa/printf: Do not fetch long va_arg as long long.

This does real harm iff all of the following conditions are satisfied:

(1) On ILP32 architectures.
(2) Both LIBSA_PRINTF_LONGLONG_SUPPORT and LIBSA_PRINTF_WIDTH_SUPPORT
compile-time options are enabled.
(3) Width field is used with 'l' modifier.

This is an implicit-fallthrough bug, but unfortunately, GCC 10.4 cannot
find this out somehow...

XXX
Pull up to netbsd-10 and netbsd-9. netbsd-8 is not affected.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/lib/libsa/subr_prf.c

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



CVS commit: src/bin/pax

2023-05-28 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun May 28 21:42:40 UTC 2023

Modified Files:
src/bin/pax: ar_subs.c buf_subs.c extern.h file_subs.c

Log Message:
pax: don't overwrite destination if -r -w copy fails

Add more error handling to pax -r -w so that any failure
during the copy to the temporary file (including a failed flush)
prevents any existing destination file from being replaced
with the partial (including possibly empty) temporary file.
The partial temporary file is removed.  pax still exists non-zero.

Thanks to Michael van Elst (mlelstv@) for the analysis
of the problem in the PR.

Should fix PR misc/33753.


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/bin/pax/ar_subs.c
cvs rdiff -u -r1.30 -r1.31 src/bin/pax/buf_subs.c
cvs rdiff -u -r1.60 -r1.61 src/bin/pax/extern.h
cvs rdiff -u -r1.64 -r1.65 src/bin/pax/file_subs.c

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

Modified files:

Index: src/bin/pax/ar_subs.c
diff -u src/bin/pax/ar_subs.c:1.57 src/bin/pax/ar_subs.c:1.58
--- src/bin/pax/ar_subs.c:1.57	Sun Dec  5 02:52:17 2021
+++ src/bin/pax/ar_subs.c	Sun May 28 21:42:40 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ar_subs.c,v 1.57 2021/12/05 02:52:17 msaitoh Exp $	*/
+/*	$NetBSD: ar_subs.c,v 1.58 2023/05/28 21:42:40 lukem Exp $	*/
 
 /*-
  * Copyright (c) 1992 Keith Muller.
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = "@(#)ar_subs.c	8.2 (Berkeley) 4/18/94";
 #else
-__RCSID("$NetBSD: ar_subs.c,v 1.57 2021/12/05 02:52:17 msaitoh Exp $");
+__RCSID("$NetBSD: ar_subs.c,v 1.58 2023/05/28 21:42:40 lukem Exp $");
 #endif
 #endif /* not lint */
 
@@ -1131,10 +1131,14 @@ copy(void)
 		}
 
 		/*
-		 * copy source file data to the destination file
+		 * copy source file data to the destination file.
+		 * if there was a failure, remove the temporary file
+		 * and leave any existing destination file unmodified.
 		 */
-		cp_file(arcn, fdsrc, fddest);
-		file_close(arcn, fddest);
+		if (cp_file(arcn, fdsrc, fddest) < 0)
+			file_cleanup(arcn, fddest);
+		else
+			file_close(arcn, fddest);
 		rdfile_close(arcn, );
 
 		if (vflag && vfpart) {

Index: src/bin/pax/buf_subs.c
diff -u src/bin/pax/buf_subs.c:1.30 src/bin/pax/buf_subs.c:1.31
--- src/bin/pax/buf_subs.c:1.30	Sat May 28 10:36:21 2022
+++ src/bin/pax/buf_subs.c	Sun May 28 21:42:40 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: buf_subs.c,v 1.30 2022/05/28 10:36:21 andvar Exp $	*/
+/*	$NetBSD: buf_subs.c,v 1.31 2023/05/28 21:42:40 lukem Exp $	*/
 
 /*-
  * Copyright (c) 1992 Keith Muller.
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = "@(#)buf_subs.c	8.2 (Berkeley) 4/18/94";
 #else
-__RCSID("$NetBSD: buf_subs.c,v 1.30 2022/05/28 10:36:21 andvar Exp $");
+__RCSID("$NetBSD: buf_subs.c,v 1.31 2023/05/28 21:42:40 lukem Exp $");
 #endif
 #endif /* not lint */
 
@@ -745,8 +745,11 @@ rd_wrfile(ARCHD *arcn, int ofd, off_t *l
 	 * written. just closing with the file offset moved forward may not put
 	 * a hole at the end of the file.
 	 */
-	if (ofd >= 0 && isem && (arcn->sb.st_size > 0L))
-		file_flush(ofd, fnm, isem);
+	if (ofd >= 0 && isem && (arcn->sb.st_size > 0L)) {
+		if (file_flush(ofd, fnm, isem) < 0) {
+			/* write flush errors are not an error here */;
+		}
+	}
 
 	/*
 	 * if we failed from archive read, we do not want to skip
@@ -758,9 +761,11 @@ rd_wrfile(ARCHD *arcn, int ofd, off_t *l
 	 * some formats record a crc on file data. If so, then we compare the
 	 * calculated crc to the crc stored in the archive
 	 */
-	if (docrc && (size == 0L) && (arcn->crc != crc))
+	if (docrc && (size == 0L) && (arcn->crc != crc)) {
 		tty_warn(1,"Actual crc does not match expected crc %s",
 		arcn->name);
+		/* crc warning is not an error */
+	}
 	return 0;
 }
 
@@ -769,9 +774,11 @@ rd_wrfile(ARCHD *arcn, int ofd, off_t *l
  *	copy the contents of one file to another. used during -rw phase of pax
  *	just as in rd_wrfile() we use a special write function to write the
  *	destination file so we can properly copy files with holes.
+ * Return:
+ *	0 if ok, -1 if any error.
  */
 
-void
+int
 cp_file(ARCHD *arcn, int fd1, int fd2)
 {
 	int cnt;
@@ -783,6 +790,7 @@ cp_file(ARCHD *arcn, int fd1, int fd2)
 	int rem;
 	int sz = MINFBSZ;
 	struct stat sb, origsb;
+	int rv = 0;
 
 	/*
 	 * check for holes in the source file. If none, we will use regular
@@ -797,8 +805,10 @@ cp_file(ARCHD *arcn, int fd1, int fd2)
 	 * if Mflag is set, use the actual mtime instead.
 	 */
 	origsb = arcn->sb;
-	if (Mflag && (fstat(fd1, ) < 0))
+	if (Mflag && (fstat(fd1, ) < 0)) {
 		syswarn(1, errno, "Failed stat on %s", arcn->org_name);
+		rv = -1;
+	}
 
 	/*
 	 * pass the blocksize of the file being written to the write routine,
@@ -830,17 +840,22 @@ cp_file(ARCHD *arcn, int fd1, int fd2)
 	/*
 	 * check to make sure the copy is valid.
 	 */
-	if (res < 0)
+	if (res < 0) {
 		syswarn(1, errno, "Failed write during copy of %s to %s",
 			arcn->org_name, arcn->name);
-	else if (cpcnt != 

CVS commit: src/bin/pax

2023-05-28 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun May 28 21:42:40 UTC 2023

Modified Files:
src/bin/pax: ar_subs.c buf_subs.c extern.h file_subs.c

Log Message:
pax: don't overwrite destination if -r -w copy fails

Add more error handling to pax -r -w so that any failure
during the copy to the temporary file (including a failed flush)
prevents any existing destination file from being replaced
with the partial (including possibly empty) temporary file.
The partial temporary file is removed.  pax still exists non-zero.

Thanks to Michael van Elst (mlelstv@) for the analysis
of the problem in the PR.

Should fix PR misc/33753.


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/bin/pax/ar_subs.c
cvs rdiff -u -r1.30 -r1.31 src/bin/pax/buf_subs.c
cvs rdiff -u -r1.60 -r1.61 src/bin/pax/extern.h
cvs rdiff -u -r1.64 -r1.65 src/bin/pax/file_subs.c

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



CVS commit: src/bin/pax

2023-05-28 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun May 28 17:01:46 UTC 2023

Modified Files:
src/bin/pax: ftree.c

Log Message:
pax: exit 0 if stdin filelist is used and empty

If copying a list of files from stdin, exit zero instead of non-zero
if there are no files supplied.

AFAICT, POSIX doesn't require a non-zero an error in this situation,
since there are no files to not match.

Fix from PR bin/41736 by Lloyd Parkes.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/bin/pax/ftree.c

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

Modified files:

Index: src/bin/pax/ftree.c
diff -u src/bin/pax/ftree.c:1.42 src/bin/pax/ftree.c:1.43
--- src/bin/pax/ftree.c:1.42	Thu Sep 27 00:44:59 2012
+++ src/bin/pax/ftree.c	Sun May 28 17:01:46 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ftree.c,v 1.42 2012/09/27 00:44:59 christos Exp $	*/
+/*	$NetBSD: ftree.c,v 1.43 2023/05/28 17:01:46 lukem Exp $	*/
 
 /*-
  * Copyright (c) 1992 Keith Muller.
@@ -71,7 +71,7 @@
 #if 0
 static char sccsid[] = "@(#)ftree.c	8.2 (Berkeley) 4/18/94";
 #else
-__RCSID("$NetBSD: ftree.c,v 1.42 2012/09/27 00:44:59 christos Exp $");
+__RCSID("$NetBSD: ftree.c,v 1.43 2023/05/28 17:01:46 lukem Exp $");
 #endif
 #endif /* not lint */
 
@@ -194,7 +194,7 @@ ftree_start(void)
 	}
 
 	if (ftree_arg() < 0)
-		return -1;
+		return 0;
 	if (tflag && (atdir_start() < 0))
 		return -1;
 	return 0;



CVS commit: src/bin/pax

2023-05-28 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun May 28 17:01:46 UTC 2023

Modified Files:
src/bin/pax: ftree.c

Log Message:
pax: exit 0 if stdin filelist is used and empty

If copying a list of files from stdin, exit zero instead of non-zero
if there are no files supplied.

AFAICT, POSIX doesn't require a non-zero an error in this situation,
since there are no files to not match.

Fix from PR bin/41736 by Lloyd Parkes.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/bin/pax/ftree.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/riscv/riscv

2023-05-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun May 28 12:56:56 UTC 2023

Modified Files:
src/sys/arch/riscv/riscv: riscv_machdep.c

Log Message:
Second arg to fdt_memory_remove_range is a size so pass dtbsize and not
dtb + dtbsize


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/riscv/riscv/riscv_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/riscv/riscv

2023-05-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun May 28 12:56:56 UTC 2023

Modified Files:
src/sys/arch/riscv/riscv: riscv_machdep.c

Log Message:
Second arg to fdt_memory_remove_range is a size so pass dtbsize and not
dtb + dtbsize


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/riscv/riscv/riscv_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/riscv/riscv/riscv_machdep.c
diff -u src/sys/arch/riscv/riscv/riscv_machdep.c:1.27 src/sys/arch/riscv/riscv/riscv_machdep.c:1.28
--- src/sys/arch/riscv/riscv/riscv_machdep.c:1.27	Sun May 14 09:14:30 2023
+++ src/sys/arch/riscv/riscv/riscv_machdep.c	Sun May 28 12:56:56 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: riscv_machdep.c,v 1.27 2023/05/14 09:14:30 skrll Exp $	*/
+/*	$NetBSD: riscv_machdep.c,v 1.28 2023/05/28 12:56:56 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2014, 2019, 2022 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 #include "opt_riscv_debug.h"
 
 #include 
-__RCSID("$NetBSD: riscv_machdep.c,v 1.27 2023/05/14 09:14:30 skrll Exp $");
+__RCSID("$NetBSD: riscv_machdep.c,v 1.28 2023/05/28 12:56:56 skrll Exp $");
 
 #include 
 
@@ -758,7 +758,7 @@ init_riscv(register_t hartid, paddr_t dt
 
 	fdt_memory_remove_reserved(memory_start, memory_end);
 
-	fdt_memory_remove_range(dtb, dtb + dtbsize);
+	fdt_memory_remove_range(dtb, dtbsize);
 
 	/* Perform PT build and VM init */
 	cpu_kernel_vm_init(memory_start, memory_end);



CVS commit: src/external/bsd/openldap

2023-05-28 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun May 28 11:00:04 UTC 2023

Modified Files:
src/external/bsd/openldap/dist/include: portable.hin
src/external/bsd/openldap/include: portable.h

Log Message:
deprecate remnants of MKCRYPTO

MKCRYPTO was removed by riastradh@ on 2017-05-22,
so remove references to it in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
src/external/bsd/openldap/dist/include/portable.hin
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/openldap/include/portable.h

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



CVS commit: src/external/bsd/openldap

2023-05-28 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun May 28 11:00:04 UTC 2023

Modified Files:
src/external/bsd/openldap/dist/include: portable.hin
src/external/bsd/openldap/include: portable.h

Log Message:
deprecate remnants of MKCRYPTO

MKCRYPTO was removed by riastradh@ on 2017-05-22,
so remove references to it in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
src/external/bsd/openldap/dist/include/portable.hin
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/openldap/include/portable.h

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

Modified files:

Index: src/external/bsd/openldap/dist/include/portable.hin
diff -u src/external/bsd/openldap/dist/include/portable.hin:1.10 src/external/bsd/openldap/dist/include/portable.hin:1.11
--- src/external/bsd/openldap/dist/include/portable.hin:1.10	Sat Aug 14 16:14:55 2021
+++ src/external/bsd/openldap/dist/include/portable.hin	Sun May 28 11:00:03 2023
@@ -755,7 +755,7 @@
 /* Define to 1 if you have the `thr_yield' function. */
 #undef HAVE_THR_YIELD
 
-#if 0	/* NETBSD: We'll control via Makefile and ${MKCRYPTO} */
+#if 0	/* NETBSD: We'll control via Makefile */
 /* define if you have TLS */
 #undef HAVE_TLS
 #endif

Index: src/external/bsd/openldap/include/portable.h
diff -u src/external/bsd/openldap/include/portable.h:1.10 src/external/bsd/openldap/include/portable.h:1.11
--- src/external/bsd/openldap/include/portable.h:1.10	Tue Dec 28 17:05:43 2021
+++ src/external/bsd/openldap/include/portable.h	Sun May 28 11:00:04 2023
@@ -753,7 +753,7 @@
 /* Define to 1 if you have the `thr_yield' function. */
 /* #undef HAVE_THR_YIELD */
 
-#if 0	/* NETBSD: We'll control via Makefile and ${MKCRYPTO} */
+#if 0	/* NETBSD: We'll control via Makefile */
 /* define if you have TLS */
 #define HAVE_TLS 1
 #endif



CVS commit: src/share/mk

2023-05-28 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun May 28 10:49:00 UTC 2023

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
bsd.own.mk: deprecate NOCRYPTO

MKCRYPTO was removed by riastradh@ on 2017-05-22,
so the NOCRYPTO override is now unnecessary.


To generate a diff of this commit:
cvs rdiff -u -r1.1326 -r1.1327 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.1326 src/share/mk/bsd.own.mk:1.1327
--- src/share/mk/bsd.own.mk:1.1326	Tue May 23 20:20:54 2023
+++ src/share/mk/bsd.own.mk	Sun May 28 10:49:00 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.1326 2023/05/23 20:20:54 lukem Exp $
+#	$NetBSD: bsd.own.mk,v 1.1327 2023/05/28 10:49:00 lukem Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -1022,7 +1022,7 @@ dependall:	.NOTMAIN realdepend .MAKE
 # including bsd.own.mk.
 #
 .for var in \
-	NOCOMPAT NOCRYPTO NODOC NOHTML NOINFO NOLIBCSANITIZER NOLINKLIB \
+	NOCOMPAT NODOC NOHTML NOINFO NOLIBCSANITIZER NOLINKLIB \
 	NOLINT NOMAN NONLS NOOBJ NOPIC NOPICINSTALL NOPROFILE NOSHARE \
 	NOSTATICLIB NODEBUGLIB NOSANITIZER NORELRO
 .if defined(${var})



CVS commit: src/share/mk

2023-05-28 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun May 28 10:49:00 UTC 2023

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
bsd.own.mk: deprecate NOCRYPTO

MKCRYPTO was removed by riastradh@ on 2017-05-22,
so the NOCRYPTO override is now unnecessary.


To generate a diff of this commit:
cvs rdiff -u -r1.1326 -r1.1327 src/share/mk/bsd.own.mk

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

2023-05-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun May 28 10:36:40 UTC 2023

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

Log Message:
Tickets #175 - #184


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

2023-05-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun May 28 10:36:40 UTC 2023

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

Log Message:
Tickets #175 - #184


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.65 -r1.1.2.66 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.65 src/doc/CHANGES-10.0:1.1.2.66
--- src/doc/CHANGES-10.0:1.1.2.65	Tue May 16 16:27:44 2023
+++ src/doc/CHANGES-10.0	Sun May 28 10:36:40 2023
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-10.0,v 1.1.2.65 2023/05/16 16:27:44 martin Exp $
+# $NetBSD: CHANGES-10.0,v 1.1.2.66 2023/05/28 10:36:40 martin Exp $
 
 A complete list of changes from the initial NetBSD 10.0 branch on 2022-12-16
 until the 10.0 release:
@@ -1909,3 +1909,83 @@ usr.bin/ftp/version.h1.97
 	ftp(1): add timeout for ssl connect.
 	[lukem, ticket #171]
 
+sys/kern/vfs_lookup.c1.234
+sys/sys/proc.h	1.371
+
+	PR 57320: fix magic "@machine_arch" symlinks to match
+	`uname -p` output.
+	[gutteridge, ticket #175]
+
+external/gpl3/gcc/usr.bin/backend/Makefile	1.67
+external/gpl3/gcc/usr.bin/common-target/Makefile 1.12
+external/gpl3/gcc/usr.bin/common/Makefile	1.12
+external/gpl3/gcc/usr.bin/frontend/Makefile	1.15
+external/gpl3/gcc/usr.bin/libcpp/Makefile	1.10
+external/gpl3/gcc/usr.bin/libdecnumber/Makefile	1.9
+
+	PR 57014: gcc: fix build with clang++ HOST_CXX.
+	[lukem, ticket #176]
+
+external/gpl3/gcc/usr.bin/host-libcpp/Makefile	1.6
+tools/Makefile.gnuhost1.56
+
+	PR 54456: fix passing -j NNN to gmake.
+	[lukem, ticket #177]
+
+distrib/cdrom/Makefile1.53
+etc/etc.mac68k/Makefile.inc			1.24
+
+	PR 42166: work around bug in mkisofs when generating
+	mac68k images.
+	[lukem, ticket #178]
+
+external/bsd/unbound/include/config.h		1.11
+
+	PR /57242: fix path for unbound pid file in chrooted environments.
+	[hannken, ticket #179]
+
+usr.bin/m4/gnum4.c1.12
+
+	PR 57431: m4 -g: { and } aren't supported in patsubst() or regexp().
+	[lukem, ticket #180]
+
+usr.bin/m4/gnum4.c1.13
+
+	Simplify previous fix to m4 in gnu compat mode (ticket #180).
+	[lukem, ticket #181]
+
+distrib/sets/lists/dtb/ad.earmv7hf		1.10
+sys/arch/arm/imx/imx23_usb.c			1.6
+sys/arch/arm/imx/imxusb.c			1.19
+sys/arch/arm/imx/imxusbvar.h			1.7
+sys/arch/arm/nxp/files.imx			1.3
+sys/arch/arm/nxp/imx6_ccm.c			1.3,1.4
+sys/arch/arm/nxp/imx6_ccmreg.h			1.2
+sys/arch/arm/nxp/imx6_ccmvar.h			1.2,1.3
+sys/arch/arm/nxp/imx6_clk.c			1.5,1.6
+sys/arch/arm/nxp/imx6_gpc.c			1.4
+sys/arch/arm/nxp/imx6_iomux.c			1.3
+sys/arch/arm/nxp/imx6_pcie.c			1.7
+sys/arch/arm/nxp/imx6_platform.c		1.8,1.9 (via patch)
+sys/arch/arm/nxp/imx6_reg.h			1.2
+sys/arch/arm/nxp/imx6_spi.c			1.8
+sys/arch/arm/nxp/imx6_usb.c			1.7,1.8
+sys/arch/arm/nxp/imx6_usbphy.c			1.3
+sys/arch/arm/nxp/imx6sx_clk.c			1.1-1.3
+sys/arch/arm/nxp/imx_sdhc.c			1.8
+sys/arch/evbarm/conf/GENERIC			1.119
+sys/dtb/arm/Makefile1.6
+
+	arm: add suppport for the i.mx6sx SoC   
+	[bouyer, ticket #182]
+
+external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c 1.15
+
+	PR 57442: mdnsd(8): fix privilege separation.
+	[andvar, ticket #183]
+
+usr.sbin/bta2dpd/bta2dpd/sbc_encode.c		1.11
+
+	bta2dpd(8): fix playback, pad(4) may return partial reads.
+	[nat, ticket #184]
+



CVS commit: [netbsd-10] src/usr.sbin/bta2dpd/bta2dpd

2023-05-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun May 28 10:34:59 UTC 2023

Modified Files:
src/usr.sbin/bta2dpd/bta2dpd [netbsd-10]: sbc_encode.c

Log Message:
Pull up following revision(s) (requested by nat in ticket #184):

usr.sbin/bta2dpd/bta2dpd/sbc_encode.c: revision 1.11

With the latest changes, pad(4) will return partial reads to allow a
more fine grained pacing of audio data. But this broke bta2dpd which
relied on full buffers returned (like reading from a file).

Replace the single read() in bta2dpd with a loop that fetches a full
buffer. This restores the old behaviour but loops in userland instead
of the kernel at the cost of a few extra system calls.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.8.1 src/usr.sbin/bta2dpd/bta2dpd/sbc_encode.c

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

Modified files:

Index: src/usr.sbin/bta2dpd/bta2dpd/sbc_encode.c
diff -u src/usr.sbin/bta2dpd/bta2dpd/sbc_encode.c:1.10 src/usr.sbin/bta2dpd/bta2dpd/sbc_encode.c:1.10.8.1
--- src/usr.sbin/bta2dpd/bta2dpd/sbc_encode.c:1.10	Sat Sep 21 00:01:33 2019
+++ src/usr.sbin/bta2dpd/bta2dpd/sbc_encode.c	Sun May 28 10:34:59 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: sbc_encode.c,v 1.10 2019/09/21 00:01:33 nat Exp $ */
+/* $NetBSD: sbc_encode.c,v 1.10.8.1 2023/05/28 10:34:59 martin Exp $ */
 
 /*-
  * Copyright (c) 2015 - 2016 Nathanial Sloss 
@@ -813,6 +813,29 @@ make_frame(uint8_t *frame, int16_t *inpu
 	return frame - frameStart;
 }
 
+static ssize_t
+readloop(int fd, void *buf, size_t nbytes)
+{
+	size_t count;
+	ssize_t ret;
+
+	count = 0;
+	while (nbytes > 0) {
+		ret = read(fd, ((char *)buf) + count, nbytes);
+		if (ret < 0) {
+			if (count == 0)
+return ret;
+			break;
+		}
+		if (ret == 0)
+			break;
+		count += (size_t)ret;
+		nbytes -= (size_t)ret;
+	}
+
+	return (ssize_t) count;
+}
+
 ssize_t
 stream(int in, int outfd, uint8_t mode, uint8_t freq, uint8_t bands, uint8_t
 blocks, uint8_t alloc_method, uint8_t bitpool, size_t mtu, int volume)
@@ -891,7 +914,7 @@ stream(int in, int outfd, uint8_t mode, 
 	pkt_len = 80;
 	while (totalSize + ((size_t)pkt_len * 2) <= mtu) {
 
-		len = read(in, music, readsize);
+		len = readloop(in, music, readsize);
 		if (len < (int)readsize)
 			break;
 



CVS commit: [netbsd-10] src/usr.sbin/bta2dpd/bta2dpd

2023-05-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun May 28 10:34:59 UTC 2023

Modified Files:
src/usr.sbin/bta2dpd/bta2dpd [netbsd-10]: sbc_encode.c

Log Message:
Pull up following revision(s) (requested by nat in ticket #184):

usr.sbin/bta2dpd/bta2dpd/sbc_encode.c: revision 1.11

With the latest changes, pad(4) will return partial reads to allow a
more fine grained pacing of audio data. But this broke bta2dpd which
relied on full buffers returned (like reading from a file).

Replace the single read() in bta2dpd with a loop that fetches a full
buffer. This restores the old behaviour but loops in userland instead
of the kernel at the cost of a few extra system calls.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.8.1 src/usr.sbin/bta2dpd/bta2dpd/sbc_encode.c

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



CVS commit: src/share/mk

2023-05-28 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun May 28 10:33:13 UTC 2023

Modified Files:
src/share/mk: bsd.lib.mk bsd.prog.mk

Log Message:
share/mk: finish USE_COMBINE, NOCOMBINE deprecation

Remove the leftover remnants of deprecated USE_COMBINE and NOCOMBINE,
as gcc -combine has been EOL for many years.

Completes the work done by maya@ on 2019-05-10 in bsd.kmodule.mk rev 1.61.


To generate a diff of this commit:
cvs rdiff -u -r1.392 -r1.393 src/share/mk/bsd.lib.mk
cvs rdiff -u -r1.344 -r1.345 src/share/mk/bsd.prog.mk

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



CVS commit: src/share/mk

2023-05-28 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun May 28 10:33:13 UTC 2023

Modified Files:
src/share/mk: bsd.lib.mk bsd.prog.mk

Log Message:
share/mk: finish USE_COMBINE, NOCOMBINE deprecation

Remove the leftover remnants of deprecated USE_COMBINE and NOCOMBINE,
as gcc -combine has been EOL for many years.

Completes the work done by maya@ on 2019-05-10 in bsd.kmodule.mk rev 1.61.


To generate a diff of this commit:
cvs rdiff -u -r1.392 -r1.393 src/share/mk/bsd.lib.mk
cvs rdiff -u -r1.344 -r1.345 src/share/mk/bsd.prog.mk

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

Modified files:

Index: src/share/mk/bsd.lib.mk
diff -u src/share/mk/bsd.lib.mk:1.392 src/share/mk/bsd.lib.mk:1.393
--- src/share/mk/bsd.lib.mk:1.392	Tue May  9 22:52:22 2023
+++ src/share/mk/bsd.lib.mk	Sun May 28 10:33:13 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.lib.mk,v 1.392 2023/05/09 22:52:22 riastradh Exp $
+#	$NetBSD: bsd.lib.mk,v 1.393 2023/05/28 10:33:13 lukem Exp $
 #	@(#)bsd.lib.mk	8.3 (Berkeley) 4/22/94
 
 .include 
@@ -428,37 +428,7 @@ _LIBS=${_LIB.a}
 _LIBS=
 .endif
 
-.if ${LIBISPRIVATE} != "no" \
-   && (defined(USE_COMBINE) && ${USE_COMBINE} == "yes" \
-   && !defined(NOCOMBINE))		# {
-.for f in ${SRCS:N*.h:N*.sh:C/\.[yl]$/.c/g}
-COMBINEFLAGS.${LIB}.$f := ${CPPFLAGS.$f:D1} ${CPUFLAGS.$f:D2} ${COPTS.$f:D3} ${OBJCOPTS.$f:D4} ${CXXFLAGS.$f:D5}
-.if empty(COMBINEFLAGS.${LIB}.${f}) && !defined(NOCOMBINE.$f)
-COMBINESRCS+=	${f}
-NODPSRCS+=	${f}
-.else
-OBJS+=  	${f:R:S/$/.o/}
-.endif
-.endfor
-
-.if !empty(COMBINESRCS)
-OBJS+=		${_LIB}_combine.o
-${_LIB}_combine.o: ${COMBINESRCS}
-	${_MKTARGET_COMPILE}
-	${COMPILE.c} -MD --combine ${.ALLSRC} -o ${.TARGET}
-.if defined(LIBSTRIPOBJS)
-	${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
-.endif
-
-CLEANFILES+=	${_LIB}_combine.d
-
-.if exists("${_LIB}_combine.d")
-.include "${_LIB}_combine.d"
-.endif
-.endif   # empty(XSRCS.${LIB})
-.else			# } {
 OBJS+=${SRCS:N*.h:N*.sh:R:S/$/.o/g}
-.endif			# }
 
 STOBJS+=${OBJS}
 

Index: src/share/mk/bsd.prog.mk
diff -u src/share/mk/bsd.prog.mk:1.344 src/share/mk/bsd.prog.mk:1.345
--- src/share/mk/bsd.prog.mk:1.344	Wed May 24 10:07:16 2023
+++ src/share/mk/bsd.prog.mk	Sun May 28 10:33:13 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.prog.mk,v 1.344 2023/05/24 10:07:16 lukem Exp $
+#	$NetBSD: bsd.prog.mk,v 1.345 2023/05/28 10:33:13 lukem Exp $
 #	@(#)bsd.prog.mk	8.2 (Berkeley) 4/2/94
 
 .ifndef HOSTPROG
@@ -475,56 +475,6 @@ LOBJS.${_P}+=	${LSRCS:.c=.ln} ${SRCS.${_
 .if defined(OBJS.${_P}) && !empty(OBJS.${_P})			# {
 .NOPATH: ${OBJS.${_P}} ${_P} ${_YPSRCS.${_P}}
 
-.if (defined(USE_COMBINE) && ${USE_COMBINE} != "no" && !commands(${_P}) \
-   && (${_CCLINK.${_P}} == ${_CCLINK.CDEFAULT} \
-   || ${_CCLINK.${_P}} == ${_CCLINK.CXXDEFAULT}) \
-   && !defined(NOCOMBINE.${_P}) && !defined(NOCOMBINE))
-.for f in ${SRCS.${_P}:N*.h:N*.sh:N*.fth:C/\.[yl]$/.c/g}
-#_XFLAGS.$f := ${CPPFLAGS.$f:D1} ${CPUFLAGS.$f:D2} \
-# ${COPTS.$f:D3} ${OBJCOPTS.$f:D4} ${CXXFLAGS.$f:D5}
-.if (${CPPFLAGS.$f:D1} == "1" || ${CPUFLAGS.$f:D2} == "2" \
- || ${COPTS.$f:D3} == "3" || ${OBJCOPTS.$f:D4} == "4" \
- || ${CXXFLAGS.$f:D5} == "5") \
-|| ("${f:M*.[cyl]}" == "" || commands(${f:R:S/$/.o/}))
-XOBJS.${_P}+=	${f:R:S/$/.o/}
-.else
-XSRCS.${_P}+=	${f}
-NODPSRCS+=	${f}
-.endif
-.endfor
-
-${_P}: .gdbinit ${LIBCRT0} ${LIBCRTI} ${XOBJS.${_P}} ${SRCS.${_P}} \
-${DPSRCS} ${LIBC} ${LIBCRTBEGIN} ${LIBCRTEND} ${_DPADD.${_P}}
-	${_MKTARGET_LINK}
-.if defined(DESTDIR)
-	${_CCLINK.${_P}} -Wl,-nostdlib \
-	${_LDFLAGS.${_P}} ${_LDSTATIC.${_P}} -o ${.TARGET} ${_PROGLDOPTS} \
-	-B${_GCC_CRTDIR}/ -B${DESTDIR}/usr/lib/ \
-	-MD --combine ${_CPPFLAGS.${_P}} ${_CFLAGS.${_P}} ${_COPTS.${_P}} \
-	${XSRCS.${_P}:@.SRC.@${.ALLSRC:M*.c:M*${.SRC.}}@:O:u} ${XOBJS.${_P}} \
-	${_LDADD.${_P}} -L${_GCC_LIBGCCDIR} -L${DESTDIR}/usr/lib
-.else
-	${_CCLINK.${_P}} ${_LDFLAGS.${_P}} ${_LDSTATIC.${_P}} -o ${.TARGET} ${_PROGLDOPTS} \
-	-MD --combine ${_CPPFLAGS.${_P}} ${_COPTS.${_P}}
-	${XSRCS.${_P}:@.SRC.@${.ALLSRC:M*.c:M*${.SRC.}}@:O:u} ${XOBJS.${_P}} \
-	${_LDADD.${_P}}
-.endif	# defined(DESTDIR)
-.if defined(CTFMERGE)
-	${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} ${OBJS.${_P}}
-.endif
-.if defined(PAXCTL_FLAGS.${_P})
-	${PAXCTL} ${PAXCTL_FLAGS.${_P}} ${.TARGET}
-.endif
-.if ${MKSTRIPIDENT} != "no"
-	${OBJCOPY} -R .ident ${.TARGET}
-.endif
-
-CLEANFILES+=	${_P}.d
-.if exists(${_P}.d)
-.include "${_P}.d"		# include -MD depend for program.
-.endif
-.else	# USE_COMBINE
-
 ${OBJS.${_P}} ${LOBJS.${_P}}: ${DPSRCS}
 
 ${_P}: .gdbinit ${LIBCRT0} ${LIBCRTI} ${OBJS.${_P}} ${LIBC} ${LIBCRTBEGIN} \
@@ -544,7 +494,6 @@ ${_P}: .gdbinit ${LIBCRT0} ${LIBCRTI} ${
 	${OBJCOPY} -R .ident ${.TARGET}
 .endif
 .endif	# !commands(${_P})
-.endif	# USE_COMBINE
 
 ${_P}.ro: ${OBJS.${_P}} ${_DPADD.${_P}}
 	${_MKTARGET_LINK}



CVS commit: [netbsd-9] src/doc

2023-05-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun May 28 10:23:12 UTC 2023

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

Log Message:
Ticket #1634


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.66 -r1.1.2.67 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.66 src/doc/CHANGES-9.4:1.1.2.67
--- src/doc/CHANGES-9.4:1.1.2.66	Mon May 15 10:26:43 2023
+++ src/doc/CHANGES-9.4	Sun May 28 10:23:12 2023
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.66 2023/05/15 10:26:43 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.67 2023/05/28 10:23:12 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -1426,3 +1426,8 @@ sys/ufs/ffs/ffs_snapshot.c			1.155
 	prematurely report that they were full and/or to panic the kernel.
 	[chs, ticket #1633]
 
+external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c 1.15
+
+	PR 57442: mdnsd(8): fix privilege separation.
+	[andvar, ticket #1634]
+



CVS commit: [netbsd-9] src/doc

2023-05-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun May 28 10:23:12 UTC 2023

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

Log Message:
Ticket #1634


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.66 -r1.1.2.67 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/apache2/mDNSResponder/dist/mDNSPosix

2023-05-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun May 28 10:21:15 UTC 2023

Modified Files:
src/external/apache2/mDNSResponder/dist/mDNSPosix [netbsd-9]:
PosixDaemon.c

Log Message:
Pull up following revision(s) (requested by andvar in ticket #1634):

external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c: revision 
1.15

reapply changes for the built-in drop-privs support by tsarna.

this commit doesn't reapply "dumping of the unicast server list
to the DumpStateLog debugging output" enhancement.
It doesn't build anymore, no idea how to rewrite.

Should fix PR 57442. Needs pull-ups for netbsd-9, netbsd-10.


To generate a diff of this commit:
cvs rdiff -u -r1.12.4.1 -r1.12.4.2 \
src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c

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

Modified files:

Index: src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c
diff -u src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c:1.12.4.1 src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c:1.12.4.2
--- src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c:1.12.4.1	Sun Jul 26 10:44:28 2020
+++ src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c	Sun May 28 10:21:15 2023
@@ -50,6 +50,10 @@ extern int daemon(int, int);
 #include "PlatformCommon.h"
 #include "DNSCommon.h"
 
+#ifndef MDNSD_USER
+#define MDNSD_USER "nobody"
+#endif
+
 #define CONFIG_FILE "/etc/mdnsd.conf"
 static domainname DynDNSZone;// Default wide-area zone for service registration
 static domainname DynDNSHostname;
@@ -190,11 +194,21 @@ int main(int argc, char **argv)
 // Now that we're finished with anything privileged, switch over to running as "nobody"
 if (mStatus_NoError == err)
 {
-const struct passwd *pw = getpwnam("nobody");
+const struct passwd *pw = getpwnam(MDNSD_USER);
 if (pw != NULL)
+	{
+setgid(pw->pw_gid);
 setuid(pw->pw_uid);
+	}
 else
-LogMsg("WARNING: mdnsd continuing as root because user \"nobody\" does not exist");
+#ifdef MDNSD_NOROOT
+{
+LogMsg("WARNING: mdnsd exiting because user \""MDNSD_USER"\" does not exist");
+err = mStatus_Invalid;
+}
+#else
+LogMsg("WARNING: mdnsd continuing as root because user \""MDNSD_USER"\" does not exist");
+#endif
 }
 
 if (mStatus_NoError == err)



CVS commit: [netbsd-9] src/external/apache2/mDNSResponder/dist/mDNSPosix

2023-05-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun May 28 10:21:15 UTC 2023

Modified Files:
src/external/apache2/mDNSResponder/dist/mDNSPosix [netbsd-9]:
PosixDaemon.c

Log Message:
Pull up following revision(s) (requested by andvar in ticket #1634):

external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c: revision 
1.15

reapply changes for the built-in drop-privs support by tsarna.

this commit doesn't reapply "dumping of the unicast server list
to the DumpStateLog debugging output" enhancement.
It doesn't build anymore, no idea how to rewrite.

Should fix PR 57442. Needs pull-ups for netbsd-9, netbsd-10.


To generate a diff of this commit:
cvs rdiff -u -r1.12.4.1 -r1.12.4.2 \
src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.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/external/apache2/mDNSResponder/dist/mDNSPosix

2023-05-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun May 28 10:20:08 UTC 2023

Modified Files:
src/external/apache2/mDNSResponder/dist/mDNSPosix [netbsd-10]:
PosixDaemon.c

Log Message:
Pull up following revision(s) (requested by andvar in ticket #183):

external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c: revision 
1.15

reapply changes for the built-in drop-privs support by tsarna.

this commit doesn't reapply "dumping of the unicast server list
to the DumpStateLog debugging output" enhancement.
It doesn't build anymore, no idea how to rewrite.

Should fix PR 57442. Needs pull-ups for netbsd-9, netbsd-10.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.14.6.1 \
src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c

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

Modified files:

Index: src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c
diff -u src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c:1.14 src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c:1.14.6.1
--- src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c:1.14	Wed Jul 22 19:05:14 2020
+++ src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c	Sun May 28 10:20:08 2023
@@ -50,6 +50,10 @@ extern int daemon(int, int);
 #include "PlatformCommon.h"
 #include "DNSCommon.h"
 
+#ifndef MDNSD_USER
+#define MDNSD_USER "nobody"
+#endif
+
 #define CONFIG_FILE "/etc/mdnsd.conf"
 static domainname DynDNSZone;// Default wide-area zone for service registration
 static domainname DynDNSHostname;
@@ -190,11 +194,21 @@ int main(int argc, char **argv)
 // Now that we're finished with anything privileged, switch over to running as "nobody"
 if (mStatus_NoError == err)
 {
-const struct passwd *pw = getpwnam("nobody");
+const struct passwd *pw = getpwnam(MDNSD_USER);
 if (pw != NULL)
+	{
+setgid(pw->pw_gid);
 setuid(pw->pw_uid);
+	}
 else
-LogMsg("WARNING: mdnsd continuing as root because user \"nobody\" does not exist");
+#ifdef MDNSD_NOROOT
+{
+LogMsg("WARNING: mdnsd exiting because user \""MDNSD_USER"\" does not exist");
+err = mStatus_Invalid;
+}
+#else
+LogMsg("WARNING: mdnsd continuing as root because user \""MDNSD_USER"\" does not exist");
+#endif
 }
 
 if (mStatus_NoError == err)



CVS commit: [netbsd-10] src/external/apache2/mDNSResponder/dist/mDNSPosix

2023-05-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun May 28 10:20:08 UTC 2023

Modified Files:
src/external/apache2/mDNSResponder/dist/mDNSPosix [netbsd-10]:
PosixDaemon.c

Log Message:
Pull up following revision(s) (requested by andvar in ticket #183):

external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c: revision 
1.15

reapply changes for the built-in drop-privs support by tsarna.

this commit doesn't reapply "dumping of the unicast server list
to the DumpStateLog debugging output" enhancement.
It doesn't build anymore, no idea how to rewrite.

Should fix PR 57442. Needs pull-ups for netbsd-9, netbsd-10.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.14.6.1 \
src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.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

2023-05-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun May 28 10:14:36 UTC 2023

Modified Files:
src/distrib/sets/lists/dtb [netbsd-10]: ad.earmv7hf
src/sys/arch/arm/imx [netbsd-10]: imx23_usb.c imxusb.c imxusbvar.h
src/sys/arch/arm/nxp [netbsd-10]: files.imx imx6_ccm.c imx6_ccmreg.h
imx6_ccmvar.h imx6_clk.c imx6_gpc.c imx6_iomux.c imx6_pcie.c
imx6_platform.c imx6_reg.h imx6_spi.c imx6_usb.c imx6_usbphy.c
imx_sdhc.c
src/sys/arch/evbarm/conf [netbsd-10]: GENERIC
src/sys/dtb/arm [netbsd-10]: Makefile
Added Files:
src/sys/arch/arm/nxp [netbsd-10]: imx6sx_clk.c

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

sys/arch/arm/nxp/imx6_platform.c: revision 1.8 (via patch)
sys/arch/arm/nxp/imx6_platform.c: revision 1.9 (via patch)
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.2
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.3
distrib/sets/lists/dtb/ad.earmv7hf: revision 1.10
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.1
sys/arch/arm/nxp/imx6_ccm.c: revision 1.3
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.2
sys/arch/arm/nxp/imx6_ccm.c: revision 1.4
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.3
sys/arch/arm/nxp/imx6_spi.c: revision 1.8
sys/arch/arm/nxp/imx_sdhc.c: revision 1.8
sys/arch/arm/imx/imxusb.c: revision 1.19
sys/arch/arm/nxp/imx6_usb.c: revision 1.7
sys/arch/arm/nxp/imx6_usb.c: revision 1.8
sys/arch/arm/nxp/files.imx: revision 1.3
sys/arch/arm/nxp/imx6_clk.c: revision 1.5
sys/arch/arm/nxp/imx6_clk.c: revision 1.6
sys/arch/arm/nxp/imx6_reg.h: revision 1.2
sys/arch/arm/nxp/imx6_gpc.c: revision 1.4
sys/arch/arm/imx/imx23_usb.c: revision 1.6
sys/dtb/arm/Makefile: revision 1.6
sys/arch/arm/imx/imxusbvar.h: revision 1.7
sys/arch/evbarm/conf/GENERIC: revision 1.119
sys/arch/arm/nxp/imx6_ccmreg.h: revision 1.2
sys/arch/arm/nxp/imx6_iomux.c: revision 1.3
sys/arch/arm/nxp/imx6_usbphy.c: revision 1.3
sys/arch/arm/nxp/imx6_pcie.c: revision 1.7

In preparation of imx6sx support, move imx6q-specific definitions from
imx6_ccm.c to imx6_clk.c, and prefix with IMX6Q/imx6q:
- Clock IDs and related struct imx_clock_id
- Clock Parents and Divider Tables
- struct imx6_clk
and related static functions

Add a pointer to struct imx6_clk, and it's size to imx6ccm_softc

Pass a pointer to imx6ccm_softc to all functions from imx6_ccm.c
NFCI

i.mx6sx CPU support in the CCM module: the clock tree si different from
the i.mx6q
- move i.mx6q-specific functions and data to imx6_clk.c
- add i.mx6sx specific imx6sx_clk.c
- add a imx6sxccm device
i.mx6sx platform support:
- the i.mx6sx has a third AIPS, so KERNEL_IO_IOREG map has to be larger
- the uart clock is at 24Mhz instead of 80.

Add i.mx6sx compatible entries to drivers that should work as is.

Fix typo, preventing i2c4 from attaching
remove commented out entries, leftover from the imx6q ccm code.
introduce imx6sx_platform_bootstrap(), which calls imx_platform_bootstrap()
and then checks for an "arm,cortex-a9-twd-timer" compatible entry in the
fdt. If not present, create one so that a9ptmr will attach.
We need this entry as this is the only timer we support for this platform,
but the upstream imx6sx.dtsi is missing the entry for it (and all A9 CPUs
have it anyway).

Thanks to Jared McNeill for advices and review.

Also build dtb files for CONFIG_SOC_IMX6SX

experimental IMX6SX support:
- add options SOC_IMX6SX
- add imx6sxccm device
tested on a UDOO Neo Full board.

known to work:
- uart (console)
- sdmmc0
- ethernet (enet0)
known to not work:
- USB (device not detected).

needs a modified device tree at this time (add arm,cortex-a9-twd-timer entry
copied from the imx6qdl dtsi); for unkown reason the imx6sx.dtsi file lacks
an entry for the a9ptmr although it is present in the soc (and, from what I
understood, in all cortex A9 SoCs).

Add imx6sx dtb files

The i.mx6sx has 2 OTG and one host-only USB controller, while the 6q has
only one OTG.

Add a "uintptr_t data" argument to all sc_*_md_hook callbacks, which
gets the sc_md_hook_data value when called.

In imx6_usb.c use this to pass the number of OTG controllers to the callbacks.
imx6_usb_init() can then properly call init_otg() or init_h1() for unit 1.

In imx6_usb_attach(), test if there is a vbus-supply property in the fdt,
and enable the regulator if present.

Now the USB port of the UDOO Neo works.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.9.2.1 src/distrib/sets/lists/dtb/ad.earmv7hf
cvs rdiff -u -r1.5 -r1.5.6.1 src/sys/arch/arm/imx/imx23_usb.c
cvs rdiff -u -r1.18 -r1.18.6.1 src/sys/arch/arm/imx/imxusb.c
cvs rdiff -u -r1.6 -r1.6.28.1 src/sys/arch/arm/imx/imxusbvar.h
cvs rdiff -u -r1.2 -r1.2.4.1 src/sys/arch/arm/nxp/files.imx \
src/sys/arch/arm/nxp/imx6_ccm.c
cvs rdiff -u -r1.1 

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

2023-05-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun May 28 10:07:11 UTC 2023

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

Log Message:
Pull up following revision(s) (requested by lukem in ticket #181):

usr.bin/m4/gnum4.c: revision 1.13

use strchr


To generate a diff of this commit:
cvs rdiff -u -r1.11.2.1 -r1.11.2.2 src/usr.bin/m4/gnum4.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/m4/gnum4.c
diff -u src/usr.bin/m4/gnum4.c:1.11.2.1 src/usr.bin/m4/gnum4.c:1.11.2.2
--- src/usr.bin/m4/gnum4.c:1.11.2.1	Sun May 28 10:03:54 2023
+++ src/usr.bin/m4/gnum4.c	Sun May 28 10:07:11 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: gnum4.c,v 1.11.2.1 2023/05/28 10:03:54 martin Exp $ */
+/* $NetBSD: gnum4.c,v 1.11.2.2 2023/05/28 10:07:11 martin Exp $ */
 /* $OpenBSD: gnum4.c,v 1.39 2008/08/21 21:01:04 espie Exp $ */
 
 /*
@@ -33,7 +33,7 @@
 #include "nbtool_config.h"
 #endif
 #include 
-__RCSID("$NetBSD: gnum4.c,v 1.11.2.1 2023/05/28 10:03:54 martin Exp $");
+__RCSID("$NetBSD: gnum4.c,v 1.11.2.2 2023/05/28 10:07:11 martin Exp $");
 
 #include 
 #include 
@@ -438,7 +438,7 @@ twiddle(const char *p)
 			p+=2;
 			continue;
 		}
-		if (*p == '(' || *p == ')' || *p == '|' || *p == '{' || *p == '}')
+		if (strchr("()|{}", *p) != NULL)
 			addchar('\\');
 
 		addchar(*p);



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

2023-05-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun May 28 10:07:11 UTC 2023

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

Log Message:
Pull up following revision(s) (requested by lukem in ticket #181):

usr.bin/m4/gnum4.c: revision 1.13

use strchr


To generate a diff of this commit:
cvs rdiff -u -r1.11.2.1 -r1.11.2.2 src/usr.bin/m4/gnum4.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/m4

2023-05-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun May 28 10:03:54 UTC 2023

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

Log Message:
Pull up following revision(s) (requested by lukem in ticket #180):

usr.bin/m4/gnum4.c: revision 1.12

m4 -g: { and } aren't supported in patsubst() or regexp()

When running in -g (GNU m4) emulation, patsubst() and regexp()
use the GNU m4 emacs-like regexes as implemented by gnulib,
which don't support {..} intervals.

When converting a GNU m4 regex to a POSIX ERE, escape raw { and }.
Autoconf relies on the GNU m4 regex behaviour.

See:
- 
https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Redefined-M4-Macros.html
- 
https://www.gnu.org/software/gnulib/manual/html_node/emacs-regular-expression-syntax.html

This fixes the tools/compat/configure regen.

PR toolchain/57431


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.2.1 src/usr.bin/m4/gnum4.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/m4

2023-05-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun May 28 10:03:54 UTC 2023

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

Log Message:
Pull up following revision(s) (requested by lukem in ticket #180):

usr.bin/m4/gnum4.c: revision 1.12

m4 -g: { and } aren't supported in patsubst() or regexp()

When running in -g (GNU m4) emulation, patsubst() and regexp()
use the GNU m4 emacs-like regexes as implemented by gnulib,
which don't support {..} intervals.

When converting a GNU m4 regex to a POSIX ERE, escape raw { and }.
Autoconf relies on the GNU m4 regex behaviour.

See:
- 
https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Redefined-M4-Macros.html
- 
https://www.gnu.org/software/gnulib/manual/html_node/emacs-regular-expression-syntax.html

This fixes the tools/compat/configure regen.

PR toolchain/57431


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.2.1 src/usr.bin/m4/gnum4.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/m4/gnum4.c
diff -u src/usr.bin/m4/gnum4.c:1.11 src/usr.bin/m4/gnum4.c:1.11.2.1
--- src/usr.bin/m4/gnum4.c:1.11	Tue Dec  7 20:24:07 2021
+++ src/usr.bin/m4/gnum4.c	Sun May 28 10:03:54 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: gnum4.c,v 1.11 2021/12/07 20:24:07 rillig Exp $ */
+/* $NetBSD: gnum4.c,v 1.11.2.1 2023/05/28 10:03:54 martin Exp $ */
 /* $OpenBSD: gnum4.c,v 1.39 2008/08/21 21:01:04 espie Exp $ */
 
 /*
@@ -33,7 +33,7 @@
 #include "nbtool_config.h"
 #endif
 #include 
-__RCSID("$NetBSD: gnum4.c,v 1.11 2021/12/07 20:24:07 rillig Exp $");
+__RCSID("$NetBSD: gnum4.c,v 1.11.2.1 2023/05/28 10:03:54 martin Exp $");
 
 #include 
 #include 
@@ -438,7 +438,7 @@ twiddle(const char *p)
 			p+=2;
 			continue;
 		}
-		if (*p == '(' || *p == ')' || *p == '|')
+		if (*p == '(' || *p == ')' || *p == '|' || *p == '{' || *p == '}')
 			addchar('\\');
 
 		addchar(*p);



CVS commit: [netbsd-10] src/external/bsd/unbound/include

2023-05-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun May 28 10:00:53 UTC 2023

Modified Files:
src/external/bsd/unbound/include [netbsd-10]: config.h

Log Message:
Pull up following revision(s) (requested by hannken in ticket #179):

external/bsd/unbound/include/config.h: revision 1.11

Set PID path back to "/var/run/unbound.pid" so rc scripts work again.
Ok: Christos Zoulas

PR bin/57242 unbound rc.d script does not work with chrooted unbound


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.2.1 src/external/bsd/unbound/include/config.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/external/bsd/unbound/include

2023-05-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun May 28 10:00:53 UTC 2023

Modified Files:
src/external/bsd/unbound/include [netbsd-10]: config.h

Log Message:
Pull up following revision(s) (requested by hannken in ticket #179):

external/bsd/unbound/include/config.h: revision 1.11

Set PID path back to "/var/run/unbound.pid" so rc scripts work again.
Ok: Christos Zoulas

PR bin/57242 unbound rc.d script does not work with chrooted unbound


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.2.1 src/external/bsd/unbound/include/config.h

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

Modified files:

Index: src/external/bsd/unbound/include/config.h
diff -u src/external/bsd/unbound/include/config.h:1.10 src/external/bsd/unbound/include/config.h:1.10.2.1
--- src/external/bsd/unbound/include/config.h:1.10	Sat Sep 24 18:11:43 2022
+++ src/external/bsd/unbound/include/config.h	Sun May 28 10:00:52 2023
@@ -773,7 +773,7 @@
 #define PACKAGE_VERSION "1.16.3"
 
 /* default pidfile location */
-#define PIDFILE CHROOT_DIR "/var/run/unbound.pid"
+#define PIDFILE "/var/run/unbound.pid"
 
 /* Define to necessary symbol if this constant uses a non-standard name on
your system. */



CVS commit: [netbsd-10] src

2023-05-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun May 28 09:58:41 UTC 2023

Modified Files:
src/distrib/cdrom [netbsd-10]: Makefile
src/etc/etc.mac68k [netbsd-10]: Makefile.inc

Log Message:
Pull up following revision(s) (requested by lukem in ticket #178):

etc/etc.mac68k/Makefile.inc: revision 1.24
distrib/cdrom/Makefile: revision 1.53

Creating Type mappings for .bin (macbinary encoded) files,
mkisofs changes files, then turns around and complains they have been
changed.

This is a self-inflicted wound, so demote the error to a warning.

Reported upstream as .

Arguably fixes PR toolchain/42166

Request pull-ups to netbsd-{8,9,10}.
XXX What about macppc?


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.52.14.1 src/distrib/cdrom/Makefile
cvs rdiff -u -r1.23 -r1.23.10.1 src/etc/etc.mac68k/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/cdrom/Makefile
diff -u src/distrib/cdrom/Makefile:1.52 src/distrib/cdrom/Makefile:1.52.14.1
--- src/distrib/cdrom/Makefile:1.52	Wed Jan 24 09:04:40 2018
+++ src/distrib/cdrom/Makefile	Sun May 28 09:58:41 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.52 2018/01/24 09:04:40 skrll Exp $
+# $NetBSD: Makefile,v 1.52.14.1 2023/05/28 09:58:41 martin Exp $
 #
 # Consult "*.conf" for the configuration variables; this Makefile is typically
 # not edited for basic configuration changes.
@@ -288,7 +288,7 @@ MKISOFS_ARGS.${image}+=	-b ${BOOTFILE.am
 MKISOFS_ARGS.${image}+= -b ${BOOTFILE.amd64} -c boot.catalog
 .endif
 .endif
-
+
 # Mac (mac68k, macppc)
 
 .if !empty(ports:Mmacppc)
@@ -299,7 +299,7 @@ MKISOFS_ARGS.${image}+=	-hfs -part -hide
 UUDECODE_FILES=	${BOOTHFS}
 .include 
 .elif defined(USE_APPLE_ISO) || !empty(ports:Mmac68k)
-MKISOFS_ARGS.${image}+=	-apple --macbin -map ${.CURDIR}/hfsmap.lst
+MKISOFS_ARGS.${image}+=	-apple --macbin -data-change-warn -map ${.CURDIR}/hfsmap.lst
 .endif
 
 # Sun (sparc, sparc64, sun3)

Index: src/etc/etc.mac68k/Makefile.inc
diff -u src/etc/etc.mac68k/Makefile.inc:1.23 src/etc/etc.mac68k/Makefile.inc:1.23.10.1
--- src/etc/etc.mac68k/Makefile.inc:1.23	Fri Jul 26 11:38:21 2019
+++ src/etc/etc.mac68k/Makefile.inc	Sun May 28 09:58:40 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.23 2019/07/26 11:38:21 rin Exp $
+#	$NetBSD: Makefile.inc,v 1.23.10.1 2023/05/28 09:58:40 martin Exp $
 #
 #	etc.mac68k/Makefile.inc -- mac68k-specific etc Makefile targets
 #
@@ -18,7 +18,7 @@ snap_md_post:
 
 # For "make iso-image"
 # mkisofs arguments to create a hybrid (HFS/Rockridge) CD-ROM image.
-MKISOFS_FLAGS+=	-hfs --macbin \
+MKISOFS_FLAGS+=	-hfs --macbin -data-change-warn \
 	-map ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/extensions.map
 
 iso-image: do-iso-image



CVS commit: [netbsd-10] src

2023-05-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun May 28 09:58:41 UTC 2023

Modified Files:
src/distrib/cdrom [netbsd-10]: Makefile
src/etc/etc.mac68k [netbsd-10]: Makefile.inc

Log Message:
Pull up following revision(s) (requested by lukem in ticket #178):

etc/etc.mac68k/Makefile.inc: revision 1.24
distrib/cdrom/Makefile: revision 1.53

Creating Type mappings for .bin (macbinary encoded) files,
mkisofs changes files, then turns around and complains they have been
changed.

This is a self-inflicted wound, so demote the error to a warning.

Reported upstream as .

Arguably fixes PR toolchain/42166

Request pull-ups to netbsd-{8,9,10}.
XXX What about macppc?


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.52.14.1 src/distrib/cdrom/Makefile
cvs rdiff -u -r1.23 -r1.23.10.1 src/etc/etc.mac68k/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

2023-05-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun May 28 09:49:03 UTC 2023

Modified Files:
src/external/gpl3/gcc/usr.bin/host-libcpp [netbsd-10]: Makefile
src/tools [netbsd-10]: Makefile.gnuhost

Log Message:
Pull up following revision(s) (requested by lukem in ticket #177):

tools/Makefile.gnuhost: revision 1.56
external/gpl3/gcc/usr.bin/host-libcpp/Makefile: revision 1.6

Fix passing -j NNN to gmake

Use a more restrictive pattern to extract -j NNN from MAKEFLAGS
into GMAKE_J_ARGS, to avoid false positives when the source directory
has "-j" in the path (e.g "amd64-job-12" or "src-j").

Previously this could pass either -"-j" or "-j BIGNUM" to gmake
and result in "vfork: Resource temporarily unavailable" failures.

PR misc/54456


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.6.1 \
src/external/gpl3/gcc/usr.bin/host-libcpp/Makefile
cvs rdiff -u -r1.54 -r1.54.2.1 src/tools/Makefile.gnuhost

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/usr.bin/host-libcpp/Makefile
diff -u src/external/gpl3/gcc/usr.bin/host-libcpp/Makefile:1.5 src/external/gpl3/gcc/usr.bin/host-libcpp/Makefile:1.5.6.1
--- src/external/gpl3/gcc/usr.bin/host-libcpp/Makefile:1.5	Wed Jun 24 05:06:08 2020
+++ src/external/gpl3/gcc/usr.bin/host-libcpp/Makefile	Sun May 28 09:49:03 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2020/06/24 05:06:08 rin Exp $
+#	$NetBSD: Makefile,v 1.5.6.1 2023/05/28 09:49:03 martin Exp $
 
 BUILD_ENV= \
 		AR=${HOST_AR:Q} \
@@ -19,7 +19,7 @@ BUILD_ENV= \
 		RANLIB=${HOST_RANLIB:Q} \
 		YACC=${YACC:Q}
 
-GMAKE_J_ARGS?=	${MAKEFLAGS:[*]:M*-j*:C/.*(-j ?[0-9]*).*/\1/W}
+GMAKE_J_ARGS?=	${MAKEFLAGS:[*]:M*-j*:C/(^|.* )(-j ?[0-9][0-9]*).*/\2/W}
 BUILD_COMMAND=	/usr/bin/env -i ${BUILD_ENV} ${TOOL_GMAKE} ${GMAKE_J_ARGS} -e
 
 libcpp/libcpp.a:

Index: src/tools/Makefile.gnuhost
diff -u src/tools/Makefile.gnuhost:1.54 src/tools/Makefile.gnuhost:1.54.2.1
--- src/tools/Makefile.gnuhost:1.54	Sun Aug 29 08:36:00 2021
+++ src/tools/Makefile.gnuhost	Sun May 28 09:49:03 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.gnuhost,v 1.54 2021/08/29 08:36:00 rillig Exp $
+#	$NetBSD: Makefile.gnuhost,v 1.54.2.1 2023/05/28 09:49:03 martin Exp $
 #
 # Rules used when building a GNU host package.  Expects MODULE to be set.
 #
@@ -100,7 +100,7 @@ BUILD_COMMAND=	${BUILD_ENV} ${MAKE} ${MA
 # gmake version of this puts MAKE_ARGS in the environment to be sure that
 # sub-gmake's get them, otherwise tools/gcc tries to build libgcc and
 # fails.  it also uses "env -i" to entirely clear out MAKEFLAGS.
-GMAKE_J_ARGS?=	${MAKEFLAGS:[*]:M*-j*:C/.*(-j ?[0-9]*).*/\1/W}
+GMAKE_J_ARGS?=	${MAKEFLAGS:[*]:M*-j*:C/(^|.* )(-j ?[0-9][0-9]*).*/\2/W}
 BUILD_COMMAND=	/usr/bin/env -i ${BUILD_ENV} ${MAKE_ARGS:N-*} ${TOOL_GMAKE} ${GMAKE_J_ARGS} -e ${MAKE_ARGS}
 
 .endif



CVS commit: [netbsd-10] src

2023-05-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun May 28 09:49:03 UTC 2023

Modified Files:
src/external/gpl3/gcc/usr.bin/host-libcpp [netbsd-10]: Makefile
src/tools [netbsd-10]: Makefile.gnuhost

Log Message:
Pull up following revision(s) (requested by lukem in ticket #177):

tools/Makefile.gnuhost: revision 1.56
external/gpl3/gcc/usr.bin/host-libcpp/Makefile: revision 1.6

Fix passing -j NNN to gmake

Use a more restrictive pattern to extract -j NNN from MAKEFLAGS
into GMAKE_J_ARGS, to avoid false positives when the source directory
has "-j" in the path (e.g "amd64-job-12" or "src-j").

Previously this could pass either -"-j" or "-j BIGNUM" to gmake
and result in "vfork: Resource temporarily unavailable" failures.

PR misc/54456


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.6.1 \
src/external/gpl3/gcc/usr.bin/host-libcpp/Makefile
cvs rdiff -u -r1.54 -r1.54.2.1 src/tools/Makefile.gnuhost

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



CVS commit: [netbsd-10] src/external/gpl3/gcc/usr.bin

2023-05-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun May 28 09:47:28 UTC 2023

Modified Files:
src/external/gpl3/gcc/usr.bin/backend [netbsd-10]: Makefile
src/external/gpl3/gcc/usr.bin/common [netbsd-10]: Makefile
src/external/gpl3/gcc/usr.bin/common-target [netbsd-10]: Makefile
src/external/gpl3/gcc/usr.bin/frontend [netbsd-10]: Makefile
src/external/gpl3/gcc/usr.bin/libcpp [netbsd-10]: Makefile
src/external/gpl3/gcc/usr.bin/libdecnumber [netbsd-10]: Makefile

Log Message:
Pull up following revision(s) (requested by lukem in ticket #176):

external/gpl3/gcc/usr.bin/libdecnumber/Makefile: revision 1.9
external/gpl3/gcc/usr.bin/common/Makefile: revision 1.12
external/gpl3/gcc/usr.bin/backend/Makefile: revision 1.67
external/gpl3/gcc/usr.bin/common-target/Makefile: revision 1.12
external/gpl3/gcc/usr.bin/frontend/Makefile: revision 1.15
external/gpl3/gcc/usr.bin/libcpp/Makefile: revision 1.10

gcc: fix build with clang++ HOST_CXX

Define HOSTPROG_CXX before .include anything that brings in bsd.own.mk.

This ensures that HOST_DBG (etc) gets assigned before HOST_CFLAGS
and HOST_CXXFLAGS is created.

backend: .include  much earlier, as per the other directories.

Fixes backend build when using clang++ as the host compiler (e.g., macOS),
because backend host tools are now built with -O.

Inspired by https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255760

Note that gcc.old/Makefile.prog may be mis-used because it defines HOSTPROG_CXX
and this Makefile fragment is included after bsd.*.mk in other Makefiles,
but they seem to build ok so leaving it alone for now.

Fixes PR toolchain/57014


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.66.2.1 src/external/gpl3/gcc/usr.bin/backend/Makefile
cvs rdiff -u -r1.11 -r1.11.2.1 src/external/gpl3/gcc/usr.bin/common/Makefile
cvs rdiff -u -r1.11 -r1.11.2.1 \
src/external/gpl3/gcc/usr.bin/common-target/Makefile
cvs rdiff -u -r1.14 -r1.14.2.1 \
src/external/gpl3/gcc/usr.bin/frontend/Makefile
cvs rdiff -u -r1.9 -r1.9.2.1 src/external/gpl3/gcc/usr.bin/libcpp/Makefile
cvs rdiff -u -r1.8 -r1.8.2.1 \
src/external/gpl3/gcc/usr.bin/libdecnumber/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/usr.bin/backend/Makefile
diff -u src/external/gpl3/gcc/usr.bin/backend/Makefile:1.66 src/external/gpl3/gcc/usr.bin/backend/Makefile:1.66.2.1
--- src/external/gpl3/gcc/usr.bin/backend/Makefile:1.66	Sat Sep 18 01:47:08 2021
+++ src/external/gpl3/gcc/usr.bin/backend/Makefile	Sun May 28 09:47:27 2023
@@ -1,7 +1,11 @@
-#	$NetBSD: Makefile,v 1.66 2021/09/18 01:47:08 christos Exp $
+#	$NetBSD: Makefile,v 1.66.2.1 2023/05/28 09:47:27 martin Exp $
 
+HOSTPROG_CXX=	1
 LIBISPRIVATE=	yes
 
+# For ../Makefile.inc and bsd.own.mk
+.include 
+
 LIB=		backend
 
 SRCS=		${G_OBJS:S,analyzer/,,} ${G_out_file:T} regsub.c
@@ -28,10 +32,6 @@ CPPFLAGS.lto-streamer-in.c+=	-DTARGET_MA
 
 HOST_CXXFLAGS+=	-std=gnu++98
 
-HOSTPROG_CXX=	1
-
-.include 
-
 HOST_LIBIBERTYOBJ!=	cd ${.CURDIR}/../host-libiberty && ${PRINTOBJDIR}
 
 .include 

Index: src/external/gpl3/gcc/usr.bin/common/Makefile
diff -u src/external/gpl3/gcc/usr.bin/common/Makefile:1.11 src/external/gpl3/gcc/usr.bin/common/Makefile:1.11.2.1
--- src/external/gpl3/gcc/usr.bin/common/Makefile:1.11	Sat Sep 18 01:47:08 2021
+++ src/external/gpl3/gcc/usr.bin/common/Makefile	Sun May 28 09:47:27 2023
@@ -1,5 +1,6 @@
-#	$NetBSD: Makefile,v 1.11 2021/09/18 01:47:08 christos Exp $
+#	$NetBSD: Makefile,v 1.11.2.1 2023/05/28 09:47:27 martin Exp $
 
+HOSTPROG_CXX=	1
 LIBISPRIVATE=	yes
 
 # For ../Makefile.inc and bsd.own.mk
@@ -21,8 +22,6 @@ CPPFLAGS+=	-I${GCCARCH} -I${BACKENDOBJ} 
 MKPIC:=		no
 MKPICLIB:=	no
 
-HOSTPROG_CXX=	1
-
 COPTS.diagnostic.c=	-Wno-stack-protector
 COPTS.intl.c=		-Wno-stack-protector
 

Index: src/external/gpl3/gcc/usr.bin/common-target/Makefile
diff -u src/external/gpl3/gcc/usr.bin/common-target/Makefile:1.11 src/external/gpl3/gcc/usr.bin/common-target/Makefile:1.11.2.1
--- src/external/gpl3/gcc/usr.bin/common-target/Makefile:1.11	Sat Sep 18 01:47:08 2021
+++ src/external/gpl3/gcc/usr.bin/common-target/Makefile	Sun May 28 09:47:27 2023
@@ -1,5 +1,6 @@
-#	$NetBSD: Makefile,v 1.11 2021/09/18 01:47:08 christos Exp $
+#	$NetBSD: Makefile,v 1.11.2.1 2023/05/28 09:47:27 martin Exp $
 
+HOSTPROG_CXX=	1
 LIBISPRIVATE=	yes
 
 # For ../Makefile.inc and bsd.own.mk
@@ -43,8 +44,6 @@ HOST_CPPFLAGS+=	-DGENERATOR_FILE
 MKPIC:=		no
 MKPICLIB:=	no
 
-HOSTPROG_CXX=	1
-
 .include 
 
 # Force using C++ for this

Index: src/external/gpl3/gcc/usr.bin/frontend/Makefile
diff -u src/external/gpl3/gcc/usr.bin/frontend/Makefile:1.14 src/external/gpl3/gcc/usr.bin/frontend/Makefile:1.14.2.1
--- src/external/gpl3/gcc/usr.bin/frontend/Makefile:1.14	Sat Sep 18 01:47:08 2021
+++ src/external/gpl3/gcc/usr.bin/frontend/Makefile	Sun May 28 

CVS commit: [netbsd-10] src/external/gpl3/gcc/usr.bin

2023-05-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun May 28 09:47:28 UTC 2023

Modified Files:
src/external/gpl3/gcc/usr.bin/backend [netbsd-10]: Makefile
src/external/gpl3/gcc/usr.bin/common [netbsd-10]: Makefile
src/external/gpl3/gcc/usr.bin/common-target [netbsd-10]: Makefile
src/external/gpl3/gcc/usr.bin/frontend [netbsd-10]: Makefile
src/external/gpl3/gcc/usr.bin/libcpp [netbsd-10]: Makefile
src/external/gpl3/gcc/usr.bin/libdecnumber [netbsd-10]: Makefile

Log Message:
Pull up following revision(s) (requested by lukem in ticket #176):

external/gpl3/gcc/usr.bin/libdecnumber/Makefile: revision 1.9
external/gpl3/gcc/usr.bin/common/Makefile: revision 1.12
external/gpl3/gcc/usr.bin/backend/Makefile: revision 1.67
external/gpl3/gcc/usr.bin/common-target/Makefile: revision 1.12
external/gpl3/gcc/usr.bin/frontend/Makefile: revision 1.15
external/gpl3/gcc/usr.bin/libcpp/Makefile: revision 1.10

gcc: fix build with clang++ HOST_CXX

Define HOSTPROG_CXX before .include anything that brings in bsd.own.mk.

This ensures that HOST_DBG (etc) gets assigned before HOST_CFLAGS
and HOST_CXXFLAGS is created.

backend: .include  much earlier, as per the other directories.

Fixes backend build when using clang++ as the host compiler (e.g., macOS),
because backend host tools are now built with -O.

Inspired by https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255760

Note that gcc.old/Makefile.prog may be mis-used because it defines HOSTPROG_CXX
and this Makefile fragment is included after bsd.*.mk in other Makefiles,
but they seem to build ok so leaving it alone for now.

Fixes PR toolchain/57014


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.66.2.1 src/external/gpl3/gcc/usr.bin/backend/Makefile
cvs rdiff -u -r1.11 -r1.11.2.1 src/external/gpl3/gcc/usr.bin/common/Makefile
cvs rdiff -u -r1.11 -r1.11.2.1 \
src/external/gpl3/gcc/usr.bin/common-target/Makefile
cvs rdiff -u -r1.14 -r1.14.2.1 \
src/external/gpl3/gcc/usr.bin/frontend/Makefile
cvs rdiff -u -r1.9 -r1.9.2.1 src/external/gpl3/gcc/usr.bin/libcpp/Makefile
cvs rdiff -u -r1.8 -r1.8.2.1 \
src/external/gpl3/gcc/usr.bin/libdecnumber/Makefile

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

2023-05-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun May 28 09:43:26 UTC 2023

Modified Files:
src/sys/kern [netbsd-10]: vfs_lookup.c
src/sys/sys [netbsd-10]: proc.h

Log Message:
Pull up following revision(s) (requested by gutteridge in ticket #175):

sys/sys/proc.h: revision 1.371
sys/kern/vfs_lookup.c: revision 1.234

Default PROC_MACHINE_ARCH to machine_arch and use this for magic
symlinks to resolve "@machine_arch".

This keeps behaviour of magic symlinks and 'uname -p' output the same.
Fixes PR 57320.


To generate a diff of this commit:
cvs rdiff -u -r1.232 -r1.232.4.1 src/sys/kern/vfs_lookup.c
cvs rdiff -u -r1.370 -r1.370.4.1 src/sys/sys/proc.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/kern/vfs_lookup.c
diff -u src/sys/kern/vfs_lookup.c:1.232 src/sys/kern/vfs_lookup.c:1.232.4.1
--- src/sys/kern/vfs_lookup.c:1.232	Mon Aug 22 09:14:59 2022
+++ src/sys/kern/vfs_lookup.c	Sun May 28 09:43:26 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_lookup.c,v 1.232 2022/08/22 09:14:59 hannken Exp $	*/
+/*	$NetBSD: vfs_lookup.c,v 1.232.4.1 2023/05/28 09:43:26 martin Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.232 2022/08/22 09:14:59 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.232.4.1 2023/05/28 09:43:26 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_magiclinks.h"
@@ -137,8 +137,8 @@ symlink_magic(struct proc *p, char *cp, 
 		 * to frequency of use.
 		 */
 		if (MATCH("machine_arch")) {
-			slen = VNL(MACHINE_ARCH);
-			SUBSTITUTE("machine_arch", MACHINE_ARCH, slen);
+			slen = strlen(PROC_MACHINE_ARCH(p));
+			SUBSTITUTE("machine_arch", PROC_MACHINE_ARCH(p), slen);
 		} else if (MATCH("machine")) {
 			slen = VNL(MACHINE);
 			SUBSTITUTE("machine", MACHINE, slen);

Index: src/sys/sys/proc.h
diff -u src/sys/sys/proc.h:1.370 src/sys/sys/proc.h:1.370.4.1
--- src/sys/sys/proc.h:1.370	Mon May  9 13:27:24 2022
+++ src/sys/sys/proc.h	Sun May 28 09:43:26 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: proc.h,v 1.370 2022/05/09 13:27:24 wiz Exp $	*/
+/*	$NetBSD: proc.h,v 1.370.4.1 2023/05/28 09:43:26 martin Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008, 2020 The NetBSD Foundation, Inc.
@@ -593,6 +593,10 @@ _proclist_skipmarker(struct proc *p0)
 #define PROC_DBREGSZ(p) (((p)->p_flag & PK_32) ? \
 sizeof(process_dbreg32) : sizeof(struct dbreg))
 
+#ifndef PROC_MACHINE_ARCH
+#define PROC_MACHINE_ARCH(p) machine_arch
+#endif
+
 /*
  * PROCLIST_FOREACH: iterate on the given proclist, skipping PK_MARKER ones.
  */



CVS commit: [netbsd-10] src/sys

2023-05-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun May 28 09:43:26 UTC 2023

Modified Files:
src/sys/kern [netbsd-10]: vfs_lookup.c
src/sys/sys [netbsd-10]: proc.h

Log Message:
Pull up following revision(s) (requested by gutteridge in ticket #175):

sys/sys/proc.h: revision 1.371
sys/kern/vfs_lookup.c: revision 1.234

Default PROC_MACHINE_ARCH to machine_arch and use this for magic
symlinks to resolve "@machine_arch".

This keeps behaviour of magic symlinks and 'uname -p' output the same.
Fixes PR 57320.


To generate a diff of this commit:
cvs rdiff -u -r1.232 -r1.232.4.1 src/sys/kern/vfs_lookup.c
cvs rdiff -u -r1.370 -r1.370.4.1 src/sys/sys/proc.h

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



CVS commit: src/sys

2023-05-28 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun May 28 08:21:24 UTC 2023

Modified Files:
src/sys/arch/mips/mips: compat_13_machdep.c
src/sys/fs/nfs/server: nfs_nfsdstate.c

Log Message:
s/Resture/Restore/ and s/restared/restarted/ in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/mips/mips/compat_13_machdep.c
cvs rdiff -u -r1.4 -r1.5 src/sys/fs/nfs/server/nfs_nfsdstate.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/mips/mips/compat_13_machdep.c
diff -u src/sys/arch/mips/mips/compat_13_machdep.c:1.21 src/sys/arch/mips/mips/compat_13_machdep.c:1.22
--- src/sys/arch/mips/mips/compat_13_machdep.c:1.21	Sun Feb 20 07:45:47 2011
+++ src/sys/arch/mips/mips/compat_13_machdep.c	Sun May 28 08:21:24 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_13_machdep.c,v 1.21 2011/02/20 07:45:47 matt Exp $	*/
+/*	$NetBSD: compat_13_machdep.c,v 1.22 2023/05/28 08:21:24 andvar Exp $	*/
 
 /*
  * Copyright 1996 The Board of Trustees of The Leland Stanford
@@ -15,7 +15,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: compat_13_machdep.c,v 1.21 2011/02/20 07:45:47 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_13_machdep.c,v 1.22 2023/05/28 08:21:24 andvar Exp $");
 
 #include 
 #include 
@@ -77,7 +77,7 @@ compat_13_sys_sigreturn(struct lwp *l, c
 	if ((uint32_t)ksc.sc_regs[_R_ZERO] != 0xacedbadeU)/* magic number */
 		return (EINVAL);
 
-	/* Resture the register context. */
+	/* Restore the register context. */
 	tf->tf_regs[_R_PC] = ksc.sc_pc;
 	tf->tf_regs[_R_MULLO] = ksc.mullo;
 	tf->tf_regs[_R_MULHI] = ksc.mulhi;

Index: src/sys/fs/nfs/server/nfs_nfsdstate.c
diff -u src/sys/fs/nfs/server/nfs_nfsdstate.c:1.4 src/sys/fs/nfs/server/nfs_nfsdstate.c:1.5
--- src/sys/fs/nfs/server/nfs_nfsdstate.c:1.4	Tue Dec 13 21:50:32 2016
+++ src/sys/fs/nfs/server/nfs_nfsdstate.c	Sun May 28 08:21:24 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_nfsdstate.c,v 1.4 2016/12/13 21:50:32 pgoyette Exp $	*/
+/*	$NetBSD: nfs_nfsdstate.c,v 1.5 2023/05/28 08:21:24 andvar Exp $	*/
 /*-
  * Copyright (c) 2009 Rick Macklem, University of Guelph
  * All rights reserved.
@@ -28,7 +28,7 @@
 
 #include 
 /* __FBSDID("FreeBSD: head/sys/fs/nfsserver/nfs_nfsdstate.c 307694 2016-10-20 23:53:16Z rmacklem "); */
-__RCSID("$NetBSD: nfs_nfsdstate.c,v 1.4 2016/12/13 21:50:32 pgoyette Exp $");
+__RCSID("$NetBSD: nfs_nfsdstate.c,v 1.5 2023/05/28 08:21:24 andvar Exp $");
 
 #ifndef APPLEKEXT
 #include 
@@ -4208,7 +4208,7 @@ nfsrv_docallback(struct nfsclient *clp, 
  * client somehow does an RPC without a
  * SequenceID Op that causes a callback just
  * after the nfsd threads have been terminated
- * and restared we could conceivably get here
+ * and restarted we could conceivably get here
  * without a backchannel xprt.
  */
 printf("nfsrv_docallback: no xprt\n");



CVS commit: src/sys

2023-05-28 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun May 28 08:21:24 UTC 2023

Modified Files:
src/sys/arch/mips/mips: compat_13_machdep.c
src/sys/fs/nfs/server: nfs_nfsdstate.c

Log Message:
s/Resture/Restore/ and s/restared/restarted/ in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/mips/mips/compat_13_machdep.c
cvs rdiff -u -r1.4 -r1.5 src/sys/fs/nfs/server/nfs_nfsdstate.c

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



CVS commit: src/tests

2023-05-28 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Sun May 28 08:17:00 UTC 2023

Modified Files:
src/tests/fs/nfs: t_rquotad.sh
src/tests/lib/librumphijack: t_tcpip.sh t_vfs.sh

Log Message:
Add RUMPHIJACK option "blanket=/DEV" so mount_ffs may canonicalise
and mount the device path.  Cannot use "/rump/DEV" here as the device
path is embedded in "struct ufs_args" where it doesnt get hijacked.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/fs/nfs/t_rquotad.sh
cvs rdiff -u -r1.21 -r1.22 src/tests/lib/librumphijack/t_tcpip.sh
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/librumphijack/t_vfs.sh

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

Modified files:

Index: src/tests/fs/nfs/t_rquotad.sh
diff -u src/tests/fs/nfs/t_rquotad.sh:1.9 src/tests/fs/nfs/t_rquotad.sh:1.10
--- src/tests/fs/nfs/t_rquotad.sh:1.9	Thu Aug 20 13:58:30 2020
+++ src/tests/fs/nfs/t_rquotad.sh	Sun May 28 08:17:00 2023
@@ -1,4 +1,4 @@
-# $NetBSD: t_rquotad.sh,v 1.9 2020/08/20 13:58:30 riastradh Exp $
+# $NetBSD: t_rquotad.sh,v 1.10 2023/05/28 08:17:00 hannken Exp $
 #
 #  Copyright (c) 2011 Manuel Bouyer
 #  All rights reserved.
@@ -110,7 +110,8 @@ get_nfs_quota()
 	/bin/echo "/export -noresvport -noresvmnt 10.1.1.100" | \
 		dd of=/rump/etc/exports 2> /dev/null
 
-	atf_check -s exit:0 -e ignore mount_ffs /dk /rump/export
+	atf_check -s exit:0 -e ignore env RUMPHIJACK='path=/rump,blanket=/dk' \
+		mount_ffs /dk /rump/export
 
 #set a quota limit (and check that we can read it back)
 	for q in ${expect} ; do

Index: src/tests/lib/librumphijack/t_tcpip.sh
diff -u src/tests/lib/librumphijack/t_tcpip.sh:1.21 src/tests/lib/librumphijack/t_tcpip.sh:1.22
--- src/tests/lib/librumphijack/t_tcpip.sh:1.21	Thu Nov 11 07:38:21 2021
+++ src/tests/lib/librumphijack/t_tcpip.sh	Sun May 28 08:17:00 2023
@@ -1,4 +1,4 @@
-#   $NetBSD: t_tcpip.sh,v 1.21 2021/11/11 07:38:21 gson Exp $
+#   $NetBSD: t_tcpip.sh,v 1.22 2023/05/28 08:17:00 hannken Exp $
 #
 # Copyright (c) 2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -182,7 +182,8 @@ test_nfs()
 
 	atf_check -s exit:0 rump.sysctl -q -w kern.module.autoload=1
 
-	atf_check -s exit:0 -e ignore mount_ffs /dk /rump/export
+	atf_check -s exit:0 -e ignore env RUMPHIJACK='path=/rump,blanket=/dk' \
+		mount_ffs /dk /rump/export
 	atf_check -s exit:0 -x "echo ${magicstr} > /rump/export/im_alive"
 
 	# start rpcbind.  we want /var/run/rpcbind.sock

Index: src/tests/lib/librumphijack/t_vfs.sh
diff -u src/tests/lib/librumphijack/t_vfs.sh:1.6 src/tests/lib/librumphijack/t_vfs.sh:1.7
--- src/tests/lib/librumphijack/t_vfs.sh:1.6	Sat Aug  4 03:56:47 2012
+++ src/tests/lib/librumphijack/t_vfs.sh	Sun May 28 08:17:00 2023
@@ -1,4 +1,4 @@
-#   $NetBSD: t_vfs.sh,v 1.6 2012/08/04 03:56:47 riastradh Exp $
+#   $NetBSD: t_vfs.sh,v 1.7 2023/05/28 08:17:00 hannken Exp $
 #
 # Copyright (c) 2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -35,7 +35,8 @@ domount()
 
 	mntdir=$1
 	[ $# -eq 0 ] && mntdir=/rump/mnt
-	atf_check -s exit:0 -e ignore mount_ffs /img ${mntdir}
+	atf_check -s exit:0 -e ignore env RUMPHIJACK='path=/rump,blanket=/img' \
+		mount_ffs /img ${mntdir}
 }
 
 dounmount()



CVS commit: src/tests

2023-05-28 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Sun May 28 08:17:00 UTC 2023

Modified Files:
src/tests/fs/nfs: t_rquotad.sh
src/tests/lib/librumphijack: t_tcpip.sh t_vfs.sh

Log Message:
Add RUMPHIJACK option "blanket=/DEV" so mount_ffs may canonicalise
and mount the device path.  Cannot use "/rump/DEV" here as the device
path is embedded in "struct ufs_args" where it doesnt get hijacked.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/fs/nfs/t_rquotad.sh
cvs rdiff -u -r1.21 -r1.22 src/tests/lib/librumphijack/t_tcpip.sh
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/librumphijack/t_vfs.sh

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



CVS commit: src/sys/net

2023-05-28 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun May 28 08:09:34 UTC 2023

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

Log Message:
s/explcit/explicit/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/net/pktqueue.c

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

Modified files:

Index: src/sys/net/pktqueue.c
diff -u src/sys/net/pktqueue.c:1.21 src/sys/net/pktqueue.c:1.22
--- src/sys/net/pktqueue.c:1.21	Sun Sep  4 17:34:43 2022
+++ src/sys/net/pktqueue.c	Sun May 28 08:09:34 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pktqueue.c,v 1.21 2022/09/04 17:34:43 thorpej Exp $	*/
+/*	$NetBSD: pktqueue.c,v 1.22 2023/05/28 08:09:34 andvar Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pktqueue.c,v 1.21 2022/09/04 17:34:43 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pktqueue.c,v 1.22 2023/05/28 08:09:34 andvar Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -552,7 +552,7 @@ pktq_flush(pktqueue_t *pq)
 
 	/*
 	 * Acquire the barrier lock.  While the caller ensures that
-	 * no explcit pktq_barrier() calls will be issued, this holds
+	 * no explicit pktq_barrier() calls will be issued, this holds
 	 * off any implicit pktq_barrier() calls that would happen
 	 * as the result of pktq_ifdetach().
 	 */



CVS commit: src/sys/net

2023-05-28 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun May 28 08:09:34 UTC 2023

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

Log Message:
s/explcit/explicit/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/net/pktqueue.c

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



CVS commit: src/sys/dev/marvell

2023-05-28 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun May 28 08:01:46 UTC 2023

Modified Files:
src/sys/dev/marvell: mvxpsec.c

Log Message:
s/sessoin/session/ in warning message.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/marvell/mvxpsec.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/marvell/mvxpsec.c
diff -u src/sys/dev/marvell/mvxpsec.c:1.18 src/sys/dev/marvell/mvxpsec.c:1.19
--- src/sys/dev/marvell/mvxpsec.c:1.18	Sat Dec 31 21:15:20 2022
+++ src/sys/dev/marvell/mvxpsec.c	Sun May 28 08:01:46 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: mvxpsec.c,v 1.18 2022/12/31 21:15:20 andvar Exp $	*/
+/*	$NetBSD: mvxpsec.c,v 1.19 2023/05/28 08:01:46 andvar Exp $	*/
 /*
  * Copyright (c) 2015 Internet Initiative Japan Inc.
  * All rights reserved.
@@ -2010,7 +2010,7 @@ fail:
 	if (mv_s)
 		mvxpsec_session_dealloc(mv_s);
 	log(LOG_WARNING,
-	"%s: Failed to add H/W crypto sessoin (id:%u): err=%d\n",
+	"%s: Failed to add H/W crypto session (id:%u): err=%d\n",
 	   __func__, session, err);
 
 	mutex_exit(>sc_session_mtx);



CVS commit: src/sys/dev/marvell

2023-05-28 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun May 28 08:01:46 UTC 2023

Modified Files:
src/sys/dev/marvell: mvxpsec.c

Log Message:
s/sessoin/session/ in warning message.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/marvell/mvxpsec.c

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



CVS commit: src/usr.sbin/bta2dpd/bta2dpd

2023-05-28 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun May 28 07:59:17 UTC 2023

Modified Files:
src/usr.sbin/bta2dpd/bta2dpd: sbc_encode.c

Log Message:
With the latest changes, pad(4) will return partial reads to allow a
more fine grained pacing of audio data. But this broke bta2dpd which
relied on full buffers returned (like reading from a file).

Replace the single read() in bta2dpd with a loop that fetches a full
buffer. This restores the old behaviour but loops in userland instead
of the kernel at the cost of a few extra system calls.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/bta2dpd/bta2dpd/sbc_encode.c

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



CVS commit: src/usr.sbin/bta2dpd/bta2dpd

2023-05-28 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun May 28 07:59:17 UTC 2023

Modified Files:
src/usr.sbin/bta2dpd/bta2dpd: sbc_encode.c

Log Message:
With the latest changes, pad(4) will return partial reads to allow a
more fine grained pacing of audio data. But this broke bta2dpd which
relied on full buffers returned (like reading from a file).

Replace the single read() in bta2dpd with a loop that fetches a full
buffer. This restores the old behaviour but loops in userland instead
of the kernel at the cost of a few extra system calls.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/bta2dpd/bta2dpd/sbc_encode.c

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

Modified files:

Index: src/usr.sbin/bta2dpd/bta2dpd/sbc_encode.c
diff -u src/usr.sbin/bta2dpd/bta2dpd/sbc_encode.c:1.10 src/usr.sbin/bta2dpd/bta2dpd/sbc_encode.c:1.11
--- src/usr.sbin/bta2dpd/bta2dpd/sbc_encode.c:1.10	Sat Sep 21 00:01:33 2019
+++ src/usr.sbin/bta2dpd/bta2dpd/sbc_encode.c	Sun May 28 07:59:17 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: sbc_encode.c,v 1.10 2019/09/21 00:01:33 nat Exp $ */
+/* $NetBSD: sbc_encode.c,v 1.11 2023/05/28 07:59:17 mlelstv Exp $ */
 
 /*-
  * Copyright (c) 2015 - 2016 Nathanial Sloss 
@@ -813,6 +813,29 @@ make_frame(uint8_t *frame, int16_t *inpu
 	return frame - frameStart;
 }
 
+static ssize_t
+readloop(int fd, void *buf, size_t nbytes)
+{
+	size_t count;
+	ssize_t ret;
+
+	count = 0;
+	while (nbytes > 0) {
+		ret = read(fd, ((char *)buf) + count, nbytes);
+		if (ret < 0) {
+			if (count == 0)
+return ret;
+			break;
+		}
+		if (ret == 0)
+			break;
+		count += (size_t)ret;
+		nbytes -= (size_t)ret;
+	}
+
+	return (ssize_t) count;
+}
+
 ssize_t
 stream(int in, int outfd, uint8_t mode, uint8_t freq, uint8_t bands, uint8_t
 blocks, uint8_t alloc_method, uint8_t bitpool, size_t mtu, int volume)
@@ -891,7 +914,7 @@ stream(int in, int outfd, uint8_t mode, 
 	pkt_len = 80;
 	while (totalSize + ((size_t)pkt_len * 2) <= mtu) {
 
-		len = read(in, music, readsize);
+		len = readloop(in, music, readsize);
 		if (len < (int)readsize)
 			break;
 



CVS commit: src/sys/sys

2023-05-28 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun May 28 06:21:00 UTC 2023

Modified Files:
src/sys/sys: param.h

Log Message:
In sys/param.h document that MAXPATHLEN includes space for a null byte.

Also note that it's the same as PATH_MAX. Reflow the comment.

Suggested by Thierry Laronde.


To generate a diff of this commit:
cvs rdiff -u -r1.726 -r1.727 src/sys/sys/param.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/sys/param.h
diff -u src/sys/sys/param.h:1.726 src/sys/sys/param.h:1.727
--- src/sys/sys/param.h:1.726	Sat Apr 22 14:05:36 2023
+++ src/sys/sys/param.h	Sun May 28 06:21:00 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.726 2023/04/22 14:05:36 riastradh Exp $	*/
+/*	$NetBSD: param.h,v 1.727 2023/05/28 06:21:00 dholland Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -395,13 +395,16 @@
 #define	MAXFRAG 	8
 
 /*
- * MAXPATHLEN defines the longest permissible path length after expanding
- * symbolic links. It is used to allocate a temporary buffer from the buffer
- * pool in which to do the name expansion, hence should be a power of two,
- * and must be less than or equal to MAXBSIZE.  MAXSYMLINKS defines the
- * maximum number of symbolic links that may be expanded in a path name.
- * It should be set high enough to allow all legitimate uses, but halt
- * infinite loops reasonably quickly.
+ * MAXPATHLEN defines the longest permissible path length after
+ * expanding symbolic links, including a trailing null terminator
+ * byte. It is used to allocate a temporary buffer from the buffer
+ * pool in which to do the name expansion, hence should be a power of
+ * two, and must be less than or equal to MAXBSIZE. It must be the
+ * same as PATH_MAX from .
+ *
+ * MAXSYMLINKS defines the maximum number of symbolic links that may
+ * be expanded in a path name. It should be set high enough to allow
+ * all legitimate uses, but halt infinite loops reasonably quickly.
  *
  * MAXSYMLINKS should be >= _POSIX_SYMLOOP_MAX (see )
  */



CVS commit: src/sys/sys

2023-05-28 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun May 28 06:21:00 UTC 2023

Modified Files:
src/sys/sys: param.h

Log Message:
In sys/param.h document that MAXPATHLEN includes space for a null byte.

Also note that it's the same as PATH_MAX. Reflow the comment.

Suggested by Thierry Laronde.


To generate a diff of this commit:
cvs rdiff -u -r1.726 -r1.727 src/sys/sys/param.h

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