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

2020-05-25 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Tue May 26 05:25:21 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: disasm.c

Log Message:
disassemblable bti insns


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/aarch64/aarch64/disasm.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/disasm.c
diff -u src/sys/arch/aarch64/aarch64/disasm.c:1.7 src/sys/arch/aarch64/aarch64/disasm.c:1.8
--- src/sys/arch/aarch64/aarch64/disasm.c:1.7	Mon May 25 10:39:48 2020
+++ src/sys/arch/aarch64/aarch64/disasm.c	Tue May 26 05:25:21 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: disasm.c,v 1.7 2020/05/25 10:39:48 ryo Exp $	*/
+/*	$NetBSD: disasm.c,v 1.8 2020/05/26 05:25:21 ryo Exp $	*/
 
 /*
  * Copyright (c) 2018 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: disasm.c,v 1.7 2020/05/25 10:39:48 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disasm.c,v 1.8 2020/05/26 05:25:21 ryo Exp $");
 
 #include 
 #include 
@@ -1681,6 +1681,18 @@ OP2FUNC(op_hint, CRm, op2)
 	case CRm_OP2(3, 3):
 		PRINTF("pacibsp\n");
 		break;
+	case CRm_OP2(4, 0):
+		PRINTF("bti\n");
+		break;
+	case CRm_OP2(4, 2):
+		PRINTF("bti\tc\n");
+		break;
+	case CRm_OP2(4, 4):
+		PRINTF("bti\tj\n");
+		break;
+	case CRm_OP2(4, 6):
+		PRINTF("bti\tjc\n");
+		break;
 	default:
 		PRINTF("hint\t#0x%"PRIx64"\n", op);
 		break;



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

2020-05-25 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Tue May 26 05:25:21 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: disasm.c

Log Message:
disassemblable bti insns


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/aarch64/aarch64/disasm.c

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



CVS commit: src/sys

2020-05-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue May 26 00:50:54 UTC 2020

Modified Files:
src/sys/dev/iscsi: iscsi_ioctl.c
src/sys/kern: kern_proc.c sys_process.c
src/sys/uvm: uvm_extern.h uvm_map.h

Log Message:
Catch up with the usage of struct vmspace::vm_refcnt

Use the dedicated reference counting routines.

Change the type of struct vmspace::vm_refcnt and struct vm_map::ref_count
to volatile.

Remove the unnecessary vm->vm_map.misc_lock locking in process_domem().

Reviewed by 


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/iscsi/iscsi_ioctl.c
cvs rdiff -u -r1.253 -r1.254 src/sys/kern/kern_proc.c
cvs rdiff -u -r1.179 -r1.180 src/sys/kern/sys_process.c
cvs rdiff -u -r1.226 -r1.227 src/sys/uvm/uvm_extern.h
cvs rdiff -u -r1.79 -r1.80 src/sys/uvm/uvm_map.h

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

Modified files:

Index: src/sys/dev/iscsi/iscsi_ioctl.c
diff -u src/sys/dev/iscsi/iscsi_ioctl.c:1.30 src/sys/dev/iscsi/iscsi_ioctl.c:1.31
--- src/sys/dev/iscsi/iscsi_ioctl.c:1.30	Fri Dec  7 14:59:19 2018
+++ src/sys/dev/iscsi/iscsi_ioctl.c	Tue May 26 00:50:54 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsi_ioctl.c,v 1.30 2018/12/07 14:59:19 mlelstv Exp $	*/
+/*	$NetBSD: iscsi_ioctl.c,v 1.31 2020/05/26 00:50:54 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -1308,7 +1308,7 @@ map_databuf(struct proc *p, void **buf, 
 	if ((p->p_sflag & PS_WEXIT) || (p->p_vmspace->vm_refcnt < 1)) {
 		return ISCSI_STATUS_NO_RESOURCES;
 	}
-	p->p_vmspace->vm_refcnt++;
+	uvmspace_addref(p->p_vmspace);
 
 	/* this is lifted from uvm_io */
 	error = uvm_map_extract(>p_vmspace->vm_map, databuf, datalen,

Index: src/sys/kern/kern_proc.c
diff -u src/sys/kern/kern_proc.c:1.253 src/sys/kern/kern_proc.c:1.254
--- src/sys/kern/kern_proc.c:1.253	Sat May 23 23:42:43 2020
+++ src/sys/kern/kern_proc.c	Tue May 26 00:50:53 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_proc.c,v 1.253 2020/05/23 23:42:43 ad Exp $	*/
+/*	$NetBSD: kern_proc.c,v 1.254 2020/05/26 00:50:53 kamil Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2006, 2007, 2008, 2020 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_proc.c,v 1.253 2020/05/23 23:42:43 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_proc.c,v 1.254 2020/05/26 00:50:53 kamil Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_kstack.h"
@@ -1753,7 +1753,7 @@ proc_vmspace_getref(struct proc *p, stru
 	/* curproc exception is for coredump. */
 
 	if ((p != curproc && (p->p_sflag & PS_WEXIT) != 0) ||
-	(p->p_vmspace->vm_refcnt < 1)) { /* XXX */
+	(p->p_vmspace->vm_refcnt < 1)) {
 		return EFAULT;
 	}
 

Index: src/sys/kern/sys_process.c
diff -u src/sys/kern/sys_process.c:1.179 src/sys/kern/sys_process.c:1.180
--- src/sys/kern/sys_process.c:1.179	Thu Apr 13 07:58:45 2017
+++ src/sys/kern/sys_process.c	Tue May 26 00:50:53 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_process.c,v 1.179 2017/04/13 07:58:45 skrll Exp $	*/
+/*	$NetBSD: sys_process.c,v 1.180 2020/05/26 00:50:53 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -118,7 +118,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sys_process.c,v 1.179 2017/04/13 07:58:45 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_process.c,v 1.180 2020/05/26 00:50:53 kamil Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ptrace.h"
@@ -168,12 +168,10 @@ process_domem(struct lwp *curl /*tracer*
 
 	vm = p->p_vmspace;
 
-	mutex_enter(>vm_map.misc_lock);
 	if ((l->l_flag & LW_WEXIT) || vm->vm_refcnt < 1)
 		error = EFAULT;
 	if (error == 0)
-		p->p_vmspace->vm_refcnt++;  /* XXX */
-	mutex_exit(>vm_map.misc_lock);
+		uvmspace_addref(p->p_vmspace);
 	if (error != 0)
 		return error;
 	error = uvm_io(>vm_map, uio, pax_mprotect_prot(l));

Index: src/sys/uvm/uvm_extern.h
diff -u src/sys/uvm/uvm_extern.h:1.226 src/sys/uvm/uvm_extern.h:1.227
--- src/sys/uvm/uvm_extern.h:1.226	Sat May  9 15:13:19 2020
+++ src/sys/uvm/uvm_extern.h	Tue May 26 00:50:53 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_extern.h,v 1.226 2020/05/09 15:13:19 thorpej Exp $	*/
+/*	$NetBSD: uvm_extern.h,v 1.227 2020/05/26 00:50:53 kamil Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -566,8 +566,7 @@ extern bool vm_page_zero_enable;
  */
 struct vmspace {
 	struct	vm_map vm_map;	/* VM address map */
-	int	vm_refcnt;	/* number of references *
- * note: protected by vm_map.misc_lock */
+	volatile int vm_refcnt;	/* number of references */
 	void *	vm_shm;		/* SYS5 shared memory private data XXX */
 /* we copy from vm_startcopy to the end of the structure on fork */
 #define vm_startcopy vm_rssize

Index: src/sys/uvm/uvm_map.h
diff -u src/sys/uvm/uvm_map.h:1.79 src/sys/uvm/uvm_map.h:1.80
--- src/sys/uvm/uvm_map.h:1.79	Sat Mar 14 14:15:43 2020
+++ src/sys/uvm/uvm_map.h	Tue May 26 00:50:53 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_map.h,v 1.79 2020/03/14 14:15:43 ad 

CVS commit: src/sys

2020-05-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue May 26 00:50:54 UTC 2020

Modified Files:
src/sys/dev/iscsi: iscsi_ioctl.c
src/sys/kern: kern_proc.c sys_process.c
src/sys/uvm: uvm_extern.h uvm_map.h

Log Message:
Catch up with the usage of struct vmspace::vm_refcnt

Use the dedicated reference counting routines.

Change the type of struct vmspace::vm_refcnt and struct vm_map::ref_count
to volatile.

Remove the unnecessary vm->vm_map.misc_lock locking in process_domem().

Reviewed by 


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/iscsi/iscsi_ioctl.c
cvs rdiff -u -r1.253 -r1.254 src/sys/kern/kern_proc.c
cvs rdiff -u -r1.179 -r1.180 src/sys/kern/sys_process.c
cvs rdiff -u -r1.226 -r1.227 src/sys/uvm/uvm_extern.h
cvs rdiff -u -r1.79 -r1.80 src/sys/uvm/uvm_map.h

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



CVS commit: src/doc

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 23:48:26 UTC 2020

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
new postfix


To generate a diff of this commit:
cvs rdiff -u -r1.1720 -r1.1721 src/doc/3RDPARTY
cvs rdiff -u -r1.2695 -r1.2696 src/doc/CHANGES

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



CVS commit: src/doc

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 23:48:26 UTC 2020

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
new postfix


To generate a diff of this commit:
cvs rdiff -u -r1.1720 -r1.1721 src/doc/3RDPARTY
cvs rdiff -u -r1.2695 -r1.2696 src/doc/CHANGES

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1720 src/doc/3RDPARTY:1.1721
--- src/doc/3RDPARTY:1.1720	Mon May 25 19:23:09 2020
+++ src/doc/3RDPARTY	Mon May 25 19:48:26 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1720 2020/05/25 23:23:09 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1721 2020/05/25 23:48:26 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1209,12 +1209,12 @@ and more. Vern's ping is gone. We are to
 now to do a new import.
 
 Package:	Postfix
-Version:	3.5.0
+Version:	3.5.2
 Current Vers:	3.5.2
 Maintainer:	Wietse Venema 
 Archive Site:
 Home Page:	http://www.postfix.org/
-Date: 		2020-05-19
+Date: 		2020-05-25
 Mailing List:	postfix-us...@postfix.org
 Responsible:	christos
 License:	IBM Public License. See also src/external/ibm-public/postfix/dist.

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2695 src/doc/CHANGES:1.2696
--- src/doc/CHANGES:1.2695	Mon May 25 19:23:09 2020
+++ src/doc/CHANGES	Mon May 25 19:48:26 2020
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2695 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2696 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -213,3 +213,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	tzcode: Updated to 2020a. [christos 20200525]
 	ntp: Import ntp 4.2.8p14. [christos 20200525] 
 	acpi(4): Updated ACPICA to 20200430. [christos 20200525]
+	postfix(1): Import version 3.5.2. [christos 20200525]



CVS commit: src/external/ibm-public/postfix/dist

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 23:47:14 UTC 2020

Modified Files:
src/external/ibm-public/postfix/dist: makedefs
src/external/ibm-public/postfix/dist/html: postconf.5.html
src/external/ibm-public/postfix/dist/man/man1: postfix.1
src/external/ibm-public/postfix/dist/man/man5: postconf.5
src/external/ibm-public/postfix/dist/proto: postconf.proto
src/external/ibm-public/postfix/dist/src/dns: dns.h dns_lookup.c
src/external/ibm-public/postfix/dist/src/global: mail_params.c
mail_params.h mail_version.h
src/external/ibm-public/postfix/dist/src/milter: milter.c
src/external/ibm-public/postfix/dist/src/postfix: postfix.c
src/external/ibm-public/postfix/dist/src/smtpd: smtpd_check.c
src/external/ibm-public/postfix/dist/src/tls: tls_session.c
src/external/ibm-public/postfix/dist/src/tlsproxy: tlsproxy.c
src/external/ibm-public/postfix/dist/src/util: midna_domain.c
midna_domain.h

Log Message:
merge conflicts


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/ibm-public/postfix/dist/makedefs
cvs rdiff -u -r1.16 -r1.17 \
src/external/ibm-public/postfix/dist/html/postconf.5.html
cvs rdiff -u -r1.3 -r1.4 \
src/external/ibm-public/postfix/dist/man/man1/postfix.1
cvs rdiff -u -r1.16 -r1.17 \
src/external/ibm-public/postfix/dist/man/man5/postconf.5
cvs rdiff -u -r1.16 -r1.17 \
src/external/ibm-public/postfix/dist/proto/postconf.proto
cvs rdiff -u -r1.3 -r1.4 src/external/ibm-public/postfix/dist/src/dns/dns.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/ibm-public/postfix/dist/src/dns/dns_lookup.c
cvs rdiff -u -r1.3 -r1.4 \
src/external/ibm-public/postfix/dist/src/global/mail_params.c \
src/external/ibm-public/postfix/dist/src/global/mail_version.h
cvs rdiff -u -r1.16 -r1.17 \
src/external/ibm-public/postfix/dist/src/global/mail_params.h
cvs rdiff -u -r1.3 -r1.4 \
src/external/ibm-public/postfix/dist/src/milter/milter.c
cvs rdiff -u -r1.3 -r1.4 \
src/external/ibm-public/postfix/dist/src/postfix/postfix.c
cvs rdiff -u -r1.3 -r1.4 \
src/external/ibm-public/postfix/dist/src/smtpd/smtpd_check.c
cvs rdiff -u -r1.2 -r1.3 \
src/external/ibm-public/postfix/dist/src/tls/tls_session.c
cvs rdiff -u -r1.3 -r1.4 \
src/external/ibm-public/postfix/dist/src/tlsproxy/tlsproxy.c
cvs rdiff -u -r1.3 -r1.4 \
src/external/ibm-public/postfix/dist/src/util/midna_domain.c \
src/external/ibm-public/postfix/dist/src/util/midna_domain.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/ibm-public/postfix/dist/makedefs
diff -u src/external/ibm-public/postfix/dist/makedefs:1.13 src/external/ibm-public/postfix/dist/makedefs:1.14
--- src/external/ibm-public/postfix/dist/makedefs:1.13	Wed Mar 18 15:05:13 2020
+++ src/external/ibm-public/postfix/dist/makedefs	Mon May 25 19:47:13 2020
@@ -228,6 +228,19 @@ case $# in
  *) echo usage: $0 [system release] 1>&2; exit 1;;
 esac
 
+case "$SYSTEM" in
+ Linux)
+case "`PATH=/bin:/usr/bin ldd /bin/sh`" in
+ *-musl-*)
+	case "$CCARGS" in
+	 *-DNO_DNSSEC*) ;;
+	 *) echo Warning: libc-musl breaks DANE/TLSA security. 1>&2
+	echo This build will not support DANE/TLSA. 1>&2
+	CCARGS="$CCARGS -DNO_DNSSEC";;
+	esac;;
+esac;;
+esac
+
 case "$SYSTEM.$RELEASE" in
SCO_SV.3.2)	SYSTYPE=SCO5
 		# Use the native compiler by default
@@ -1136,7 +1149,7 @@ esac
 : ${CC=gcc} ${OPT='-O'} ${DEBUG='-g'} ${AWK=awk} \
 ${WARN='-Wall -Wno-comment -Wformat -Wimplicit -Wmissing-prototypes \
 	-Wparentheses -Wstrict-prototypes -Wswitch -Wuninitialized \
-	-Wunused -Wno-missing-braces'}
+	-Wunused -Wno-missing-braces -fcommon'}
 
 # Extract map type names from -DHAS_XXX compiler options.  We avoid
 # problems with tr(1) range syntax by using enumerations instead,

Index: src/external/ibm-public/postfix/dist/html/postconf.5.html
diff -u src/external/ibm-public/postfix/dist/html/postconf.5.html:1.16 src/external/ibm-public/postfix/dist/html/postconf.5.html:1.17
--- src/external/ibm-public/postfix/dist/html/postconf.5.html:1.16	Wed Mar 18 15:05:14 2020
+++ src/external/ibm-public/postfix/dist/html/postconf.5.html	Mon May 25 19:47:13 2020
@@ -6329,7 +6329,7 @@ whitespace. 
 
 
 maillog_file_rotate_suffix
-(default: %Y%M%d-%H%M%S)
+(default: %Y%m%d-%H%M%S)
 
  The format of the suffix to append to $maillog_file while rotating
 the file with "postfix logrotate". See strftime(3) for syntax. The

Index: src/external/ibm-public/postfix/dist/man/man1/postfix.1
diff -u src/external/ibm-public/postfix/dist/man/man1/postfix.1:1.3 src/external/ibm-public/postfix/dist/man/man1/postfix.1:1.4
--- src/external/ibm-public/postfix/dist/man/man1/postfix.1:1.3	Wed Mar 18 15:05:14 2020
+++ src/external/ibm-public/postfix/dist/man/man1/postfix.1	Mon May 25 19:47:13 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: 

CVS commit: src/external/ibm-public/postfix/dist

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 23:47:14 UTC 2020

Modified Files:
src/external/ibm-public/postfix/dist: makedefs
src/external/ibm-public/postfix/dist/html: postconf.5.html
src/external/ibm-public/postfix/dist/man/man1: postfix.1
src/external/ibm-public/postfix/dist/man/man5: postconf.5
src/external/ibm-public/postfix/dist/proto: postconf.proto
src/external/ibm-public/postfix/dist/src/dns: dns.h dns_lookup.c
src/external/ibm-public/postfix/dist/src/global: mail_params.c
mail_params.h mail_version.h
src/external/ibm-public/postfix/dist/src/milter: milter.c
src/external/ibm-public/postfix/dist/src/postfix: postfix.c
src/external/ibm-public/postfix/dist/src/smtpd: smtpd_check.c
src/external/ibm-public/postfix/dist/src/tls: tls_session.c
src/external/ibm-public/postfix/dist/src/tlsproxy: tlsproxy.c
src/external/ibm-public/postfix/dist/src/util: midna_domain.c
midna_domain.h

Log Message:
merge conflicts


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/ibm-public/postfix/dist/makedefs
cvs rdiff -u -r1.16 -r1.17 \
src/external/ibm-public/postfix/dist/html/postconf.5.html
cvs rdiff -u -r1.3 -r1.4 \
src/external/ibm-public/postfix/dist/man/man1/postfix.1
cvs rdiff -u -r1.16 -r1.17 \
src/external/ibm-public/postfix/dist/man/man5/postconf.5
cvs rdiff -u -r1.16 -r1.17 \
src/external/ibm-public/postfix/dist/proto/postconf.proto
cvs rdiff -u -r1.3 -r1.4 src/external/ibm-public/postfix/dist/src/dns/dns.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/ibm-public/postfix/dist/src/dns/dns_lookup.c
cvs rdiff -u -r1.3 -r1.4 \
src/external/ibm-public/postfix/dist/src/global/mail_params.c \
src/external/ibm-public/postfix/dist/src/global/mail_version.h
cvs rdiff -u -r1.16 -r1.17 \
src/external/ibm-public/postfix/dist/src/global/mail_params.h
cvs rdiff -u -r1.3 -r1.4 \
src/external/ibm-public/postfix/dist/src/milter/milter.c
cvs rdiff -u -r1.3 -r1.4 \
src/external/ibm-public/postfix/dist/src/postfix/postfix.c
cvs rdiff -u -r1.3 -r1.4 \
src/external/ibm-public/postfix/dist/src/smtpd/smtpd_check.c
cvs rdiff -u -r1.2 -r1.3 \
src/external/ibm-public/postfix/dist/src/tls/tls_session.c
cvs rdiff -u -r1.3 -r1.4 \
src/external/ibm-public/postfix/dist/src/tlsproxy/tlsproxy.c
cvs rdiff -u -r1.3 -r1.4 \
src/external/ibm-public/postfix/dist/src/util/midna_domain.c \
src/external/ibm-public/postfix/dist/src/util/midna_domain.h

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



CVS import: src/external/ibm-public/postfix/dist

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 23:40:44 UTC 2020

Update of /cvsroot/src/external/ibm-public/postfix/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv12760

Log Message:
Postfix versions 3.5.2, 3.4.12, 3.3.10, 3.2.15:

A TLS error for a database client caused a false 'lost connection'
error for an SMTP over TLS session in the same Postfix process.
Reported by Alexander Vasarab, diagnosed by Viktor Dukhovni. This
bug was introduced with Postfix 2.2.

The same bug existed in the tlsproxy(8) daemon, where a TLS error
for one TLS session could cause a false 'lost connection' error
for a concurrent TLS session in the same process. This bug was
introduced with Postfix 2.8.

The Postfix build now disables DANE support on Linux systems with
libc-musl such as Alpine, because libc-musl provides no indication
whether DNS responses are authentic. This broke DANE support without
a clear explanation.

Due to implementation changes in the ICU library, some Postfix
daemons reported file access errrors (U_FILE_ACCESS_ERROR) after
chroot(). This was fixed by initializing the ICU library before
making the chroot() call.

Minor code changes to silence a compiler that special-cases string literals.

Postfix 3.5.2, 3.4.12:

Segfault (null pointer) in the tlsproxy(8) client role when the
server role was disabled. This typically happened on systems that
do not receive mail, after configuring connection reuse for outbound
SMTP over TLS.

The date portion of the maillog_file_rotate_suffix default value
used the minute (%M) instead of the month (%m). Reported by Larry
Stone.

Postfix versions 3.5.1, 3.4.11, 3.3.9, 3.2.14:

Bitrot workaround for broken builds after an incompatible change in GCC 10.

Bitrot workaround for broken DANE/DNSSEC support after an incompatible
change in GLIBC 2.31.  This change avoids the need for new options
in /etc/resolv.conf.

Postfix 3.3.9, 3.2.14:

Bitrot workarounds for Linux 5 and GLIBC resolver flags.

Status:

Vendor Tag: VENEMA
Release Tags:   PFIX-3-5-2

U src/external/ibm-public/postfix/dist/COMPATIBILITY
U src/external/ibm-public/postfix/dist/HISTORY
U src/external/ibm-public/postfix/dist/AAAREADME
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-1.0
U src/external/ibm-public/postfix/dist/COPYRIGHT
U src/external/ibm-public/postfix/dist/INSTALL
U src/external/ibm-public/postfix/dist/IPv6-ChangeLog
U src/external/ibm-public/postfix/dist/Makefile
U src/external/ibm-public/postfix/dist/LICENSE
C src/external/ibm-public/postfix/dist/makedefs
U src/external/ibm-public/postfix/dist/Makefile.in
U src/external/ibm-public/postfix/dist/Makefile.init
U src/external/ibm-public/postfix/dist/PORTING
U src/external/ibm-public/postfix/dist/RELEASE_NOTES
U src/external/ibm-public/postfix/dist/TLS_ACKNOWLEDGEMENTS
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-1.1
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.0
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.1
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.10
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.11
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.2
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.3
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.4
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.5
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.6
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.7
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.8
U src/external/ibm-public/postfix/dist/TLS_CHANGES
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.9
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-3.0
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-3.1
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-3.2
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-3.3
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-3.4
U src/external/ibm-public/postfix/dist/US_PATENT_6321267
U src/external/ibm-public/postfix/dist/TLS_LICENSE
U src/external/ibm-public/postfix/dist/TLS_TODO
U src/external/ibm-public/postfix/dist/postfix-env.sh
U src/external/ibm-public/postfix/dist/pflogsumm_quickfix.txt
U src/external/ibm-public/postfix/dist/postfix-install
U src/external/ibm-public/postfix/dist/README_FILES/RELEASE_NOTES
U src/external/ibm-public/postfix/dist/README_FILES/BACKSCATTER_README
U src/external/ibm-public/postfix/dist/README_FILES/AAAREADME
U src/external/ibm-public/postfix/dist/README_FILES/ADDRESS_REWRITING_README
U src/external/ibm-public/postfix/dist/README_FILES/ADDRESS_CLASS_README
U src/external/ibm-public/postfix/dist/README_FILES/DB_README
U src/external/ibm-public/postfix/dist/README_FILES/ADDRESS_VERIFICATION_README
U src/external/ibm-public/postfix/dist/README_FILES/BASIC_CONFIGURATION_README
U src/external/ibm-public/postfix/dist/README_FILES/BDAT_README
U src/external/ibm-public/postfix/dist/README_FILES/BUILTIN_FILTER_README
U 

CVS import: src/external/ibm-public/postfix/dist

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 23:40:44 UTC 2020

Update of /cvsroot/src/external/ibm-public/postfix/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv12760

Log Message:
Postfix versions 3.5.2, 3.4.12, 3.3.10, 3.2.15:

A TLS error for a database client caused a false 'lost connection'
error for an SMTP over TLS session in the same Postfix process.
Reported by Alexander Vasarab, diagnosed by Viktor Dukhovni. This
bug was introduced with Postfix 2.2.

The same bug existed in the tlsproxy(8) daemon, where a TLS error
for one TLS session could cause a false 'lost connection' error
for a concurrent TLS session in the same process. This bug was
introduced with Postfix 2.8.

The Postfix build now disables DANE support on Linux systems with
libc-musl such as Alpine, because libc-musl provides no indication
whether DNS responses are authentic. This broke DANE support without
a clear explanation.

Due to implementation changes in the ICU library, some Postfix
daemons reported file access errrors (U_FILE_ACCESS_ERROR) after
chroot(). This was fixed by initializing the ICU library before
making the chroot() call.

Minor code changes to silence a compiler that special-cases string literals.

Postfix 3.5.2, 3.4.12:

Segfault (null pointer) in the tlsproxy(8) client role when the
server role was disabled. This typically happened on systems that
do not receive mail, after configuring connection reuse for outbound
SMTP over TLS.

The date portion of the maillog_file_rotate_suffix default value
used the minute (%M) instead of the month (%m). Reported by Larry
Stone.

Postfix versions 3.5.1, 3.4.11, 3.3.9, 3.2.14:

Bitrot workaround for broken builds after an incompatible change in GCC 10.

Bitrot workaround for broken DANE/DNSSEC support after an incompatible
change in GLIBC 2.31.  This change avoids the need for new options
in /etc/resolv.conf.

Postfix 3.3.9, 3.2.14:

Bitrot workarounds for Linux 5 and GLIBC resolver flags.

Status:

Vendor Tag: VENEMA
Release Tags:   PFIX-3-5-2

U src/external/ibm-public/postfix/dist/COMPATIBILITY
U src/external/ibm-public/postfix/dist/HISTORY
U src/external/ibm-public/postfix/dist/AAAREADME
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-1.0
U src/external/ibm-public/postfix/dist/COPYRIGHT
U src/external/ibm-public/postfix/dist/INSTALL
U src/external/ibm-public/postfix/dist/IPv6-ChangeLog
U src/external/ibm-public/postfix/dist/Makefile
U src/external/ibm-public/postfix/dist/LICENSE
C src/external/ibm-public/postfix/dist/makedefs
U src/external/ibm-public/postfix/dist/Makefile.in
U src/external/ibm-public/postfix/dist/Makefile.init
U src/external/ibm-public/postfix/dist/PORTING
U src/external/ibm-public/postfix/dist/RELEASE_NOTES
U src/external/ibm-public/postfix/dist/TLS_ACKNOWLEDGEMENTS
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-1.1
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.0
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.1
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.10
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.11
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.2
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.3
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.4
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.5
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.6
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.7
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.8
U src/external/ibm-public/postfix/dist/TLS_CHANGES
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.9
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-3.0
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-3.1
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-3.2
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-3.3
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-3.4
U src/external/ibm-public/postfix/dist/US_PATENT_6321267
U src/external/ibm-public/postfix/dist/TLS_LICENSE
U src/external/ibm-public/postfix/dist/TLS_TODO
U src/external/ibm-public/postfix/dist/postfix-env.sh
U src/external/ibm-public/postfix/dist/pflogsumm_quickfix.txt
U src/external/ibm-public/postfix/dist/postfix-install
U src/external/ibm-public/postfix/dist/README_FILES/RELEASE_NOTES
U src/external/ibm-public/postfix/dist/README_FILES/BACKSCATTER_README
U src/external/ibm-public/postfix/dist/README_FILES/AAAREADME
U src/external/ibm-public/postfix/dist/README_FILES/ADDRESS_REWRITING_README
U src/external/ibm-public/postfix/dist/README_FILES/ADDRESS_CLASS_README
U src/external/ibm-public/postfix/dist/README_FILES/DB_README
U src/external/ibm-public/postfix/dist/README_FILES/ADDRESS_VERIFICATION_README
U src/external/ibm-public/postfix/dist/README_FILES/BASIC_CONFIGURATION_README
U src/external/ibm-public/postfix/dist/README_FILES/BDAT_README
U src/external/ibm-public/postfix/dist/README_FILES/BUILTIN_FILTER_README
U 

CVS commit: src/doc

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 23:23:09 UTC 2020

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
new acpica


To generate a diff of this commit:
cvs rdiff -u -r1.1719 -r1.1720 src/doc/3RDPARTY
cvs rdiff -u -r1.2694 -r1.2695 src/doc/CHANGES

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



CVS commit: src/doc

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 23:23:09 UTC 2020

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
new acpica


To generate a diff of this commit:
cvs rdiff -u -r1.1719 -r1.1720 src/doc/3RDPARTY
cvs rdiff -u -r1.2694 -r1.2695 src/doc/CHANGES

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1719 src/doc/3RDPARTY:1.1720
--- src/doc/3RDPARTY:1.1719	Mon May 25 16:56:54 2020
+++ src/doc/3RDPARTY	Mon May 25 19:23:09 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1719 2020/05/25 20:56:54 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1720 2020/05/25 23:23:09 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -41,12 +41,12 @@
 #
 
 Package:	acpica
-Version:	20190326
-Current Vers:	20190326
+Version:	20200430
+Current Vers:	20200430
 Maintainer:	Intel
 Archive Site:	http://www.acpica.org/downloads/
 Home Page:	http://www.acpica.org/
-Date:		2020-03-28
+Date:		2020-05-25
 Mailing List:	de...@acpica.org
 License:	BSD-like
 Responsible:	jruoho

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2694 src/doc/CHANGES:1.2695
--- src/doc/CHANGES:1.2694	Mon May 25 16:56:11 2020
+++ src/doc/CHANGES	Mon May 25 19:23:09 2020
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2694 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2695 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -212,3 +212,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	bind: Import version 9.16.3. [christos 20200524]
 	tzcode: Updated to 2020a. [christos 20200525]
 	ntp: Import ntp 4.2.8p14. [christos 20200525] 
+	acpi(4): Updated ACPICA to 20200430. [christos 20200525]



CVS commit: src/sys/external/bsd/acpica/dist

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 23:19:28 UTC 2020

Modified Files:
src/sys/external/bsd/acpica/dist/compiler: aslcompiler.l aslload.c
aslpredef.c aslxref.c dtutils.c
src/sys/external/bsd/acpica/dist/disassembler: dmbuffer.c
src/sys/external/bsd/acpica/dist/include: acglobal.h acpixf.h

Log Message:
merge conflicts


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 \
src/sys/external/bsd/acpica/dist/compiler/aslcompiler.l
cvs rdiff -u -r1.17 -r1.18 \
src/sys/external/bsd/acpica/dist/compiler/aslload.c \
src/sys/external/bsd/acpica/dist/compiler/aslxref.c
cvs rdiff -u -r1.12 -r1.13 \
src/sys/external/bsd/acpica/dist/compiler/aslpredef.c
cvs rdiff -u -r1.14 -r1.15 \
src/sys/external/bsd/acpica/dist/compiler/dtutils.c
cvs rdiff -u -r1.11 -r1.12 \
src/sys/external/bsd/acpica/dist/disassembler/dmbuffer.c
cvs rdiff -u -r1.21 -r1.22 \
src/sys/external/bsd/acpica/dist/include/acglobal.h
cvs rdiff -u -r1.25 -r1.26 src/sys/external/bsd/acpica/dist/include/acpixf.h

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



CVS commit: src/sys/external/bsd/acpica/dist

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 23:19:28 UTC 2020

Modified Files:
src/sys/external/bsd/acpica/dist/compiler: aslcompiler.l aslload.c
aslpredef.c aslxref.c dtutils.c
src/sys/external/bsd/acpica/dist/disassembler: dmbuffer.c
src/sys/external/bsd/acpica/dist/include: acglobal.h acpixf.h

Log Message:
merge conflicts


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 \
src/sys/external/bsd/acpica/dist/compiler/aslcompiler.l
cvs rdiff -u -r1.17 -r1.18 \
src/sys/external/bsd/acpica/dist/compiler/aslload.c \
src/sys/external/bsd/acpica/dist/compiler/aslxref.c
cvs rdiff -u -r1.12 -r1.13 \
src/sys/external/bsd/acpica/dist/compiler/aslpredef.c
cvs rdiff -u -r1.14 -r1.15 \
src/sys/external/bsd/acpica/dist/compiler/dtutils.c
cvs rdiff -u -r1.11 -r1.12 \
src/sys/external/bsd/acpica/dist/disassembler/dmbuffer.c
cvs rdiff -u -r1.21 -r1.22 \
src/sys/external/bsd/acpica/dist/include/acglobal.h
cvs rdiff -u -r1.25 -r1.26 src/sys/external/bsd/acpica/dist/include/acpixf.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/external/bsd/acpica/dist/compiler/aslcompiler.l
diff -u src/sys/external/bsd/acpica/dist/compiler/aslcompiler.l:1.15 src/sys/external/bsd/acpica/dist/compiler/aslcompiler.l:1.16
--- src/sys/external/bsd/acpica/dist/compiler/aslcompiler.l:1.15	Sat Mar 28 15:49:26 2020
+++ src/sys/external/bsd/acpica/dist/compiler/aslcompiler.l	Mon May 25 19:19:28 2020
@@ -711,7 +711,7 @@ NamePathTail[.]{NameSeg}
 }
 
 /*
- * The eror code is contained inside the
+ * The error code is contained inside the
  * {ErrorCode} pattern. Extract it and log it
  * as the expected error code.
  */

Index: src/sys/external/bsd/acpica/dist/compiler/aslload.c
diff -u src/sys/external/bsd/acpica/dist/compiler/aslload.c:1.17 src/sys/external/bsd/acpica/dist/compiler/aslload.c:1.18
--- src/sys/external/bsd/acpica/dist/compiler/aslload.c:1.17	Sat Mar 28 15:49:26 2020
+++ src/sys/external/bsd/acpica/dist/compiler/aslload.c	Mon May 25 19:19:28 2020
@@ -1,6 +1,6 @@
 /**
  *
- * Module Name: dswload - Dispatcher namespace load callbacks
+ * Module Name: aslload - compiler namespace load callbacks
  *
  */
 
@@ -93,7 +93,6 @@ LdAnalyzeExternals (
 ACPI_NAMESPACE_NODE *Node,
 ACPI_PARSE_OBJECT   *Op,
 ACPI_OBJECT_TYPEExternalOpType,
-ACPI_OBJECT_TYPEObjectType,
 ACPI_WALK_STATE *WalkState);
 
 
@@ -407,7 +406,6 @@ LdNamespace1Begin (
 ACPI_PARSE_OBJECT   *MethodOp;
 ACPI_STATUS Status;
 ACPI_OBJECT_TYPEObjectType;
-ACPI_OBJECT_TYPEActualObjectType = ACPI_TYPE_ANY;
 char*Path;
 UINT32  Flags = ACPI_NS_NO_UPSEARCH;
 ACPI_PARSE_OBJECT   *Arg;
@@ -581,8 +579,7 @@ LdNamespace1Begin (
  *
  * first child is name, next child is ObjectType
  */
-ActualObjectType = (UINT8) Op->Asl.Child->Asl.Next->Asl.Value.Integer;
-ObjectType = ACPI_TYPE_ANY;
+ObjectType = (UINT8) Op->Asl.Child->Asl.Next->Asl.Value.Integer;
 
 /*
  * We will mark every new node along the path as "External". This
@@ -601,7 +598,7 @@ LdNamespace1Begin (
  *   Store (\_SB_.PCI0.ABCD, Local0)
  *   }
  */
-Flags |= ACPI_NS_EXTERNAL;
+Flags |= ACPI_NS_EXTERNAL | ACPI_NS_DONT_OPEN_SCOPE;
 break;
 
 case PARSEOP_DEFAULT_ARG:
@@ -805,8 +802,7 @@ LdNamespace1Begin (
 else if ((Node->Flags & ANOBJ_IS_EXTERNAL) ||
  (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL))
 {
-Status = LdAnalyzeExternals (Node, Op, ActualObjectType,
-ObjectType, WalkState);
+Status = LdAnalyzeExternals (Node, Op, ObjectType, WalkState);
 if (ACPI_FAILURE (Status))
 {
 if (Status == AE_ERROR)
@@ -821,6 +817,19 @@ LdNamespace1Begin (
 }
 return_ACPI_STATUS (Status);
 }
+
+if (!(Node->Flags & ANOBJ_IS_EXTERNAL) &&
+ (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL))
+{
+/*
+ * If we get to here, it means that an actual definition of
+ * the object declared external exists. Meaning that Op
+ * loading this this Op should have no change to the ACPI
+  

CVS import: src/sys/external/bsd/acpica/dist

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 23:16:35 UTC 2020

Update of /cvsroot/src/sys/external/bsd/acpica/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv850

Log Message:
30 April 2020. Summary of changes for version 20200430:


1) ACPICA kernel-resident subsystem:

Cleaned up the coding style of a couple of global variables 
(AcpiGbl_NextCmdNum and AcpiProtocolLengths) caught by static analyzers. 
AcpiProtocolLengths was made static, and the definition of 
AcpiGbl_NextCmdNum was moved to acglobal.h.


2) iASL Compiler/Disassembler and ACPICA tools: 

iASL DataTable Compiler:  Fixed a segfault on errors that aren't directly 
associated with a field.

Disassembler: has been made more resilient so that it will continue to 
parse AML even if the AML generates ACPI namespace errors. This enables 
iASL to disassemble some AML that may have been compiled using older 
versions of iASL that no longer compile with newer versions of iASL.

iASL: Fixed the required parameters for _NIH and _NIG. Previously, there 
was a mixup where _NIG required one parameter and _NIH required zero 
parameters. This change swaps these parameter requirements. Now it is 
required that _NIH must be called with one parameter and _NIG requires 
zero parameters.

iASL: Allow use of undefined externals as long as they are protected by 
an if (CondRefOf (...)) block when compiling multiple definition blocks.

iASL: Fixed the type override behavior of named objects that are declared 
as External. External declarations will no longer override the type of 
the actual definition if it already exists.

AcpiNames: Added setargv.obj to the MSVC 2017 link sequence to enable 
command line wildcard support on Windows. Note: the AcpiNames utility is 
essentially redundant with the AcpiExec utility (using the "namespace" 
command) and is therefore deprecated. It will be removed in future 
releases of ACPICA.

Disassembler: ignore AE_ALREADY_EXISTS status when parsing create* 
operators. The disassembler is intended to emit existing ASL code as-is. 
Therefore, error messages emitted during disassembly should be ignored or 
handled in a way such that the disassembler can continue to parse the 
AML. This change ignores AE_ALREADY_EXISTS errors during the deferred Op 
parsing for create operators in order to complete parsing ASL termlists.

iASL DataTable Compiler: IVRS table: fix potentially uninitialized 
variable warning. Some compilers catch potential uninitialized variables. 
This is done by examining branches of if/else statements. This change 
replaces an "else if" with an "else" to fix the uninitialized variable 
warning.

Status:

Vendor Tag: intel
Release Tags:   acpica-20200430

U src/sys/external/bsd/acpica/dist/changes.txt
U src/sys/external/bsd/acpica/dist/Makefile
U src/sys/external/bsd/acpica/dist/generate/lint/files.lnt
U src/sys/external/bsd/acpica/dist/generate/lint/lint.bat
U src/sys/external/bsd/acpica/dist/generate/lint/lset.bat
U src/sys/external/bsd/acpica/dist/generate/lint/options.lnt
U src/sys/external/bsd/acpica/dist/generate/lint/readme.txt
U src/sys/external/bsd/acpica/dist/generate/lint/std16.lnt
U src/sys/external/bsd/acpica/dist/generate/lint/std32.lnt
U src/sys/external/bsd/acpica/dist/generate/lint/std64.lnt
U src/sys/external/bsd/acpica/dist/generate/release/build.sh
U src/sys/external/bsd/acpica/dist/generate/release/release.sh
U src/sys/external/bsd/acpica/dist/generate/unix/Makefile
U src/sys/external/bsd/acpica/dist/generate/unix/Makefile.common
U src/sys/external/bsd/acpica/dist/generate/unix/Makefile.config
U src/sys/external/bsd/acpica/dist/generate/unix/Makefile.rules
U src/sys/external/bsd/acpica/dist/generate/unix/readme.txt
U src/sys/external/bsd/acpica/dist/generate/unix/acpibin/Makefile
U src/sys/external/bsd/acpica/dist/generate/unix/acpidump/Makefile
U src/sys/external/bsd/acpica/dist/generate/unix/acpiexamples/Makefile
U src/sys/external/bsd/acpica/dist/generate/unix/acpiexec/Makefile
U src/sys/external/bsd/acpica/dist/generate/unix/acpihelp/Makefile
U src/sys/external/bsd/acpica/dist/generate/unix/acpinames/Makefile
U src/sys/external/bsd/acpica/dist/generate/unix/acpisrc/Makefile
U src/sys/external/bsd/acpica/dist/generate/unix/acpixtract/Makefile
U src/sys/external/bsd/acpica/dist/generate/unix/iasl/Makefile
U src/sys/external/bsd/acpica/dist/common/acfileio.c
U src/sys/external/bsd/acpica/dist/common/acgetline.c
U src/sys/external/bsd/acpica/dist/common/adfile.c
U src/sys/external/bsd/acpica/dist/common/adisasm.c
U src/sys/external/bsd/acpica/dist/common/adwalk.c
U src/sys/external/bsd/acpica/dist/common/ahids.c
U src/sys/external/bsd/acpica/dist/common/ahpredef.c
U src/sys/external/bsd/acpica/dist/common/ahtable.c
U src/sys/external/bsd/acpica/dist/common/ahuuids.c
U src/sys/external/bsd/acpica/dist/common/cmfsize.c
U src/sys/external/bsd/acpica/dist/common/dmextern.c
U src/sys/external/bsd/acpica/dist/common/dmrestag.c
U 

CVS import: src/sys/external/bsd/acpica/dist

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 23:16:35 UTC 2020

Update of /cvsroot/src/sys/external/bsd/acpica/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv850

Log Message:
30 April 2020. Summary of changes for version 20200430:


1) ACPICA kernel-resident subsystem:

Cleaned up the coding style of a couple of global variables 
(AcpiGbl_NextCmdNum and AcpiProtocolLengths) caught by static analyzers. 
AcpiProtocolLengths was made static, and the definition of 
AcpiGbl_NextCmdNum was moved to acglobal.h.


2) iASL Compiler/Disassembler and ACPICA tools: 

iASL DataTable Compiler:  Fixed a segfault on errors that aren't directly 
associated with a field.

Disassembler: has been made more resilient so that it will continue to 
parse AML even if the AML generates ACPI namespace errors. This enables 
iASL to disassemble some AML that may have been compiled using older 
versions of iASL that no longer compile with newer versions of iASL.

iASL: Fixed the required parameters for _NIH and _NIG. Previously, there 
was a mixup where _NIG required one parameter and _NIH required zero 
parameters. This change swaps these parameter requirements. Now it is 
required that _NIH must be called with one parameter and _NIG requires 
zero parameters.

iASL: Allow use of undefined externals as long as they are protected by 
an if (CondRefOf (...)) block when compiling multiple definition blocks.

iASL: Fixed the type override behavior of named objects that are declared 
as External. External declarations will no longer override the type of 
the actual definition if it already exists.

AcpiNames: Added setargv.obj to the MSVC 2017 link sequence to enable 
command line wildcard support on Windows. Note: the AcpiNames utility is 
essentially redundant with the AcpiExec utility (using the "namespace" 
command) and is therefore deprecated. It will be removed in future 
releases of ACPICA.

Disassembler: ignore AE_ALREADY_EXISTS status when parsing create* 
operators. The disassembler is intended to emit existing ASL code as-is. 
Therefore, error messages emitted during disassembly should be ignored or 
handled in a way such that the disassembler can continue to parse the 
AML. This change ignores AE_ALREADY_EXISTS errors during the deferred Op 
parsing for create operators in order to complete parsing ASL termlists.

iASL DataTable Compiler: IVRS table: fix potentially uninitialized 
variable warning. Some compilers catch potential uninitialized variables. 
This is done by examining branches of if/else statements. This change 
replaces an "else if" with an "else" to fix the uninitialized variable 
warning.

Status:

Vendor Tag: intel
Release Tags:   acpica-20200430

U src/sys/external/bsd/acpica/dist/changes.txt
U src/sys/external/bsd/acpica/dist/Makefile
U src/sys/external/bsd/acpica/dist/generate/lint/files.lnt
U src/sys/external/bsd/acpica/dist/generate/lint/lint.bat
U src/sys/external/bsd/acpica/dist/generate/lint/lset.bat
U src/sys/external/bsd/acpica/dist/generate/lint/options.lnt
U src/sys/external/bsd/acpica/dist/generate/lint/readme.txt
U src/sys/external/bsd/acpica/dist/generate/lint/std16.lnt
U src/sys/external/bsd/acpica/dist/generate/lint/std32.lnt
U src/sys/external/bsd/acpica/dist/generate/lint/std64.lnt
U src/sys/external/bsd/acpica/dist/generate/release/build.sh
U src/sys/external/bsd/acpica/dist/generate/release/release.sh
U src/sys/external/bsd/acpica/dist/generate/unix/Makefile
U src/sys/external/bsd/acpica/dist/generate/unix/Makefile.common
U src/sys/external/bsd/acpica/dist/generate/unix/Makefile.config
U src/sys/external/bsd/acpica/dist/generate/unix/Makefile.rules
U src/sys/external/bsd/acpica/dist/generate/unix/readme.txt
U src/sys/external/bsd/acpica/dist/generate/unix/acpibin/Makefile
U src/sys/external/bsd/acpica/dist/generate/unix/acpidump/Makefile
U src/sys/external/bsd/acpica/dist/generate/unix/acpiexamples/Makefile
U src/sys/external/bsd/acpica/dist/generate/unix/acpiexec/Makefile
U src/sys/external/bsd/acpica/dist/generate/unix/acpihelp/Makefile
U src/sys/external/bsd/acpica/dist/generate/unix/acpinames/Makefile
U src/sys/external/bsd/acpica/dist/generate/unix/acpisrc/Makefile
U src/sys/external/bsd/acpica/dist/generate/unix/acpixtract/Makefile
U src/sys/external/bsd/acpica/dist/generate/unix/iasl/Makefile
U src/sys/external/bsd/acpica/dist/common/acfileio.c
U src/sys/external/bsd/acpica/dist/common/acgetline.c
U src/sys/external/bsd/acpica/dist/common/adfile.c
U src/sys/external/bsd/acpica/dist/common/adisasm.c
U src/sys/external/bsd/acpica/dist/common/adwalk.c
U src/sys/external/bsd/acpica/dist/common/ahids.c
U src/sys/external/bsd/acpica/dist/common/ahpredef.c
U src/sys/external/bsd/acpica/dist/common/ahtable.c
U src/sys/external/bsd/acpica/dist/common/ahuuids.c
U src/sys/external/bsd/acpica/dist/common/cmfsize.c
U src/sys/external/bsd/acpica/dist/common/dmextern.c
U src/sys/external/bsd/acpica/dist/common/dmrestag.c
U 

CVS commit: src/sys/uvm

2020-05-25 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Mon May 25 22:04:51 UTC 2020

Modified Files:
src/sys/uvm: uvm_aobj.c

Log Message:
uao_get(): in the PGO_SYNCIO case use uvm_page_array and simplify control
flow a little bit.


To generate a diff of this commit:
cvs rdiff -u -r1.146 -r1.147 src/sys/uvm/uvm_aobj.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/uvm/uvm_aobj.c
diff -u src/sys/uvm/uvm_aobj.c:1.146 src/sys/uvm/uvm_aobj.c:1.147
--- src/sys/uvm/uvm_aobj.c:1.146	Mon May 25 21:15:10 2020
+++ src/sys/uvm/uvm_aobj.c	Mon May 25 22:04:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_aobj.c,v 1.146 2020/05/25 21:15:10 ad Exp $	*/
+/*	$NetBSD: uvm_aobj.c,v 1.147 2020/05/25 22:04:51 ad Exp $	*/
 
 /*
  * Copyright (c) 1998 Chuck Silvers, Charles D. Cranor and
@@ -38,7 +38,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.146 2020/05/25 21:15:10 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.147 2020/05/25 22:04:51 ad Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_uvmhist.h"
@@ -799,10 +799,11 @@ uao_get(struct uvm_object *uobj, voff_t 
 int *npagesp, int centeridx, vm_prot_t access_type, int advice, int flags)
 {
 	voff_t current_offset;
-	struct vm_page *ptmp = NULL;	/* Quell compiler warning */
-	int lcv, gotpages, maxpages, swslot = -1, pageidx = -1; /* XXX: gcc */
+	struct vm_page *ptmp;
+	int lcv, gotpages, maxpages, swslot, pageidx;
 	UVMHIST_FUNC("uao_get"); UVMHIST_CALLED(pdhist);
 	bool overwrite = ((flags & PGO_OVERWRITE) != 0);
+	struct uvm_page_array a;
 
 	UVMHIST_LOG(pdhist, "aobj=%#jx offset=%jd, flags=%jd",
 		(uintptr_t)uobj, offset, flags,0);
@@ -828,7 +829,6 @@ uao_get(struct uvm_object *uobj, voff_t 
  	 */
 
 	if (flags & PGO_LOCKED) {
-		struct uvm_page_array a;
 
 		/*
  		 * step 1a: get pages that are already resident.   only do
@@ -890,8 +890,8 @@ uao_get(struct uvm_object *uobj, voff_t 
 		goto done;
 	}
 
-	for (lcv = 0, current_offset = offset ; lcv < maxpages ;
-	lcv++, current_offset += PAGE_SIZE) {
+	uvm_page_array_init(, uobj, 0);
+	for (lcv = 0, current_offset = offset ; lcv < maxpages ;) {
 
 		/*
  		 * we have yet to locate the current page (pps[lcv]).   we
@@ -900,48 +900,14 @@ uao_get(struct uvm_object *uobj, voff_t 
 		 * released.  if that is the case, then we sleep on the page
 		 * until it is no longer busy or released and repeat the lookup.
 		 * if the page we found is neither busy nor released, then we
-		 * busy it (so we own it) and plug it into pps[lcv].   this
-		 * 'break's the following while loop and indicates we are
-		 * ready to move on to the next page in the "lcv" loop above.
- 		 *
- 		 * if we exit the while loop with pps[lcv] set to NULL,
-		 * then it means that we allocated a new busy/fake/clean page
-		 * ptmp in the object and we need to do I/O to fill in the data.
+		 * busy it (so we own it) and plug it into pps[lcv].   we are
+		 * ready to move on to the next page.
  		 */
 
-		/* top of "pps" while loop */
-		for (;;) {
-			/* look for a resident page */
-			ptmp = uvm_pagelookup(uobj, current_offset);
-
-			/* not resident?   allocate one now (if we can) */
-			if (ptmp == NULL) {
-/* get a zeroed page if not in swap */
-pageidx = current_offset >> PAGE_SHIFT;
-swslot = uao_find_swslot(uobj, pageidx);
-ptmp = uao_pagealloc(uobj, current_offset,
-swslot != 0 || overwrite ? 0 :
-UVM_PGA_ZERO);
-
-/* out of RAM? */
-if (ptmp == NULL) {
-	rw_exit(uobj->vmobjlock);
-	UVMHIST_LOG(pdhist,
-	"sleeping, ptmp == NULL\n",0,0,0,0);
-	uvm_wait("uao_getpage");
-	rw_enter(uobj->vmobjlock, RW_WRITER);
-	continue;
-}
-
-/*
- * got new page ready for I/O.  break pps for
- * loop.
- */
-
-pps[lcv] = NULL;
-break;
-			}
+		ptmp = uvm_page_array_fill_and_peek(, current_offset,
+		maxpages - lcv);
 
+		if (ptmp != NULL && ptmp->offset == current_offset) {
 			/* page is there, see if we need to wait on it */
 			if ((ptmp->flags & PG_BUSY) != 0) {
 UVMHIST_LOG(pdhist,
@@ -949,14 +915,15 @@ uao_get(struct uvm_object *uobj, voff_t 
 ptmp->flags,0,0,0);
 uvm_pagewait(ptmp, uobj->vmobjlock, "uao_get");
 rw_enter(uobj->vmobjlock, RW_WRITER);
+uvm_page_array_clear();
 continue;
 			}
 
 			/*
- 			 * if we get here then the page has become resident and
-			 * unbusy between steps 1 and 2.  we busy it now (so we
-			 * own it) and set pps[lcv] (so that we exit the while
-			 * loop).
+ 			 * if we get here then the page is resident and
+			 * unbusy.  we busy it now (so we own it).  if
+			 * overwriting, mark the page dirty up front as
+			 * it will be zapped via an unmanaged mapping.
  			 */
 
 			KASSERT(uvm_pagegetdirty(ptmp) !=
@@ -967,17 +934,35 @@ uao_get(struct uvm_object *uobj, voff_t 
 			/* we own it, caller must un-busy */
 			ptmp->flags |= PG_BUSY;
 			UVM_PAGE_OWN(ptmp, 

CVS commit: src/sys/uvm

2020-05-25 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Mon May 25 22:04:51 UTC 2020

Modified Files:
src/sys/uvm: uvm_aobj.c

Log Message:
uao_get(): in the PGO_SYNCIO case use uvm_page_array and simplify control
flow a little bit.


To generate a diff of this commit:
cvs rdiff -u -r1.146 -r1.147 src/sys/uvm/uvm_aobj.c

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



CVS commit: src/sys/uvm

2020-05-25 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Mon May 25 22:01:27 UTC 2020

Modified Files:
src/sys/uvm: uvm_page_array.c

Log Message:
Make previous work as intended.  Bad programmer.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/uvm/uvm_page_array.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/uvm/uvm_page_array.c
diff -u src/sys/uvm/uvm_page_array.c:1.7 src/sys/uvm/uvm_page_array.c:1.8
--- src/sys/uvm/uvm_page_array.c:1.7	Mon May 25 21:22:40 2020
+++ src/sys/uvm/uvm_page_array.c	Mon May 25 22:01:26 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_page_array.c,v 1.7 2020/05/25 21:22:40 ad Exp $	*/
+/*	$NetBSD: uvm_page_array.c,v 1.8 2020/05/25 22:01:26 ad Exp $	*/
 
 /*-
  * Copyright (c)2011 YAMAMOTO Takashi,
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_page_array.c,v 1.7 2020/05/25 21:22:40 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_page_array.c,v 1.8 2020/05/25 22:01:26 ad Exp $");
 
 #include 
 #include 
@@ -180,12 +180,12 @@ uvm_page_array_fill(struct uvm_page_arra
 			 * set of arguments, in the current version of the
 			 * tree.
 			 *
-			 * minimize repeated tree lookups by "finding" some
-			 * null pointers, in case the caller keeps looping
-			 * (a common use case).
+			 * minimize repeated tree lookups by "finding" a
+			 * null pointer, in case the caller keeps looping (a
+			 * common use case).
 			 */
-			npages = maxpages;
-			memset(ar->ar_pages, 0, sizeof(ar->ar_pages[0]) * npages);
+			npages = 1;
+			ar->ar_pages[0] = NULL;
 		}
 	}
 	KASSERT(npages <= maxpages);
@@ -220,20 +220,17 @@ uvm_page_array_fill(struct uvm_page_arra
  */
 
 struct vm_page *
-uvm_page_array_fill_and_peek(struct uvm_page_array *a, voff_t off,
+uvm_page_array_fill_and_peek(struct uvm_page_array *ar, voff_t off,
 unsigned int nwant)
 {
-	struct vm_page *pg;
 	int error;
 
-	pg = uvm_page_array_peek(a);
-	if (pg != NULL) {
-		return pg;
+	if (ar->ar_idx != ar->ar_npages) {
+		return ar->ar_pages[ar->ar_idx];
 	}
-	error = uvm_page_array_fill(a, off, nwant);
+	error = uvm_page_array_fill(ar, off, nwant);
 	if (error != 0) {
 		return NULL;
 	}
-	pg = uvm_page_array_peek(a);
-	return pg;
+	return uvm_page_array_peek(ar);
 }



CVS commit: src/sys/uvm

2020-05-25 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Mon May 25 22:01:27 UTC 2020

Modified Files:
src/sys/uvm: uvm_page_array.c

Log Message:
Make previous work as intended.  Bad programmer.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/uvm/uvm_page_array.c

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



CVS commit: src/sys/uvm

2020-05-25 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Mon May 25 21:22:40 UTC 2020

Modified Files:
src/sys/uvm: uvm_page_array.c

Log Message:
Minor correction to previous.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/uvm/uvm_page_array.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/uvm/uvm_page_array.c
diff -u src/sys/uvm/uvm_page_array.c:1.6 src/sys/uvm/uvm_page_array.c:1.7
--- src/sys/uvm/uvm_page_array.c:1.6	Mon May 25 21:15:10 2020
+++ src/sys/uvm/uvm_page_array.c	Mon May 25 21:22:40 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_page_array.c,v 1.6 2020/05/25 21:15:10 ad Exp $	*/
+/*	$NetBSD: uvm_page_array.c,v 1.7 2020/05/25 21:22:40 ad Exp $	*/
 
 /*-
  * Copyright (c)2011 YAMAMOTO Takashi,
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_page_array.c,v 1.6 2020/05/25 21:15:10 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_page_array.c,v 1.7 2020/05/25 21:22:40 ad Exp $");
 
 #include 
 #include 
@@ -195,10 +195,9 @@ uvm_page_array_fill(struct uvm_page_arra
 	for (i = 0; i < ar->ar_npages; i++) {
 		struct vm_page * const pg = ar->ar_pages[i];
 
-		if (!dense && pg == NULL) {
+		if (pg == NULL) {
 			continue;
 		}
-		KDASSERT(pg != NULL);
 		KDASSERT(pg->uobject == uobj);
 		if (backward) {
 			KDASSERT(pg->offset <= off);



CVS commit: src/sys/uvm

2020-05-25 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Mon May 25 21:22:40 UTC 2020

Modified Files:
src/sys/uvm: uvm_page_array.c

Log Message:
Minor correction to previous.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/uvm/uvm_page_array.c

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



CVS commit: src/sys

2020-05-25 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Mon May 25 21:15:10 UTC 2020

Modified Files:
src/sys/arch/hppa/hppa: pmap.c
src/sys/miscfs/genfs: genfs_io.c
src/sys/nfs: nfs_subs.c
src/sys/uvm: uvm_aobj.c uvm_object.c uvm_page_array.c uvm_page_array.h
uvm_vnode.c

Log Message:
- Alter the convention for uvm_page_array slightly, so the basic search
  parameters can't change part way through a search: move the "uobj" and
  "flags" arguments over to uvm_page_array_init() and store those with the
  array.

- With that, detect when it's not possible to find any more pages in the
  tree with the given search parameters, and avoid repeated tree lookups if
  the caller loops over uvm_page_array_fill_and_peek().


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 src/sys/arch/hppa/hppa/pmap.c
cvs rdiff -u -r1.96 -r1.97 src/sys/miscfs/genfs/genfs_io.c
cvs rdiff -u -r1.239 -r1.240 src/sys/nfs/nfs_subs.c
cvs rdiff -u -r1.145 -r1.146 src/sys/uvm/uvm_aobj.c
cvs rdiff -u -r1.22 -r1.23 src/sys/uvm/uvm_object.c
cvs rdiff -u -r1.5 -r1.6 src/sys/uvm/uvm_page_array.c
cvs rdiff -u -r1.2 -r1.3 src/sys/uvm/uvm_page_array.h
cvs rdiff -u -r1.113 -r1.114 src/sys/uvm/uvm_vnode.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/hppa/hppa/pmap.c
diff -u src/sys/arch/hppa/hppa/pmap.c:1.112 src/sys/arch/hppa/hppa/pmap.c:1.113
--- src/sys/arch/hppa/hppa/pmap.c:1.112	Thu Apr 30 06:16:47 2020
+++ src/sys/arch/hppa/hppa/pmap.c	Mon May 25 21:15:10 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.112 2020/04/30 06:16:47 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.113 2020/05/25 21:15:10 ad Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2020 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.112 2020/04/30 06:16:47 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.113 2020/05/25 21:15:10 ad Exp $");
 
 #include "opt_cputype.h"
 
@@ -1253,11 +1253,10 @@ pmap_destroy(pmap_t pmap)
 		return;
 
 #ifdef DIAGNOSTIC
-	uvm_page_array_init();
+	uvm_page_array_init(, >pm_obj, 0);
 	off = 0;
 	rw_enter(pmap->pm_lock, RW_WRITER);
-	while ((pg = uvm_page_array_fill_and_peek(, >pm_obj, off, 0, 0))
-	!= NULL) {
+	while ((pg = uvm_page_array_fill_and_peek(, off, 0)) != NULL) {
 		pt_entry_t *pde, *epde;
 		struct vm_page *spg;
 		struct pv_entry *pv, *npv;

Index: src/sys/miscfs/genfs/genfs_io.c
diff -u src/sys/miscfs/genfs/genfs_io.c:1.96 src/sys/miscfs/genfs/genfs_io.c:1.97
--- src/sys/miscfs/genfs/genfs_io.c:1.96	Sun May 17 19:38:16 2020
+++ src/sys/miscfs/genfs/genfs_io.c	Mon May 25 21:15:10 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: genfs_io.c,v 1.96 2020/05/17 19:38:16 ad Exp $	*/
+/*	$NetBSD: genfs_io.c,v 1.97 2020/05/25 21:15:10 ad Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.96 2020/05/17 19:38:16 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.97 2020/05/25 21:15:10 ad Exp $");
 
 #include 
 #include 
@@ -1005,7 +1005,8 @@ retry:
 
 	cleanall = true;
 	freeflag = pagedaemon ? PG_PAGEOUT : PG_RELEASED;
-	uvm_page_array_init();
+	uvm_page_array_init(, uobj, dirtyonly ? (UVM_PAGE_ARRAY_FILL_DIRTY |
+	(!async ? UVM_PAGE_ARRAY_FILL_WRITEBACK : 0)) : 0);
 	for (;;) {
 		bool pgprotected;
 
@@ -1017,9 +1018,7 @@ retry:
 		 * wait on pages being written back by other threads as well.
 		 */
 
-		pg = uvm_page_array_fill_and_peek(, uobj, nextoff, 0,
-		dirtyonly ? (UVM_PAGE_ARRAY_FILL_DIRTY |
-		(!async ? UVM_PAGE_ARRAY_FILL_WRITEBACK : 0)) : 0);
+		pg = uvm_page_array_fill_and_peek(, nextoff, 0);
 		if (pg == NULL) {
 			break;
 		}

Index: src/sys/nfs/nfs_subs.c
diff -u src/sys/nfs/nfs_subs.c:1.239 src/sys/nfs/nfs_subs.c:1.240
--- src/sys/nfs/nfs_subs.c:1.239	Sat Apr  4 07:07:20 2020
+++ src/sys/nfs/nfs_subs.c	Mon May 25 21:15:10 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_subs.c,v 1.239 2020/04/04 07:07:20 mlelstv Exp $	*/
+/*	$NetBSD: nfs_subs.c,v 1.240 2020/05/25 21:15:10 ad Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -70,7 +70,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nfs_subs.c,v 1.239 2020/04/04 07:07:20 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_subs.c,v 1.240 2020/05/25 21:15:10 ad Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_nfs.h"
@@ -1798,10 +1798,10 @@ nfs_clearcommit(struct mount *mp)
 		np->n_pushedhi = 0;
 		np->n_commitflags &=
 		~(NFS_COMMIT_PUSH_VALID | NFS_COMMIT_PUSHED_VALID);
-		uvm_page_array_init();
+		uvm_page_array_init(, >v_uobj, 0);
 		off = 0;
-		while ((pg = uvm_page_array_fill_and_peek(, >v_uobj, off,
-		0, 0)) != NULL) {
+		while ((pg = uvm_page_array_fill_and_peek(, off, 0)) !=
+		NULL) {
 			pg->flags &= ~PG_NEEDCOMMIT;
 			uvm_page_array_advance();
 			off = pg->offset + PAGE_SIZE;

Index: src/sys/uvm/uvm_aobj.c
diff -u src/sys/uvm/uvm_aobj.c:1.145 

CVS commit: src/sys

2020-05-25 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Mon May 25 21:15:10 UTC 2020

Modified Files:
src/sys/arch/hppa/hppa: pmap.c
src/sys/miscfs/genfs: genfs_io.c
src/sys/nfs: nfs_subs.c
src/sys/uvm: uvm_aobj.c uvm_object.c uvm_page_array.c uvm_page_array.h
uvm_vnode.c

Log Message:
- Alter the convention for uvm_page_array slightly, so the basic search
  parameters can't change part way through a search: move the "uobj" and
  "flags" arguments over to uvm_page_array_init() and store those with the
  array.

- With that, detect when it's not possible to find any more pages in the
  tree with the given search parameters, and avoid repeated tree lookups if
  the caller loops over uvm_page_array_fill_and_peek().


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 src/sys/arch/hppa/hppa/pmap.c
cvs rdiff -u -r1.96 -r1.97 src/sys/miscfs/genfs/genfs_io.c
cvs rdiff -u -r1.239 -r1.240 src/sys/nfs/nfs_subs.c
cvs rdiff -u -r1.145 -r1.146 src/sys/uvm/uvm_aobj.c
cvs rdiff -u -r1.22 -r1.23 src/sys/uvm/uvm_object.c
cvs rdiff -u -r1.5 -r1.6 src/sys/uvm/uvm_page_array.c
cvs rdiff -u -r1.2 -r1.3 src/sys/uvm/uvm_page_array.h
cvs rdiff -u -r1.113 -r1.114 src/sys/uvm/uvm_vnode.c

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



CVS commit: src/sys/kern

2020-05-25 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon May 25 21:05:01 UTC 2020

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

Log Message:
Remove support for the !DVF_PRIV_ALLOC case; device_t and driver private
storage separation are now mandatory.


To generate a diff of this commit:
cvs rdiff -u -r1.270 -r1.271 src/sys/kern/subr_autoconf.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/subr_autoconf.c
diff -u src/sys/kern/subr_autoconf.c:1.270 src/sys/kern/subr_autoconf.c:1.271
--- src/sys/kern/subr_autoconf.c:1.270	Thu Apr 30 03:28:18 2020
+++ src/sys/kern/subr_autoconf.c	Mon May 25 21:05:01 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_autoconf.c,v 1.270 2020/04/30 03:28:18 riastradh Exp $ */
+/* $NetBSD: subr_autoconf.c,v 1.271 2020/05/25 21:05:01 thorpej Exp $ */
 
 /*
  * Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -77,7 +77,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.270 2020/04/30 03:28:18 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.271 2020/05/25 21:05:01 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -1265,12 +1265,11 @@ config_devlink(device_t dev)
 static void
 config_devfree(device_t dev)
 {
-	int priv = (dev->dv_flags & DVF_PRIV_ALLOC);
+	KASSERT(dev->dv_flags & DVF_PRIV_ALLOC);
 
 	if (dev->dv_cfattach->ca_devsize > 0)
 		kmem_free(dev->dv_private, dev->dv_cfattach->ca_devsize);
-	if (priv)
-		kmem_free(dev, sizeof(*dev));
+	kmem_free(dev, sizeof(*dev));
 }
 
 /*
@@ -1401,26 +1400,14 @@ config_devalloc(const device_t parent, c
 		return NULL;
 
 	/* get memory for all device vars */
-	KASSERTMSG((ca->ca_flags & DVF_PRIV_ALLOC)
-	|| ca->ca_devsize >= sizeof(struct device),
-	"%s: %s (%zu < %zu)", __func__, cf->cf_atname, ca->ca_devsize,
-	sizeof(struct device));
+	KASSERT(ca->ca_flags & DVF_PRIV_ALLOC);
 	if (ca->ca_devsize > 0) {
 		dev_private = kmem_zalloc(ca->ca_devsize, KM_SLEEP);
 	} else {
-		KASSERT(ca->ca_flags & DVF_PRIV_ALLOC);
 		dev_private = NULL;
 	}
+	dev = kmem_zalloc(sizeof(*dev), KM_SLEEP);
 
-	if ((ca->ca_flags & DVF_PRIV_ALLOC) != 0) {
-		dev = kmem_zalloc(sizeof(*dev), KM_SLEEP);
-	} else {
-		dev = dev_private;
-#ifdef DIAGNOSTIC
-		printf("%s has not been converted to device_t\n", cd->cd_name);
-#endif
-		KASSERT(dev != NULL);
-	}
 	dev->dv_class = cd->cd_class;
 	dev->dv_cfdata = cf;
 	dev->dv_cfdriver = cd;



CVS commit: src/sys/kern

2020-05-25 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon May 25 21:05:01 UTC 2020

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

Log Message:
Remove support for the !DVF_PRIV_ALLOC case; device_t and driver private
storage separation are now mandatory.


To generate a diff of this commit:
cvs rdiff -u -r1.270 -r1.271 src/sys/kern/subr_autoconf.c

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



CVS commit: src/doc

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 20:56:54 UTC 2020

Modified Files:
src/doc: 3RDPARTY

Log Message:
new ntp


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

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



CVS commit: src/doc

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 20:56:54 UTC 2020

Modified Files:
src/doc: 3RDPARTY

Log Message:
new ntp


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

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1718 src/doc/3RDPARTY:1.1719
--- src/doc/3RDPARTY:1.1718	Mon May 25 10:54:26 2020
+++ src/doc/3RDPARTY	Mon May 25 16:56:54 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1718 2020/05/25 14:54:26 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1719 2020/05/25 20:56:54 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -976,12 +976,12 @@ and ndbootd-raw.c.  Restore saved config
 HAVE_STRICT_ALIGNMENT.  Fix RCS IDs, import.
 
 Package:	ntp
-Version:	4.2.8p12
-Current Vers:	4.2.8p13
+Version:	4.2.8p14
+Current Vers:	4.2.8p14
 Maintainer:	David L. Mills 
 Archive Site:	http://www.ntp.org/
 Home Page:	http://www.ntp.org/, http://support.ntp.org/
-Date:		2019-10-09
+Date:		2020-05-25
 Mailing List:
 Responsible:	simonb, jonathan, kardel
 License:	BSD-like



CVS commit: src/doc

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 20:56:11 UTC 2020

Modified Files:
src/doc: CHANGES

Log Message:
new ntp


To generate a diff of this commit:
cvs rdiff -u -r1.2693 -r1.2694 src/doc/CHANGES

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
diff -u src/doc/CHANGES:1.2693 src/doc/CHANGES:1.2694
--- src/doc/CHANGES:1.2693	Mon May 25 10:54:26 2020
+++ src/doc/CHANGES	Mon May 25 16:56:11 2020
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2693 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2694 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -211,3 +211,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	libuv: Import version 1.38.0. [christos 20200524]
 	bind: Import version 9.16.3. [christos 20200524]
 	tzcode: Updated to 2020a. [christos 20200525]
+	ntp: Import ntp 4.2.8p14. [christos 20200525] 



CVS commit: src/doc

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 20:56:11 UTC 2020

Modified Files:
src/doc: CHANGES

Log Message:
new ntp


To generate a diff of this commit:
cvs rdiff -u -r1.2693 -r1.2694 src/doc/CHANGES

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



CVS commit: src/external/bsd/ntp/dist/sntp/libopts

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 20:54:08 UTC 2020

Modified Files:
src/external/bsd/ntp/dist/sntp/libopts: boolean.c configfile.c

Log Message:
Add FALLTHROUGH


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/ntp/dist/sntp/libopts/boolean.c
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/ntp/dist/sntp/libopts/configfile.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/bsd/ntp/dist/sntp/libopts/boolean.c
diff -u src/external/bsd/ntp/dist/sntp/libopts/boolean.c:1.5 src/external/bsd/ntp/dist/sntp/libopts/boolean.c:1.6
--- src/external/bsd/ntp/dist/sntp/libopts/boolean.c:1.5	Mon May 25 16:47:34 2020
+++ src/external/bsd/ntp/dist/sntp/libopts/boolean.c	Mon May 25 16:54:07 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: boolean.c,v 1.5 2020/05/25 20:47:34 christos Exp $	*/
+/*	$NetBSD: boolean.c,v 1.6 2020/05/25 20:54:07 christos Exp $	*/
 
 
 /**
@@ -66,8 +66,8 @@ optionBooleanVal(tOptions * opts, tOptDe
 long  val = strtol(od->optArg.argString, , 0);
 if ((val != 0) || (*pz != NUL))
 break;
-/* FALLTHROUGH */
 }
+/*FALLTHROUGH*/
 case 'N':
 case 'n':
 case 'F':

Index: src/external/bsd/ntp/dist/sntp/libopts/configfile.c
diff -u src/external/bsd/ntp/dist/sntp/libopts/configfile.c:1.9 src/external/bsd/ntp/dist/sntp/libopts/configfile.c:1.10
--- src/external/bsd/ntp/dist/sntp/libopts/configfile.c:1.9	Mon May 25 16:47:34 2020
+++ src/external/bsd/ntp/dist/sntp/libopts/configfile.c	Mon May 25 16:54:07 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: configfile.c,v 1.9 2020/05/25 20:47:34 christos Exp $	*/
+/*	$NetBSD: configfile.c,v 1.10 2020/05/25 20:54:07 christos Exp $	*/
 
 /**
  * \file configfile.c
@@ -468,7 +468,7 @@ file_preset(tOptions * opts, char const 
 ftext = strchr(ftext + 2, '>');
 if (ftext++ != NULL)
 break;
-
+		/*FALLTHROUGH*/
 default:
 ftext = NULL;
 }



CVS commit: src/external/bsd/ntp/dist/sntp/libopts

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 20:54:08 UTC 2020

Modified Files:
src/external/bsd/ntp/dist/sntp/libopts: boolean.c configfile.c

Log Message:
Add FALLTHROUGH


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/ntp/dist/sntp/libopts/boolean.c
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/ntp/dist/sntp/libopts/configfile.c

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



CVS commit: src/external/bsd/ntp

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 20:47:38 UTC 2020

Modified Files:
src/external/bsd/ntp: importdate ntp2netbsd
src/external/bsd/ntp/bin/ntp-keygen: ntp-keygen.8
src/external/bsd/ntp/bin/ntpd: ntpd.8
src/external/bsd/ntp/bin/ntpdc: ntpdc.8
src/external/bsd/ntp/bin/ntpq: ntpq.8
src/external/bsd/ntp/bin/ntptrace: ntptrace.8
src/external/bsd/ntp/dist: configure.ac
src/external/bsd/ntp/dist/adjtimed: adjtimed.c
src/external/bsd/ntp/dist/clockstuff: chutest.c propdelay.c
src/external/bsd/ntp/dist/include: adjtime.h ascii.h audio.h binio.h
declcond.h gps.h hopf6039.h icom.h ieee754io.h intreswork.h
iosignal.h l_stdlib.h lib_strbuf.h libntp.h libssl_compat.h
mbg_gps166.h mx4200.h ntif.h ntp.h ntp_assert.h ntp_calendar.h
ntp_calgps.h ntp_cmdargs.h ntp_config.h ntp_control.h ntp_crypto.h
ntp_datum.h ntp_debug.h ntp_filegen.h ntp_fp.h ntp_if.h
ntp_intres.h ntp_io.h ntp_keyacc.h ntp_libopts.h ntp_lineedit.h
ntp_lists.h ntp_machine.h ntp_malloc.h ntp_md5.h ntp_net.h
ntp_prio_q.h ntp_proto.h ntp_psl.h ntp_random.h ntp_refclock.h
ntp_request.h ntp_rfc2553.h ntp_select.h ntp_stdlib.h ntp_string.h
ntp_syscall.h ntp_syslog.h ntp_tty.h ntp_types.h ntp_unixtime.h
ntp_worker.h ntp_workimpl.h ntpd.h ntpsim.h parse.h parse_conf.h
rc_cmdlength.h recvbuff.h refclock_atom.h refidsmear.h safecast.h
ssl_applink.c timepps-SCO.h timepps-Solaris.h timepps-SunOS.h
timespecops.h timetoa.h timevalops.h timexsup.h trimble.h
vint64ops.h
src/external/bsd/ntp/dist/include/isc: mem.h
src/external/bsd/ntp/dist/kernel/sys: bsd_audioirig.h i8253.h
parsestreams.h pcl720.h ppsclock.h timex.h tpro.h tt560_api.h
src/external/bsd/ntp/dist/lib/isc: app_api.c assertions.c
backtrace-emptytbl.c backtrace.c base32.c base64.c bitstring.c
buffer.c bufferlist.c commandline.c entropy.c error.c event.c
fsaccess.c hash.c heap.c hex.c hmacmd5.c hmacsha.c httpd.c
inet_aton.c inet_ntop.c inet_pton.c iterated_hash.c lex.c lfsr.c
lib.c log.c md5.c mem.c mem_api.c mutexblock.c netaddr.c netscope.c
ondestroy.c parseint.c portset.c print.c quota.c radix.c random.c
ratelimiter.c refcount.c region.c result.c rwlock.c serial.c sha1.c
sha2.c sockaddr.c socket_api.c stats.c string.c strtoul.c symtab.c
task.c task_api.c task_p.h taskpool.c timer.c timer_api.c timer_p.h
tsmemcmp.c version.c
src/external/bsd/ntp/dist/lib/isc/alpha/include/isc: atomic.h
src/external/bsd/ntp/dist/lib/isc/ia64/include/isc: atomic.h
src/external/bsd/ntp/dist/lib/isc/include/isc: app.h assertions.h
backtrace.h base32.h base64.h bind9.h bitstring.h boolean.h
buffer.h bufferlist.h commandline.h entropy.h error.h event.h
eventclass.h file.h formatcheck.h fsaccess.h hash.h heap.h hex.h
hmacmd5.h hmacsha.h httpd.h interfaceiter.h ipv6.h iterated_hash.h
lang.h lex.h lfsr.h lib.h list.h log.h magic.h md5.h mem.h msgcat.h
msgs.h mutexblock.h namespace.h netaddr.h netscope.h ondestroy.h
os.h parseint.h platform.h platform.h.in portset.h print.h queue.h
quota.h radix.h random.h ratelimiter.h refcount.h region.h
resource.h result.h resultclass.h rwlock.h serial.h sha1.h sha2.h
sockaddr.h socket.h stats.h stdio.h stdlib.h string.h symtab.h
task.h taskpool.h timer.h types.h util.h version.h xml.h
src/external/bsd/ntp/dist/lib/isc/mips/include/isc: atomic.h
src/external/bsd/ntp/dist/lib/isc/nls: msgcat.c
src/external/bsd/ntp/dist/lib/isc/noatomic/include/isc: atomic.h
src/external/bsd/ntp/dist/lib/isc/nothreads: condition.c mutex.c
thread.c
src/external/bsd/ntp/dist/lib/isc/nothreads/include/isc: condition.h
mutex.h once.h thread.h
src/external/bsd/ntp/dist/lib/isc/powerpc/include/isc: atomic.h
src/external/bsd/ntp/dist/lib/isc/pthreads: condition.c mutex.c
thread.c
src/external/bsd/ntp/dist/lib/isc/pthreads/include/isc: condition.h
mutex.h once.h thread.h
src/external/bsd/ntp/dist/lib/isc/sparc64/include/isc: atomic.h
src/external/bsd/ntp/dist/lib/isc/tests: hash_test.c isctest.c
isctest.h queue_test.c socket_test.c symtab_test.c task_test.c
taskpool_test.c
src/external/bsd/ntp/dist/lib/isc/unix: app.c dir.c entropy.c
errno2result.c errno2result.h file.c fsaccess.c ifiter_getifaddrs.c
ifiter_ioctl.c ifiter_sysctl.c interfaceiter.c ipv6.c keyboard.c
net.c os.c resource.c socket.c socket_p.h stdio.c stdtime.c

CVS commit: src/external/bsd/ntp

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 20:47:38 UTC 2020

Modified Files:
src/external/bsd/ntp: importdate ntp2netbsd
src/external/bsd/ntp/bin/ntp-keygen: ntp-keygen.8
src/external/bsd/ntp/bin/ntpd: ntpd.8
src/external/bsd/ntp/bin/ntpdc: ntpdc.8
src/external/bsd/ntp/bin/ntpq: ntpq.8
src/external/bsd/ntp/bin/ntptrace: ntptrace.8
src/external/bsd/ntp/dist: configure.ac
src/external/bsd/ntp/dist/adjtimed: adjtimed.c
src/external/bsd/ntp/dist/clockstuff: chutest.c propdelay.c
src/external/bsd/ntp/dist/include: adjtime.h ascii.h audio.h binio.h
declcond.h gps.h hopf6039.h icom.h ieee754io.h intreswork.h
iosignal.h l_stdlib.h lib_strbuf.h libntp.h libssl_compat.h
mbg_gps166.h mx4200.h ntif.h ntp.h ntp_assert.h ntp_calendar.h
ntp_calgps.h ntp_cmdargs.h ntp_config.h ntp_control.h ntp_crypto.h
ntp_datum.h ntp_debug.h ntp_filegen.h ntp_fp.h ntp_if.h
ntp_intres.h ntp_io.h ntp_keyacc.h ntp_libopts.h ntp_lineedit.h
ntp_lists.h ntp_machine.h ntp_malloc.h ntp_md5.h ntp_net.h
ntp_prio_q.h ntp_proto.h ntp_psl.h ntp_random.h ntp_refclock.h
ntp_request.h ntp_rfc2553.h ntp_select.h ntp_stdlib.h ntp_string.h
ntp_syscall.h ntp_syslog.h ntp_tty.h ntp_types.h ntp_unixtime.h
ntp_worker.h ntp_workimpl.h ntpd.h ntpsim.h parse.h parse_conf.h
rc_cmdlength.h recvbuff.h refclock_atom.h refidsmear.h safecast.h
ssl_applink.c timepps-SCO.h timepps-Solaris.h timepps-SunOS.h
timespecops.h timetoa.h timevalops.h timexsup.h trimble.h
vint64ops.h
src/external/bsd/ntp/dist/include/isc: mem.h
src/external/bsd/ntp/dist/kernel/sys: bsd_audioirig.h i8253.h
parsestreams.h pcl720.h ppsclock.h timex.h tpro.h tt560_api.h
src/external/bsd/ntp/dist/lib/isc: app_api.c assertions.c
backtrace-emptytbl.c backtrace.c base32.c base64.c bitstring.c
buffer.c bufferlist.c commandline.c entropy.c error.c event.c
fsaccess.c hash.c heap.c hex.c hmacmd5.c hmacsha.c httpd.c
inet_aton.c inet_ntop.c inet_pton.c iterated_hash.c lex.c lfsr.c
lib.c log.c md5.c mem.c mem_api.c mutexblock.c netaddr.c netscope.c
ondestroy.c parseint.c portset.c print.c quota.c radix.c random.c
ratelimiter.c refcount.c region.c result.c rwlock.c serial.c sha1.c
sha2.c sockaddr.c socket_api.c stats.c string.c strtoul.c symtab.c
task.c task_api.c task_p.h taskpool.c timer.c timer_api.c timer_p.h
tsmemcmp.c version.c
src/external/bsd/ntp/dist/lib/isc/alpha/include/isc: atomic.h
src/external/bsd/ntp/dist/lib/isc/ia64/include/isc: atomic.h
src/external/bsd/ntp/dist/lib/isc/include/isc: app.h assertions.h
backtrace.h base32.h base64.h bind9.h bitstring.h boolean.h
buffer.h bufferlist.h commandline.h entropy.h error.h event.h
eventclass.h file.h formatcheck.h fsaccess.h hash.h heap.h hex.h
hmacmd5.h hmacsha.h httpd.h interfaceiter.h ipv6.h iterated_hash.h
lang.h lex.h lfsr.h lib.h list.h log.h magic.h md5.h mem.h msgcat.h
msgs.h mutexblock.h namespace.h netaddr.h netscope.h ondestroy.h
os.h parseint.h platform.h platform.h.in portset.h print.h queue.h
quota.h radix.h random.h ratelimiter.h refcount.h region.h
resource.h result.h resultclass.h rwlock.h serial.h sha1.h sha2.h
sockaddr.h socket.h stats.h stdio.h stdlib.h string.h symtab.h
task.h taskpool.h timer.h types.h util.h version.h xml.h
src/external/bsd/ntp/dist/lib/isc/mips/include/isc: atomic.h
src/external/bsd/ntp/dist/lib/isc/nls: msgcat.c
src/external/bsd/ntp/dist/lib/isc/noatomic/include/isc: atomic.h
src/external/bsd/ntp/dist/lib/isc/nothreads: condition.c mutex.c
thread.c
src/external/bsd/ntp/dist/lib/isc/nothreads/include/isc: condition.h
mutex.h once.h thread.h
src/external/bsd/ntp/dist/lib/isc/powerpc/include/isc: atomic.h
src/external/bsd/ntp/dist/lib/isc/pthreads: condition.c mutex.c
thread.c
src/external/bsd/ntp/dist/lib/isc/pthreads/include/isc: condition.h
mutex.h once.h thread.h
src/external/bsd/ntp/dist/lib/isc/sparc64/include/isc: atomic.h
src/external/bsd/ntp/dist/lib/isc/tests: hash_test.c isctest.c
isctest.h queue_test.c socket_test.c symtab_test.c task_test.c
taskpool_test.c
src/external/bsd/ntp/dist/lib/isc/unix: app.c dir.c entropy.c
errno2result.c errno2result.h file.c fsaccess.c ifiter_getifaddrs.c
ifiter_ioctl.c ifiter_sysctl.c interfaceiter.c ipv6.c keyboard.c
net.c os.c resource.c socket.c socket_p.h stdio.c stdtime.c

CVS import: src/external/bsd/ntp/dist

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 20:40:58 UTC 2020

Update of /cvsroot/src/external/bsd/ntp/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv3563

Log Message:
(4.2.8p14) 2020/03/03 Released by Harlan Stenn 

* [Sec 3610] process_control() should bail earlier on short packets. stenn@
  - Reported by Philippe Antoine
* [Sec 3596] Highly predictable timestamp attack. 
  - Reported by Miroslav Lichvar
* [Sec 3592] DoS attack on client ntpd 
  - Reported by Miroslav Lichvar
* [Bug 3637] Emit the version of ntpd in saveconfig.  stenn@
* [Bug 3636] NMEA: combine time/date from multiple sentences 
* [Bug 3635] Make leapsecond file hash check optional 
* [Bug 3634] Typo in discipline.html, reported by Jason Harrison.  stenn@
* [Bug 3628] raw DCF decoding - improve robustness with Zeller's congruence
  - implement Zeller's congruence in libparse and libntp 
* [Bug 3627] SIGSEGV on FreeBSD-12 with stack limit and stack gap 

  - integrated patch by Cy Schubert
* [Bug 3620] memory leak in ntpq sysinfo 
  - applied patch by Gerry Garvey
* [Bug 3619] Honour drefid setting in cooked mode and sysinfo 

  - applied patch by Gerry Garvey
* [Bug 3617] Add support for ACE III and Copernicus II receivers 

  - integrated patch by Richard Steedman
* [Bug 3615] accelerate refclock startup 
* [Bug 3613] Propagate noselect to mobilized pool servers 
  - Reported by Martin Burnicki
* [Bug 3612] Use-of-uninitialized-value in receive function 
  - Reported by Philippe Antoine
* [Bug 3611] NMEA time interpreted incorrectly 
  - officially document new "trust date" mode bit for NMEA driver
  - restore the (previously undocumented) "trust date" feature lost with [bug 
3577] 
* [Bug 3609] Fixing wrong falseticker in case of non-statistic jitter 

  - mostly based on a patch by Michael Haardt, implementing 'fudge minjitter'
* [Bug 3608] libparse fails to compile on S11.4SRU13 and later 

  - removed ffs() and fls() prototypes as per Brian Utterback
* [Bug 3604] Wrong param byte order passing into record_raw_stats() in
ntp_io.c 
  - fixed byte and paramter order as suggested by wei6...@sina.com 
* [Bug 3601] Tests fail to link on platforms with ntp_cv_gc_sections_runs=no 

* [Bug 3599] Build fails on linux-m68k due to alignment issues 

  - added padding as suggested by John Paul Adrian Glaubitz 
* [Bug 3594] ntpd discards messages coming through nmead 
* [Bug 3593] ntpd discards silently nmea messages after the 5th string 

* [Bug 3590] Update refclock_oncore.c to the new GPS date API 

* [Bug 3585] Unity tests mix buffered and unbuffered output 
  - stdout+stderr are set to line buffered during test setup now
* [Bug 3583] synchronization error 
  - set clock to base date if system time is before that limit
* [Bug 3582] gpsdjson refclock fudgetime1 adjustment is doubled 

* [Bug 3580] Possible bug ntpq-subs (NULL dereference in dogetassoc) 

  - Reported by Paulo Neves
* [Bug 3577] Update refclock_zyfer.c to the new GPS date API 
  - also updates for refclock_nmea.c and refclock_jupiter.c
* [Bug 3576] New GPS date function API 
* [Bug 3573] nptdate: missleading error message 
* [Bug 3570] NMEA driver docs: talker ID not mentioned, typo 
* [Bug 3569] cleanup MOD_NANO/STA_NANO handling for 'ntpadjtimex()' 

  - sidekick: service port resolution in 'ntpdate'
* [Bug 3550] Reproducible build: Respect SOURCE_DATE_EPOCH 
  - applied patch by Douglas Royds
* [Bug 3542] ntpdc monlist parameters cannot be set 
* [Bug 3533] ntpdc peer_info ipv6 issues 
  - applied patch by Gerry Garvey
* [Bug 3531] make check: test-decodenetnum fails 
  - try to harden 'decodenetnum()' against 'getaddrinfo()' errors
  - fix wrong cond-compile tests in unit tests
* [Bug 3517] Reducing build noise 
* [Bug 3516] Require tooling from this decade 
  - patch by Philipp Prindeville
* [Bug 3515] Refactor ntpdmain() dispatcher loop and group common code 

  - patch by Philipp Prindeville
* [Bug 3511] Get rid of AC_LANG_SOURCE() warnings 
  - patch by Philipp Prindeville
* [Bug 3510] Flatten out the #ifdef nesting in ntpdmain() 
  - partial application of patch by Philipp Prindeville
* [Bug 3491] Signed values of LFP datatypes should always display a sign
  - applied patch by Gerry Garvey & fixed unit tests 
* [Bug 3490] Patch to support Trimble Resolution Receivers 
  - applied (modified) patch by Richard Steedman
* [Bug 3473] RefID of refclocks should always be text format 
  - applied patch by Gerry Garvey (with minor formatting changes)
* [Bug 3132] Building 4.2.8p8 with disabled local libopts fails 

  - applied patch by Miroslav Lichvar
* [Bug 3094] ntpd trying to listen for broadcasts on a completely ipv6 network
  
* [Bug 2420] ntpd doesn't run and exits with retval 0 when invalid user
 is specified with -u 
  - monitor daemon child startup & propagate exit codes
* [Bug 1433] runtime check whether the kernel really supports capabilities
  - (modified) patch by Kurt Roeckx 
* Clean up 

CVS import: src/external/bsd/ntp/dist

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 20:40:58 UTC 2020

Update of /cvsroot/src/external/bsd/ntp/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv3563

Log Message:
(4.2.8p14) 2020/03/03 Released by Harlan Stenn 

* [Sec 3610] process_control() should bail earlier on short packets. stenn@
  - Reported by Philippe Antoine
* [Sec 3596] Highly predictable timestamp attack. 
  - Reported by Miroslav Lichvar
* [Sec 3592] DoS attack on client ntpd 
  - Reported by Miroslav Lichvar
* [Bug 3637] Emit the version of ntpd in saveconfig.  stenn@
* [Bug 3636] NMEA: combine time/date from multiple sentences 
* [Bug 3635] Make leapsecond file hash check optional 
* [Bug 3634] Typo in discipline.html, reported by Jason Harrison.  stenn@
* [Bug 3628] raw DCF decoding - improve robustness with Zeller's congruence
  - implement Zeller's congruence in libparse and libntp 
* [Bug 3627] SIGSEGV on FreeBSD-12 with stack limit and stack gap 

  - integrated patch by Cy Schubert
* [Bug 3620] memory leak in ntpq sysinfo 
  - applied patch by Gerry Garvey
* [Bug 3619] Honour drefid setting in cooked mode and sysinfo 

  - applied patch by Gerry Garvey
* [Bug 3617] Add support for ACE III and Copernicus II receivers 

  - integrated patch by Richard Steedman
* [Bug 3615] accelerate refclock startup 
* [Bug 3613] Propagate noselect to mobilized pool servers 
  - Reported by Martin Burnicki
* [Bug 3612] Use-of-uninitialized-value in receive function 
  - Reported by Philippe Antoine
* [Bug 3611] NMEA time interpreted incorrectly 
  - officially document new "trust date" mode bit for NMEA driver
  - restore the (previously undocumented) "trust date" feature lost with [bug 
3577] 
* [Bug 3609] Fixing wrong falseticker in case of non-statistic jitter 

  - mostly based on a patch by Michael Haardt, implementing 'fudge minjitter'
* [Bug 3608] libparse fails to compile on S11.4SRU13 and later 

  - removed ffs() and fls() prototypes as per Brian Utterback
* [Bug 3604] Wrong param byte order passing into record_raw_stats() in
ntp_io.c 
  - fixed byte and paramter order as suggested by wei6...@sina.com 
* [Bug 3601] Tests fail to link on platforms with ntp_cv_gc_sections_runs=no 

* [Bug 3599] Build fails on linux-m68k due to alignment issues 

  - added padding as suggested by John Paul Adrian Glaubitz 
* [Bug 3594] ntpd discards messages coming through nmead 
* [Bug 3593] ntpd discards silently nmea messages after the 5th string 

* [Bug 3590] Update refclock_oncore.c to the new GPS date API 

* [Bug 3585] Unity tests mix buffered and unbuffered output 
  - stdout+stderr are set to line buffered during test setup now
* [Bug 3583] synchronization error 
  - set clock to base date if system time is before that limit
* [Bug 3582] gpsdjson refclock fudgetime1 adjustment is doubled 

* [Bug 3580] Possible bug ntpq-subs (NULL dereference in dogetassoc) 

  - Reported by Paulo Neves
* [Bug 3577] Update refclock_zyfer.c to the new GPS date API 
  - also updates for refclock_nmea.c and refclock_jupiter.c
* [Bug 3576] New GPS date function API 
* [Bug 3573] nptdate: missleading error message 
* [Bug 3570] NMEA driver docs: talker ID not mentioned, typo 
* [Bug 3569] cleanup MOD_NANO/STA_NANO handling for 'ntpadjtimex()' 

  - sidekick: service port resolution in 'ntpdate'
* [Bug 3550] Reproducible build: Respect SOURCE_DATE_EPOCH 
  - applied patch by Douglas Royds
* [Bug 3542] ntpdc monlist parameters cannot be set 
* [Bug 3533] ntpdc peer_info ipv6 issues 
  - applied patch by Gerry Garvey
* [Bug 3531] make check: test-decodenetnum fails 
  - try to harden 'decodenetnum()' against 'getaddrinfo()' errors
  - fix wrong cond-compile tests in unit tests
* [Bug 3517] Reducing build noise 
* [Bug 3516] Require tooling from this decade 
  - patch by Philipp Prindeville
* [Bug 3515] Refactor ntpdmain() dispatcher loop and group common code 

  - patch by Philipp Prindeville
* [Bug 3511] Get rid of AC_LANG_SOURCE() warnings 
  - patch by Philipp Prindeville
* [Bug 3510] Flatten out the #ifdef nesting in ntpdmain() 
  - partial application of patch by Philipp Prindeville
* [Bug 3491] Signed values of LFP datatypes should always display a sign
  - applied patch by Gerry Garvey & fixed unit tests 
* [Bug 3490] Patch to support Trimble Resolution Receivers 
  - applied (modified) patch by Richard Steedman
* [Bug 3473] RefID of refclocks should always be text format 
  - applied patch by Gerry Garvey (with minor formatting changes)
* [Bug 3132] Building 4.2.8p8 with disabled local libopts fails 

  - applied patch by Miroslav Lichvar
* [Bug 3094] ntpd trying to listen for broadcasts on a completely ipv6 network
  
* [Bug 2420] ntpd doesn't run and exits with retval 0 when invalid user
 is specified with -u 
  - monitor daemon child startup & propagate exit codes
* [Bug 1433] runtime check whether the kernel really supports capabilities
  - (modified) patch by Kurt Roeckx 
* Clean up 

CVS commit: src/sys/uvm

2020-05-25 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Mon May 25 20:13:00 UTC 2020

Modified Files:
src/sys/uvm: uvm_aobj.c

Log Message:
PR kern/55300: ubciomove triggers page not dirty assertion

If overwriting an existing page, mark it dirty since there may be no
managed mapping to track the modification.


To generate a diff of this commit:
cvs rdiff -u -r1.144 -r1.145 src/sys/uvm/uvm_aobj.c

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



CVS commit: src/sys/uvm

2020-05-25 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Mon May 25 20:13:00 UTC 2020

Modified Files:
src/sys/uvm: uvm_aobj.c

Log Message:
PR kern/55300: ubciomove triggers page not dirty assertion

If overwriting an existing page, mark it dirty since there may be no
managed mapping to track the modification.


To generate a diff of this commit:
cvs rdiff -u -r1.144 -r1.145 src/sys/uvm/uvm_aobj.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/uvm/uvm_aobj.c
diff -u src/sys/uvm/uvm_aobj.c:1.144 src/sys/uvm/uvm_aobj.c:1.145
--- src/sys/uvm/uvm_aobj.c:1.144	Fri May 22 19:02:59 2020
+++ src/sys/uvm/uvm_aobj.c	Mon May 25 20:13:00 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_aobj.c,v 1.144 2020/05/22 19:02:59 ad Exp $	*/
+/*	$NetBSD: uvm_aobj.c,v 1.145 2020/05/25 20:13:00 ad Exp $	*/
 
 /*
  * Copyright (c) 1998 Chuck Silvers, Charles D. Cranor and
@@ -38,7 +38,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.144 2020/05/22 19:02:59 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.145 2020/05/25 20:13:00 ad Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_uvmhist.h"
@@ -963,6 +963,9 @@ uao_get(struct uvm_object *uobj, voff_t 
 
 			KASSERT(uvm_pagegetdirty(ptmp) !=
 			UVM_PAGE_STATUS_CLEAN);
+			if (overwrite) {
+uvm_pagemarkdirty(ptmp, UVM_PAGE_STATUS_DIRTY);
+			}
 			/* we own it, caller must un-busy */
 			ptmp->flags |= PG_BUSY;
 			UVM_PAGE_OWN(ptmp, "uao_get2");



CVS commit: src/sys/dev

2020-05-25 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon May 25 19:49:28 UTC 2020

Modified Files:
src/sys/dev/acpi: genet_acpi.c
src/sys/dev/fdt: genet_fdt.c
src/sys/dev/ic: bcmgenet.c bcmgenetvar.h

Log Message:
Improve RGMII TX / RX delay handling, from OpenBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/acpi/genet_acpi.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/fdt/genet_fdt.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/ic/bcmgenet.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/ic/bcmgenetvar.h

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

Modified files:

Index: src/sys/dev/acpi/genet_acpi.c
diff -u src/sys/dev/acpi/genet_acpi.c:1.1 src/sys/dev/acpi/genet_acpi.c:1.2
--- src/sys/dev/acpi/genet_acpi.c:1.1	Sat Feb 22 02:28:06 2020
+++ src/sys/dev/acpi/genet_acpi.c	Mon May 25 19:49:28 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: genet_acpi.c,v 1.1 2020/02/22 02:28:06 jmcneill Exp $ */
+/* $NetBSD: genet_acpi.c,v 1.2 2020/05/25 19:49:28 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2020 Jared McNeill 
@@ -29,7 +29,7 @@
 #include "opt_net_mpsafe.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: genet_acpi.c,v 1.1 2020/02/22 02:28:06 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genet_acpi.c,v 1.2 2020/05/25 19:49:28 jmcneill Exp $");
 
 #include 
 #include 
@@ -131,6 +131,8 @@ genet_acpi_attach(device_t parent, devic
 		sc->sc_phy_mode = GENET_PHY_MODE_RGMII_RXID;
 	else if (strcmp(phy_mode, "rgmii-txid") == 0)
 		sc->sc_phy_mode = GENET_PHY_MODE_RGMII_TXID;
+	else if (strcmp(phy_mode, "rgmii-id") == 0)
+		sc->sc_phy_mode = GENET_PHY_MODE_RGMII_ID;
 	else if (strcmp(phy_mode, "rgmii") == 0)
 		sc->sc_phy_mode = GENET_PHY_MODE_RGMII;
 	else {

Index: src/sys/dev/fdt/genet_fdt.c
diff -u src/sys/dev/fdt/genet_fdt.c:1.1 src/sys/dev/fdt/genet_fdt.c:1.2
--- src/sys/dev/fdt/genet_fdt.c:1.1	Sat Feb 22 00:28:35 2020
+++ src/sys/dev/fdt/genet_fdt.c	Mon May 25 19:49:28 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: genet_fdt.c,v 1.1 2020/02/22 00:28:35 jmcneill Exp $ */
+/* $NetBSD: genet_fdt.c,v 1.2 2020/05/25 19:49:28 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2020 Jared McNeill 
@@ -29,7 +29,7 @@
 #include "opt_net_mpsafe.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: genet_fdt.c,v 1.1 2020/02/22 00:28:35 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genet_fdt.c,v 1.2 2020/05/25 19:49:28 jmcneill Exp $");
 
 #include 
 #include 
@@ -108,6 +108,8 @@ genet_fdt_attach(device_t parent, device
 		sc->sc_phy_mode = GENET_PHY_MODE_RGMII_RXID;
 	else if (strcmp(phy_mode, "rgmii-txid") == 0)
 		sc->sc_phy_mode = GENET_PHY_MODE_RGMII_TXID;
+	else if (strcmp(phy_mode, "rgmii-id") == 0)
+		sc->sc_phy_mode = GENET_PHY_MODE_RGMII_ID;
 	else if (strcmp(phy_mode, "rgmii") == 0)
 		sc->sc_phy_mode = GENET_PHY_MODE_RGMII;
 	else {

Index: src/sys/dev/ic/bcmgenet.c
diff -u src/sys/dev/ic/bcmgenet.c:1.5 src/sys/dev/ic/bcmgenet.c:1.6
--- src/sys/dev/ic/bcmgenet.c:1.5	Sun Mar 29 13:20:04 2020
+++ src/sys/dev/ic/bcmgenet.c	Mon May 25 19:49:28 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: bcmgenet.c,v 1.5 2020/03/29 13:20:04 jmcneill Exp $ */
+/* $NetBSD: bcmgenet.c,v 1.6 2020/05/25 19:49:28 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2020 Jared McNeill 
@@ -34,7 +34,7 @@
 #include "opt_ddb.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bcmgenet.c,v 1.5 2020/03/29 13:20:04 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcmgenet.c,v 1.6 2020/05/25 19:49:28 jmcneill Exp $");
 
 #include 
 #include 
@@ -165,6 +165,8 @@ genet_update_link(struct genet_softc *sc
 	val |= GENET_EXT_RGMII_OOB_RGMII_MODE_EN;
 	if (sc->sc_phy_mode == GENET_PHY_MODE_RGMII)
 		val |= GENET_EXT_RGMII_OOB_ID_MODE_DISABLE;
+	else
+		val &= ~GENET_EXT_RGMII_OOB_ID_MODE_DISABLE;
 	WR4(sc, GENET_EXT_RGMII_OOB_CTRL, val);
 
 	val = RD4(sc, GENET_UMAC_CMD);
@@ -507,9 +509,13 @@ genet_init_locked(struct genet_softc *sc
 		return 0;
 
 	if (sc->sc_phy_mode == GENET_PHY_MODE_RGMII ||
-	sc->sc_phy_mode == GENET_PHY_MODE_RGMII_RXID)
+	sc->sc_phy_mode == GENET_PHY_MODE_RGMII_ID ||
+	sc->sc_phy_mode == GENET_PHY_MODE_RGMII_RXID ||
+	sc->sc_phy_mode == GENET_PHY_MODE_RGMII_TXID)
 		WR4(sc, GENET_SYS_PORT_CTRL,
 		GENET_SYS_PORT_MODE_EXT_GPHY);
+	else
+		WR4(sc, GENET_SYS_PORT_CTRL, 0);
 
 	/* Write hardware address */
 	val = enaddr[3] | (enaddr[2] << 8) | (enaddr[1] << 16) |
@@ -908,6 +914,7 @@ genet_attach(struct genet_softc *sc)
 	struct ifnet *ifp = >sc_ec.ec_if;
 	uint8_t eaddr[ETHER_ADDR_LEN];
 	u_int maj, min;
+	int mii_flags = 0;
 
 	const uint32_t rev = RD4(sc, GENET_SYS_REV_CTRL);
 	min = __SHIFTOUT(rev, SYS_REV_MINOR);
@@ -922,6 +929,21 @@ genet_attach(struct genet_softc *sc)
 		return ENXIO;
 	}
 
+	switch (sc->sc_phy_mode) {
+	case GENET_PHY_MODE_RGMII_TXID:
+		mii_flags |= MIIF_TXID;
+		break;
+	case GENET_PHY_MODE_RGMII_RXID:
+		mii_flags |= MIIF_RXID;
+		break;
+	case GENET_PHY_MODE_RGMII_ID:
+		mii_flags |= MIIF_RXID | MIIF_TXID;
+		break;
+	case GENET_PHY_MODE_RGMII:
+	default:
+		

CVS commit: src/sys/dev

2020-05-25 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon May 25 19:49:28 UTC 2020

Modified Files:
src/sys/dev/acpi: genet_acpi.c
src/sys/dev/fdt: genet_fdt.c
src/sys/dev/ic: bcmgenet.c bcmgenetvar.h

Log Message:
Improve RGMII TX / RX delay handling, from OpenBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/acpi/genet_acpi.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/fdt/genet_fdt.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/ic/bcmgenet.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/ic/bcmgenetvar.h

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



CVS commit: src/sys/dev/mii

2020-05-25 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon May 25 19:48:38 UTC 2020

Modified Files:
src/sys/dev/mii: brgphy.c brgphyreg.h

Log Message:
Add support for BCM54213PE RGMII clock delays, from OpenBSD


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/dev/mii/brgphy.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/mii/brgphyreg.h

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



CVS commit: src/sys/dev/mii

2020-05-25 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon May 25 19:48:38 UTC 2020

Modified Files:
src/sys/dev/mii: brgphy.c brgphyreg.h

Log Message:
Add support for BCM54213PE RGMII clock delays, from OpenBSD


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/dev/mii/brgphy.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/mii/brgphyreg.h

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

Modified files:

Index: src/sys/dev/mii/brgphy.c
diff -u src/sys/dev/mii/brgphy.c:1.89 src/sys/dev/mii/brgphy.c:1.90
--- src/sys/dev/mii/brgphy.c:1.89	Sat Mar 28 18:37:18 2020
+++ src/sys/dev/mii/brgphy.c	Mon May 25 19:48:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: brgphy.c,v 1.89 2020/03/28 18:37:18 thorpej Exp $	*/
+/*	$NetBSD: brgphy.c,v 1.90 2020/05/25 19:48:38 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.89 2020/03/28 18:37:18 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.90 2020/05/25 19:48:38 jmcneill Exp $");
 
 #include 
 #include 
@@ -118,7 +118,7 @@ static void	brgphy_crc_bug(struct mii_so
 static void	brgphy_disable_early_dac(struct mii_softc *);
 static void	brgphy_jumbo_settings(struct mii_softc *);
 static void	brgphy_eth_wirespeed(struct mii_softc *);
-
+static void	brgphy_bcm54xx_clock_delay(struct mii_softc *);
 
 static const struct mii_phy_funcs brgphy_copper_funcs = {
 	brgphy_service, brgphy_copper_status, brgphy_reset,
@@ -460,6 +460,12 @@ setit:
 break;
 			}
 			break;
+		case MII_OUI_BROADCOM4:
+			switch (sc->mii_mpd_model) {
+			case MII_MODEL_BROADCOM4_BCM54213PE:
+brgphy_bcm54xx_clock_delay(sc);
+break;
+			}
 		}
 	}
 
@@ -1242,3 +1248,30 @@ brgphy_eth_wirespeed(struct mii_softc *s
 	PHY_READ(sc, BRGPHY_MII_AUXCTL, );
 	PHY_WRITE(sc, BRGPHY_MII_AUXCTL, val | (1 << 15) | (1 << 4));
 }
+
+static void
+brgphy_bcm54xx_clock_delay(struct mii_softc *sc)
+{
+	uint16_t val;
+
+	PHY_WRITE(sc, BRGPHY_MII_AUXCTL, BRGPHY_AUXCTL_SHADOW_MISC |
+	BRGPHY_AUXCTL_SHADOW_MISC << BRGPHY_AUXCTL_MISC_READ_SHIFT);
+	PHY_READ(sc, BRGPHY_MII_AUXCTL, );
+	val &= BRGPHY_AUXCTL_MISC_DATA_MASK;
+	if (sc->mii_flags & MIIF_RXID)
+		val |= BRGPHY_AUXCTL_MISC_RGMII_SKEW_EN;
+	else
+		val &= ~BRGPHY_AUXCTL_MISC_RGMII_SKEW_EN;
+	PHY_WRITE(sc, BRGPHY_MII_AUXCTL, BRGPHY_AUXCTL_MISC_WRITE_EN |
+	BRGPHY_AUXCTL_SHADOW_MISC | val);
+
+	PHY_WRITE(sc, BRGPHY_MII_SHADOW_1C, BRGPHY_SHADOW_1C_CLK_CTRL);
+	PHY_READ(sc, BRGPHY_MII_SHADOW_1C, );
+	val &= BRGPHY_SHADOW_1C_DATA_MASK;
+	if (sc->mii_flags & MIIF_TXID)
+		val |= BRGPHY_SHADOW_1C_GTXCLK_EN;
+	else
+		val &= ~BRGPHY_SHADOW_1C_GTXCLK_EN;
+	PHY_WRITE(sc, BRGPHY_MII_SHADOW_1C, BRGPHY_SHADOW_1C_WRITE_EN |
+	BRGPHY_SHADOW_1C_CLK_CTRL | val);
+}

Index: src/sys/dev/mii/brgphyreg.h
diff -u src/sys/dev/mii/brgphyreg.h:1.11 src/sys/dev/mii/brgphyreg.h:1.12
--- src/sys/dev/mii/brgphyreg.h:1.11	Thu Apr 11 09:14:07 2019
+++ src/sys/dev/mii/brgphyreg.h	Mon May 25 19:48:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: brgphyreg.h,v 1.11 2019/04/11 09:14:07 msaitoh Exp $	*/
+/*	$NetBSD: brgphyreg.h,v 1.12 2020/05/25 19:48:38 jmcneill Exp $	*/
 
 /*
  * Copyright (c) 2000
@@ -192,6 +192,17 @@
 /* Begin: PHY register values for the 5706 PHY */
 /***/
 
+/*
+ * Aux control shadow register, bits 0-2 select function (0x00 to
+ * 0x07).
+ */
+#define BRGPHY_AUXCTL_SHADOW_MISC	0x07
+#define BRGPHY_AUXCTL_MISC_DATA_MASK	0x7ff8
+#define BRGPHY_AUXCTL_MISC_READ_SHIFT	12
+#define BRGPHY_AUXCTL_MISC_WRITE_EN	0x8000
+#define BRGPHY_AUXCTL_MISC_RGMII_SKEW_EN 0x0200
+#define BRGPHY_AUXCTL_MISC_WIRESPEED_EN	0x0010
+
 /* 
  * Shadow register 0x1C, bit 15 is write enable,
  * bits 14-10 select function (0x00 to 0x1F).
@@ -199,6 +210,11 @@
 #define BRGPHY_MII_SHADOW_1C		0x1C
 #define BRGPHY_SHADOW_1C_WRITE_EN	0x8000
 #define BRGPHY_SHADOW_1C_SELECT_MASK	0x7C00
+#define BRGPHY_SHADOW_1C_DATA_MASK	0x03FF
+
+/* Shadow 0x1C Clock Alignment Control Register (select value 0x03) */
+#define BRGPHY_SHADOW_1C_CLK_CTRL	(0x03 << 10)
+#define BRGPHY_SHADOW_1C_GTXCLK_EN	0x0200
 
 /* Shadow 0x1C Mode Control Register (select value 0x1F) */
 #define BRGPHY_SHADOW_1C_MODE_CTRL	(0x1F << 10)



CVS commit: src/sys/dev/mii

2020-05-25 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon May 25 19:47:59 UTC 2020

Modified Files:
src/sys/dev/mii: miivar.h

Log Message:
Add MIIF_RXID and MIIF_TXID flags to signal that RX or TX delays are required, 
from OpenBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/dev/mii/miivar.h

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



CVS commit: src/sys/dev/mii

2020-05-25 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon May 25 19:47:59 UTC 2020

Modified Files:
src/sys/dev/mii: miivar.h

Log Message:
Add MIIF_RXID and MIIF_TXID flags to signal that RX or TX delays are required, 
from OpenBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/dev/mii/miivar.h

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

Modified files:

Index: src/sys/dev/mii/miivar.h
diff -u src/sys/dev/mii/miivar.h:1.70 src/sys/dev/mii/miivar.h:1.71
--- src/sys/dev/mii/miivar.h:1.70	Sun Mar 15 23:04:50 2020
+++ src/sys/dev/mii/miivar.h	Mon May 25 19:47:58 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: miivar.h,v 1.70 2020/03/15 23:04:50 thorpej Exp $	*/
+/*	$NetBSD: miivar.h,v 1.71 2020/05/25 19:47:58 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001, 2020 The NetBSD Foundation, Inc.
@@ -175,6 +175,8 @@ typedef struct mii_softc mii_softc_t;
 #define	MIIF_FORCEANEG	0x0400		/* force auto-negotiation */
 #define	MIIF_PROBING	0x0800		/* PHY probe in-progress */
 #define	MIIF_EXITING	0x1000		/* MII is exiting */
+#define	MIIF_RXID	0x2000		/* add RX delay */
+#define	MIIF_TXID	0x4000		/* add TX delay */
 
 #define	MIIF_INHERIT_MASK (MIIF_NOISOLATE | MIIF_NOLOOP | MIIF_AUTOTSLEEP)
 



CVS commit: src/sys/uvm

2020-05-25 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Mon May 25 19:46:20 UTC 2020

Modified Files:
src/sys/uvm: uvm_pdaemon.c

Log Message:
uvm_pageout_done(): do nothing when npages is zero.


To generate a diff of this commit:
cvs rdiff -u -r1.126 -r1.127 src/sys/uvm/uvm_pdaemon.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/uvm/uvm_pdaemon.c
diff -u src/sys/uvm/uvm_pdaemon.c:1.126 src/sys/uvm/uvm_pdaemon.c:1.127
--- src/sys/uvm/uvm_pdaemon.c:1.126	Mon Apr 13 15:54:45 2020
+++ src/sys/uvm/uvm_pdaemon.c	Mon May 25 19:46:20 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_pdaemon.c,v 1.126 2020/04/13 15:54:45 maxv Exp $	*/
+/*	$NetBSD: uvm_pdaemon.c,v 1.127 2020/05/25 19:46:20 ad Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_pdaemon.c,v 1.126 2020/04/13 15:54:45 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_pdaemon.c,v 1.127 2020/05/25 19:46:20 ad Exp $");
 
 #include "opt_uvmhist.h"
 #include "opt_readahead.h"
@@ -355,7 +355,12 @@ void
 uvm_pageout_done(int npages)
 {
 
-	KASSERT(uvmexp.paging >= npages);
+	KASSERT(atomic_load_relaxed() >= npages);
+
+	if (npages == 0) {
+		return;
+	}
+
 	atomic_add_int(, -npages);
 
 	/*



CVS commit: src/sys/uvm

2020-05-25 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Mon May 25 19:46:20 UTC 2020

Modified Files:
src/sys/uvm: uvm_pdaemon.c

Log Message:
uvm_pageout_done(): do nothing when npages is zero.


To generate a diff of this commit:
cvs rdiff -u -r1.126 -r1.127 src/sys/uvm/uvm_pdaemon.c

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



CVS commit: src/sys/uvm

2020-05-25 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Mon May 25 19:29:09 UTC 2020

Modified Files:
src/sys/uvm: uvm_bio.c

Log Message:
ubc_uiomove_direct(): if UBC_FAULTBUSY, the left-over portion of the final
page needs to be zeroed.


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/sys/uvm/uvm_bio.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/uvm/uvm_bio.c
diff -u src/sys/uvm/uvm_bio.c:1.116 src/sys/uvm/uvm_bio.c:1.117
--- src/sys/uvm/uvm_bio.c:1.116	Sun May 24 20:05:53 2020
+++ src/sys/uvm/uvm_bio.c	Mon May 25 19:29:08 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_bio.c,v 1.116 2020/05/24 20:05:53 ad Exp $	*/
+/*	$NetBSD: uvm_bio.c,v 1.117 2020/05/25 19:29:08 ad Exp $	*/
 
 /*
  * Copyright (c) 1998 Chuck Silvers.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v 1.116 2020/05/24 20:05:53 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v 1.117 2020/05/25 19:29:08 ad Exp $");
 
 #include "opt_uvmhist.h"
 #include "opt_ubc.h"
@@ -997,22 +997,40 @@ ubc_uiomove_direct(struct uvm_object *uo
 			error = uvm_direct_process(pgs, npages, off, bytelen,
 			ubc_uiomove_process, uio);
 		}
-		if (error != 0 && overwrite) {
+
+		if (overwrite) {
+			voff_t endoff;
+
 			/*
-			 * if we haven't initialized the pages yet,
-			 * do it now.  it's safe to use memset here
-			 * because we just mapped the pages above.
+			 * if we haven't initialized the pages yet due to an
+			 * error above, do it now.
 			 */
-			printf("%s: error=%d\n", __func__, error);
-			(void) uvm_direct_process(pgs, npages, off, bytelen,
-			ubc_zerorange_process, NULL);
+			if (error != 0) {
+printf("%s: error=%d\n", __func__, error);
+(void) uvm_direct_process(pgs, npages, off,
+bytelen, ubc_zerorange_process, NULL);
+			}
+
+			off += bytelen;
+			todo -= bytelen;
+			endoff = off & (PAGE_SIZE - 1);
+
+			/*
+			 * zero out the remaining portion of the final page
+			 * (if any).
+			 */
+			if (todo == 0 && endoff != 0) {
+vsize_t zlen = PAGE_SIZE - endoff;
+(void) uvm_direct_process(pgs + npages - 1, 1,
+off, zlen, ubc_zerorange_process, NULL);
+			}
+		} else {
+			off += bytelen;
+			todo -= bytelen;
 		}
 
 		ubc_direct_release(uobj, flags, pgs, npages);
 
-		off += bytelen;
-		todo -= bytelen;
-
 		if (error != 0 && ISSET(flags, UBC_PARTIALOK)) {
 			break;
 		}



CVS commit: src/sys/uvm

2020-05-25 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Mon May 25 19:29:09 UTC 2020

Modified Files:
src/sys/uvm: uvm_bio.c

Log Message:
ubc_uiomove_direct(): if UBC_FAULTBUSY, the left-over portion of the final
page needs to be zeroed.


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/sys/uvm/uvm_bio.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/pci

2020-05-25 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon May 25 19:13:28 UTC 2020

Modified Files:
src/sys/dev/pci: ubsec.c

Log Message:
unifdef everything-but-NetBSD.  Gets rid of a naked cfattach decl.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/dev/pci/ubsec.c

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

Modified files:

Index: src/sys/dev/pci/ubsec.c
diff -u src/sys/dev/pci/ubsec.c:1.50 src/sys/dev/pci/ubsec.c:1.51
--- src/sys/dev/pci/ubsec.c:1.50	Thu Apr 30 03:40:53 2020
+++ src/sys/dev/pci/ubsec.c	Mon May 25 19:13:28 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ubsec.c,v 1.50 2020/04/30 03:40:53 riastradh Exp $	*/
+/*	$NetBSD: ubsec.c,v 1.51 2020/05/25 19:13:28 thorpej Exp $	*/
 /* $FreeBSD: src/sys/dev/ubsec/ubsec.c,v 1.6.2.6 2003/01/23 21:06:43 sam Exp $ */
 /*	$OpenBSD: ubsec.c,v 1.143 2009/03/27 13:31:30 reyk Exp$	*/
 
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ubsec.c,v 1.50 2020/04/30 03:40:53 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ubsec.c,v 1.51 2020/05/25 19:13:28 thorpej Exp $");
 
 #undef UBSEC_DEBUG
 
@@ -47,11 +47,6 @@ __KERNEL_RCSID(0, "$NetBSD: ubsec.c,v 1.
 #include 
 #include 
 #include 
-#ifdef __NetBSD__
-  #define UBSEC_NO_RNG	/* hangs on attach */
-  #define letoh16 htole16
-  #define letoh32 htole32
-#endif
 #include 
 #include 
 #include 
@@ -63,14 +58,9 @@ __KERNEL_RCSID(0, "$NetBSD: ubsec.c,v 1.
 
 #include 
 #include 
-#ifdef __OpenBSD__
- #include 
- #include 
-#else
- #include 
- #include 
- #include 
-#endif
+#include 
+#include 
+#include 
 #include 
 
 #include 
@@ -80,6 +70,10 @@ __KERNEL_RCSID(0, "$NetBSD: ubsec.c,v 1.
 #include 
 #include 
 
+#define UBSEC_NO_RNG	/* hangs on attach */
+#define letoh16 htole16
+#define letoh32 htole32
+
 /*
  * Prototypes and count for the pci_device structure
  */
@@ -93,19 +87,9 @@ static	void ubsec_cleanchip(struct ubsec
 static	void ubsec_totalreset(struct ubsec_softc *);
 static	int  ubsec_free_q(struct ubsec_softc*, struct ubsec_q *);
 
-#ifdef __OpenBSD__
-struct cfattach ubsec_ca = {
-	sizeof(struct ubsec_softc), ubsec_probe, ubsec_attach,
-};
-
-struct cfdriver ubsec_cd = {
-	0, "ubsec", DV_DULL
-};
-#else
 CFATTACH_DECL_NEW(ubsec, sizeof(struct ubsec_softc), ubsec_probe, ubsec_attach,
 	  ubsec_detach, NULL);
 extern struct cfdriver ubsec_cd;
-#endif
 
 /* patchable */
 #ifdef	UBSEC_DEBUG
@@ -503,13 +487,8 @@ ubsec_attach(device_t parent, device_t s
 			sc->sc_rnghz = hz / 100;
 		else
 			sc->sc_rnghz = 1;
-#ifdef __OpenBSD__
-		timeout_set(>sc_rngto, ubsec_rng, sc);
-		timeout_add(>sc_rngto, sc->sc_rnghz);
-#else
 		callout_init(>sc_rngto, 0);
 		callout_setfunc(>sc_rngto, ubsec_rng, sc);
-#endif
 		rndsource_setcb(>sc_rnd_source, ubsec_rng_get, sc);
 		rnd_attach_source(>sc_rnd_source, device_xname(sc->sc_dev),
   RND_TYPE_RNG,
@@ -1053,11 +1032,7 @@ ubsec_newsession(void *arg, u_int32_t *s
 	ses->ses_used = 1;
 	if (encini) {
 		/* get an IV, network byte order */
-#ifdef __NetBSD__
 		cprng_fast(ses->ses_iv, sizeof(ses->ses_iv));
-#else
-		get_random_bytes(ses->ses_iv, sizeof(ses->ses_iv));
-#endif
 
 		/* Go ahead and compute key in ubsec's byte order */
 		if (encini->cri_alg == CRYPTO_AES_CBC) {
@@ -1175,9 +1150,6 @@ static int
 ubsec_process(void *arg, struct cryptop *crp, int hint)
 {
 	struct ubsec_q *q = NULL;
-#ifdef	__OpenBSD__
-	int card;
-#endif
 	int err = 0, i, j, nicealign;
 	struct ubsec_softc *sc;
 	struct cryptodesc *crd1, *crd2, *maccrd, *enccrd;
@@ -2016,22 +1988,13 @@ ubsec_callback2(struct ubsec_softc *sc, 
 		bus_dmamap_sync(sc->sc_dmat, rng->rng_buf.dma_map, 0,
 		rng->rng_buf.dma_map->dm_mapsize, BUS_DMASYNC_POSTREAD);
 		p = (u_int32_t *)rng->rng_buf.dma_vaddr;
-#ifndef __NetBSD__
-		for (i = 0; i < UBSEC_RNG_BUFSIZ; p++, i++)
-			add_true_randomness(letoh32(*p));
-#else
 		i = UBSEC_RNG_BUFSIZ * sizeof(u_int32_t);
 		rnd_add_data(>sc_rnd_source, (char *)p, i, i * NBBY);
 		sc->sc_rng_need -= i;
-#endif
 		rng->rng_used = 0;
-#ifdef __OpenBSD__
-		timeout_add(>sc_rngto, sc->sc_rnghz);
-#else
 		if (sc->sc_rng_need > 0) {
 			callout_schedule(>sc_rngto, sc->sc_rnghz);
 		}
-#endif
 		break;
 	}
 #endif
@@ -2204,11 +2167,7 @@ out:
 	 * Something weird happened, generate our own call back.
 	 */
 	(*nqueue)--;
-#ifdef __OpenBSD__
-	timeout_add(>sc_rngto, sc->sc_rnghz);
-#else
 	callout_schedule(>sc_rngto, sc->sc_rnghz);
-#endif
 }
 #endif /* UBSEC_NO_RNG */
 
@@ -2434,24 +2393,6 @@ ubsec_dmamap_aligned(bus_dmamap_t map)
 	return (1);
 }
 
-#ifdef __OpenBSD__
-struct ubsec_softc *
-ubsec_kfind(struct cryptkop *krp)
-{
-	struct ubsec_softc *sc;
-	int i;
-
-	for (i = 0; i < ubsec_cd.cd_ndevs; i++) {
-		sc = ubsec_cd.cd_devs[i];
-		if (sc == NULL)
-			continue;
-		if (sc->sc_cid == krp->krp_hid)
-			return (sc);
-	}
-	return (NULL);
-}
-#endif
-
 static void
 ubsec_kfree(struct ubsec_softc *sc, struct ubsec_q2 *q)
 {
@@ -2493,13 +2434,8 @@ ubsec_kprocess(void 

CVS commit: src/sys/dev/pci

2020-05-25 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon May 25 19:13:28 UTC 2020

Modified Files:
src/sys/dev/pci: ubsec.c

Log Message:
unifdef everything-but-NetBSD.  Gets rid of a naked cfattach decl.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/dev/pci/ubsec.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/ata

2020-05-25 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Mon May 25 19:05:30 UTC 2020

Modified Files:
src/sys/dev/ata: ata.c

Log Message:
disable downgrade of ATA mode from DMA, as generally not relevant
any more - while it has been instrumental to inadvertedly discover
driver bugs in PIO mode under QEMU recently, generally the switch
more hurts than helps, so now only warn when DMA errors happen

code kept under ATA_DOWNGRADE_MODE ifdef, disabled by default


To generate a diff of this commit:
cvs rdiff -u -r1.158 -r1.159 src/sys/dev/ata/ata.c

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

Modified files:

Index: src/sys/dev/ata/ata.c
diff -u src/sys/dev/ata/ata.c:1.158 src/sys/dev/ata/ata.c:1.159
--- src/sys/dev/ata/ata.c:1.158	Mon May 25 18:29:25 2020
+++ src/sys/dev/ata/ata.c	Mon May 25 19:05:30 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ata.c,v 1.158 2020/05/25 18:29:25 jdolecek Exp $	*/
+/*	$NetBSD: ata.c,v 1.159 2020/05/25 19:05:30 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.  All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.158 2020/05/25 18:29:25 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.159 2020/05/25 19:05:30 jdolecek Exp $");
 
 #include "opt_ata.h"
 
@@ -84,7 +84,7 @@ int atadebug_mask = ATADEBUG_MASK;
 #define ATADEBUG_PRINT(args, level)
 #endif
 
-#if NATA_DMA
+#if defined(ATA_DOWNGRADE_MODE) && NATA_DMA
 static int	ata_downgrade_mode(struct ata_drive_datas *, int);
 #endif
 
@@ -965,8 +965,19 @@ ata_dmaerr(struct ata_drive_datas *drvp,
 	 */
 	drvp->n_dmaerrs++;
 	if (drvp->n_dmaerrs >= NERRS_MAX && drvp->n_xfers <= NXFER) {
+#ifdef ATA_DOWNGRADE_MODE
 		ata_downgrade_mode(drvp, flags);
 		drvp->n_dmaerrs = NERRS_MAX-1;
+#else
+		static struct timeval last;
+		static const struct timeval serrintvl = { 300, 0 };
+
+		if (ratecheck(, )) {
+			aprint_error_dev(drvp->drv_softc,
+			"excessive DMA errors - %d in last %d transfers\n",
+			drvp->n_dmaerrs, drvp->n_xfers);
+		}
+#endif
 		drvp->n_xfers = 0;
 		return;
 	}
@@ -1752,7 +1763,7 @@ ata_print_modes(struct ata_channel *chp)
 	}
 }
 
-#if NATA_DMA
+#if defined(ATA_DOWNGRADE_MODE) && NATA_DMA
 /*
  * downgrade the transfer mode of a drive after an error. return 1 if
  * downgrade was possible, 0 otherwise.
@@ -1809,7 +1820,7 @@ ata_downgrade_mode(struct ata_drive_data
 	ata_thread_run(chp, flags, ATACH_TH_RESET, ATACH_NODRIVE);
 	return 1;
 }
-#endif	/* NATA_DMA */
+#endif	/* ATA_DOWNGRADE_MODE && NATA_DMA */
 
 /*
  * Probe drive's capabilities, for use by the controller later



CVS commit: src/sys/dev/ata

2020-05-25 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Mon May 25 19:05:30 UTC 2020

Modified Files:
src/sys/dev/ata: ata.c

Log Message:
disable downgrade of ATA mode from DMA, as generally not relevant
any more - while it has been instrumental to inadvertedly discover
driver bugs in PIO mode under QEMU recently, generally the switch
more hurts than helps, so now only warn when DMA errors happen

code kept under ATA_DOWNGRADE_MODE ifdef, disabled by default


To generate a diff of this commit:
cvs rdiff -u -r1.158 -r1.159 src/sys/dev/ata/ata.c

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



CVS commit: src/sys/dev/gpib

2020-05-25 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon May 25 19:01:15 UTC 2020

Modified Files:
src/sys/dev/gpib: hil_gpib.c

Log Message:
This driver is incomplete and doens't even compile, but make it
use CFATTACH_DECL_NEW() anyway.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/gpib/hil_gpib.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/gpib/hil_gpib.c
diff -u src/sys/dev/gpib/hil_gpib.c:1.12 src/sys/dev/gpib/hil_gpib.c:1.13
--- src/sys/dev/gpib/hil_gpib.c:1.12	Sat Oct 27 17:18:16 2012
+++ src/sys/dev/gpib/hil_gpib.c	Mon May 25 19:01:15 2020
@@ -1,7 +1,7 @@
-/*	$NetBSD: hil_gpib.c,v 1.12 2012/10/27 17:18:16 chs Exp $	*/
+/*	$NetBSD: hil_gpib.c,v 1.13 2020/05/25 19:01:15 thorpej Exp $	*/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hil_gpib.c,v 1.12 2012/10/27 17:18:16 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hil_gpib.c,v 1.13 2020/05/25 19:01:15 thorpej Exp $");
 
 #include 
 #include 
@@ -38,17 +38,20 @@ struct  hil_softc {
 #define HILF_DELAY	0x10
 };
 
-int hilmatch(device_t, cfdata_t, void *);
-voidhilattach(device_t, device_t, void *);
+static int	hilmatch(device_t, cfdata_t, void *);
+static void	hilattach(device_t, device_t, void *);
 
-const struct cfattach hil_ca = {
-	sizeof(struct hil_softc), hilmatch, hilattach,
-};
+CFATTACH_DECL_NEW(hil_gpib,
+	sizeof(struct hil_softc),
+	hilmatch,
+	hilattach,
+	NULL,
+	NULL);
 
-void	hilcallback(void *, int);
-void	hilstart(void *);
+static void	hilcallback(void *, int);
+static void	hilstart(void *);
 
-int
+static int
 hilmatch(device_t parent, cfdata_t match, void *aux)
 {
 	struct gpib_attach_args *ga = aux;
@@ -63,7 +66,7 @@ hilmatch(device_t parent, cfdata_t match
 	return (1);
 }
 
-void
+static void
 hilattach(device_t parent, device_t self, void *aux)
 {
 	struct hil_softc *sc = device_private(self);
@@ -83,7 +86,7 @@ hilattach(device_t parent, device_t self
 	sc->sc_flags = HILF_ALIVE;
 }
 
-void
+static void
 hilcallback(void *v, int action)
 {
 	struct hil_softc *sc = v;
@@ -105,7 +108,7 @@ hilcallback(void *v, int action)
 	}
 }
 
-void
+static void
 hilstart(void *v)
 {
 	struct hil_softc *sc = v;



CVS commit: src/sys/dev/gpib

2020-05-25 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon May 25 19:01:15 UTC 2020

Modified Files:
src/sys/dev/gpib: hil_gpib.c

Log Message:
This driver is incomplete and doens't even compile, but make it
use CFATTACH_DECL_NEW() anyway.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/gpib/hil_gpib.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/ata

2020-05-25 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Mon May 25 18:29:25 UTC 2020

Modified Files:
src/sys/dev/ata: ata.c atavar.h

Log Message:
make ata_downgrade_mode() static, it's not used anywhere else


To generate a diff of this commit:
cvs rdiff -u -r1.157 -r1.158 src/sys/dev/ata/ata.c
cvs rdiff -u -r1.107 -r1.108 src/sys/dev/ata/atavar.h

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

Modified files:

Index: src/sys/dev/ata/ata.c
diff -u src/sys/dev/ata/ata.c:1.157 src/sys/dev/ata/ata.c:1.158
--- src/sys/dev/ata/ata.c:1.157	Sat May  2 19:09:56 2020
+++ src/sys/dev/ata/ata.c	Mon May 25 18:29:25 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ata.c,v 1.157 2020/05/02 19:09:56 thorpej Exp $	*/
+/*	$NetBSD: ata.c,v 1.158 2020/05/25 18:29:25 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.  All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.157 2020/05/02 19:09:56 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.158 2020/05/25 18:29:25 jdolecek Exp $");
 
 #include "opt_ata.h"
 
@@ -84,6 +84,10 @@ int atadebug_mask = ATADEBUG_MASK;
 #define ATADEBUG_PRINT(args, level)
 #endif
 
+#if NATA_DMA
+static int	ata_downgrade_mode(struct ata_drive_datas *, int);
+#endif
+
 static ONCE_DECL(ata_init_ctrl);
 static struct pool ata_xfer_pool;
 
@@ -1755,7 +1759,7 @@ ata_print_modes(struct ata_channel *chp)
  *
  * MUST BE CALLED AT splbio()!
  */
-int
+static int
 ata_downgrade_mode(struct ata_drive_datas *drvp, int flags)
 {
 	struct ata_channel *chp = drvp->chnl_softc;

Index: src/sys/dev/ata/atavar.h
diff -u src/sys/dev/ata/atavar.h:1.107 src/sys/dev/ata/atavar.h:1.108
--- src/sys/dev/ata/atavar.h:1.107	Sat May  2 19:09:56 2020
+++ src/sys/dev/ata/atavar.h	Mon May 25 18:29:25 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: atavar.h,v 1.107 2020/05/02 19:09:56 thorpej Exp $	*/
+/*	$NetBSD: atavar.h,v 1.108 2020/05/25 18:29:25 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.
@@ -559,9 +559,6 @@ int	ata_addref(struct ata_channel *);
 void	ata_delref(struct ata_channel *);
 void	atastart(struct ata_channel *);
 void	ata_print_modes(struct ata_channel *);
-#if NATA_DMA
-int	ata_downgrade_mode(struct ata_drive_datas *, int);
-#endif
 void	ata_probe_caps(struct ata_drive_datas *);
 
 #if NATA_DMA



CVS commit: src/sys/dev/ata

2020-05-25 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Mon May 25 18:29:25 UTC 2020

Modified Files:
src/sys/dev/ata: ata.c atavar.h

Log Message:
make ata_downgrade_mode() static, it's not used anywhere else


To generate a diff of this commit:
cvs rdiff -u -r1.157 -r1.158 src/sys/dev/ata/ata.c
cvs rdiff -u -r1.107 -r1.108 src/sys/dev/ata/atavar.h

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



CVS commit: src/sys/arch/evbmips/loongson/dev

2020-05-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon May 25 17:56:19 UTC 2020

Modified Files:
src/sys/arch/evbmips/loongson/dev: kb3310.c

Log Message:
Switch to CFATTACH_DECL_NEW.

This driver doesn't compile -- never has since it was imported from
OpenBSD -- but in case anyone wants to make it work, let's leave fewer
landmines to step on.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbmips/loongson/dev/kb3310.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/evbmips/loongson/dev/kb3310.c
diff -u src/sys/arch/evbmips/loongson/dev/kb3310.c:1.2 src/sys/arch/evbmips/loongson/dev/kb3310.c:1.3
--- src/sys/arch/evbmips/loongson/dev/kb3310.c:1.2	Sat Oct 27 17:17:50 2012
+++ src/sys/arch/evbmips/loongson/dev/kb3310.c	Mon May 25 17:56:19 2020
@@ -99,9 +99,8 @@ extern void loongson_set_isa_imr(uint);
 int	ykbec_match(device_t, cfdata_t, void *);
 void	ykbec_attach(device_t, device_t, void *);
 
-const struct cfattach ykbec_ca = {
-	sizeof(struct ykbec_softc), ykbec_match, ykbec_attach
-};
+CFATTACH_DECL_NEW(ykbec, sizeof(struct ykbec_softc),
+ykbec_match, ykbec_attach, NULL, NULL);
 
 int	ykbec_apminfo(struct apm_power_info *);
 void	ykbec_bell(void *, u_int, u_int, u_int, int);



CVS commit: src/sys/arch/evbmips/loongson/dev

2020-05-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon May 25 17:56:19 UTC 2020

Modified Files:
src/sys/arch/evbmips/loongson/dev: kb3310.c

Log Message:
Switch to CFATTACH_DECL_NEW.

This driver doesn't compile -- never has since it was imported from
OpenBSD -- but in case anyone wants to make it work, let's leave fewer
landmines to step on.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbmips/loongson/dev/kb3310.c

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



CVS commit: [netbsd-8] src/doc

2020-05-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 25 17:49:03 UTC 2020

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

Log Message:
Ticket #1549


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

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



CVS commit: [netbsd-8] src/doc

2020-05-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 25 17:49:03 UTC 2020

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

Log Message:
Ticket #1549


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

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

Modified files:

Index: src/doc/CHANGES-8.3
diff -u src/doc/CHANGES-8.3:1.1.2.10 src/doc/CHANGES-8.3:1.1.2.11
--- src/doc/CHANGES-8.3:1.1.2.10	Wed May 13 12:40:09 2020
+++ src/doc/CHANGES-8.3	Mon May 25 17:49:03 2020
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.3,v 1.1.2.10 2020/05/13 12:40:09 martin Exp $
+# $NetBSD: CHANGES-8.3,v 1.1.2.11 2020/05/25 17:49:03 martin Exp $
 
 A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3
 release:
@@ -145,3 +145,10 @@ sys/arch/x86/pci/if_vmx.c			1.60
 	of two.
 	[yamaguchi, ticket #1547]
 
+sys/kern/kern_time.c1.204
+sys/netinet/igmp.c1.70
+
+	Fix one byte kernel heap leak.
+	Fix uninitialized memory access.
+	[christos, ticket #1549]
+



CVS commit: [netbsd-8] src/sys

2020-05-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 25 17:48:16 UTC 2020

Modified Files:
src/sys/kern [netbsd-8]: kern_time.c
src/sys/netinet [netbsd-8]: igmp.c

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

sys/netinet/igmp.c: revision 1.70
sys/kern/kern_time.c: revision 1.204

igmp_sendpkt() expects ip_output() to set 'imo.imo_multicast_ttl' into
'ip->ip_ttl'; but ip_output() won't if the target is not a multicast
address, meaning that the uninitialized 'ip->ip_ttl' byte gets sent to
the network. This leaks one byte of kernel heap.

Fix this by filling 'ip->ip_ttl' with a TTL of one.
Found by KMSAN.

 -

Fix uninitialized memory access. Found by KMSAN.


To generate a diff of this commit:
cvs rdiff -u -r1.189.8.5 -r1.189.8.6 src/sys/kern/kern_time.c
cvs rdiff -u -r1.64.6.2 -r1.64.6.3 src/sys/netinet/igmp.c

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

Modified files:

Index: src/sys/kern/kern_time.c
diff -u src/sys/kern/kern_time.c:1.189.8.5 src/sys/kern/kern_time.c:1.189.8.6
--- src/sys/kern/kern_time.c:1.189.8.5	Sun Feb 24 10:49:53 2019
+++ src/sys/kern/kern_time.c	Mon May 25 17:48:16 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_time.c,v 1.189.8.5 2019/02/24 10:49:53 martin Exp $	*/
+/*	$NetBSD: kern_time.c,v 1.189.8.6 2020/05/25 17:48:16 martin Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2004, 2005, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.189.8.5 2019/02/24 10:49:53 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.189.8.6 2020/05/25 17:48:16 martin Exp $");
 
 #include 
 #include 
@@ -354,8 +354,12 @@ again:
 		struct timespec rmtend;
 		struct timespec t0;
 		struct timespec *t;
+		int err;
+
+		err = clock_gettime1(clock_id, );
+		if (err != 0)
+			return err;
 
-		(void)clock_gettime1(clock_id, );
 		t = (rmt != NULL) ? rmt : 
 		if (flags & TIMER_ABSTIME) {
 			timespecsub(rqt, , t);

Index: src/sys/netinet/igmp.c
diff -u src/sys/netinet/igmp.c:1.64.6.2 src/sys/netinet/igmp.c:1.64.6.3
--- src/sys/netinet/igmp.c:1.64.6.2	Fri Jul 13 14:26:47 2018
+++ src/sys/netinet/igmp.c	Mon May 25 17:48:16 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: igmp.c,v 1.64.6.2 2018/07/13 14:26:47 martin Exp $	*/
+/*	$NetBSD: igmp.c,v 1.64.6.3 2020/05/25 17:48:16 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: igmp.c,v 1.64.6.2 2018/07/13 14:26:47 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: igmp.c,v 1.64.6.3 2020/05/25 17:48:16 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_mrouting.h"
@@ -620,6 +620,7 @@ igmp_sendpkt(struct in_multi *inm, int t
 	ip->ip_tos = 0;
 	ip->ip_len = htons(sizeof(struct ip) + IGMP_MINLEN);
 	ip->ip_off = htons(0);
+	ip->ip_ttl = IP_DEFAULT_MULTICAST_TTL;
 	ip->ip_p = IPPROTO_IGMP;
 	ip->ip_src = zeroin_addr;
 	ip->ip_dst = inm->inm_addr;



CVS commit: [netbsd-8] src/sys

2020-05-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 25 17:48:16 UTC 2020

Modified Files:
src/sys/kern [netbsd-8]: kern_time.c
src/sys/netinet [netbsd-8]: igmp.c

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

sys/netinet/igmp.c: revision 1.70
sys/kern/kern_time.c: revision 1.204

igmp_sendpkt() expects ip_output() to set 'imo.imo_multicast_ttl' into
'ip->ip_ttl'; but ip_output() won't if the target is not a multicast
address, meaning that the uninitialized 'ip->ip_ttl' byte gets sent to
the network. This leaks one byte of kernel heap.

Fix this by filling 'ip->ip_ttl' with a TTL of one.
Found by KMSAN.

 -

Fix uninitialized memory access. Found by KMSAN.


To generate a diff of this commit:
cvs rdiff -u -r1.189.8.5 -r1.189.8.6 src/sys/kern/kern_time.c
cvs rdiff -u -r1.64.6.2 -r1.64.6.3 src/sys/netinet/igmp.c

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



CVS commit: [netbsd-9] src/doc

2020-05-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 25 17:31:36 UTC 2020

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

Log Message:
Tickets #920 - #922, #924 - #926, #929 - #932


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.61 -r1.1.2.62 src/doc/CHANGES-9.1

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

Modified files:

Index: src/doc/CHANGES-9.1
diff -u src/doc/CHANGES-9.1:1.1.2.61 src/doc/CHANGES-9.1:1.1.2.62
--- src/doc/CHANGES-9.1:1.1.2.61	Thu May 21 10:53:23 2020
+++ src/doc/CHANGES-9.1	Mon May 25 17:31:36 2020
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.1,v 1.1.2.61 2020/05/21 10:53:23 martin Exp $
+# $NetBSD: CHANGES-9.1,v 1.1.2.62 2020/05/25 17:31:36 martin Exp $
 
 A complete list of changes from the NetBSD 9.0 release to the NetBSD 9.1
 release:
@@ -2671,3 +2671,73 @@ sys/dev/nvmm/x86/nvmm_x86_vmx.c			1.56-1
 	ticket #857).
 	[maxv, ticket #919]
 
+lib/libc/compat/gen/compat_ldexp_ieee754.c	1.8
+
+	Teach libc's compat ldexp stub to raise fp exceptions.
+	[riastradh, ticket #920]
+
+sys/dev/usb/xhci.c1.129
+
+	xhci(4): USB abort and timeout fix (followup fix for
+	ticket #744).
+	[jakllsch, ticket #921]
+
+sys/arch/x86/x86/cpu_topology.c			1.18
+
+	Assert smt_bits value only after it is computed.
+	[mlelstv, ticket #922]
+
+external/gpl3/gdb/dist/gdb/alpha-tdep.c		1.5
+
+	Revive entrypoint heuristics for alpha.
+	[rin, ticket #924]
+
+tests/lib/libc/sys/t_ptrace_fork_wait.h	1.2-1.4,1.6	(via patch, adapted)
+	(applied to tests/lib/libc/sys/t_ptrace_wait.c)
+
+	Fix race in fork_singalmasked.
+	Ignore interception of SIGCHLD signals in the debugger.
+	PR 55241: there is a race that SIGCHLD might be blocked during
+	forking	and dropped.
+	[kamil, ticket #925]	
+
+sys/arch/sparc/sparc/process_machdep.c		1.20
+
+	PR 54734: reject setting unaligned Program Counter.
+	[kamil, ticket #926]
+
+sys/kern/subr_thmap.c1.6
+
+	thmap(9): merge changes from the upstream to use
+	atomic_loadstore(9) primitives.
+	[rmind, ticket #929]
+
+sys/net/npf/npf_conf.c1.16
+sys/net/npf/npf_conn.c1.31
+sys/net/npf/npf_conn.h1.19
+sys/net/npf/npf_conndb.c			1.8
+sys/net/npf/npf_inet.c1.56
+sys/net/npf/npf_nat.c1.49
+usr.sbin/npf/npfctl/npf_build.c			1.54
+usr.sbin/npf/npfctl/npf_show.c			1.31
+usr.sbin/npf/npfctl/npfctl.h			1.52
+
+	Backport selected NPF fixes from the upstream:
+	- PR 55182: protect the connection lookup with pserialize(9).
+	- fix crashes with some invalid configurations.
+	- fix a lockup with dynamic NAT rules.
+	- fix a regression since dynamic NAT rules.
+	- npfctl: fix a regression and restore the default group behaviour.
+	- validate the TCP data offset.
+	[rmind, ticket #930]
+
+usr.sbin/npf/npfctl/npf_show.c			1.30
+
+	PR/54670: consistently use 'W' for TH_CWN, and bump buffer size.
+	[rmind, ticket #931]
+
+usr.sbin/npf/npfctl/npf_scan.l			1.31
+
+	PR/55288: npfctl: change parameter syntax to be more permissive.
+	[rmind, ticket #932]
+



CVS commit: [netbsd-9] src/doc

2020-05-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 25 17:31:36 UTC 2020

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

Log Message:
Tickets #920 - #922, #924 - #926, #929 - #932


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.61 -r1.1.2.62 src/doc/CHANGES-9.1

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



CVS commit: [netbsd-9] src/usr.sbin/npf/npfctl

2020-05-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 25 17:29:28 UTC 2020

Modified Files:
src/usr.sbin/npf/npfctl [netbsd-9]: npf_scan.l

Log Message:
Pull up following revision(s) (requested by rmind in ticket #932):

usr.sbin/npf/npfctl/npf_scan.l: revision 1.31

PR/55288: npfctl: change parameter syntax to be more permissive.


To generate a diff of this commit:
cvs rdiff -u -r1.29.2.1 -r1.29.2.2 src/usr.sbin/npf/npfctl/npf_scan.l

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



CVS commit: [netbsd-9] src/usr.sbin/npf/npfctl

2020-05-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 25 17:29:28 UTC 2020

Modified Files:
src/usr.sbin/npf/npfctl [netbsd-9]: npf_scan.l

Log Message:
Pull up following revision(s) (requested by rmind in ticket #932):

usr.sbin/npf/npfctl/npf_scan.l: revision 1.31

PR/55288: npfctl: change parameter syntax to be more permissive.


To generate a diff of this commit:
cvs rdiff -u -r1.29.2.1 -r1.29.2.2 src/usr.sbin/npf/npfctl/npf_scan.l

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/npf/npfctl/npf_scan.l
diff -u src/usr.sbin/npf/npfctl/npf_scan.l:1.29.2.1 src/usr.sbin/npf/npfctl/npf_scan.l:1.29.2.2
--- src/usr.sbin/npf/npfctl/npf_scan.l:1.29.2.1	Fri Oct  4 08:06:34 2019
+++ src/usr.sbin/npf/npfctl/npf_scan.l	Mon May 25 17:29:28 2020
@@ -91,6 +91,7 @@ npfctl_parse_string(const char *str, par
 
 ID	[a-zA-Z_][a-zA-Z_0-9]*
 DID	[a-zA-Z_][a-zA-Z_0-9-]*
+SPID	[a-zA-Z][a-zA-Z_0-9.]*
 NUMBER	[0-9]+
 HEXDIG	[0-9a-fA-F]+
 
@@ -227,7 +228,7 @@ any			return ANY;
 			return VAR_ID;
 		}
 
-[a-z]*"."[a-z.]* {
+{ID}"."{SPID}+	{
 			yylval.str = estrndup(yytext, yyleng);
 			return PARAM;
 		}



CVS commit: [netbsd-9] src/usr.sbin/npf/npfctl

2020-05-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 25 17:27:19 UTC 2020

Modified Files:
src/usr.sbin/npf/npfctl [netbsd-9]: npf_show.c

Log Message:
Pull up following revision(s) (requested by rmind in ticket #931):

usr.sbin/npf/npfctl/npf_show.c: revision 1.30

PR/54670: Azuma OKAMOTO: Consistently use 'W' for TH_CWN, and bump buffer
size.


To generate a diff of this commit:
cvs rdiff -u -r1.28.2.2 -r1.28.2.3 src/usr.sbin/npf/npfctl/npf_show.c

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



CVS commit: [netbsd-9] src/usr.sbin/npf/npfctl

2020-05-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 25 17:27:19 UTC 2020

Modified Files:
src/usr.sbin/npf/npfctl [netbsd-9]: npf_show.c

Log Message:
Pull up following revision(s) (requested by rmind in ticket #931):

usr.sbin/npf/npfctl/npf_show.c: revision 1.30

PR/54670: Azuma OKAMOTO: Consistently use 'W' for TH_CWN, and bump buffer
size.


To generate a diff of this commit:
cvs rdiff -u -r1.28.2.2 -r1.28.2.3 src/usr.sbin/npf/npfctl/npf_show.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/npf/npfctl/npf_show.c
diff -u src/usr.sbin/npf/npfctl/npf_show.c:1.28.2.2 src/usr.sbin/npf/npfctl/npf_show.c:1.28.2.3
--- src/usr.sbin/npf/npfctl/npf_show.c:1.28.2.2	Mon May 25 17:25:28 2020
+++ src/usr.sbin/npf/npfctl/npf_show.c	Mon May 25 17:27:19 2020
@@ -34,7 +34,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: npf_show.c,v 1.28.2.2 2020/05/25 17:25:28 martin Exp $");
+__RCSID("$NetBSD: npf_show.c,v 1.28.2.3 2020/05/25 17:27:19 martin Exp $");
 
 #include 
 #define	__FAVOR_BSD
@@ -125,7 +125,7 @@ tcpflags2string(char *buf, u_int tfl)
 	if (tfl & TH_ACK)	buf[i++] = 'A';
 	if (tfl & TH_URG)	buf[i++] = 'U';
 	if (tfl & TH_ECE)	buf[i++] = 'E';
-	if (tfl & TH_CWR)	buf[i++] = 'C';
+	if (tfl & TH_CWR)	buf[i++] = 'W';
 	buf[i] = '\0';
 	return i;
 }
@@ -209,7 +209,7 @@ static char *
 print_tcpflags(npf_conf_info_t *ctx __unused, const uint32_t *words)
 {
 	const u_int tf = words[0], tf_mask = words[1];
-	char buf[16];
+	char buf[20];
 
 	size_t n = tcpflags2string(buf, tf);
 	if (tf != tf_mask) {



CVS commit: [netbsd-9] src

2020-05-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 25 17:25:28 UTC 2020

Modified Files:
src/sys/net/npf [netbsd-9]: npf_conf.c npf_conn.c npf_conn.h
npf_conndb.c npf_inet.c npf_nat.c
src/usr.sbin/npf/npfctl [netbsd-9]: npf_build.c npf_show.c npfctl.h

Log Message:
Pull up following revision(s) (requested by rmind in ticket #930):

usr.sbin/npf/npfctl/npf_build.c: revision 1.54
sys/net/npf/npf_conn.h: revision 1.19
usr.sbin/npf/npfctl/npfctl.h: revision 1.52
usr.sbin/npf/npfctl/npf_show.c: revision 1.31
sys/net/npf/npf_conf.c: revision 1.16
sys/net/npf/npf_nat.c: revision 1.49
sys/net/npf/npf_inet.c: revision 1.56
sys/net/npf/npf_conndb.c: revision 1.8
sys/net/npf/npf_conn.c: revision 1.31

Backport selected NPF fixes from the upstream (to be pulled up):

- npf_conndb_lookup: protect the connection lookup with pserialize(9),
  instead of incorrectly assuming that the handler always runs at IPL_SOFNET.
  Should fix crashes reported on high load (PR/55182).

- npf_config_destroy: handle partially initialized config; fixes crashes
  with some invalid configurations.

- NAT policy creation / destruction: set the initial reference and do not
  wait for reference draining on destruction; destroy the policy on the
  last reference drop instead.  Fixes a lockup with the dynamic NAT rules.

- npf_nat_{export,import}: fix a regression since dynamic NAT rules.

- npfctl: fix a regression and restore the default group behaviour.

- Add npf_cache_tcp() and validate the TCP data offset (from maxv@).


To generate a diff of this commit:
cvs rdiff -u -r1.13.2.2 -r1.13.2.3 src/sys/net/npf/npf_conf.c
cvs rdiff -u -r1.27.2.2 -r1.27.2.3 src/sys/net/npf/npf_conn.c
cvs rdiff -u -r1.16.2.2 -r1.16.2.3 src/sys/net/npf/npf_conn.h
cvs rdiff -u -r1.6 -r1.6.2.1 src/sys/net/npf/npf_conndb.c
cvs rdiff -u -r1.54.2.1 -r1.54.2.2 src/sys/net/npf/npf_inet.c
cvs rdiff -u -r1.46.2.2 -r1.46.2.3 src/sys/net/npf/npf_nat.c
cvs rdiff -u -r1.50.2.2 -r1.50.2.3 src/usr.sbin/npf/npfctl/npf_build.c
cvs rdiff -u -r1.28.2.1 -r1.28.2.2 src/usr.sbin/npf/npfctl/npf_show.c
cvs rdiff -u -r1.48.2.2 -r1.48.2.3 src/usr.sbin/npf/npfctl/npfctl.h

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

Modified files:

Index: src/sys/net/npf/npf_conf.c
diff -u src/sys/net/npf/npf_conf.c:1.13.2.2 src/sys/net/npf/npf_conf.c:1.13.2.3
--- src/sys/net/npf/npf_conf.c:1.13.2.2	Sun Sep  1 13:21:39 2019
+++ src/sys/net/npf/npf_conf.c	Mon May 25 17:25:28 2020
@@ -47,7 +47,7 @@
 
 #ifdef _KERNEL
 #include 
-__KERNEL_RCSID(0, "$NetBSD: npf_conf.c,v 1.13.2.2 2019/09/01 13:21:39 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_conf.c,v 1.13.2.3 2020/05/25 17:25:28 martin Exp $");
 
 #include 
 #include 
@@ -94,10 +94,18 @@ npf_config_destroy(npf_config_t *nc)
 	 * Note: the rulesets must be destroyed first, in order to drop
 	 * any references to the tableset.
 	 */
-	npf_ruleset_destroy(nc->ruleset);
-	npf_ruleset_destroy(nc->nat_ruleset);
-	npf_rprocset_destroy(nc->rule_procs);
-	npf_tableset_destroy(nc->tableset);
+	if (nc->ruleset) {
+		npf_ruleset_destroy(nc->ruleset);
+	}
+	if (nc->nat_ruleset) {
+		npf_ruleset_destroy(nc->nat_ruleset);
+	}
+	if (nc->rule_procs) {
+		npf_rprocset_destroy(nc->rule_procs);
+	}
+	if (nc->tableset) {
+		npf_tableset_destroy(nc->tableset);
+	}
 	kmem_free(nc, sizeof(npf_config_t));
 }
 

Index: src/sys/net/npf/npf_conn.c
diff -u src/sys/net/npf/npf_conn.c:1.27.2.2 src/sys/net/npf/npf_conn.c:1.27.2.3
--- src/sys/net/npf/npf_conn.c:1.27.2.2	Fri Oct  4 08:06:35 2019
+++ src/sys/net/npf/npf_conn.c	Mon May 25 17:25:28 2020
@@ -107,7 +107,7 @@
 
 #ifdef _KERNEL
 #include 
-__KERNEL_RCSID(0, "$NetBSD: npf_conn.c,v 1.27.2.2 2019/10/04 08:06:35 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_conn.c,v 1.27.2.3 2020/05/25 17:25:28 martin Exp $");
 
 #include 
 #include 
@@ -311,7 +311,7 @@ npf_conn_lookup(const npf_cache_t *npc, 
 	if (!npf_conn_conkey(npc, , true)) {
 		return NULL;
 	}
-	con = npf_conndb_lookup(npf->conn_db, , forw);
+	con = npf_conndb_lookup(npf, , forw);
 	if (con == NULL) {
 		return NULL;
 	}
@@ -908,7 +908,7 @@ npf_conn_find(npf_t *npf, const nvlist_t
 	if (!kdict || !npf_connkey_import(kdict, )) {
 		return EINVAL;
 	}
-	con = npf_conndb_lookup(npf->conn_db, , );
+	con = npf_conndb_lookup(npf, , );
 	if (con == NULL) {
 		return ESRCH;
 	}

Index: src/sys/net/npf/npf_conn.h
diff -u src/sys/net/npf/npf_conn.h:1.16.2.2 src/sys/net/npf/npf_conn.h:1.16.2.3
--- src/sys/net/npf/npf_conn.h:1.16.2.2	Tue Aug 13 14:35:55 2019
+++ src/sys/net/npf/npf_conn.h	Mon May 25 17:25:28 2020
@@ -157,7 +157,7 @@ void		npf_conndb_sysfini(npf_t *);
 npf_conndb_t *	npf_conndb_create(void);
 void		npf_conndb_destroy(npf_conndb_t *);
 
-npf_conn_t *	npf_conndb_lookup(npf_conndb_t *, const npf_connkey_t *, bool *);
+npf_conn_t *	npf_conndb_lookup(npf_t *, const npf_connkey_t *, bool *);
 

CVS commit: [netbsd-9] src

2020-05-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 25 17:25:28 UTC 2020

Modified Files:
src/sys/net/npf [netbsd-9]: npf_conf.c npf_conn.c npf_conn.h
npf_conndb.c npf_inet.c npf_nat.c
src/usr.sbin/npf/npfctl [netbsd-9]: npf_build.c npf_show.c npfctl.h

Log Message:
Pull up following revision(s) (requested by rmind in ticket #930):

usr.sbin/npf/npfctl/npf_build.c: revision 1.54
sys/net/npf/npf_conn.h: revision 1.19
usr.sbin/npf/npfctl/npfctl.h: revision 1.52
usr.sbin/npf/npfctl/npf_show.c: revision 1.31
sys/net/npf/npf_conf.c: revision 1.16
sys/net/npf/npf_nat.c: revision 1.49
sys/net/npf/npf_inet.c: revision 1.56
sys/net/npf/npf_conndb.c: revision 1.8
sys/net/npf/npf_conn.c: revision 1.31

Backport selected NPF fixes from the upstream (to be pulled up):

- npf_conndb_lookup: protect the connection lookup with pserialize(9),
  instead of incorrectly assuming that the handler always runs at IPL_SOFNET.
  Should fix crashes reported on high load (PR/55182).

- npf_config_destroy: handle partially initialized config; fixes crashes
  with some invalid configurations.

- NAT policy creation / destruction: set the initial reference and do not
  wait for reference draining on destruction; destroy the policy on the
  last reference drop instead.  Fixes a lockup with the dynamic NAT rules.

- npf_nat_{export,import}: fix a regression since dynamic NAT rules.

- npfctl: fix a regression and restore the default group behaviour.

- Add npf_cache_tcp() and validate the TCP data offset (from maxv@).


To generate a diff of this commit:
cvs rdiff -u -r1.13.2.2 -r1.13.2.3 src/sys/net/npf/npf_conf.c
cvs rdiff -u -r1.27.2.2 -r1.27.2.3 src/sys/net/npf/npf_conn.c
cvs rdiff -u -r1.16.2.2 -r1.16.2.3 src/sys/net/npf/npf_conn.h
cvs rdiff -u -r1.6 -r1.6.2.1 src/sys/net/npf/npf_conndb.c
cvs rdiff -u -r1.54.2.1 -r1.54.2.2 src/sys/net/npf/npf_inet.c
cvs rdiff -u -r1.46.2.2 -r1.46.2.3 src/sys/net/npf/npf_nat.c
cvs rdiff -u -r1.50.2.2 -r1.50.2.3 src/usr.sbin/npf/npfctl/npf_build.c
cvs rdiff -u -r1.28.2.1 -r1.28.2.2 src/usr.sbin/npf/npfctl/npf_show.c
cvs rdiff -u -r1.48.2.2 -r1.48.2.3 src/usr.sbin/npf/npfctl/npfctl.h

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



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

2020-05-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 25 17:19:37 UTC 2020

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

Log Message:
Pull up following revision(s) (requested by rmind in ticket #929):

sys/kern/subr_thmap.c: revision 1.6

thmap(9): merge changes from the upstream -- primarily, switch to the
C11-style memory fences and atomic primitives; in NetBSD, this translates
to using the atomic_loadstore(9) primitives.

To be pulled up (just in case).


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.6.1 src/sys/kern/subr_thmap.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/subr_thmap.c
diff -u src/sys/kern/subr_thmap.c:1.5 src/sys/kern/subr_thmap.c:1.5.6.1
--- src/sys/kern/subr_thmap.c:1.5	Mon Feb  4 08:00:27 2019
+++ src/sys/kern/subr_thmap.c	Mon May 25 17:19:37 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_thmap.c,v 1.5 2019/02/04 08:00:27 mrg Exp $	*/
+/*	$NetBSD: subr_thmap.c,v 1.5.6.1 2020/05/25 17:19:37 martin Exp $	*/
 
 /*-
  * Copyright (c) 2018 Mindaugas Rasiukevicius 
@@ -53,7 +53,7 @@
  *   re-try from the root; this is a case for deletions and is achieved
  *   using the NODE_DELETED flag.
  *
- *   iii) the node destruction must be synchronised with the readers,
+ *   iii) the node destruction must be synchronized with the readers,
  *   e.g. by using the Epoch-based reclamation or other techniques.
  *
  * - WRITERS AND LOCKING: Each intermediate node has a spin-lock (which
@@ -87,7 +87,6 @@
  *	https://www.csd.uoc.gr/~hy460/pdf/p650-lehman.pdf
  */
 
-
 #ifdef _KERNEL
 #include 
 #include 
@@ -112,20 +111,19 @@
 #include "utils.h"
 #endif
 
-THMAP_RCSID("$NetBSD: subr_thmap.c,v 1.5 2019/02/04 08:00:27 mrg Exp $");
+THMAP_RCSID("$NetBSD: subr_thmap.c,v 1.5.6.1 2020/05/25 17:19:37 martin Exp $");
 
 /*
  * NetBSD kernel wrappers
  */
 #ifdef _KERNEL
 #define	ASSERT KASSERT
-#define	atomic_thread_fence(x) x
-#define	memory_order_stores membar_producer()
-#define	memory_order_loads membar_consumer()
-#define	atomic_cas_32_p(p, e, n) (atomic_cas_32((p), (e), (n)) == (e))
-#define	atomic_cas_ptr_p(p, e, n) \
-(atomic_cas_ptr((p), (void *)(e), (void *)(n)) == (e))
-#define	atomic_exchange atomic_swap_ptr
+#define	atomic_thread_fence(x) membar_sync()
+#define	atomic_compare_exchange_weak_explicit_32(p, e, n, m1, m2) \
+(atomic_cas_32((p), *(e), (n)) == *(e))
+#define	atomic_compare_exchange_weak_explicit_ptr(p, e, n, m1, m2) \
+(atomic_cas_ptr((p), *(void **)(e), (void *)(n)) == *(void **)(e))
+#define	atomic_exchange_explicit(o, n, m1) atomic_swap_ptr((o), (n))
 #define	murmurhash3 murmurhash2
 #endif
 
@@ -160,6 +158,7 @@ THMAP_RCSID("$NetBSD: subr_thmap.c,v 1.5
  * least significant bit.
  */
 typedef uintptr_t thmap_ptr_t;
+typedef uintptr_t atomic_thmap_ptr_t;			// C11 _Atomic
 
 #define	THMAP_NULL		((thmap_ptr_t)0)
 
@@ -188,9 +187,9 @@ typedef uintptr_t thmap_ptr_t;
  */
 
 typedef struct {
-	uint32_t	state;
-	thmap_ptr_t	parent;
-	thmap_ptr_t	slots[LEVEL_SIZE];
+	uint32_t		state;			// C11 _Atomic
+	thmap_ptr_t		parent;
+	atomic_thmap_ptr_t	slots[LEVEL_SIZE];
 } thmap_inode_t;
 
 #define	THMAP_INODE_LEN	sizeof(thmap_inode_t)
@@ -217,11 +216,11 @@ typedef struct {
 #define	THMAP_ROOT_LEN	(sizeof(thmap_ptr_t) * ROOT_SIZE)
 
 struct thmap {
-	uintptr_t	baseptr;
-	thmap_ptr_t *	root;
-	unsigned	flags;
-	const thmap_ops_t *ops;
-	thmap_gc_t *	gc_list;
+	uintptr_t		baseptr;
+	atomic_thmap_ptr_t *	root;
+	unsigned		flags;
+	const thmap_ops_t *	ops;
+	thmap_gc_t *		gc_list;		// C11 _Atomic
 };
 
 static void	stage_mem_gc(thmap_t *, uintptr_t, size_t);
@@ -253,9 +252,9 @@ static const thmap_ops_t thmap_default_o
 
 #ifdef DIAGNOSTIC
 static inline bool
-node_locked_p(const thmap_inode_t *node)
+node_locked_p(thmap_inode_t *node)
 {
-	return (node->state & NODE_LOCKED) != 0;
+	return (atomic_load_relaxed(>state) & NODE_LOCKED) != 0;
 }
 #endif
 
@@ -265,18 +264,14 @@ lock_node(thmap_inode_t *node)
 	unsigned bcount = SPINLOCK_BACKOFF_MIN;
 	uint32_t s;
 again:
-	s = node->state;
+	s = atomic_load_relaxed(>state);
 	if (s & NODE_LOCKED) {
 		SPINLOCK_BACKOFF(bcount);
 		goto again;
 	}
-	/*
-	 * CAS will issue a full memory fence for us.
-	 *
-	 * WARNING: for optimisations purposes, callers rely on us
-	 * issuing load and store fence
-	 */
-	if (!atomic_cas_32_p(>state, s, s | NODE_LOCKED)) {
+	/* Acquire from prior release in unlock_node.() */
+	if (!atomic_compare_exchange_weak_explicit_32(>state,
+	, s | NODE_LOCKED, memory_order_acquire, memory_order_relaxed)) {
 		bcount = SPINLOCK_BACKOFF_MIN;
 		goto again;
 	}
@@ -285,11 +280,11 @@ again:
 static void
 unlock_node(thmap_inode_t *node)
 {
-	uint32_t s = node->state & ~NODE_LOCKED;
+	uint32_t s = atomic_load_relaxed(>state) & ~NODE_LOCKED;
 
 	ASSERT(node_locked_p(node));
-	atomic_thread_fence(memory_order_stores);
-	node->state = s; // atomic store
+	/* Release to subsequent 

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

2020-05-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 25 17:19:37 UTC 2020

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

Log Message:
Pull up following revision(s) (requested by rmind in ticket #929):

sys/kern/subr_thmap.c: revision 1.6

thmap(9): merge changes from the upstream -- primarily, switch to the
C11-style memory fences and atomic primitives; in NetBSD, this translates
to using the atomic_loadstore(9) primitives.

To be pulled up (just in case).


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.6.1 src/sys/kern/subr_thmap.c

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



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

2020-05-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 25 17:12:26 UTC 2020

Modified Files:
src/sys/arch/sparc/sparc [netbsd-9]: process_machdep.c

Log Message:
Pull up following revision(s) (requested by kamil in ticket #926):

sys/arch/sparc/sparc/process_machdep.c: revision 1.20

Reject setting unaligned Program Counter

Patch taken from OpenBSD.

Tested in qemu.
Fixes PR port-sparc/54734 by Andreas Gustafsson


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.19.20.1 src/sys/arch/sparc/sparc/process_machdep.c

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



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

2020-05-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 25 17:12:26 UTC 2020

Modified Files:
src/sys/arch/sparc/sparc [netbsd-9]: process_machdep.c

Log Message:
Pull up following revision(s) (requested by kamil in ticket #926):

sys/arch/sparc/sparc/process_machdep.c: revision 1.20

Reject setting unaligned Program Counter

Patch taken from OpenBSD.

Tested in qemu.
Fixes PR port-sparc/54734 by Andreas Gustafsson


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.19.20.1 src/sys/arch/sparc/sparc/process_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/sparc/sparc/process_machdep.c
diff -u src/sys/arch/sparc/sparc/process_machdep.c:1.19 src/sys/arch/sparc/sparc/process_machdep.c:1.19.20.1
--- src/sys/arch/sparc/sparc/process_machdep.c:1.19	Fri Dec 30 17:54:43 2016
+++ src/sys/arch/sparc/sparc/process_machdep.c	Mon May 25 17:12:26 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: process_machdep.c,v 1.19 2016/12/30 17:54:43 christos Exp $ */
+/*	$NetBSD: process_machdep.c,v 1.19.20.1 2020/05/25 17:12:26 martin Exp $ */
 
 /*
  * Copyright (c) 1993 The Regents of the University of California.
@@ -95,7 +95,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.19 2016/12/30 17:54:43 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.19.20.1 2020/05/25 17:12:26 martin Exp $");
 
 #include 
 #include 
@@ -122,6 +122,9 @@ process_write_regs(struct lwp *l, const 
 {
 	int	psr = l->l_md.md_tf->tf_psr & ~PSR_ICC;
 
+	if (((regs->r_pc | regs->r_npc) & 0x03) != 0)
+		return EINVAL;
+
 	memcpy(l->l_md.md_tf, regs, sizeof(*regs));
 	l->l_md.md_tf->tf_psr = psr | (regs->r_psr & PSR_ICC);
 	return 0;
@@ -140,6 +143,9 @@ int
 process_set_pc(struct lwp *l, void *addr)
 {
 
+	if (((u_int)addr & 0x03) != 0)
+		return EINVAL;
+
 	l->l_md.md_tf->tf_pc = (u_int)addr;
 	l->l_md.md_tf->tf_npc = (u_int)addr + 4;
 	return 0;



CVS commit: [netbsd-9] src/tests/lib/libc/sys

2020-05-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 25 17:06:52 UTC 2020

Modified Files:
src/tests/lib/libc/sys [netbsd-9]: t_ptrace_wait.c

Log Message:
Apply patch, requested by kamil in ticket #925:
Adaption of:

tests/lib/libc/sys/t_ptrace_fork_wait.h 1.3,1.4,1.6

Ignore interception of SIGCHLD signals in the debugger

There is a race that SIGCHLD might be blocked during forking and dropped.

PR/55241 by Andreas Gustafsson


To generate a diff of this commit:
cvs rdiff -u -r1.131.2.7 -r1.131.2.8 src/tests/lib/libc/sys/t_ptrace_wait.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/lib/libc/sys/t_ptrace_wait.c
diff -u src/tests/lib/libc/sys/t_ptrace_wait.c:1.131.2.7 src/tests/lib/libc/sys/t_ptrace_wait.c:1.131.2.8
--- src/tests/lib/libc/sys/t_ptrace_wait.c:1.131.2.7	Mon May 25 17:00:20 2020
+++ src/tests/lib/libc/sys/t_ptrace_wait.c	Mon May 25 17:06:52 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ptrace_wait.c,v 1.131.2.7 2020/05/25 17:00:20 martin Exp $	*/
+/*	$NetBSD: t_ptrace_wait.c,v 1.131.2.8 2020/05/25 17:06:52 martin Exp $	*/
 
 /*-
  * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.131.2.7 2020/05/25 17:00:20 martin Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.131.2.8 2020/05/25 17:06:52 martin Exp $");
 
 #include 
 #include 
@@ -3041,6 +3041,8 @@ fork_body(const char *fn, bool trackspaw
 		DPRINTF("Before calling PT_TRACE_ME from child %d\n", getpid());
 		FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
 
+		sigblock(sigmask(SIGCHLD));
+
 		DPRINTF("Before raising %s from child\n", strsignal(sigval));
 		FORKEE_ASSERT(raise(sigval) == 0);
 
@@ -3197,16 +3199,6 @@ fork_body(const char *fn, bool trackspaw
 	}
 #endif
 
-	DPRINTF("Before calling %s() for the child - expected stopped "
-	"SIGCHLD\n", TWAIT_FNAME);
-	TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), child);
-
-	validate_status_stopped(status, SIGCHLD);
-
-	DPRINTF("Before resuming the child process where it left off and "
-	"without signal to be sent\n");
-	SYSCALL_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
-
 	DPRINTF("Before calling %s() for the child - expected exited\n",
 	TWAIT_FNAME);
 	TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), child);
@@ -,6 +3325,8 @@ fork_detach_forker_body(const char *fn, 
 		DPRINTF("Before calling PT_TRACE_ME from child %d\n", getpid());
 		FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
 
+		sigblock(sigmask(SIGCHLD));
+
 		DPRINTF("Before raising %s from child\n", strsignal(sigval));
 		FORKEE_ASSERT(raise(sigval) == 0);
 
@@ -5763,6 +5757,8 @@ fork2_body(const char *fn, bool masked, 
 		DPRINTF("Before calling PT_TRACE_ME from child %d\n", getpid());
 		FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
 
+		sigblock(sigmask(SIGCHLD));
+
 		if (masked) {
 			sigemptyset();
 			sigaddset(, SIGTRAP);
@@ -6062,16 +6058,6 @@ fork2_body(const char *fn, bool masked, 
 		wpid = TWAIT_GENERIC(child2, , 0));
 	}
 
-	DPRINTF("Before calling %s() for the child - expected stopped "
-	"SIGCHLD\n", TWAIT_FNAME);
-	TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), child);
-
-	validate_status_stopped(status, SIGCHLD);
-
-	DPRINTF("Before resuming the child process where it left off and "
-	"without signal to be sent\n");
-	SYSCALL_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
-
 	DPRINTF("Before calling %s() for the child - expected exited\n",
 	TWAIT_FNAME);
 	TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), child);



CVS commit: [netbsd-9] src/tests/lib/libc/sys

2020-05-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 25 17:06:52 UTC 2020

Modified Files:
src/tests/lib/libc/sys [netbsd-9]: t_ptrace_wait.c

Log Message:
Apply patch, requested by kamil in ticket #925:
Adaption of:

tests/lib/libc/sys/t_ptrace_fork_wait.h 1.3,1.4,1.6

Ignore interception of SIGCHLD signals in the debugger

There is a race that SIGCHLD might be blocked during forking and dropped.

PR/55241 by Andreas Gustafsson


To generate a diff of this commit:
cvs rdiff -u -r1.131.2.7 -r1.131.2.8 src/tests/lib/libc/sys/t_ptrace_wait.c

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



CVS commit: [netbsd-9] src/tests/lib/libc/sys

2020-05-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 25 17:00:20 UTC 2020

Modified Files:
src/tests/lib/libc/sys [netbsd-9]: t_ptrace_wait.c

Log Message:
Apply patch, requested by kamil in ticket #925:

Cherry-pick from:

tests/lib/libc/sys/t_ptrace_fork_wait.h 1.2

Fix race in fork_singalmasked

ELF RTLD after rtld.c r. 1.204 introduced locking that wraps the fork
syscall. This locking changes signal mask of the calling process during
the forking process.

Instead of comparing old and new signal mask, just after the forking
operation, check whether the expected signal is still masked and in
another test whether it is still ignored.


To generate a diff of this commit:
cvs rdiff -u -r1.131.2.6 -r1.131.2.7 src/tests/lib/libc/sys/t_ptrace_wait.c

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



CVS commit: [netbsd-9] src/tests/lib/libc/sys

2020-05-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 25 17:00:20 UTC 2020

Modified Files:
src/tests/lib/libc/sys [netbsd-9]: t_ptrace_wait.c

Log Message:
Apply patch, requested by kamil in ticket #925:

Cherry-pick from:

tests/lib/libc/sys/t_ptrace_fork_wait.h 1.2

Fix race in fork_singalmasked

ELF RTLD after rtld.c r. 1.204 introduced locking that wraps the fork
syscall. This locking changes signal mask of the calling process during
the forking process.

Instead of comparing old and new signal mask, just after the forking
operation, check whether the expected signal is still masked and in
another test whether it is still ignored.


To generate a diff of this commit:
cvs rdiff -u -r1.131.2.6 -r1.131.2.7 src/tests/lib/libc/sys/t_ptrace_wait.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/lib/libc/sys/t_ptrace_wait.c
diff -u src/tests/lib/libc/sys/t_ptrace_wait.c:1.131.2.6 src/tests/lib/libc/sys/t_ptrace_wait.c:1.131.2.7
--- src/tests/lib/libc/sys/t_ptrace_wait.c:1.131.2.6	Wed Oct 23 19:25:39 2019
+++ src/tests/lib/libc/sys/t_ptrace_wait.c	Mon May 25 17:00:20 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ptrace_wait.c,v 1.131.2.6 2019/10/23 19:25:39 martin Exp $	*/
+/*	$NetBSD: t_ptrace_wait.c,v 1.131.2.7 2020/05/25 17:00:20 martin Exp $	*/
 
 /*-
  * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.131.2.6 2019/10/23 19:25:39 martin Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.131.2.7 2020/05/25 17:00:20 martin Exp $");
 
 #include 
 #include 
@@ -5824,11 +5824,8 @@ fork2_body(const char *fn, bool masked, 
 
 	FORKEE_ASSERT_EQ(sysctl(name, namelen, , , NULL, 0), 0);
 
-	if (masked)
-		kp_sigmask = kp.p_sigmask;
-
-	if (ignored)
-		kp_sigignore = kp.p_sigignore;
+	kp_sigmask = kp.p_sigmask;
+	kp_sigignore = kp.p_sigignore;
 
 	DPRINTF("Set 0%s%s%s%s in EVENT_MASK for the child %d\n",
 	strcmp(fn, "spawn") == 0 ? "|PTRACE_POSIX_SPAWN" : "",
@@ -5874,8 +5871,8 @@ fork2_body(const char *fn, bool masked, 
 			kp.p_sigmask.__bits[0], kp.p_sigmask.__bits[1],
 			kp.p_sigmask.__bits[2], kp.p_sigmask.__bits[3]);
 
-			ATF_REQUIRE(!memcmp(_sigmask, _sigmask,
-			sizeof(kp_sigmask)));
+			ATF_REQUIRE(sigismember((sigset_t *)_sigmask,
+			SIGTRAP));
 		}
 
 		if (ignored) {
@@ -5891,8 +5888,8 @@ fork2_body(const char *fn, bool masked, 
 			kp.p_sigignore.__bits[0], kp.p_sigignore.__bits[1],
 			kp.p_sigignore.__bits[2], kp.p_sigignore.__bits[3]);
 
-			ATF_REQUIRE(!memcmp(_sigignore, _sigignore,
-			sizeof(kp_sigignore)));
+			ATF_REQUIRE(sigismember((sigset_t *)_sigignore,
+			SIGTRAP));
 		}
 
 		SYSCALL_REQUIRE(
@@ -5937,8 +5934,8 @@ fork2_body(const char *fn, bool masked, 
 			kp.p_sigmask.__bits[0], kp.p_sigmask.__bits[1],
 			kp.p_sigmask.__bits[2], kp.p_sigmask.__bits[3]);
 
-			ATF_REQUIRE(!memcmp(_sigmask, _sigmask,
-			sizeof(kp_sigmask)));
+			ATF_REQUIRE(sigismember((sigset_t *)_sigmask,
+			SIGTRAP));
 		}
 
 		if (ignored) {
@@ -5954,8 +5951,8 @@ fork2_body(const char *fn, bool masked, 
 			kp.p_sigignore.__bits[0], kp.p_sigignore.__bits[1],
 			kp.p_sigignore.__bits[2], kp.p_sigignore.__bits[3]);
 
-			ATF_REQUIRE(!memcmp(_sigignore, _sigignore,
-			sizeof(kp_sigignore)));
+			ATF_REQUIRE(sigismember((sigset_t *)_sigignore,
+			SIGTRAP));
 		}
 
 		SYSCALL_REQUIRE(
@@ -6016,8 +6013,8 @@ fork2_body(const char *fn, bool masked, 
 			kp.p_sigmask.__bits[0], kp.p_sigmask.__bits[1],
 			kp.p_sigmask.__bits[2], kp.p_sigmask.__bits[3]);
 
-			ATF_REQUIRE(!memcmp(_sigmask, _sigmask,
-			sizeof(kp_sigmask)));
+			ATF_REQUIRE(sigismember((sigset_t *)_sigmask,
+			SIGTRAP));
 		}
 
 		if (ignored) {
@@ -6033,8 +6030,8 @@ fork2_body(const char *fn, bool masked, 
 			kp.p_sigignore.__bits[0], kp.p_sigignore.__bits[1],
 			kp.p_sigignore.__bits[2], kp.p_sigignore.__bits[3]);
 
-			ATF_REQUIRE(!memcmp(_sigignore, _sigignore,
-			sizeof(kp_sigignore)));
+			ATF_REQUIRE(sigismember((sigset_t *)_sigignore,
+			SIGTRAP));
 		}
 
 		SYSCALL_REQUIRE(



CVS commit: [netbsd-9] src/external/gpl3/gdb/dist/gdb

2020-05-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 25 15:54:15 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb [netbsd-9]: alpha-tdep.c

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

external/gpl3/gdb/dist/gdb/alpha-tdep.c: revision 1.5

Revive entrypoint heuristics, accidentally removed in the previous.
Now, e.g., "b main" works again for "gdb /bin/echo" as expected.

See more details:
http://cvsweb.netbsd.org/bsdweb.cgi/src/external/gpl3/gdb/dist/gdb/alpha-tdep.c#rev1.2
XXX

Single-stepping into shared libraries still fails sometimes;
tracee does not stop at a function in shared library.
We need further analysis...


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.2.1 src/external/gpl3/gdb/dist/gdb/alpha-tdep.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/gdb/dist/gdb/alpha-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/alpha-tdep.c:1.4 src/external/gpl3/gdb/dist/gdb/alpha-tdep.c:1.4.2.1
--- src/external/gpl3/gdb/dist/gdb/alpha-tdep.c:1.4	Sun May 26 21:40:01 2019
+++ src/external/gpl3/gdb/dist/gdb/alpha-tdep.c	Mon May 25 15:54:15 2020
@@ -1825,6 +1825,9 @@ alpha_gdbarch_init (struct gdbarch_info 
   /* Prologue heuristics.  */
   set_gdbarch_skip_prologue (gdbarch, alpha_skip_prologue);
 
+  /* Entrypoint heuristics.  */
+  set_gdbarch_skip_entrypoint (gdbarch, alpha_skip_entrypoint);
+
   /* Call info.  */
 
   set_gdbarch_return_value (gdbarch, alpha_return_value);



CVS commit: [netbsd-9] src/external/gpl3/gdb/dist/gdb

2020-05-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 25 15:54:15 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb [netbsd-9]: alpha-tdep.c

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

external/gpl3/gdb/dist/gdb/alpha-tdep.c: revision 1.5

Revive entrypoint heuristics, accidentally removed in the previous.
Now, e.g., "b main" works again for "gdb /bin/echo" as expected.

See more details:
http://cvsweb.netbsd.org/bsdweb.cgi/src/external/gpl3/gdb/dist/gdb/alpha-tdep.c#rev1.2
XXX

Single-stepping into shared libraries still fails sometimes;
tracee does not stop at a function in shared library.
We need further analysis...


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.2.1 src/external/gpl3/gdb/dist/gdb/alpha-tdep.c

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



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

2020-05-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 25 15:39:54 UTC 2020

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

Log Message:
Pull up following revision(s) (requested by mlelstv in ticket #922):

sys/arch/x86/x86/cpu_topology.c: revision 1.18

assert smt_bits value only after it is computed.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.14.4.1 src/sys/arch/x86/x86/cpu_topology.c

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



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

2020-05-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 25 15:39:54 UTC 2020

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

Log Message:
Pull up following revision(s) (requested by mlelstv in ticket #922):

sys/arch/x86/x86/cpu_topology.c: revision 1.18

assert smt_bits value only after it is computed.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.14.4.1 src/sys/arch/x86/x86/cpu_topology.c

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

Modified files:

Index: src/sys/arch/x86/x86/cpu_topology.c
diff -u src/sys/arch/x86/x86/cpu_topology.c:1.14 src/sys/arch/x86/x86/cpu_topology.c:1.14.4.1
--- src/sys/arch/x86/x86/cpu_topology.c:1.14	Wed Nov 21 10:34:53 2018
+++ src/sys/arch/x86/x86/cpu_topology.c	Mon May 25 15:39:54 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_topology.c,v 1.14 2018/11/21 10:34:53 msaitoh Exp $	*/
+/*	$NetBSD: cpu_topology.c,v 1.14.4.1 2020/05/25 15:39:54 martin Exp $	*/
 
 /*-
  * Copyright (c) 2009 Mindaugas Rasiukevicius ,
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu_topology.c,v 1.14 2018/11/21 10:34:53 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_topology.c,v 1.14.4.1 2020/05/25 15:39:54 martin Exp $");
 
 #include 
 #include 
@@ -157,8 +157,9 @@ x86_cpu_topology(struct cpu_info *ci)
 		x86_cpuid(0x801e, descs);
 		const u_int threads = ((descs[1] >> 8) & 0xff) + 1;
 
-		KASSERT(smt_bits == 0 && smt_bits <= core_bits);
+		KASSERT(smt_bits == 0);
 		smt_bits = ilog2(threads);
+		KASSERT(smt_bits <= core_bits);
 		core_bits -= smt_bits;
 	}
 



CVS commit: src/external/mpl/dhcp

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 15:37:51 UTC 2020

Modified Files:
src/external/mpl/dhcp: Makefile.inc

Log Message:
Fix static build


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/mpl/dhcp/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/external/mpl/dhcp/Makefile.inc
diff -u src/external/mpl/dhcp/Makefile.inc:1.6 src/external/mpl/dhcp/Makefile.inc:1.7
--- src/external/mpl/dhcp/Makefile.inc:1.6	Sun May 24 15:50:12 2020
+++ src/external/mpl/dhcp/Makefile.inc	Mon May 25 11:37:50 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.6 2020/05/24 19:50:12 christos Exp $
+# $NetBSD: Makefile.inc,v 1.7 2020/05/25 15:37:50 christos Exp $
 
 WARNS?=	1	# XXX -Wshadow -Wcast-qual -Wsign-compare
 
@@ -37,8 +37,8 @@ LDADD+= ${OMOBJDIR}/libomapi.a
 # would be to install the libraries in /lib...
 LDADD+=-Wl,-Bstatic
 .endif
-LDADD+= -lirs -lisccfg -ldns -lisc -luv
-DPADD+= ${LIBIRS} ${LIBISCCFG} ${LIBDNS} ${LIBISC} ${LIBUV}
+LDADD+= -lirs -lisccfg -ldns -lisc -luv -lkvm
+DPADD+= ${LIBIRS} ${LIBISCCFG} ${LIBDNS} ${LIBISC} ${LIBUV} ${LIBKVM}
 LDADD+= -lpthread -lz
 DPADD+= ${LIBPTHREAD} ${LIBZ}
 .if (${MKKERBEROS} != "no")



CVS commit: src/external/mpl/dhcp

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 15:37:51 UTC 2020

Modified Files:
src/external/mpl/dhcp: Makefile.inc

Log Message:
Fix static build


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/mpl/dhcp/Makefile.inc

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



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

2020-05-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 25 15:31:45 UTC 2020

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

Log Message:
Pull up following revision(s) (requested by jakllsch in ticket #921):

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

xhci(4): only usbd_xfer_trycomplete() if certain to usb_transfer_complete()

Previously we'd cancel the timeout after the data stage of control xfers, and
then hope that the status stage would eventually interrupt.


To generate a diff of this commit:
cvs rdiff -u -r1.107.2.5 -r1.107.2.6 src/sys/dev/usb/xhci.c

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

Modified files:

Index: src/sys/dev/usb/xhci.c
diff -u src/sys/dev/usb/xhci.c:1.107.2.5 src/sys/dev/usb/xhci.c:1.107.2.6
--- src/sys/dev/usb/xhci.c:1.107.2.5	Sun Mar  1 12:35:16 2020
+++ src/sys/dev/usb/xhci.c	Mon May 25 15:31:45 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: xhci.c,v 1.107.2.5 2020/03/01 12:35:16 martin Exp $	*/
+/*	$NetBSD: xhci.c,v 1.107.2.6 2020/05/25 15:31:45 martin Exp $	*/
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.107.2.5 2020/03/01 12:35:16 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.107.2.6 2020/05/25 15:31:45 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -1969,13 +1969,6 @@ xhci_event_transfer(struct xhci_softc * 
 		return;
 	}
 
-	/*
-	 * Try to claim this xfer for completion.  If it has already
-	 * completed or aborted, drop it on the floor.
-	 */
-	if (!usbd_xfer_trycomplete(xfer))
-		return;
-
 	/* 4.11.5.2 Event Data TRB */
 	if ((trb_3 & XHCI_TRB_3_ED_BIT) != 0) {
 		DPRINTFN(14, "transfer Event Data: 0x%016jx 0x%08jx"
@@ -2031,6 +2024,13 @@ xhci_event_transfer(struct xhci_softc * 
 		DPRINTFN(1, "ERR %ju slot %ju dci %ju", trbcode, slot, dci, 0);
 		xr->is_halted = true;
 		/*
+		 * Try to claim this xfer for completion.  If it has already
+		 * completed or aborted, drop it on the floor.
+		 */
+		if (!usbd_xfer_trycomplete(xfer))
+			return;
+
+		/*
 		 * Stalled endpoints can be recoverd by issuing
 		 * command TRB TYPE_RESET_EP on xHCI instead of
 		 * issuing request CLEAR_FEATURE UF_ENDPOINT_HALT
@@ -2055,6 +2055,13 @@ xhci_event_transfer(struct xhci_softc * 
 		break;
 	}
 
+	/*
+	 * Try to claim this xfer for completion.  If it has already
+	 * completed or aborted, drop it on the floor.
+	 */
+	if (!usbd_xfer_trycomplete(xfer))
+		return;
+
 	/* Set the status.  */
 	xfer->ux_status = err;
 



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

2020-05-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 25 15:31:45 UTC 2020

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

Log Message:
Pull up following revision(s) (requested by jakllsch in ticket #921):

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

xhci(4): only usbd_xfer_trycomplete() if certain to usb_transfer_complete()

Previously we'd cancel the timeout after the data stage of control xfers, and
then hope that the status stage would eventually interrupt.


To generate a diff of this commit:
cvs rdiff -u -r1.107.2.5 -r1.107.2.6 src/sys/dev/usb/xhci.c

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



CVS commit: [netbsd-9] src/lib/libc/compat/gen

2020-05-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 25 15:26:05 UTC 2020

Modified Files:
src/lib/libc/compat/gen [netbsd-9]: compat_ldexp_ieee754.c

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

lib/libc/compat/gen/compat_ldexp_ieee754.c: revision 1.8

Teach libc's compat ldexp stub to raise fp exceptions.

This ldexp stub will shadow the ldexp weak alias for scalbn in libm,
which is unfortunate but hard to fix properly without chasing the
mythical libc bump beast.  With the change here, we should raise all
the same exceptions that libm's scalbn does -- overflow, underflow,
inexact-result, and (for signalling NaN only) invalid-operation.

This in turn should correct the missing overflow/underflow exceptions
of our portable C fma, and perhaps other routines.

XXX pullup


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.16.1 src/lib/libc/compat/gen/compat_ldexp_ieee754.c

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

Modified files:

Index: src/lib/libc/compat/gen/compat_ldexp_ieee754.c
diff -u src/lib/libc/compat/gen/compat_ldexp_ieee754.c:1.7 src/lib/libc/compat/gen/compat_ldexp_ieee754.c:1.7.16.1
--- src/lib/libc/compat/gen/compat_ldexp_ieee754.c:1.7	Sat Aug 27 09:35:13 2016
+++ src/lib/libc/compat/gen/compat_ldexp_ieee754.c	Mon May 25 15:26:05 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_ldexp_ieee754.c,v 1.7 2016/08/27 09:35:13 christos Exp $ */
+/* $NetBSD: compat_ldexp_ieee754.c,v 1.7.16.1 2020/05/25 15:26:05 martin Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -31,14 +31,34 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: compat_ldexp_ieee754.c,v 1.7 2016/08/27 09:35:13 christos Exp $");
+__RCSID("$NetBSD: compat_ldexp_ieee754.c,v 1.7.16.1 2020/05/25 15:26:05 martin Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include 
+
 #include 
+
 #include 
+#include 
+#include 
+
+static volatile const double tiny = DBL_MIN, huge = DBL_MAX;
+
+static double
+underflow(double val)
+{
+
+	errno = ERANGE;
+	return (val < 0 ? -tiny*tiny : tiny*tiny);
+}
+
+static double
+overflow(double val)
+{
 
-double ldexp(double, int);
+	errno = ERANGE;
+	return (val < 0 ? -huge*huge : huge*huge);
+}
 
 /*
  * Multiply the given value by 2^expon.
@@ -53,10 +73,13 @@ ldexp(double val, int expon)
 	oldexp = u.dblu_dbl.dbl_exp;
 
 	/*
-	 * If input is zero, Inf or NaN, just return it.
+	 * If input is zero, Inf or NaN, just return it, but raise
+	 * invalid exception if it is a signalling NaN: adding any of
+	 * these inputs to itself gives itself as output; arithmetic on
+	 * a signalling NaN additionally raises invalid-operation.
 	 */
 	if (u.dblu_d == 0.0 || oldexp == DBL_EXP_INFNAN)
-		return (val);
+		return (val + val);
 
 	if (oldexp == 0) {
 		/*
@@ -68,17 +91,13 @@ ldexp(double val, int expon)
 			 * Optimization: if the scaling can be done in a single
 			 * multiply, or underflows, just do it now.
 			 */
-			if (expon <= -DBL_FRACBITS) {
-errno = ERANGE;
-return (val < 0.0 ? -0.0 : 0.0);
-			}
+			if (expon <= -DBL_FRACBITS)
+return underflow(val);
 			mul.dblu_d = 0.0;
 			mul.dblu_dbl.dbl_exp = expon + DBL_EXP_BIAS;
 			u.dblu_d *= mul.dblu_d;
-			if (u.dblu_d == 0.0) {
-errno = ERANGE;
-return (val < 0.0 ? -0.0 : 0.0);
-			}
+			if (u.dblu_d == 0.0)
+return underflow(val);
 			return (u.dblu_d);
 		} else {
 			/*
@@ -105,20 +124,14 @@ ldexp(double val, int expon)
 		/*
 		 * The result overflowed; return +/-Inf.
 		 */
-		u.dblu_dbl.dbl_exp = DBL_EXP_INFNAN;
-		u.dblu_dbl.dbl_frach = 0;
-		u.dblu_dbl.dbl_fracl = 0;
-		errno = ERANGE;
-		return (u.dblu_d);
+		return overflow(val);
 	} else if (newexp <= 0) {
 		/*
 		 * The output number is either denormal or underflows (see
 		 * comments in machine/ieee.h).
 		 */
-		if (newexp <= -DBL_FRACBITS) {
-			errno = ERANGE;
-			return (val < 0.0 ? -0.0 : 0.0);
-		}
+		if (newexp <= -DBL_FRACBITS)
+			return underflow(val);
 		/*
 		 * Denormalize the result.  We do this with a multiply.  If
 		 * expon is very large, it won't fit in a double, so we have



CVS commit: [netbsd-9] src/lib/libc/compat/gen

2020-05-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 25 15:26:05 UTC 2020

Modified Files:
src/lib/libc/compat/gen [netbsd-9]: compat_ldexp_ieee754.c

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

lib/libc/compat/gen/compat_ldexp_ieee754.c: revision 1.8

Teach libc's compat ldexp stub to raise fp exceptions.

This ldexp stub will shadow the ldexp weak alias for scalbn in libm,
which is unfortunate but hard to fix properly without chasing the
mythical libc bump beast.  With the change here, we should raise all
the same exceptions that libm's scalbn does -- overflow, underflow,
inexact-result, and (for signalling NaN only) invalid-operation.

This in turn should correct the missing overflow/underflow exceptions
of our portable C fma, and perhaps other routines.

XXX pullup


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.16.1 src/lib/libc/compat/gen/compat_ldexp_ieee754.c

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



CVS commit: src/external/mpl/bind/dist/lib/dns

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 15:14:04 UTC 2020

Modified Files:
src/external/mpl/bind/dist/lib/dns: zone.c
src/external/mpl/bind/dist/lib/dns/include/dns: zone.h

Log Message:
Pointless to force use of 64 bit atomics on flags fields that fit in 32 bits.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/mpl/bind/dist/lib/dns/zone.c
cvs rdiff -u -r1.5 -r1.6 \
src/external/mpl/bind/dist/lib/dns/include/dns/zone.h

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



CVS commit: src/external/mpl/bind/dist/lib/dns

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 15:14:04 UTC 2020

Modified Files:
src/external/mpl/bind/dist/lib/dns: zone.c
src/external/mpl/bind/dist/lib/dns/include/dns: zone.h

Log Message:
Pointless to force use of 64 bit atomics on flags fields that fit in 32 bits.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/mpl/bind/dist/lib/dns/zone.c
cvs rdiff -u -r1.5 -r1.6 \
src/external/mpl/bind/dist/lib/dns/include/dns/zone.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/mpl/bind/dist/lib/dns/zone.c
diff -u src/external/mpl/bind/dist/lib/dns/zone.c:1.9 src/external/mpl/bind/dist/lib/dns/zone.c:1.10
--- src/external/mpl/bind/dist/lib/dns/zone.c:1.9	Sun May 24 15:46:23 2020
+++ src/external/mpl/bind/dist/lib/dns/zone.c	Mon May 25 11:14:04 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: zone.c,v 1.9 2020/05/24 19:46:23 christos Exp $	*/
+/*	$NetBSD: zone.c,v 1.10 2020/05/25 15:14:04 christos Exp $	*/
 
 /*
  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
@@ -226,8 +226,13 @@ struct dns_zone {
 	int32_t journalsize;
 	dns_rdataclass_t rdclass;
 	dns_zonetype_t type;
+#ifdef __NetBSD__
+	atomic_uint_fast32_t flags;
+	atomic_uint_fast32_t options;
+#else
 	atomic_uint_fast64_t flags;
 	atomic_uint_fast64_t options;
+#endif
 	unsigned int db_argc;
 	char **db_argv;
 	isc_time_t expiretime;
@@ -372,7 +377,11 @@ struct dns_zone {
 	/*%
 	 * Autosigning/key-maintenance options
 	 */
+#ifdef __NetBSD__
+	atomic_uint_fast32_t keyopts;
+#else
 	atomic_uint_fast64_t keyopts;
+#endif
 
 	/*%
 	 * True if added by "rndc addzone"
@@ -501,7 +510,9 @@ typedef enum {
 		  * notify due to the zone
 		  * just being loaded for
 		  * the first time.  */
+#ifndef __NetBSD__
 	DNS_ZONEFLG___MAX = UINT64_MAX, /* trick to make the ENUM 64-bit wide */
+#endif
 } dns_zoneflg_t;
 
 #define DNS_ZONE_OPTION(z, o)	 ((atomic_load_relaxed(&(z)->options) & (o)) != 0)

Index: src/external/mpl/bind/dist/lib/dns/include/dns/zone.h
diff -u src/external/mpl/bind/dist/lib/dns/include/dns/zone.h:1.5 src/external/mpl/bind/dist/lib/dns/include/dns/zone.h:1.6
--- src/external/mpl/bind/dist/lib/dns/include/dns/zone.h:1.5	Sun May 24 15:46:23 2020
+++ src/external/mpl/bind/dist/lib/dns/include/dns/zone.h	Mon May 25 11:14:04 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: zone.h,v 1.5 2020/05/24 19:46:23 christos Exp $	*/
+/*	$NetBSD: zone.h,v 1.6 2020/05/25 15:14:04 christos Exp $	*/
 
 /*
  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
@@ -89,7 +89,9 @@ typedef enum {
 	DNS_ZONEOPT_CHECKSPF = 1 << 27,		/*%< check SPF records */
 	DNS_ZONEOPT_CHECKTTL = 1 << 28,		/*%< check max-zone-ttl */
 	DNS_ZONEOPT_AUTOEMPTY = 1 << 29,	/*%< automatic empty zone */
+#ifndef __NetBSD__
 	DNS_ZONEOPT___MAX = UINT64_MAX, /* trick to make the ENUM 64-bit wide */
+#endif
 } dns_zoneopt_t;
 
 /*
@@ -101,7 +103,9 @@ typedef enum {
 	DNS_ZONEKEY_CREATE = 0x0004U,   /*%< make keys when needed */
 	DNS_ZONEKEY_FULLSIGN = 0x0008U, /*%< roll to new keys immediately */
 	DNS_ZONEKEY_NORESIGN = 0x0010U, /*%< no automatic resigning */
+#ifndef __NetBSD__
 	DNS_ZONEKEY___MAX = UINT64_MAX, /* trick to make the ENUM 64-bit wide */
+#endif
 } dns_zonekey_t;
 
 #ifndef DNS_ZONE_MINREFRESH



CVS commit: src/external/mpl/bind/dist/lib/ns

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 15:13:25 UTC 2020

Modified Files:
src/external/mpl/bind/dist/lib/ns: client.c
src/external/mpl/bind/dist/lib/ns/include/ns: client.h

Log Message:
Fix stats counters to be 32 bits on ILP32


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/mpl/bind/dist/lib/ns/client.c
cvs rdiff -u -r1.8 -r1.9 \
src/external/mpl/bind/dist/lib/ns/include/ns/client.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/mpl/bind/dist/lib/ns/client.c
diff -u src/external/mpl/bind/dist/lib/ns/client.c:1.9 src/external/mpl/bind/dist/lib/ns/client.c:1.10
--- src/external/mpl/bind/dist/lib/ns/client.c:1.9	Sun May 24 15:46:29 2020
+++ src/external/mpl/bind/dist/lib/ns/client.c	Mon May 25 11:13:25 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: client.c,v 1.9 2020/05/24 19:46:29 christos Exp $	*/
+/*	$NetBSD: client.c,v 1.10 2020/05/25 15:13:25 christos Exp $	*/
 
 /*
  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
@@ -128,7 +128,7 @@
  * Number of tasks to be used by clients - those are used only when recursing
  */
 
-#if defined(_WIN32) && !defined(_WIN64)
+#if (defined(_WIN32) && !defined(_WIN64)) || !defined(_LP64)
 LIBNS_EXTERNAL_DATA atomic_uint_fast32_t ns_client_requests;
 #else  /* if defined(_WIN32) && !defined(_WIN64) */
 LIBNS_EXTERNAL_DATA atomic_uint_fast64_t ns_client_requests;

Index: src/external/mpl/bind/dist/lib/ns/include/ns/client.h
diff -u src/external/mpl/bind/dist/lib/ns/include/ns/client.h:1.8 src/external/mpl/bind/dist/lib/ns/include/ns/client.h:1.9
--- src/external/mpl/bind/dist/lib/ns/include/ns/client.h:1.8	Sun May 24 15:46:29 2020
+++ src/external/mpl/bind/dist/lib/ns/include/ns/client.h	Mon May 25 11:13:25 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: client.h,v 1.8 2020/05/24 19:46:29 christos Exp $	*/
+/*	$NetBSD: client.h,v 1.9 2020/05/25 15:13:25 christos Exp $	*/
 
 /*
  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
@@ -273,7 +273,7 @@ struct ns_client {
  */
 #define NS_FAILCACHE_CD 0x01
 
-#if defined(_WIN32) && !defined(_WIN64)
+#if (defined(_WIN32) && !defined(_WIN64)) || !defined(_LP64)
 LIBNS_EXTERNAL_DATA extern atomic_uint_fast32_t ns_client_requests;
 #else  /* if defined(_WIN32) && !defined(_WIN64) */
 LIBNS_EXTERNAL_DATA extern atomic_uint_fast64_t ns_client_requests;



CVS commit: src/external/mpl/bind

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 15:12:54 UTC 2020

Modified Files:
src/external/mpl/bind: Makefile.inc

Log Message:
Fix static linking.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/mpl/bind/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/external/mpl/bind/Makefile.inc
diff -u src/external/mpl/bind/Makefile.inc:1.6 src/external/mpl/bind/Makefile.inc:1.7
--- src/external/mpl/bind/Makefile.inc:1.6	Sun May 24 15:46:10 2020
+++ src/external/mpl/bind/Makefile.inc	Mon May 25 11:12:54 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.6 2020/05/24 19:46:10 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.7 2020/05/25 15:12:54 christos Exp $
 
 .if !defined(BIND9_MAKEFILE_INC)
 BIND9_MAKEFILE_INC=yes
@@ -66,12 +66,13 @@ DBG=-g3 -gstabs
 .if !defined(LIB) || empty(LIB)
 # NOTE: the order of these libraries is important...
 .if defined(NAMED_DEBUG)
-LDADD+=		-lbind9_g -lisccfg_g -ldns_g -lns_g -lirs_g -lisccc_g -lisc_g -lz_g
+LDADD+=		-lbind9_g -lisccfg_g -ldns_g -lns_g -lirs_g
+LDADD+=		-lisccc_g -lisc_g -luv_g -lkvm_g -lz_g
 .else
 LDADD+=		-lbind9 -lisccfg -ldns -lns -lirs
 DPADD+=		${LIBBIND9} ${LIBISCCFG} ${LIBDNS} ${LIBNS} ${LIBIRS}
-LDADD+=		-lisccc -lisc -luv -lz
-DPADD+=		${LIBISCCC} ${LIBISC} ${LIBUV} ${LIBZ}
+LDADD+=		-lisccc -lisc -luv -lkvm -lz
+DPADD+=		${LIBISCCC} ${LIBISC} ${LIBUV} ${LIBKVM} ${LIBZ}
 .endif
 .else
 CPPFLAGS+= -DLIBINTERFACE=${LIBINTERFACE} \



CVS commit: src/external/mpl/bind/dist/lib/ns

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 15:13:25 UTC 2020

Modified Files:
src/external/mpl/bind/dist/lib/ns: client.c
src/external/mpl/bind/dist/lib/ns/include/ns: client.h

Log Message:
Fix stats counters to be 32 bits on ILP32


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/mpl/bind/dist/lib/ns/client.c
cvs rdiff -u -r1.8 -r1.9 \
src/external/mpl/bind/dist/lib/ns/include/ns/client.h

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



CVS commit: src/external/mpl/bind

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 15:12:54 UTC 2020

Modified Files:
src/external/mpl/bind: Makefile.inc

Log Message:
Fix static linking.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/mpl/bind/Makefile.inc

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



CVS commit: src/doc

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 14:54:26 UTC 2020

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
new tzcode2020a


To generate a diff of this commit:
cvs rdiff -u -r1.1717 -r1.1718 src/doc/3RDPARTY
cvs rdiff -u -r1.2692 -r1.2693 src/doc/CHANGES

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1717 src/doc/3RDPARTY:1.1718
--- src/doc/3RDPARTY:1.1717	Sun May 24 15:49:34 2020
+++ src/doc/3RDPARTY	Mon May 25 10:54:26 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1717 2020/05/24 19:49:34 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1718 2020/05/25 14:54:26 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1395,14 +1395,14 @@ Notes:
 Added changes from a5 -> a12 manually.
 
 Package:	tz
-Version:	tzcode2019b / tzdata2020a
+Version:	tzcode2020a / tzdata2020a
 Current Vers:	tzcode2020a / tzdata2020a
 Maintainer:	Paul Eggert 
 Archive Site:	ftp://ftp.iana.org/tz/releases/
 Archive Site:	ftp://munnari.oz.au/pub/oldtz/
 Old Archive Site:	ftp://elsie.nci.nih.gov/pub/
 Home Page:	http://www.iana.org/time-zones
-Date:		2019-07-03
+Date:		2020-05-25
 Mailing List:	t...@iana.org
 Responsible:	kleink, christos, kre
 License:	Public domain

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2692 src/doc/CHANGES:1.2693
--- src/doc/CHANGES:1.2692	Sun May 24 15:49:34 2020
+++ src/doc/CHANGES	Mon May 25 10:54:26 2020
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2692 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2693 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -210,3 +210,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 		generator device [riastradh 20200517]
 	libuv: Import version 1.38.0. [christos 20200524]
 	bind: Import version 9.16.3. [christos 20200524]
+	tzcode: Updated to 2020a. [christos 20200525]



CVS commit: src/doc

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 14:54:26 UTC 2020

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
new tzcode2020a


To generate a diff of this commit:
cvs rdiff -u -r1.1717 -r1.1718 src/doc/3RDPARTY
cvs rdiff -u -r1.2692 -r1.2693 src/doc/CHANGES

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



CVS commit: src/lib/libc/time

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 14:52:48 UTC 2020

Modified Files:
src/lib/libc/time: Makefile NEWS localtime.c private.h strftime.c
theory.html tz-art.html tz-link.html tzfile.5 version zdump.8
zdump.c zic.8 zic.c

Log Message:
Bring in 2020a


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/lib/libc/time/Makefile
cvs rdiff -u -r1.29 -r1.30 src/lib/libc/time/NEWS src/lib/libc/time/tzfile.5
cvs rdiff -u -r1.122 -r1.123 src/lib/libc/time/localtime.c
cvs rdiff -u -r1.55 -r1.56 src/lib/libc/time/private.h
cvs rdiff -u -r1.46 -r1.47 src/lib/libc/time/strftime.c
cvs rdiff -u -r1.8 -r1.9 src/lib/libc/time/theory.html
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/time/tz-art.html
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/time/tz-link.html
cvs rdiff -u -r1.12 -r1.13 src/lib/libc/time/version
cvs rdiff -u -r1.19 -r1.20 src/lib/libc/time/zdump.8
cvs rdiff -u -r1.52 -r1.53 src/lib/libc/time/zdump.c
cvs rdiff -u -r1.33 -r1.34 src/lib/libc/time/zic.8
cvs rdiff -u -r1.75 -r1.76 src/lib/libc/time/zic.c

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

Modified files:

Index: src/lib/libc/time/Makefile
diff -u src/lib/libc/time/Makefile:1.44 src/lib/libc/time/Makefile:1.45
--- src/lib/libc/time/Makefile:1.44	Wed Jul  3 11:50:16 2019
+++ src/lib/libc/time/Makefile	Mon May 25 10:52:48 2020
@@ -150,6 +150,15 @@ TIME_T_ALTERNATIVES_TAIL = int32_t uint3
 
 REDO=		posix_right
 
+# Whether to put an "Expires" line in the leapseconds file.
+# Use EXPIRES_LINE=1 to put the line in, 0 to omit it.
+# The EXPIRES_LINE value matters only if REDO's value contains "right".
+# If you change EXPIRES_LINE, remove the leapseconds file before running "make".
+# zic's support for the Expires line was introduced in tzdb 2020a,
+# and EXPIRES_LINE defaults to 0 for now so that the leapseconds file
+# can be given to older zic implementations.
+EXPIRES_LINE=	0
+
 # To install data in text form that has all the information of the TZif data,
 # (optionally incorporating leap second information), use
 #	TZDATA_TEXT=	tzdata.zi leapseconds
@@ -295,8 +304,9 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fn
 # than TM_GMTOFF and TM_ZONE.  However, most of them are standardized.
 # #
 # # To omit or support the external variable "tzname", add one of:
-# #	-DHAVE_TZNAME=0
-# #	-DHAVE_TZNAME=1
+# #	-DHAVE_TZNAME=0 # do not support "tzname"
+# #	-DHAVE_TZNAME=1 # support "tzname", which is defined by system library
+# #	-DHAVE_TZNAME=2 # support and define "tzname"
 # # to the "CFLAGS=" line.  "tzname" is required by POSIX 1988 and later.
 # # If not defined, the code attempts to guess HAVE_TZNAME from other macros.
 # # Warning: unless time_tz is also defined, HAVE_TZNAME=1 can cause
@@ -304,16 +314,20 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fn
 # # presumably due to memory allocation issues.
 # #
 # # To omit or support the external variables "timezone" and "daylight", add
-# #	-DUSG_COMPAT=0
-# #	-DUSG_COMPAT=1
+# #	-DUSG_COMPAT=0 # do not support
+# #	-DUSG_COMPAT=1 # support, and variables are defined by system library
+# #	-DUSG_COMPAT=2 # support and define variables
 # # to the "CFLAGS=" line; "timezone" and "daylight" are inspired by
 # # Unix Systems Group code and are required by POSIX 2008 (with XSI) and later.
 # # If not defined, the code attempts to guess USG_COMPAT from other macros.
 # #
 # # To support the external variable "altzone", add
-# #	-DALTZONE
+# #	-DALTZONE=0 # do not support
+# #	-DALTZONE=1 # support "altzone", which is defined by system library
+# #	-DALTZONE=2 # support and define "altzone"
 # # to the end of the "CFLAGS=" line; although "altzone" appeared in
 # # System V Release 3.1 it has not been standardized.
+# # If not defined, the code attempts to guess ALTZONE from other macros.
 #
 # If you want functions that were inspired by early versions of X3J11's work,
 # add
@@ -321,9 +335,7 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fn
 # to the end of the "CFLAGS=" line.  This arranges for the functions
 # "tzsetwall", "offtime", "timelocal", "timegm", "timeoff",
 # "posix2time", and "time2posix" to be added to the time conversion library.
-# "tzsetwall" is like "tzset" except that it arranges for local wall clock
-# time (rather than the timezone specified in the TZ environment variable)
-# to be used.
+# "tzsetwall" is deprecated and is intended to be removed soon; see NEWS.
 # "offtime" is like "gmtime" except that it accepts a second (long) argument
 # that gives an offset to add to the time_t when converting it.
 # "timelocal" is equivalent to "mktime".
@@ -333,7 +345,6 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fn
 # that gives an offset to use when converting to a time_t.
 # "posix2time" and "time2posix" are described in an included manual page.
 # X3J11's work does not describe any of these functions.
-# Sun has provided "tzsetwall", "timelocal", and "timegm" in SunOS 4.0.
 # These 

CVS commit: src/lib/libc/time

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 14:52:48 UTC 2020

Modified Files:
src/lib/libc/time: Makefile NEWS localtime.c private.h strftime.c
theory.html tz-art.html tz-link.html tzfile.5 version zdump.8
zdump.c zic.8 zic.c

Log Message:
Bring in 2020a


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/lib/libc/time/Makefile
cvs rdiff -u -r1.29 -r1.30 src/lib/libc/time/NEWS src/lib/libc/time/tzfile.5
cvs rdiff -u -r1.122 -r1.123 src/lib/libc/time/localtime.c
cvs rdiff -u -r1.55 -r1.56 src/lib/libc/time/private.h
cvs rdiff -u -r1.46 -r1.47 src/lib/libc/time/strftime.c
cvs rdiff -u -r1.8 -r1.9 src/lib/libc/time/theory.html
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/time/tz-art.html
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/time/tz-link.html
cvs rdiff -u -r1.12 -r1.13 src/lib/libc/time/version
cvs rdiff -u -r1.19 -r1.20 src/lib/libc/time/zdump.8
cvs rdiff -u -r1.52 -r1.53 src/lib/libc/time/zdump.c
cvs rdiff -u -r1.33 -r1.34 src/lib/libc/time/zic.8
cvs rdiff -u -r1.75 -r1.76 src/lib/libc/time/zic.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/usb

2020-05-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon May 25 13:55:31 UTC 2020

Modified Files:
src/sys/dev/usb: uhci.c

Log Message:
Be more careful with transfer descriptors and crossing page boundaries

Enable USBMALLOC_MULTISEG


To generate a diff of this commit:
cvs rdiff -u -r1.301 -r1.302 src/sys/dev/usb/uhci.c

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

Modified files:

Index: src/sys/dev/usb/uhci.c
diff -u src/sys/dev/usb/uhci.c:1.301 src/sys/dev/usb/uhci.c:1.302
--- src/sys/dev/usb/uhci.c:1.301	Fri May 15 06:15:42 2020
+++ src/sys/dev/usb/uhci.c	Mon May 25 13:55:31 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhci.c,v 1.301 2020/05/15 06:15:42 skrll Exp $	*/
+/*	$NetBSD: uhci.c,v 1.302 2020/05/25 13:55:31 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.301 2020/05/15 06:15:42 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.302 2020/05/25 13:55:31 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -582,6 +582,7 @@ uhci_init(uhci_softc_t *sc)
 	sc->sc_bus.ub_methods = _bus_methods;
 	sc->sc_bus.ub_pipesize = sizeof(struct uhci_pipe);
 	sc->sc_bus.ub_usedma = true;
+	sc->sc_bus.ub_dmaflags = USBMALLOC_MULTISEG;
 
 	UHCICMD(sc, UHCI_CMD_MAXP); /* Assume 64 byte packets at frame end */
 
@@ -2009,6 +2010,17 @@ uhci_alloc_std_chain(uhci_softc_t *sc, s
 		return EINVAL;
 	}
 	size_t ntd = howmany(len, maxp);
+	/*
+	 * if our transfer is bigger than PAGE_SIZE and maxp not a factor of
+	 * PAGE_SIZE then we will need another TD per page.
+	 */
+	if (len > PAGE_SIZE && (PAGE_SIZE % maxp) != 0) {
+		ntd += howmany(len, PAGE_SIZE);
+	}
+
+	/*
+	 * Might need one more TD if we're writing a ZLP
+	 */
 	if (!rd && (flags & USBD_FORCE_SHORT_XFER)) {
 		ntd++;
 	}
@@ -2080,7 +2092,7 @@ uhci_reset_std_chain(uhci_softc_t *sc, s
 	int tog = *toggle;
 	int maxp;
 	uint32_t status;
-	size_t i;
+	size_t i, offs;
 
 	UHCIHIST_FUNC(); UHCIHIST_CALLED();
 	DPRINTFN(8, "xfer=%#jx len %jd isread %jd toggle %jd", (uintptr_t)xfer,
@@ -2102,9 +2114,15 @@ uhci_reset_std_chain(uhci_softc_t *sc, s
 	usb_syncmem(dma, 0, len,
 	isread ? BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE);
 	std = prev = NULL;
-	for (i = 0; len != 0 && i < uxfer->ux_nstd; i++, prev = std) {
+	for (offs = i = 0; len != 0 && i < uxfer->ux_nstd; i++, prev = std) {
 		int l = len;
 		std = uxfer->ux_stds[i];
+
+		const bus_addr_t sbp = DMAADDR(dma, offs);
+		const bus_addr_t ebp = DMAADDR(dma, offs + l - 1);
+		if (((sbp ^ ebp) & ~PAGE_MASK) != 0)
+			l = PAGE_SIZE - (DMAADDR(dma, offs) & PAGE_MASK);
+
 		if (l > maxp)
 			l = maxp;
 
@@ -2129,7 +2147,7 @@ uhci_reset_std_chain(uhci_softc_t *sc, s
 		UHCI_TD_SET_DT(tog) |
 		UHCI_TD_SET_MAXLEN(l)
 		);
-		std->td.td_buffer = htole32(DMAADDR(dma, i * maxp));
+		std->td.td_buffer = htole32(DMAADDR(dma, offs));
 
 		std->link.std = NULL;
 
@@ -2137,6 +2155,7 @@ uhci_reset_std_chain(uhci_softc_t *sc, s
 		BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD);
 		tog ^= 1;
 
+		offs += l;
 		len -= l;
 	}
 	KASSERTMSG(len == 0, "xfer %p alen %d len %d mps %d ux_nqtd %zu i %zu",
@@ -2933,17 +2952,20 @@ uhci_device_isoc_transfer(struct usbd_xf
 	xfer->ux_status = USBD_IN_PROGRESS;
 	ux->ux_curframe = next;
 
-	buf = DMAADDR(>ux_dmabuf, 0);
 	offs = 0;
 	status = UHCI_TD_ZERO_ACTLEN(UHCI_TD_SET_ERRCNT(0) |
  UHCI_TD_ACTIVE |
  UHCI_TD_IOS);
 	nframes = xfer->ux_nframes;
 	for (i = 0; i < nframes; i++) {
+		buf = DMAADDR(>ux_dmabuf, offs);
 		std = isoc->stds[next];
 		if (++next >= UHCI_VFRAMELIST_COUNT)
 			next = 0;
 		len = xfer->ux_frlengths[i];
+
+		KASSERTMSG(len <= __SHIFTOUT_MASK(UHCI_TD_MAXLEN_MASK),
+		"len %d", len);
 		std->td.td_buffer = htole32(buf);
 		usb_syncmem(>ux_dmabuf, offs, len,
 		rd ? BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE);
@@ -2962,8 +2984,11 @@ uhci_device_isoc_transfer(struct usbd_xf
 			DPRINTF("--- dump end ---", 0, 0, 0, 0);
 		}
 #endif
-		buf += len;
 		offs += len;
+		const bus_addr_t bend __diagused =
+		DMAADDR(>ux_dmabuf, offs - 1);
+
+		KASSERT(((buf ^ bend) & ~PAGE_MASK) == 0);
 	}
 	isoc->next = next;
 	isoc->inuse += xfer->ux_nframes;



CVS commit: src/sys/dev/usb

2020-05-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon May 25 13:55:31 UTC 2020

Modified Files:
src/sys/dev/usb: uhci.c

Log Message:
Be more careful with transfer descriptors and crossing page boundaries

Enable USBMALLOC_MULTISEG


To generate a diff of this commit:
cvs rdiff -u -r1.301 -r1.302 src/sys/dev/usb/uhci.c

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



  1   2   >