CVS commit: src/sys/arch/aarch64/aarch64

2021-04-13 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Wed Apr 14 05:43:09 UTC 2021

Modified Files:
src/sys/arch/aarch64/aarch64: bus_space.c trap.c

Log Message:
Fix the problem "pcictl pci0 list" causes "panic: trap_el1h_error" on rockpro64.

The panic occures in bus_space_barrier() in rk3399_pcie.c:rkpcie_conf_read().
We expected bus_space_peek_4() to trap and recover in the path
trap_el1h_sync() -> data_abort_handler(), but In fact, the read is delayed
until bus_space_barrier(), and we get an SError interrupt (trap_el1h_error)
instead of a Synchronous Exception (trap_el1h_sync).

To catch this correctly, An implicit barrier in bus_space_peek have been added,
and trap the SError interrupt to recover from.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/aarch64/aarch64/bus_space.c
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/aarch64/aarch64/trap.c

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

Modified files:

Index: src/sys/arch/aarch64/aarch64/bus_space.c
diff -u src/sys/arch/aarch64/aarch64/bus_space.c:1.15 src/sys/arch/aarch64/aarch64/bus_space.c:1.16
--- src/sys/arch/aarch64/aarch64/bus_space.c:1.15	Mon Dec 14 19:32:29 2020
+++ src/sys/arch/aarch64/aarch64/bus_space.c	Wed Apr 14 05:43:09 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_space.c,v 1.15 2020/12/14 19:32:29 skrll Exp $ */
+/* $NetBSD: bus_space.c,v 1.16 2021/04/14 05:43:09 ryo Exp $ */
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: bus_space.c,v 1.15 2020/12/14 19:32:29 skrll Exp $");
+__KERNEL_RCSID(1, "$NetBSD: bus_space.c,v 1.16 2021/04/14 05:43:09 ryo Exp $");
 
 #include 
 #include 
@@ -702,6 +702,7 @@ generic_bs_pe_1(void *t, bus_space_handl
 
 	if ((error = cpu_set_onfault()) == 0) {
 		*datap = generic_dsb_bs_r_1(t, bsh, offset);
+		dsb(ld);
 		cpu_unset_onfault();
 	}
 	return error;
@@ -716,6 +717,7 @@ generic_bs_pe_2(void *t, bus_space_handl
 
 	if ((error = cpu_set_onfault()) == 0) {
 		*datap = NSWAP(generic_dsb_bs_r_2)(t, bsh, offset);
+		dsb(ld);
 		cpu_unset_onfault();
 	}
 	return error;
@@ -730,6 +732,7 @@ generic_bs_pe_4(void *t, bus_space_handl
 
 	if ((error = cpu_set_onfault()) == 0) {
 		*datap = NSWAP(generic_dsb_bs_r_4)(t, bsh, offset);
+		dsb(ld);
 		cpu_unset_onfault();
 	}
 	return error;
@@ -744,6 +747,7 @@ generic_bs_pe_8(void *t, bus_space_handl
 
 	if ((error = cpu_set_onfault()) == 0) {
 		*datap = NSWAP(generic_dsb_bs_r_8)(t, bsh, offset);
+		dsb(ld);
 		cpu_unset_onfault();
 	}
 	return error;

Index: src/sys/arch/aarch64/aarch64/trap.c
diff -u src/sys/arch/aarch64/aarch64/trap.c:1.45 src/sys/arch/aarch64/aarch64/trap.c:1.46
--- src/sys/arch/aarch64/aarch64/trap.c:1.45	Tue Mar  9 16:44:27 2021
+++ src/sys/arch/aarch64/aarch64/trap.c	Wed Apr 14 05:43:09 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.45 2021/03/09 16:44:27 ryo Exp $ */
+/* $NetBSD: trap.c,v 1.46 2021/04/14 05:43:09 ryo Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.45 2021/03/09 16:44:27 ryo Exp $");
+__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.46 2021/04/14 05:43:09 ryo Exp $");
 
 #include "opt_arm_intr_impl.h"
 #include "opt_compat_netbsd32.h"
@@ -861,6 +861,26 @@ unknown:
 	}
 }
 
+void
+trap_el1h_error(struct trapframe *tf)
+{
+	/*
+	 * Normally, we should panic unconditionally,
+	 * but SError interrupt may occur when accessing to unmapped(?) I/O
+	 * spaces. bus_space_{peek,poke}_{1,2,4,8}() should trap these case.
+	 */
+	struct faultbuf *fb;
+
+	if (curcpu()->ci_intr_depth == 0) {
+		fb = cpu_disable_onfault();
+		if (fb != NULL) {
+			cpu_jump_onfault(tf, fb, EFAULT);
+			return;
+		}
+	}
+	panic("%s", __func__);
+}
+
 #define bad_trap_panic(trapfunc)	\
 void	\
 trapfunc(struct trapframe *tf)		\
@@ -872,7 +892,6 @@ bad_trap_panic(trap_el1t_irq)
 bad_trap_panic(trap_el1t_fiq)
 bad_trap_panic(trap_el1t_error)
 bad_trap_panic(trap_el1h_fiq)
-bad_trap_panic(trap_el1h_error)
 bad_trap_panic(trap_el0_fiq)
 bad_trap_panic(trap_el0_error)
 bad_trap_panic(trap_el0_32fiq)



CVS commit: src/sys/compat/netbsd32

2021-04-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr 14 02:48:00 UTC 2021

Modified Files:
src/sys/compat/netbsd32: netbsd32_systrace_args.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/compat/netbsd32/netbsd32_systrace_args.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/compat/netbsd32/netbsd32_systrace_args.c
diff -u src/sys/compat/netbsd32/netbsd32_systrace_args.c:1.46 src/sys/compat/netbsd32/netbsd32_systrace_args.c:1.47
--- src/sys/compat/netbsd32/netbsd32_systrace_args.c:1.46	Tue Apr 13 19:57:23 2021
+++ src/sys/compat/netbsd32/netbsd32_systrace_args.c	Tue Apr 13 22:48:00 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_systrace_args.c,v 1.46 2021/04/13 23:57:23 christos Exp $ */
+/* $NetBSD: netbsd32_systrace_args.c,v 1.47 2021/04/14 02:48:00 christos Exp $ */
 
 /*
  * System call argument to DTrace register array conversion.
@@ -16,7 +16,7 @@ systrace_args(register_t sysnum, const v
 	case 0: {
 		const struct netbsd32_syscall_args *p = params;
 		iarg[0] = SCARG(p, code); /* int */
-		uarg[1] = (intptr_t) SCARG(p, args); /* register32_t */
+		iarg[1] = SCARG(p, args[0]); /* register32_t */
 		*n_args = 2;
 		break;
 	}
@@ -1412,7 +1412,7 @@ systrace_args(register_t sysnum, const v
 	case 198: {
 		const struct netbsd32syscall_args *p = params;
 		iarg[0] = SCARG(p, code); /* quad_t */
-		uarg[1] = (intptr_t) SCARG(p, args); /* register32_t */
+		iarg[1] = SCARG(p, args[0]); /* register32_t */
 		*n_args = 2;
 		break;
 	}



CVS commit: src/sys/kern

2021-04-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr 14 02:45:58 UTC 2021

Modified Files:
src/sys/kern: systrace_args.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/kern/systrace_args.c

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

Modified files:

Index: src/sys/kern/systrace_args.c
diff -u src/sys/kern/systrace_args.c:1.46 src/sys/kern/systrace_args.c:1.47
--- src/sys/kern/systrace_args.c:1.46	Tue Apr 13 18:46:13 2021
+++ src/sys/kern/systrace_args.c	Tue Apr 13 22:45:58 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: systrace_args.c,v 1.46 2021/04/13 22:46:13 christos Exp $ */
+/* $NetBSD: systrace_args.c,v 1.47 2021/04/14 02:45:58 christos Exp $ */
 
 /*
  * System call argument to DTrace register array conversion.
@@ -16,7 +16,7 @@ systrace_args(register_t sysnum, const v
 	case 0: {
 		const struct sys_syscall_args *p = params;
 		iarg[0] = SCARG(p, code); /* int */
-		uarg[1] = (intptr_t) SCARG(p, args); /* register_t */
+		iarg[1] = SCARG(p, args[0]); /* register_t */
 		*n_args = 2;
 		break;
 	}
@@ -1460,7 +1460,7 @@ systrace_args(register_t sysnum, const v
 	case 198: {
 		const struct sys___syscall_args *p = params;
 		iarg[0] = SCARG(p, code); /* quad_t */
-		uarg[1] = (intptr_t) SCARG(p, args); /* register_t */
+		iarg[1] = SCARG(p, args[0]); /* register_t */
 		*n_args = 2;
 		break;
 	}



CVS commit: src/sys/kern

2021-04-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr 14 02:45:40 UTC 2021

Modified Files:
src/sys/kern: makesyscalls.sh

Log Message:
use the first element of the array instead


To generate a diff of this commit:
cvs rdiff -u -r1.184 -r1.185 src/sys/kern/makesyscalls.sh

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/makesyscalls.sh
diff -u src/sys/kern/makesyscalls.sh:1.184 src/sys/kern/makesyscalls.sh:1.185
--- src/sys/kern/makesyscalls.sh:1.184	Tue Apr 13 18:45:32 2021
+++ src/sys/kern/makesyscalls.sh	Tue Apr 13 22:45:40 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: makesyscalls.sh,v 1.184 2021/04/13 22:45:32 christos Exp $
+#	$NetBSD: makesyscalls.sh,v 1.185 2021/04/14 02:45:40 christos Exp $
 #
 # Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou
 # All rights reserved.
@@ -808,9 +808,9 @@ function printrumpsysmap(syscall, wfn, f
 function fixarray(arg) {
 	iii = index(arg, "[")
 	if (iii == 0) {
-		return arg
+		return arg 
 	} else {
-		return substr(arg, 1, iii - 1)
+		return substr(arg, 1, iii - 1) "[0]"
 	}
 }
 
@@ -831,7 +831,7 @@ function putsystrace(type, compatwrap_) 
  i - 1, \
  argname[i], arg) > systrace
 			else if (index(arg, "*") > 0 || arg == "caddr_t" ||
-			arg ~ /.*_handler_t$/ || index(argname[i], "[") > 0)
+			arg ~ /.*_handler_t$/)
 printf("\t\tuarg[%d] = (intptr_t) SCARG(p, %s); /* %s */\n", \
  i - 1, \
  fixarray(argname[i]), arg) > systrace
@@ -842,7 +842,7 @@ function putsystrace(type, compatwrap_) 
 			else
 printf("\t\tiarg[%d] = SCARG(p, %s); /* %s */\n", \
  i - 1, \
- argname[i], arg) > systrace
+ fixarray(argname[i]), arg) > systrace
 		}
 		printf("\t\tdefault:\n\t\t\tbreak;\n\t\t};\n") > systracetmp
 



CVS commit: src/external/gpl3/gcc

2021-04-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Apr 14 01:19:13 UTC 2021

Modified Files:
src/external/gpl3/gcc: README.gcc10

Log Message:
dtrace systrace.c issue fixed by christos (thanks!)

mips issue is related to memset.c miscompiling and does not
appear with -ffreestanding (thanks joerg & simonb.)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gcc/README.gcc10

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/README.gcc10
diff -u src/external/gpl3/gcc/README.gcc10:1.6 src/external/gpl3/gcc/README.gcc10:1.7
--- src/external/gpl3/gcc/README.gcc10:1.6	Tue Apr 13 22:24:56 2021
+++ src/external/gpl3/gcc/README.gcc10	Wed Apr 14 01:19:13 2021
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc10,v 1.6 2021/04/13 22:24:56 mrg Exp $
+$NetBSD: README.gcc10,v 1.7 2021/04/14 01:19:13 mrg Exp $
 
 
 new stuff:
@@ -65,7 +65,7 @@ sh3el		y	y	y	y		y		y	?	?
 sparc		y	y	y	y		y		y	y	n
 sparc64		y	y	y	y		y		y	y	n
 vax		y	y	y	y		y		y	n[6]	n
-x86_64		y	y	y	y		y[7]		y	y	?
+x86_64		y	y	y	y		y		y	y	n
 riscv32		y	N/A	y	y		y		N/A	N/A	n
 riscv64		y	N/A	y	y		y		N/A	N/A	n
 --
@@ -100,13 +100,8 @@ architecture	tools	kernels	libgcc	native
 - OCTEON kernel seems OK, something in my private configuration?
 [5] - userland is broken.  some dynamic apps run on old install (ie, old
   ld.elf_so & shlibs) but nothing in chroot runs (static or dynamic).
+  memset.c compiles wrongly, wants -ffreestanding.  oddness.
 [6] - vax vs c++ exceptions issue
-[7] - with ctf/dtrace enabled, this happens:
-  /usr/src2/sys/kern/systrace_args.c:19:13: error: array subscript 8 is above array bounds of 'const union [8]' [-Werror=array-bounds]
- 19 |   iarg[1] = SCARG(p, args[SYS_MAXSYSARGS]); /* register_t */
-| ^
-  which makes sense as args[8] is out of bounds.
-  -- this issue has been -Wno-'d but should be investigated.
 [8] - i386 seems to have a signal delivery issue.  GCC 9 or 10 kernels are
   unable to reboot properly, and GCC 10 atf runs hang in signal delivery.
 



CVS commit: src/sys/compat/netbsd32

2021-04-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 13 23:57:23 UTC 2021

Modified Files:
src/sys/compat/netbsd32: netbsd32_systrace_args.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/compat/netbsd32/netbsd32_systrace_args.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/compat/netbsd32/netbsd32_systrace_args.c
diff -u src/sys/compat/netbsd32/netbsd32_systrace_args.c:1.45 src/sys/compat/netbsd32/netbsd32_systrace_args.c:1.46
--- src/sys/compat/netbsd32/netbsd32_systrace_args.c:1.45	Fri Oct  9 20:03:53 2020
+++ src/sys/compat/netbsd32/netbsd32_systrace_args.c	Tue Apr 13 19:57:23 2021
@@ -1,7 +1,7 @@
-/* $NetBSD: netbsd32_systrace_args.c,v 1.45 2020/10/10 00:03:53 rin Exp $ */
+/* $NetBSD: netbsd32_systrace_args.c,v 1.46 2021/04/13 23:57:23 christos Exp $ */
 
 /*
- * System call argument to DTrace register array converstion.
+ * System call argument to DTrace register array conversion.
  *
  * DO NOT EDIT-- this file is automatically generated.
  * This file is part of the DTrace syscall provider.
@@ -16,7 +16,7 @@ systrace_args(register_t sysnum, const v
 	case 0: {
 		const struct netbsd32_syscall_args *p = params;
 		iarg[0] = SCARG(p, code); /* int */
-		iarg[1] = SCARG(p, args[NETBSD32_SYS_MAXSYSARGS]); /* register32_t */
+		uarg[1] = (intptr_t) SCARG(p, args); /* register32_t */
 		*n_args = 2;
 		break;
 	}
@@ -1412,7 +1412,7 @@ systrace_args(register_t sysnum, const v
 	case 198: {
 		const struct netbsd32syscall_args *p = params;
 		iarg[0] = SCARG(p, code); /* quad_t */
-		iarg[1] = SCARG(p, args[NETBSD32_SYS_MAXSYSARGS]); /* register32_t */
+		uarg[1] = (intptr_t) SCARG(p, args); /* register32_t */
 		*n_args = 2;
 		break;
 	}



CVS commit: src/sys/kern

2021-04-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 13 22:46:13 UTC 2021

Modified Files:
src/sys/kern: systrace_args.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/kern/systrace_args.c

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

Modified files:

Index: src/sys/kern/systrace_args.c
diff -u src/sys/kern/systrace_args.c:1.45 src/sys/kern/systrace_args.c:1.46
--- src/sys/kern/systrace_args.c:1.45	Wed Feb 17 01:25:10 2021
+++ src/sys/kern/systrace_args.c	Tue Apr 13 18:46:13 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: systrace_args.c,v 1.45 2021/02/17 06:25:10 rillig Exp $ */
+/* $NetBSD: systrace_args.c,v 1.46 2021/04/13 22:46:13 christos Exp $ */
 
 /*
  * System call argument to DTrace register array conversion.
@@ -16,7 +16,7 @@ systrace_args(register_t sysnum, const v
 	case 0: {
 		const struct sys_syscall_args *p = params;
 		iarg[0] = SCARG(p, code); /* int */
-		iarg[1] = SCARG(p, args[SYS_MAXSYSARGS]); /* register_t */
+		uarg[1] = (intptr_t) SCARG(p, args); /* register_t */
 		*n_args = 2;
 		break;
 	}
@@ -1460,7 +1460,7 @@ systrace_args(register_t sysnum, const v
 	case 198: {
 		const struct sys___syscall_args *p = params;
 		iarg[0] = SCARG(p, code); /* quad_t */
-		iarg[1] = SCARG(p, args[SYS_MAXSYSARGS]); /* register_t */
+		uarg[1] = (intptr_t) SCARG(p, args); /* register_t */
 		*n_args = 2;
 		break;
 	}



CVS commit: src/sys/kern

2021-04-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 13 22:45:32 UTC 2021

Modified Files:
src/sys/kern: makesyscalls.sh

Log Message:
Elide [NUM] in arguments for systrace, use the first address of the array
and cast to intptr_t instead.


To generate a diff of this commit:
cvs rdiff -u -r1.183 -r1.184 src/sys/kern/makesyscalls.sh

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/makesyscalls.sh
diff -u src/sys/kern/makesyscalls.sh:1.183 src/sys/kern/makesyscalls.sh:1.184
--- src/sys/kern/makesyscalls.sh:1.183	Wed Feb 17 01:25:10 2021
+++ src/sys/kern/makesyscalls.sh	Tue Apr 13 18:45:32 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: makesyscalls.sh,v 1.183 2021/02/17 06:25:10 rillig Exp $
+#	$NetBSD: makesyscalls.sh,v 1.184 2021/04/13 22:45:32 christos Exp $
 #
 # Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou
 # All rights reserved.
@@ -805,6 +805,15 @@ function printrumpsysmap(syscall, wfn, f
 	syscall, wfn, funcalias, rumpentry) > rumpsysmap
 }
 
+function fixarray(arg) {
+	iii = index(arg, "[")
+	if (iii == 0) {
+		return arg
+	} else {
+		return substr(arg, 1, iii - 1)
+	}
+}
+
 function putsystrace(type, compatwrap_) {
 	printf("\t/* %s */\n\tcase %d: {\n", funcname, syscall) > systrace
 	printf("\t/* %s */\n\tcase %d:\n", funcname, syscall) > systracetmp
@@ -822,10 +831,10 @@ function putsystrace(type, compatwrap_) 
  i - 1, \
  argname[i], arg) > systrace
 			else if (index(arg, "*") > 0 || arg == "caddr_t" ||
-			arg ~ /.*_handler_t$/)
+			arg ~ /.*_handler_t$/ || index(argname[i], "[") > 0)
 printf("\t\tuarg[%d] = (intptr_t) SCARG(p, %s); /* %s */\n", \
  i - 1, \
- argname[i], arg) > systrace
+ fixarray(argname[i]), arg) > systrace
 			else if (substr(arg, 1, 1) == "u" || arg == "size_t")
 printf("\t\tuarg[%d] = SCARG(p, %s); /* %s */\n", \
  i - 1, \



CVS commit: src/external/gpl3/gcc

2021-04-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Apr 13 22:24:56 UTC 2021

Modified Files:
src/external/gpl3/gcc: README.gcc10

Log Message:
note amd64 dtrace issue is only warning for now.
note that i386 has problems in -current.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/README.gcc10

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/README.gcc10
diff -u src/external/gpl3/gcc/README.gcc10:1.5 src/external/gpl3/gcc/README.gcc10:1.6
--- src/external/gpl3/gcc/README.gcc10:1.5	Tue Apr 13 10:10:25 2021
+++ src/external/gpl3/gcc/README.gcc10	Tue Apr 13 22:24:56 2021
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc10,v 1.5 2021/04/13 10:10:25 mrg Exp $
+$NetBSD: README.gcc10,v 1.6 2021/04/13 22:24:56 mrg Exp $
 
 
 new stuff:
@@ -50,7 +50,7 @@ earmv7eb	y	b	y	y		n		?	?	?
 earmv7hf	y	y	y	y		y		y	y	n
 earmv7hfeb	y	b	y	y		y		?	?	?
 hppa		y	b	y	y		y		?	?	?
-i386		y	y	y	y		y		y	?	?
+i386		y	y	y	y		y		y	n[8]	?
 ia64		y	y	y	y		n[2]		?	N/A	n
 m68000		y	b	y	y		n[1]		?	?	?
 m68k		y	y	y	y		y		?	?	?
@@ -106,6 +106,9 @@ architecture	tools	kernels	libgcc	native
  19 |   iarg[1] = SCARG(p, args[SYS_MAXSYSARGS]); /* register_t */
 | ^
   which makes sense as args[8] is out of bounds.
+  -- this issue has been -Wno-'d but should be investigated.
+[8] - i386 seems to have a signal delivery issue.  GCC 9 or 10 kernels are
+  unable to reboot properly, and GCC 10 atf runs hang in signal delivery.
 
 
 



CVS commit: src/sys/rump

2021-04-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 13 22:23:42 UTC 2021

Modified Files:
src/sys/rump: Makefile.rump

Log Message:
Pass -isystem and -imacro ccp flags to lint


To generate a diff of this commit:
cvs rdiff -u -r1.130 -r1.131 src/sys/rump/Makefile.rump

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

Modified files:

Index: src/sys/rump/Makefile.rump
diff -u src/sys/rump/Makefile.rump:1.130 src/sys/rump/Makefile.rump:1.131
--- src/sys/rump/Makefile.rump:1.130	Sun Mar 14 09:11:59 2021
+++ src/sys/rump/Makefile.rump	Tue Apr 13 18:23:42 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rump,v 1.130 2021/03/14 13:11:59 rin Exp $
+#	$NetBSD: Makefile.rump,v 1.131 2021/04/13 22:23:42 christos Exp $
 #
 
 .if !defined(_RUMP_MK)
@@ -56,9 +56,9 @@ CFLAGS+=	-ffreestanding -fno-strict-alia
 
 CWARNFLAGS+=	-Wno-format-zero-length -Wno-pointer-sign
 
-CPPFLAGS+=	-imacros ${RUMPTOP}/include/opt/opt_rumpkernel.h
+CPPIFLAGS+=	-imacros ${RUMPTOP}/include/opt/opt_rumpkernel.h
 .ifdef BUILDRUMP_IMACROS
-CPPFLAGS+=	-imacros ${BUILDRUMP_IMACROS}
+CPPIFLAGS+=	-imacros ${BUILDRUMP_IMACROS}
 .endif
 
 CPPFLAGS+=	-I${.CURDIR} -I.
@@ -70,8 +70,8 @@ SHLIB_MAJOR?=	0
 SHLIB_MINOR?=	0
 
 .ifdef NEED_ISYSTEM
-CPPFLAGS+=	-isystem ${RUMPTOP}/../arch
-CPPFLAGS+=	-isystem ${RUMPTOP}/..
+CPPIFLAGS+=	-isystem ${RUMPTOP}/../arch
+CPPIFLAGS+=	-isystem ${RUMPTOP}/..
 .else
 CPPFLAGS+=	-I${RUMPTOP}/../arch
 CPPFLAGS+=	-I${RUMPTOP}/..
@@ -261,6 +261,9 @@ COMMENT?=	(no description)
 rumpdescribe: .PHONY
 	@printf '%-24s %s\n' '${LIB}' '${COMMENT}'
 
+CPPFLAGS+=	${CPPIFLAGS}
+LINTFLAGS+=	${CPPIFLAGS:S/^/-Z /}
+
 _BSD_IOCONF_MK_USER_=1
 .include 
 



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

2021-04-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 13 22:22:02 UTC 2021

Modified Files:
src/usr.bin/xlint/lint1: cgram.y

Log Message:
Allow type attributes after function pointer parameters


To generate a diff of this commit:
cvs rdiff -u -r1.212 -r1.213 src/usr.bin/xlint/lint1/cgram.y

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/xlint/lint1/cgram.y
diff -u src/usr.bin/xlint/lint1/cgram.y:1.212 src/usr.bin/xlint/lint1/cgram.y:1.213
--- src/usr.bin/xlint/lint1/cgram.y:1.212	Mon Apr 12 11:55:26 2021
+++ src/usr.bin/xlint/lint1/cgram.y	Tue Apr 13 18:22:02 2021
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.212 2021/04/12 15:55:26 christos Exp $ */
+/* $NetBSD: cgram.y,v 1.213 2021/04/13 22:22:02 christos Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: cgram.y,v 1.212 2021/04/12 15:55:26 christos Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.213 2021/04/13 22:22:02 christos Exp $");
 #endif
 
 #include 
@@ -123,7 +123,7 @@ anonymize(sym_t *s)
 }
 %}
 
-%expect 165
+%expect 177
 
 %union {
 	val_t	*y_val;
@@ -1257,14 +1257,14 @@ identifier_list:
 	;
 
 abstract_decl_param_list:
-	  abstract_decl_lparen T_RPAREN {
+	  abstract_decl_lparen T_RPAREN opt_type_attribute {
 		$$ = NULL;
 	  }
-	| abstract_decl_lparen vararg_parameter_type_list T_RPAREN {
+	| abstract_decl_lparen vararg_parameter_type_list T_RPAREN opt_type_attribute {
 		dcs->d_proto = true;
 		$$ = $2;
 	  }
-	| abstract_decl_lparen error T_RPAREN {
+	| abstract_decl_lparen error T_RPAREN opt_type_attribute {
 		$$ = NULL;
 	  }
 	;



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

2021-04-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 13 22:21:19 UTC 2021

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

Log Message:
add a test for a type attribute after a param function pointer


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/xlint/lint1/msg_124.c

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

Modified files:

Index: src/tests/usr.bin/xlint/lint1/msg_124.c
diff -u src/tests/usr.bin/xlint/lint1/msg_124.c:1.8 src/tests/usr.bin/xlint/lint1/msg_124.c:1.9
--- src/tests/usr.bin/xlint/lint1/msg_124.c:1.8	Sun Feb 28 07:40:00 2021
+++ src/tests/usr.bin/xlint/lint1/msg_124.c	Tue Apr 13 18:21:19 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_124.c,v 1.8 2021/02/28 12:40:00 rillig Exp $	*/
+/*	$NetBSD: msg_124.c,v 1.9 2021/04/13 22:21:19 christos Exp $	*/
 # 3 "msg_124.c"
 
 // Test for message: illegal pointer combination (%s) and (%s), op %s [124]
@@ -49,3 +49,6 @@ compare_pointers(const void *vp, const c
 	ok(ip == 0L);
 	ok(fp == 0L);
 }
+
+void	test_varargs_attribute(void (*pr)(const char *, ...) __attribute__((__format__(__printf__, 1, 2;
+



CVS commit: src/sys/modules/dtrace

2021-04-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Apr 13 19:16:51 UTC 2021

Modified Files:
src/sys/modules/dtrace/netbsd32_syscall: Makefile
src/sys/modules/dtrace/syscall: Makefile

Log Message:
apply -Wno-error=array-bounds for GCC 10.

these trigger "pointer to end of array" issues, and i'm not
entirely sure what is happening in the code generated for the
two "INDIR" system calls from syscalls.master.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/modules/dtrace/netbsd32_syscall/Makefile
cvs rdiff -u -r1.7 -r1.8 src/sys/modules/dtrace/syscall/Makefile

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

Modified files:

Index: src/sys/modules/dtrace/netbsd32_syscall/Makefile
diff -u src/sys/modules/dtrace/netbsd32_syscall/Makefile:1.7 src/sys/modules/dtrace/netbsd32_syscall/Makefile:1.8
--- src/sys/modules/dtrace/netbsd32_syscall/Makefile:1.7	Sun Feb 17 04:05:48 2019
+++ src/sys/modules/dtrace/netbsd32_syscall/Makefile	Tue Apr 13 19:16:51 2021
@@ -16,6 +16,7 @@ WARNS=		4
 CPPFLAGS+=	-Wno-unknown-pragmas
 
 CPPFLAGS+=	${${ACTIVE_CC} == "gcc" :? -Wno-discarded-qualifiers :}
+CPPFLAGS+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-error=array-bounds :}
 CPPFLAGS+=	${${ACTIVE_CC} == "clang" :? -Wno-incompatible-pointer-types-discards-qualifiers :}
 
 .include 

Index: src/sys/modules/dtrace/syscall/Makefile
diff -u src/sys/modules/dtrace/syscall/Makefile:1.7 src/sys/modules/dtrace/syscall/Makefile:1.8
--- src/sys/modules/dtrace/syscall/Makefile:1.7	Sun Feb 17 04:05:48 2019
+++ src/sys/modules/dtrace/syscall/Makefile	Tue Apr 13 19:16:51 2021
@@ -16,6 +16,7 @@ WARNS=		4
 CPPFLAGS+=	-Wno-unknown-pragmas
 
 CPPFLAGS+=	${${ACTIVE_CC} == "gcc" :? -Wno-discarded-qualifiers :}
+CPPFLAGS+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-error=array-bounds :}
 CPPFLAGS+=	${${ACTIVE_CC} == "clang" :? -Wno-incompatible-pointer-types-discards-qualifiers :}
 
 .include 



CVS commit: src/sys/arch/zaurus/dev

2021-04-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Apr 13 13:18:50 UTC 2021

Modified Files:
src/sys/arch/zaurus/dev: w100lcd.c

Log Message:
Make LCD BrightnessUp/BrightnessDown work on C7x0/860.

Patch from steleto:
 https://gist.github.com/steleto/10f62a074bff0c188fcc10c14ef40b5a
and also confirmed by me on SL-C700.

Worth to pullup to netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/zaurus/dev/w100lcd.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/zaurus/dev/w100lcd.c
diff -u src/sys/arch/zaurus/dev/w100lcd.c:1.2 src/sys/arch/zaurus/dev/w100lcd.c:1.3
--- src/sys/arch/zaurus/dev/w100lcd.c:1.2	Fri Feb 10 11:25:42 2012
+++ src/sys/arch/zaurus/dev/w100lcd.c	Tue Apr 13 13:18:50 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: w100lcd.c,v 1.2 2012/02/10 11:25:42 tsutsui Exp $ */
+/* $NetBSD: w100lcd.c,v 1.3 2021/04/13 13:18:50 tsutsui Exp $ */
 /*
  * Copyright (c) 2002, 2003  Genetec Corporation.  All rights reserved.
  * Written by Hiroyuki Bessho for Genetec Corporation.
@@ -39,7 +39,9 @@
  * LCD on/off switch and backlight brightness are done in lcdctl.c.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: w100lcd.c,v 1.2 2012/02/10 11:25:42 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: w100lcd.c,v 1.3 2021/04/13 13:18:50 tsutsui Exp $");
+
+#include "lcdctl.h"
 
 #include 
 #include 
@@ -58,6 +60,9 @@ __KERNEL_RCSID(0, "$NetBSD: w100lcd.c,v 
 
 #include 
 #include 
+#if NLCDCTL > 0
+#include 
+#endif
 
 /*
  * wsdisplay glue



CVS commit: src/lib/libform

2021-04-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 13 13:13:04 UTC 2021

Modified Files:
src/lib/libform: field.c form.c internals.c type_alnum.c type_alpha.c
type_enum.c type_integer.c type_numeric.c type_regex.c

Log Message:
- fix memory leak
- xxx questionable allocation
- remove casts
- use sizeof(*var)
- bcopy -> memcpy/memmove


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/lib/libform/field.c
cvs rdiff -u -r1.16 -r1.17 src/lib/libform/form.c
cvs rdiff -u -r1.39 -r1.40 src/lib/libform/internals.c
cvs rdiff -u -r1.11 -r1.12 src/lib/libform/type_alnum.c
cvs rdiff -u -r1.12 -r1.13 src/lib/libform/type_alpha.c \
src/lib/libform/type_enum.c
cvs rdiff -u -r1.8 -r1.9 src/lib/libform/type_integer.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libform/type_numeric.c
cvs rdiff -u -r1.7 -r1.8 src/lib/libform/type_regex.c

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

Modified files:

Index: src/lib/libform/field.c
diff -u src/lib/libform/field.c:1.31 src/lib/libform/field.c:1.32
--- src/lib/libform/field.c:1.31	Wed Mar  9 14:47:13 2016
+++ src/lib/libform/field.c	Tue Apr 13 09:13:03 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: field.c,v 1.31 2016/03/09 19:47:13 christos Exp $	*/
+/*	$NetBSD: field.c,v 1.32 2021/04/13 13:13:03 christos Exp $	*/
 /*-
  * Copyright (c) 1998-1999 Brett Lymn
  * (bl...@baea.com.au, brett_l...@yahoo.com.au)
@@ -29,7 +29,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: field.c,v 1.31 2016/03/09 19:47:13 christos Exp $");
+__RCSID("$NetBSD: field.c,v 1.32 2021/04/13 13:13:03 christos Exp $");
 
 #include 
 #include 
@@ -751,12 +751,12 @@ _formi_create_field(FIELD *prototype, in
 	(nrows < 0) || (nbuf < 0))
 		return NULL;
 	
-	if ((new = (FIELD *)malloc(sizeof(FIELD))) == NULL) {
+	if ((new = malloc(sizeof(*new))) == NULL) {
 		return NULL;
 	}
 
 	  /* copy in the default field info */
-	bcopy(prototype, new, sizeof(FIELD));
+	memcpy(new, prototype, sizeof(*new));
 
 	new->nbuf = nbuf + 1;
 	new->rows = rows;
@@ -775,7 +775,6 @@ FIELD *
 new_field(int rows, int cols, int frow, int fcol, int nrows, int nbuf)
 {
 	FIELD *new;
-	size_t buf_len;
 	int i;
 	
 
@@ -783,31 +782,24 @@ new_field(int rows, int cols, int frow, 
    frow, fcol, nrows, nbuf)) == NULL)
 		return NULL;
 	
-	buf_len = (nbuf + 1) * sizeof(FORM_STR);
-	
-	if ((new->buffers = (FORM_STR *)malloc(buf_len)) == NULL) {
+	if ((new->buffers = calloc(nbuf + 1, sizeof(*new->buffers))) == NULL) {
 		free(new);
 		return NULL;
 	}
 
-	  /* Initialise the strings to a zero length string */
+	/* Initialise the strings to a zero length string */
 	for (i = 0; i < nbuf + 1; i++) {
 		if ((new->buffers[i].string =
-		 (char *) malloc(sizeof(char))) == NULL) {
-			free(new->buffers);
-			free(new);
-			return NULL;
+		malloc(sizeof(*new->buffers[i].string))) == NULL) {
+			goto out;
 		}
 		new->buffers[i].string[0] = '\0';
 		new->buffers[i].length = 0;
 		new->buffers[i].allocated = 1;
 	}
 
-	if ((new->alines = (_FORMI_FIELD_LINES *)
-	 malloc(sizeof(struct _formi_field_lines))) == NULL) {
-		free(new->buffers);
-		free(new);
-		return NULL;
+	if ((new->alines = malloc(sizeof(*new->alines))) == NULL) {
+		goto out;
 	}
 
 	new->alines->prev = NULL;
@@ -822,6 +814,13 @@ new_field(int rows, int cols, int frow, 
 	new->cur_line = new->alines;
 	
 	return new;
+out:
+	while (--i >= 0) {
+		free(new->buffers[i].string);
+	}
+	free(new->buffers);
+	free(new);
+	return NULL;
 }
 
 /*
@@ -836,23 +835,24 @@ dup_field(FIELD *field, int frow, int fc
 	if (field == NULL)
 		return NULL;
 
-	  /*  this right */
+	/* XXX: this right */
 	if ((new = _formi_create_field(field, (int) field->rows,
-   (int ) field->cols,
+   (int) field->cols,
    frow, fcol, (int) field->nrows,
    field->nbuf - 1)) == NULL)
 		return NULL;
 
 	row_len = (field->rows + field->nrows + 1) * field->cols;
-	buf_len = (field->nbuf + 1) * row_len * sizeof(FORM_STR);
+	buf_len = (field->nbuf + 1) * row_len * sizeof(*new->buffers);
 	
-	if ((new->buffers = (FORM_STR *)malloc(buf_len)) == NULL) {
+	/* XXX: dups buffers but not their strings? */
+	if ((new->buffers = malloc(buf_len)) == NULL) {
 		free(new);
 		return NULL;
 	}
 
 	  /* copy the buffers from the source field into the new copy */
-	bcopy(field->buffers, new->buffers, buf_len);
+	memcpy(new->buffers, field->buffers, buf_len);
 
 	return new;
 }

Index: src/lib/libform/form.c
diff -u src/lib/libform/form.c:1.16 src/lib/libform/form.c:1.17
--- src/lib/libform/form.c:1.16	Wed Mar  9 14:47:13 2016
+++ src/lib/libform/form.c	Tue Apr 13 09:13:04 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: form.c,v 1.16 2016/03/09 19:47:13 christos Exp $	*/
+/*	$NetBSD: form.c,v 1.17 2021/04/13 13:13:04 christos Exp $	*/
 
 /*-
  * Copyright (c) 1998-1999 Brett Lymn
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: form.c,v 1.16 2016/03/09 19:47:13 

CVS commit: src/external/gpl3/gcc

2021-04-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Apr 13 10:10:25 UTC 2021

Modified Files:
src/external/gpl3/gcc: README.gcc10

Log Message:
with dtrace enabled, there is at least one remaining issue for amd64.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gcc/README.gcc10

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/README.gcc10
diff -u src/external/gpl3/gcc/README.gcc10:1.4 src/external/gpl3/gcc/README.gcc10:1.5
--- src/external/gpl3/gcc/README.gcc10:1.4	Tue Apr 13 08:57:39 2021
+++ src/external/gpl3/gcc/README.gcc10	Tue Apr 13 10:10:25 2021
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc10,v 1.4 2021/04/13 08:57:39 mrg Exp $
+$NetBSD: README.gcc10,v 1.5 2021/04/13 10:10:25 mrg Exp $
 
 
 new stuff:
@@ -65,7 +65,7 @@ sh3el		y	y	y	y		y		y	?	?
 sparc		y	y	y	y		y		y	y	n
 sparc64		y	y	y	y		y		y	y	n
 vax		y	y	y	y		y		y	n[6]	n
-x86_64		y	y	y	y		y		y	y	n
+x86_64		y	y	y	y		y[7]		y	y	?
 riscv32		y	N/A	y	y		y		N/A	N/A	n
 riscv64		y	N/A	y	y		y		N/A	N/A	n
 --
@@ -101,6 +101,12 @@ architecture	tools	kernels	libgcc	native
 [5] - userland is broken.  some dynamic apps run on old install (ie, old
   ld.elf_so & shlibs) but nothing in chroot runs (static or dynamic).
 [6] - vax vs c++ exceptions issue
+[7] - with ctf/dtrace enabled, this happens:
+  /usr/src2/sys/kern/systrace_args.c:19:13: error: array subscript 8 is above array bounds of 'const union [8]' [-Werror=array-bounds]
+ 19 |   iarg[1] = SCARG(p, args[SYS_MAXSYSARGS]); /* register_t */
+| ^
+  which makes sense as args[8] is out of bounds.
+
 
 
 



CVS commit: src/external/cddl/osnet/usr.bin/ctfconvert

2021-04-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Apr 13 09:28:42 UTC 2021

Modified Files:
src/external/cddl/osnet/usr.bin/ctfconvert: Makefile

Log Message:
ignore a "should be impossible" uninitialised variable error.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/cddl/osnet/usr.bin/ctfconvert/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/cddl/osnet/usr.bin/ctfconvert/Makefile
diff -u src/external/cddl/osnet/usr.bin/ctfconvert/Makefile:1.9 src/external/cddl/osnet/usr.bin/ctfconvert/Makefile:1.10
--- src/external/cddl/osnet/usr.bin/ctfconvert/Makefile:1.9	Sun Feb  9 07:55:13 2020
+++ src/external/cddl/osnet/usr.bin/ctfconvert/Makefile	Tue Apr 13 09:28:42 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.9 2020/02/09 07:55:13 fox Exp $
+#	$NetBSD: Makefile,v 1.10 2021/04/13 09:28:42 mrg Exp $
 
 # $FreeBSD: head/cddl/usr.bin/ctfconvert/Makefile 314654 2017-03-04 11:30:04Z ngie $
 
@@ -37,5 +37,6 @@ SRCS=		alist.c \
 COPTS.dwarf.c +=	${GCC_NO_STRINGOP_TRUNCATION}
 COPTS.st_parse.c +=	-Wno-format-nonliteral
 COPTS.util.c +=		-Wno-format-nonliteral
+COPTS.st_parse.c +=	${GCC_NO_MAYBE_UNINITIALIZED}
 
 .include 



CVS commit: src/external/cddl/osnet/lib/libdtrace

2021-04-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Apr 13 09:20:55 UTC 2021

Modified Files:
src/external/cddl/osnet/lib/libdtrace: Makefile

Log Message:
XXX: ignore warning about overlapping buffers for sprintf().


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/external/cddl/osnet/lib/libdtrace/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/cddl/osnet/lib/libdtrace/Makefile
diff -u src/external/cddl/osnet/lib/libdtrace/Makefile:1.29 src/external/cddl/osnet/lib/libdtrace/Makefile:1.30
--- src/external/cddl/osnet/lib/libdtrace/Makefile:1.29	Mon Mar 29 05:18:02 2021
+++ src/external/cddl/osnet/lib/libdtrace/Makefile	Tue Apr 13 09:20:55 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.29 2021/03/29 05:18:02 simonb Exp $
+#	$NetBSD: Makefile,v 1.30 2021/04/13 09:20:55 mrg Exp $
 
 # $FreeBSD: head/cddl/lib/libdtrace/Makefile 314654 2017-03-04 11:30:04Z ngie $
 
@@ -145,4 +145,6 @@ beforedepend:	dt_errtags.c dt_names.c
 
 LIBDPLIBS=	proc	${NETBSDSRCDIR}/external/bsd/libproc/lib
 
+COPTS.dt_link.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-restrict :}
+
 .include 



CVS commit: src/external/gpl3/gcc

2021-04-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Apr 13 08:57:39 UTC 2021

Modified Files:
src/external/gpl3/gcc: README.gcc10

Log Message:
sparc and amd64 successfully finished their atf runs.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gcc/README.gcc10

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/README.gcc10
diff -u src/external/gpl3/gcc/README.gcc10:1.3 src/external/gpl3/gcc/README.gcc10:1.4
--- src/external/gpl3/gcc/README.gcc10:1.3	Tue Apr 13 08:22:40 2021
+++ src/external/gpl3/gcc/README.gcc10	Tue Apr 13 08:57:39 2021
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc10,v 1.3 2021/04/13 08:22:40 mrg Exp $
+$NetBSD: README.gcc10,v 1.4 2021/04/13 08:57:39 mrg Exp $
 
 
 new stuff:
@@ -62,10 +62,10 @@ powerpc		y	b	y	y		y		?	?	?
 powerpc64	y	b	y	y		y		N/A	N/A	?
 sh3eb		y	b	y	y		y		?	?	?
 sh3el		y	y	y	y		y		y	?	?
-sparc		y	y	y	y		y		y	?	?
+sparc		y	y	y	y		y		y	y	n
 sparc64		y	y	y	y		y		y	y	n
 vax		y	y	y	y		y		y	n[6]	n
-x86_64		y	y	y	y		y		y	?	?
+x86_64		y	y	y	y		y		y	y	n
 riscv32		y	N/A	y	y		y		N/A	N/A	n
 riscv64		y	N/A	y	y		y		N/A	N/A	n
 --



CVS commit: src

2021-04-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Apr 13 08:55:06 UTC 2021

Modified Files:
src/sys/arch/hppa/stand: Makefile.inc
src/usr.sbin/crash: Makefile

Log Message:
more -fcommon for sources not ready yet


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hppa/stand/Makefile.inc
cvs rdiff -u -r1.45 -r1.46 src/usr.sbin/crash/Makefile

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/hppa/stand/Makefile.inc
diff -u src/sys/arch/hppa/stand/Makefile.inc:1.4 src/sys/arch/hppa/stand/Makefile.inc:1.5
--- src/sys/arch/hppa/stand/Makefile.inc:1.4	Tue Aug 29 09:17:43 2017
+++ src/sys/arch/hppa/stand/Makefile.inc	Tue Apr 13 08:55:06 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.4 2017/08/29 09:17:43 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.5 2021/04/13 08:55:06 mrg Exp $
 
 NOSSP=yes
 NOPIE=yes
@@ -10,3 +10,4 @@ BINDIR=		/usr/mdec
 COPTS+=		-Wno-pointer-sign
 COPTS+=		-fno-strict-aliasing
 COPTS+=		-fno-unwind-tables
+COPTS+=		-fcommon

Index: src/usr.sbin/crash/Makefile
diff -u src/usr.sbin/crash/Makefile:1.45 src/usr.sbin/crash/Makefile:1.46
--- src/usr.sbin/crash/Makefile:1.45	Mon Aug 17 04:15:33 2020
+++ src/usr.sbin/crash/Makefile	Tue Apr 13 08:55:06 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.45 2020/08/17 04:15:33 mrg Exp $
+#	$NetBSD: Makefile,v 1.46 2021/04/13 08:55:06 mrg Exp $
 
 PROG=		crash
 MAN=		crash.8
@@ -125,5 +125,7 @@ COPTS.kern_timeout.c += -Wno-stack-prote
 
 COPTS.db_command.c+=	${GCC_NO_CAST_FUNCTION_TYPE}
 
+COPTS+=		-fcommon
+
 .include 
 .include 



CVS commit: src/external/gpl3/gcc

2021-04-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Apr 13 08:22:40 UTC 2021

Modified Files:
src/external/gpl3/gcc: README.gcc10

Log Message:
update the status of GCC.  summary:  mostly looking good.

- all targets build or can be attempted
- arm64 needs __aarch64_swp1_acq in both libgcc and libkern
- earmv4 works, earmv7hf works, all arm32 builds, rest untested
- hppa, most/all m68k, alpha, and most ppc builds, none tested
- ia64 kernel runs as well as before, userland fails to build
- i386 runs, seems mostly fine except lib/libc/sys/t_ptrace_wait
  resume test is hung, and cpu-spinning in a zombie
- sun2 grew again, too large but builds besides RAMDISK not fitting
- mips seems problematic.  some kernels fail some work, userland
  has problems with both static and dynamic n32 and n64 programs
- sh3el seems ok in gxemul/landisk, sh3eb not tested
- vax seems OK in simh (same c++ exception issues)

all ports kernels have been tested to build (though perhaps with
some uncommited changes only needed for some, while most changes
are commited, about 15 are not but many ports build without them.)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gcc/README.gcc10

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/README.gcc10
diff -u src/external/gpl3/gcc/README.gcc10:1.2 src/external/gpl3/gcc/README.gcc10:1.3
--- src/external/gpl3/gcc/README.gcc10:1.2	Mon Apr 12 08:31:30 2021
+++ src/external/gpl3/gcc/README.gcc10	Tue Apr 13 08:22:40 2021
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc10,v 1.2 2021/04/12 08:31:30 mrg Exp $
+$NetBSD: README.gcc10,v 1.3 2021/04/13 08:22:40 mrg Exp $
 
 
 new stuff:
@@ -21,7 +21,7 @@ todo:
 arch/feature list.
 
 tools:		does build.sh tools work?
-kernels:	does a kernel run?
+kernels:	does a kernel run?  y (yes), b (builds/ready), ? (not ready)
 libgcc:		does libgcc build?
 native-gcc:	does a full mknative-gcc complete?
 make release:	does build.sh release complete?
@@ -34,37 +34,37 @@ architecture	tools	kernels	libgcc	native
 	-	---	--	--			---	
 aarch64		y	n[3]	y	y		n		?	?	?
 aarch64be	y	n	n	y		n		?	?	?
-alpha		y	n	n	y		n		?	?	?
-earmv4		y	n	n	y		n		?	?	?
-earmv4eb	y	n	n	y		n		?	?	?
-earmv5		y	n	n	y		n		?	?	?
-earmv5eb	y	n	n	y		n		?	?	?
-earmv5hf	y	n	n	y		n		?	?	?
-earmv5hfeb	y	n	n	y		n		?	?	?
-earmv6		y	n	n	y		n		?	?	?
-earmv6eb	y	n	n	y		n		?	?	?
-earmv6hf	y	n	n	y		n		?	?	?
-earmv6hfeb	y	n	n	y		n		?	?	?
-earmv7		y	n	n	y		n		?	?	?
-earmv7eb	y	n	n	y		n		?	?	?
-earmv7hf	y	n	n	y		n		?	?	?
-earmv7hfeb	y	n	n	y		n		?	?	?
-hppa		y	n	n	y		n		?	?	?
-i386		y	n	n	y		n		?	?	?
-ia64		y	n	n	y		n		?	N/A	?
-m68000		y	n	n	y		n		?	?	?
-m68k		y	n	n	y		n		?	?	?
-mipseb		y	n	y	y		y		?	?	?
-mipsel		y	n	y	y		y		?	?	?
-mips64eb	y	n	y	y		y		?	?	?
-mips64el	y	n	y	y		y		?	?	?
-powerpc		y	n	y	y		y		?	?	?
-powerpc64	y	n	y	y		y		N/A	N/A	?
-sh3eb		y	n	n	y		n		?	?	?
-sh3el		y	n	n	y		n		?	?	?
+alpha		y	b	y	y		y		?	?	?
+earmv4		y	y	y	y		y		y	?	n
+earmv4eb	y	b	y	y		n		?	?	?
+earmv5		y	b	y	y		n		?	?	?
+earmv5eb	y	b	y	y		n		?	?	?
+earmv5hf	y	b	y	y		n		?	?	?
+earmv5hfeb	y	b	y	y		n		?	?	?
+earmv6		y	b	y	y		n		?	?	?
+earmv6eb	y	b	y	y		n		?	?	?
+earmv6hf	y	b	y	y		n		?	?	?
+earmv6hfeb	y	b	y	y		n		?	?	?
+earmv7		y	b	y	y		n		?	?	?
+earmv7eb	y	b	y	y		n		?	?	?
+earmv7hf	y	y	y	y		y		y	y	n
+earmv7hfeb	y	b	y	y		y		?	?	?
+hppa		y	b	y	y		y		?	?	?
+i386		y	y	y	y		y		y	?	?
+ia64		y	y	y	y		n[2]		?	N/A	n
+m68000		y	b	y	y		n[1]		?	?	?
+m68k		y	y	y	y		y		?	?	?
+mipseb		y	b	y	y		y		?	?	?
+mipsel		y	b	y	y		y		?	?	?
+mips64eb	y	y	y	y		y		n[4,5]	?	?
+mips64el	y	b	y	y		y		?	?	?
+powerpc		y	b	y	y		y		?	?	?
+powerpc64	y	b	y	y		y		N/A	N/A	?
+sh3eb		y	b	y	y		y		?	?	?
+sh3el		y	y	y	y		y		y	?	?
 sparc		y	y	y	y		y		y	?	?
-sparc64		y	y	y	y		y		y	?	?
-vax		y	n	n	y		n		?	?	?
+sparc64		y	y	y	y		y		y	y	n
+vax		y	y	y	y		y		y	n[6]	n
 x86_64		y	y	y	y		y		y	?	?
 riscv32		y	N/A	y	y		y		N/A	N/A	n
 riscv64		y	N/A	y	y		y		N/A	N/A	n
@@ -73,8 +73,34 @@ coldfire	?	N/A	?	?		?		N/A	N/A
 	-	---	--	--			---
 architecture	tools	kernels	libgcc	native-gcc	make release	runs	atf
 
+[1] - ramdisk.fs is too large, needs fixing.
+[2] - rescue fails to build:
+  /tmp//ccnNTCsS.s: Assembler messages:
+  /tmp//ccnNTCsS.s:610: Warning: .label_state outside of body region
+  /tmp//ccnNTCsS.s:611: Warning: .restore outside of body region
+  /tmp//ccnNTCsS.s: Error: 2 warnings, treating warnings as errors
 [3] - missing __aarch64_swp1_acq in kernels.
-
+[4] - edgerouter lite3 crashes early in boot:
+  [   1.000] u-boot bootmem desc @ 0x24108 version 3.0
+  [   1.000] phys segment: 0xfc000 @ 0x102000
+  [   1.000] adding 0xfc000 @ 0x102000 to freelist 3
+  [   1.000] phys segment: 0x7276000 @ 0xe8a000
+  [   1.000] adding 0x7276000 @ 0xe8a000 to freelist 3
+  [   1.000] phys 

CVS commit: src/games/warp

2021-04-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Apr 13 08:06:38 UTC 2021

Modified Files:
src/games/warp: term.h

Log Message:
avoid duplicating symbols in libterminfo.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/games/warp/term.h

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

Modified files:

Index: src/games/warp/term.h
diff -u src/games/warp/term.h:1.5 src/games/warp/term.h:1.6
--- src/games/warp/term.h:1.5	Wed Nov 11 17:11:19 2020
+++ src/games/warp/term.h	Tue Apr 13 08:06:38 2021
@@ -252,8 +252,10 @@ EXT bool bizarre INIT(false);			/* do we
  */
 
 #ifdef HAVETERMLIB
+#if 0
 EXT char *BC INIT(NULL);		/* backspace character */
 EXT char *UP INIT(NULL);		/* move cursor up one line */
+#endif
 EXT char *myUP;
 EXT char *ND INIT(NULL);		/* non-destructive cursor right */
 EXT char *myND;
@@ -275,8 +277,10 @@ EXT char *UC INIT(NULL);		/* underline a
 EXT int UG INIT(0);		/* blanks left by US and UE */
 EXT bool AM INIT(false);		/* does terminal have automatic margins? */
 EXT bool XN INIT(false);		/* does it eat 1st newline after automatic wrap? */
+#if 0
 EXT char PC INIT(0);		/* pad character for use by tputs() */
 EXT short ospeed INIT(0);	/* terminal output speed, for use by tputs() */
+#endif
 EXT int LINES INIT(0), COLS INIT(0);	/* size of screen */
 EXT int just_a_sec INIT(960);			/* 1 sec at current baud rate */
 	/* (number of nulls) */



CVS commit: src/external/gpl3/gcc/dist/libgcc

2021-04-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Apr 13 08:06:11 UTC 2021

Modified Files:
src/external/gpl3/gcc/dist/libgcc: emutls.c

Log Message:
make this match the builtin prototypes.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.9 -r1.2 src/external/gpl3/gcc/dist/libgcc/emutls.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/gpl3/gcc/dist/libgcc/emutls.c
diff -u src/external/gpl3/gcc/dist/libgcc/emutls.c:1.1.1.9 src/external/gpl3/gcc/dist/libgcc/emutls.c:1.2
--- src/external/gpl3/gcc/dist/libgcc/emutls.c:1.1.1.9	Sat Apr 10 22:09:58 2021
+++ src/external/gpl3/gcc/dist/libgcc/emutls.c	Tue Apr 13 08:06:11 2021
@@ -50,8 +50,8 @@ struct __emutls_array
   void **data[];
 };
 
-void *__emutls_get_address (struct __emutls_object *);
-void __emutls_register_common (struct __emutls_object *, word, word, void *);
+void *__emutls_get_address (void *);
+void __emutls_register_common (void *, word, word, void *);
 
 #ifdef __GTHREADS
 #ifdef __GTHREAD_MUTEX_INIT
@@ -124,8 +124,10 @@ emutls_alloc (struct __emutls_object *ob
 }
 
 void *
-__emutls_get_address (struct __emutls_object *obj)
+__emutls_get_address (void *vobj)
 {
+  struct __emutls_object *obj = vobj;
+
   if (! __gthread_active_p ())
 {
   if (__builtin_expect (obj->loc.ptr == NULL, 0))
@@ -188,9 +190,11 @@ __emutls_get_address (struct __emutls_ob
 }
 
 void
-__emutls_register_common (struct __emutls_object *obj,
+__emutls_register_common (void *vobj,
 			  word size, word align, void *templ)
 {
+  struct __emutls_object *obj = vobj;
+
   if (obj->size < size)
 {
   obj->size = size;



CVS commit: src/external/mit/xorg/server/xorg-server.old

2021-04-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Apr 13 07:53:59 UTC 2021

Modified Files:
src/external/mit/xorg/server/xorg-server.old: Makefile.serverlib
Makefile.servermod

Log Message:
apply -fcommon here as well.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/mit/xorg/server/xorg-server.old/Makefile.serverlib \
src/external/mit/xorg/server/xorg-server.old/Makefile.servermod

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

Modified files:

Index: src/external/mit/xorg/server/xorg-server.old/Makefile.serverlib
diff -u src/external/mit/xorg/server/xorg-server.old/Makefile.serverlib:1.2 src/external/mit/xorg/server/xorg-server.old/Makefile.serverlib:1.3
--- src/external/mit/xorg/server/xorg-server.old/Makefile.serverlib:1.2	Mon Apr 12 03:57:06 2021
+++ src/external/mit/xorg/server/xorg-server.old/Makefile.serverlib	Tue Apr 13 07:53:59 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.serverlib,v 1.2 2021/04/12 03:57:06 mrg Exp $
+#	$NetBSD: Makefile.serverlib,v 1.3 2021/04/13 07:53:59 mrg Exp $
 
 .include 		# for NETBSDSRCDIR and mk.conf processing
 
@@ -27,3 +27,6 @@ CPPFLAGS+=	-D__GLX_ALIGN64
 
 # IOPortBase is particularly annoying to fix
 COPTS+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -fcommon :}
+
+# IOPortBase is particularly annoying to fix
+COPTS+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -fcommon :}
Index: src/external/mit/xorg/server/xorg-server.old/Makefile.servermod
diff -u src/external/mit/xorg/server/xorg-server.old/Makefile.servermod:1.2 src/external/mit/xorg/server/xorg-server.old/Makefile.servermod:1.3
--- src/external/mit/xorg/server/xorg-server.old/Makefile.servermod:1.2	Mon Apr 12 03:57:06 2021
+++ src/external/mit/xorg/server/xorg-server.old/Makefile.servermod	Tue Apr 13 07:53:59 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.servermod,v 1.2 2021/04/12 03:57:06 mrg Exp $
+#	$NetBSD: Makefile.servermod,v 1.3 2021/04/13 07:53:59 mrg Exp $
 
 .include 	# For /etc/mk.conf processing
 
@@ -25,4 +25,7 @@ CPPFLAGS+=	${X11FLAGS.LOADABLE}
 .endif
 
 # IOPortBase is particularly annoying to fix
+
+# IOPortBase is particularly annoying to fix
+COPTS+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -fcommon :}
 COPTS+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -fcommon :}



CVS commit: src/usr.sbin/sysinst

2021-04-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Apr 13 07:53:19 UTC 2021

Modified Files:
src/usr.sbin/sysinst: Makefile.inc

Log Message:
some platforms trip -fcommon here too.  we should fix this.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/usr.sbin/sysinst/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/usr.sbin/sysinst/Makefile.inc
diff -u src/usr.sbin/sysinst/Makefile.inc:1.39 src/usr.sbin/sysinst/Makefile.inc:1.40
--- src/usr.sbin/sysinst/Makefile.inc:1.39	Tue Apr 13 04:59:00 2021
+++ src/usr.sbin/sysinst/Makefile.inc	Tue Apr 13 07:53:19 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.39 2021/04/13 04:59:00 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.40 2021/04/13 07:53:19 mrg Exp $
 #
 # Makefile for sysinst
 
@@ -253,5 +253,6 @@ check-lang:	msg.def msg_defs.h
 	@rm /tmp/sysinst.en
 
 COPTS.util.c+=	${GCC_NO_STRINGOP_TRUNCATION}
+COPTS+=		-fcommon
 
 .include 



CVS commit: src/external/gpl3/gcc/usr.bin/backend

2021-04-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Apr 13 06:30:36 UTC 2021

Modified Files:
src/external/gpl3/gcc/usr.bin/backend: Makefile

Log Message:
more -O0 for vax


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/external/gpl3/gcc/usr.bin/backend/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.64 src/external/gpl3/gcc/usr.bin/backend/Makefile:1.65
--- src/external/gpl3/gcc/usr.bin/backend/Makefile:1.64	Mon Apr 12 00:05:56 2021
+++ src/external/gpl3/gcc/usr.bin/backend/Makefile	Tue Apr 13 06:30:36 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.64 2021/04/12 00:05:56 mrg Exp $
+#	$NetBSD: Makefile,v 1.65 2021/04/13 06:30:36 mrg Exp $
 
 LIBISPRIVATE=	yes
 
@@ -552,6 +552,7 @@ COPTS.internal-fn.c+=-O0
 COPTS.lto-streamer-out.c+=-O0
 COPTS.omp-low.c+=-O0
 COPTS.predict.c+=-O0
+COPTS.range-op.cc+=-O0
 COPTS.recog.c+=-O0
 COPTS.sanopt.c+=-O0
 COPTS.stmt.c+=-O0
@@ -591,8 +592,8 @@ COPTS.ubsan.c+=-O0
 COPTS.varasm.c+=-O0
 COPTS.vr-values.c+=-O0
 COPTS.web.c+=-O0
-COPTS.wide-int.cc+=-O0
 COPTS.wide-int-range.cc+=-O0
+COPTS.wide-int.cc+=-O0
 .else
 COPTS.tree.c=	${${ACTIVE_CC} == "clang" :? -O0 :}
 .endif



CVS commit: src

2021-04-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Apr 13 06:25:49 UTC 2021

Modified Files:
src/external/apache2/mDNSResponder/usr.sbin/mdnsd: Makefile
src/external/mpl/dhcp/bin/server: Makefile
src/sbin/newfs_udf: udf_create.c
src/sys/fs/udf: udf_subr.c
src/sys/modules/hpacel: Makefile
src/usr.bin/rsh: rsh.c

Log Message:
more GCC 10 fixes.

mDNSResponder: another wrong return local address

dhcp: ignore a seemingly impossible stringop overflow

hpacel: avoid maybe uninitialised error that is wrong.

rsh: avoid impossible malloc(0)

udf: cast pointers through (uintptr_t) to fool invalid boundary checks


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 \
src/external/apache2/mDNSResponder/usr.sbin/mdnsd/Makefile
cvs rdiff -u -r1.6 -r1.7 src/external/mpl/dhcp/bin/server/Makefile
cvs rdiff -u -r1.28 -r1.29 src/sbin/newfs_udf/udf_create.c
cvs rdiff -u -r1.152 -r1.153 src/sys/fs/udf/udf_subr.c
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/hpacel/Makefile
cvs rdiff -u -r1.38 -r1.39 src/usr.bin/rsh/rsh.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/usr.sbin/mdnsd/Makefile
diff -u src/external/apache2/mDNSResponder/usr.sbin/mdnsd/Makefile:1.13 src/external/apache2/mDNSResponder/usr.sbin/mdnsd/Makefile:1.14
--- src/external/apache2/mDNSResponder/usr.sbin/mdnsd/Makefile:1.13	Sun Sep  6 07:20:26 2020
+++ src/external/apache2/mDNSResponder/usr.sbin/mdnsd/Makefile	Tue Apr 13 06:25:48 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.13 2020/09/06 07:20:26 mrg Exp $
+#	$NetBSD: Makefile,v 1.14 2021/04/13 06:25:48 mrg Exp $
 
 PROG=	mdnsd
 
@@ -20,4 +20,6 @@ MAN=	mdnsd.8
 CWARNFLAGS.clang+=	-Wno-unused-value -Wno-error=address-of-packed-member
 CWARNFLAGS.gcc+=	${GCC_NO_ADDR_OF_PACKED_MEMBER}
 
+COPTS.DNSCommon.c+=	${GCC_NO_RETURN_LOCAL_ADDR}
+
 .include 

Index: src/external/mpl/dhcp/bin/server/Makefile
diff -u src/external/mpl/dhcp/bin/server/Makefile:1.6 src/external/mpl/dhcp/bin/server/Makefile:1.7
--- src/external/mpl/dhcp/bin/server/Makefile:1.6	Sun Jun  7 23:29:16 2020
+++ src/external/mpl/dhcp/bin/server/Makefile	Tue Apr 13 06:25:48 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2020/06/07 23:29:16 fox Exp $
+# $NetBSD: Makefile,v 1.7 2021/04/13 06:25:48 mrg Exp $
 
 .include 
 
@@ -22,5 +22,6 @@ COPTS.ddns.c +=-Wno-stringop-overflow
 COPTS.mdb6.c +=		${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=format-overflow :}
 COPTS.omapi.c +=	-Wno-stack-protector
 COPTS.confpars.c+=	${GCC_NO_STRINGOP_TRUNCATION}
+COPTS.mdb6.c+=		${GCC_NO_STRINGOP_OVERFLOW}
 
 .include 

Index: src/sbin/newfs_udf/udf_create.c
diff -u src/sbin/newfs_udf/udf_create.c:1.28 src/sbin/newfs_udf/udf_create.c:1.29
--- src/sbin/newfs_udf/udf_create.c:1.28	Thu May 14 08:34:18 2020
+++ src/sbin/newfs_udf/udf_create.c	Tue Apr 13 06:25:48 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_create.c,v 1.28 2020/05/14 08:34:18 msaitoh Exp $ */
+/* $NetBSD: udf_create.c,v 1.29 2021/04/13 06:25:48 mrg Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -30,7 +30,7 @@
 #endif
 
 #include 
-__RCSID("$NetBSD: udf_create.c,v 1.28 2020/05/14 08:34:18 msaitoh Exp $");
+__RCSID("$NetBSD: udf_create.c,v 1.29 2021/04/13 06:25:48 mrg Exp $");
 
 #include 
 #include 
@@ -2025,7 +2025,7 @@ udf_append_meta_mapping_part_to_efe(stru
 	uint64_t inf_len, obj_size, logblks_rec;
 	uint32_t l_ad, l_ea;
 	uint16_t crclen;
-	uint8_t *bpos;
+	uintptr_t bpos;
 
 	inf_len = udf_rw64(efe->inf_len);
 	obj_size= udf_rw64(efe->obj_size);
@@ -2039,8 +2039,8 @@ udf_append_meta_mapping_part_to_efe(stru
 	icb->flags = udf_rw16(UDF_ICB_SHORT_ALLOC);
 
 	/* append short_ad */
-	bpos = (uint8_t *) efe->data + l_ea + l_ad;
-	memcpy(bpos, mapping, sizeof(struct short_ad));
+	bpos = (uintptr_t)efe->data + l_ea + l_ad;
+	memcpy((void *)bpos, mapping, sizeof(struct short_ad));
 
 	l_ad   += sizeof(struct short_ad);
 	crclen += sizeof(struct short_ad);

Index: src/sys/fs/udf/udf_subr.c
diff -u src/sys/fs/udf/udf_subr.c:1.152 src/sys/fs/udf/udf_subr.c:1.153
--- src/sys/fs/udf/udf_subr.c:1.152	Mon Jan 11 22:02:28 2021
+++ src/sys/fs/udf/udf_subr.c	Tue Apr 13 06:25:49 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_subr.c,v 1.152 2021/01/11 22:02:28 skrll Exp $ */
+/* $NetBSD: udf_subr.c,v 1.153 2021/04/13 06:25:49 mrg Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -29,7 +29,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.152 2021/01/11 22:02:28 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.153 2021/04/13 06:25:49 mrg Exp $");
 #endif /* not lint */
 
 
@@ -2664,7 +2664,8 @@ udf_update_vat_extattr_from_lvid(struct 
 	const char *extstr = "*UDF VAT LVExtension";
 	uint64_tvat_uniqueid;
 	uint32_toffset, a_l;
-	uint8_t*ea_start, *lvextpos;
+	uint8_t*ea_start;
+	uintptr_t   lvextpos;
 	int error;
 
 	/* get mountpoint and