CVS commit: src/sys/kern

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 22:41:56 UTC 2023

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

Log Message:
pipe1(): call getnanotime() once not twice.


To generate a diff of this commit:
cvs rdiff -u -r1.162 -r1.163 src/sys/kern/sys_pipe.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

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 22:41:56 UTC 2023

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

Log Message:
pipe1(): call getnanotime() once not twice.


To generate a diff of this commit:
cvs rdiff -u -r1.162 -r1.163 src/sys/kern/sys_pipe.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/sys_pipe.c
diff -u src/sys/kern/sys_pipe.c:1.162 src/sys/kern/sys_pipe.c:1.163
--- src/sys/kern/sys_pipe.c:1.162	Wed Oct  4 22:19:58 2023
+++ src/sys/kern/sys_pipe.c	Wed Oct  4 22:41:56 2023
@@ -1,7 +1,7 @@
-/*	$NetBSD: sys_pipe.c,v 1.162 2023/10/04 22:19:58 ad Exp $	*/
+/*	$NetBSD: sys_pipe.c,v 1.163 2023/10/04 22:41:56 ad Exp $	*/
 
 /*-
- * Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc.
+ * Copyright (c) 2003, 2007, 2008, 2009, 2023 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
@@ -68,7 +68,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sys_pipe.c,v 1.162 2023/10/04 22:19:58 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_pipe.c,v 1.163 2023/10/04 22:41:56 ad Exp $");
 
 #include 
 #include 
@@ -131,7 +131,7 @@ static const struct fileops pipeops = {
  * Limit the number of "big" pipes
  */
 #define	LIMITBIGPIPES	32
-static u_int	maxbigpipes = LIMITBIGPIPES;
+static u_int	maxbigpipes __read_mostly = LIMITBIGPIPES;
 static u_int	nbigpipe = 0;
 
 /*
@@ -141,7 +141,7 @@ static u_int	amountpipekva = 0;
 
 static void	pipeclose(struct pipe *);
 static void	pipe_free_kmem(struct pipe *);
-static int	pipe_create(struct pipe **, pool_cache_t);
+static int	pipe_create(struct pipe **, pool_cache_t, struct timespec *);
 static int	pipelock(struct pipe *, bool);
 static inline void pipeunlock(struct pipe *);
 static void	pipeselwakeup(struct pipe *, struct pipe *, int);
@@ -220,6 +220,7 @@ int
 pipe1(struct lwp *l, int *fildes, int flags)
 {
 	struct pipe *rpipe, *wpipe;
+	struct timespec nt;
 	file_t *rf, *wf;
 	int fd, error;
 	proc_t *p;
@@ -228,8 +229,9 @@ pipe1(struct lwp *l, int *fildes, int fl
 		return EINVAL;
 	p = curproc;
 	rpipe = wpipe = NULL;
-	if ((error = pipe_create(, pipe_rd_cache)) ||
-	(error = pipe_create(, pipe_wr_cache))) {
+	getnanotime();
+	if ((error = pipe_create(, pipe_rd_cache, )) ||
+	(error = pipe_create(, pipe_wr_cache, ))) {
 		goto free2;
 	}
 	rpipe->pipe_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_NONE);
@@ -312,7 +314,7 @@ pipespace(struct pipe *pipe, int size)
  * Initialize and allocate VM and memory for pipe.
  */
 static int
-pipe_create(struct pipe **pipep, pool_cache_t cache)
+pipe_create(struct pipe **pipep, pool_cache_t cache, struct timespec *nt)
 {
 	struct pipe *pipe;
 	int error;
@@ -321,8 +323,7 @@ pipe_create(struct pipe **pipep, pool_ca
 	KASSERT(pipe != NULL);
 	*pipep = pipe;
 	error = 0;
-	getnanotime(>pipe_btime);
-	pipe->pipe_atime = pipe->pipe_mtime = pipe->pipe_btime;
+	pipe->pipe_atime = pipe->pipe_mtime = pipe->pipe_btime = *nt;
 	pipe->pipe_lock = NULL;
 	if (cache == pipe_rd_cache) {
 		error = pipespace(pipe, PIPE_SIZE);



CVS commit: src/share/misc

2023-10-04 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Wed Oct  4 22:34:23 UTC 2023

Modified Files:
src/share/misc: acronyms.comp

Log Message:
+DOHDNS over HTTPS
+DOQDNS over QUIC
+DOTDNS over TLS
+DRNDiscovery of Network-designated Resolvers
+QUIC   Quick UDP Internet Connections


To generate a diff of this commit:
cvs rdiff -u -r1.371 -r1.372 src/share/misc/acronyms.comp

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



CVS commit: src/share/misc

2023-10-04 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Wed Oct  4 22:34:23 UTC 2023

Modified Files:
src/share/misc: acronyms.comp

Log Message:
+DOHDNS over HTTPS
+DOQDNS over QUIC
+DOTDNS over TLS
+DRNDiscovery of Network-designated Resolvers
+QUIC   Quick UDP Internet Connections


To generate a diff of this commit:
cvs rdiff -u -r1.371 -r1.372 src/share/misc/acronyms.comp

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

Modified files:

Index: src/share/misc/acronyms.comp
diff -u src/share/misc/acronyms.comp:1.371 src/share/misc/acronyms.comp:1.372
--- src/share/misc/acronyms.comp:1.371	Mon Oct  2 00:16:42 2023
+++ src/share/misc/acronyms.comp	Wed Oct  4 22:34:23 2023
@@ -1,4 +1,4 @@
-$NetBSD: acronyms.comp,v 1.371 2023/10/02 00:16:42 riastradh Exp $
+$NetBSD: acronyms.comp,v 1.372 2023/10/04 22:34:23 jschauma Exp $
 3WHS	three-way handshake
 8VSB	8-state vestigial side band modulation
 AA	anti-aliasing
@@ -448,9 +448,12 @@ DNSBL   Domain Name System Block List
 DNSSEC	DNS Security Extensions
 DOE	distributed object environment
 DOF	data over fibre
+DOH	DNS over HTTPS
 DOM	document object model
+DOQ	DNS over QUIC
 DOS	denial of service
 DOS	disk operating system
+DOT	DNS over TLS
 DP	DisplayPort
 DPAA	data path acceleration architecture
 DPC	deferred procedure call
@@ -468,6 +471,7 @@ DRBG	deterministic random bit generator
 DRI	direct rendering infrastructure
 DRM	digital rights management
 DRM	direct rendering manager
+DRN	Discovery of Network-designated Resolvers
 DRRS	display refresh rate switching
 DS	debug store
 DS	differentiated services
@@ -1353,6 +1357,7 @@ QDI	quasi delay insensitive
 QCIF	quarter common intermediate format
 QOI	quality of implementation
 QOI	quick order interface
+QUIC	Quick UDP Internet Connections
 QOS	quality of service
 QVL	qualified vendor list
 R/O	read only



CVS commit: src/sys

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 22:19:58 UTC 2023

Modified Files:
src/sys/kern: sys_pipe.c
src/sys/sys: pipe.h

Log Message:
pipe->pipe_waiters isn't needed on NetBSD, kernel condvars do this for free.


To generate a diff of this commit:
cvs rdiff -u -r1.161 -r1.162 src/sys/kern/sys_pipe.c
cvs rdiff -u -r1.38 -r1.39 src/sys/sys/pipe.h

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

Modified files:

Index: src/sys/kern/sys_pipe.c
diff -u src/sys/kern/sys_pipe.c:1.161 src/sys/kern/sys_pipe.c:1.162
--- src/sys/kern/sys_pipe.c:1.161	Wed Oct  4 22:12:23 2023
+++ src/sys/kern/sys_pipe.c	Wed Oct  4 22:19:58 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_pipe.c,v 1.161 2023/10/04 22:12:23 ad Exp $	*/
+/*	$NetBSD: sys_pipe.c,v 1.162 2023/10/04 22:19:58 ad Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sys_pipe.c,v 1.161 2023/10/04 22:12:23 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_pipe.c,v 1.162 2023/10/04 22:19:58 ad Exp $");
 
 #include 
 #include 
@@ -348,19 +348,13 @@ pipelock(struct pipe *pipe, bool catch_p
 	KASSERT(mutex_owned(pipe->pipe_lock));
 
 	while (pipe->pipe_state & PIPE_LOCKFL) {
-		pipe->pipe_waiters++;
-		KASSERT(pipe->pipe_waiters != 0); /* just in case */
 		if (catch_p) {
 			error = cv_wait_sig(>pipe_lkcv, pipe->pipe_lock);
 			if (error != 0) {
-KASSERT(pipe->pipe_waiters > 0);
-pipe->pipe_waiters--;
 return error;
 			}
 		} else
 			cv_wait(>pipe_lkcv, pipe->pipe_lock);
-		KASSERT(pipe->pipe_waiters > 0);
-		pipe->pipe_waiters--;
 	}
 
 	pipe->pipe_state |= PIPE_LOCKFL;
@@ -378,9 +372,7 @@ pipeunlock(struct pipe *pipe)
 	KASSERT(pipe->pipe_state & PIPE_LOCKFL);
 
 	pipe->pipe_state &= ~PIPE_LOCKFL;
-	if (pipe->pipe_waiters > 0) {
-		cv_signal(>pipe_lkcv);
-	}
+	cv_signal(>pipe_lkcv);
 }
 
 /*

Index: src/sys/sys/pipe.h
diff -u src/sys/sys/pipe.h:1.38 src/sys/sys/pipe.h:1.39
--- src/sys/sys/pipe.h:1.38	Mon Jan 25 19:21:11 2021
+++ src/sys/sys/pipe.h	Wed Oct  4 22:19:58 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: pipe.h,v 1.38 2021/01/25 19:21:11 dholland Exp $ */
+/* $NetBSD: pipe.h,v 1.39 2023/10/04 22:19:58 ad Exp $ */
 
 /*
  * Copyright (c) 1996 John S. Dyson
@@ -98,9 +98,8 @@ struct pipe {
 	struct	timespec pipe_atime;	/* time of last access */
 	struct	timespec pipe_mtime;	/* time of last modify */
 	struct	timespec pipe_btime;	/* time of creation */
-	pid_t	pipe_pgid;		/* process group for sigio */
-	u_int	pipe_waiters;		/* number of waiters pending */
 	struct	pipe *pipe_peer;	/* link with other direction */
+	pid_t	pipe_pgid;		/* process group for sigio */
 	u_int	pipe_state;		/* pipe status info */
 	int	pipe_busy;		/* busy flag, to handle rundown */
 	vaddr_t	pipe_kmem;		/* preallocated PIPE_SIZE buffer */



CVS commit: src/sys

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 22:19:58 UTC 2023

Modified Files:
src/sys/kern: sys_pipe.c
src/sys/sys: pipe.h

Log Message:
pipe->pipe_waiters isn't needed on NetBSD, kernel condvars do this for free.


To generate a diff of this commit:
cvs rdiff -u -r1.161 -r1.162 src/sys/kern/sys_pipe.c
cvs rdiff -u -r1.38 -r1.39 src/sys/sys/pipe.h

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



CVS commit: src

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 22:17:10 UTC 2023

Modified Files:
src/share/man/man9: kauth.9
src/sys/kern: kern_auth.c kern_core.c kern_descrip.c kern_exec.c
kern_lwp.c kern_proc.c uipc_socket.c uipc_syscalls.c
src/sys/sys: kauth.h

Log Message:
kauth_cred_hold(): return cred verbatim so that donating a reference to
another data structure can be done more elegantly.


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/share/man/man9/kauth.9
cvs rdiff -u -r1.83 -r1.84 src/sys/kern/kern_auth.c
cvs rdiff -u -r1.38 -r1.39 src/sys/kern/kern_core.c
cvs rdiff -u -r1.261 -r1.262 src/sys/kern/kern_descrip.c
cvs rdiff -u -r1.519 -r1.520 src/sys/kern/kern_exec.c
cvs rdiff -u -r1.262 -r1.263 src/sys/kern/kern_lwp.c
cvs rdiff -u -r1.272 -r1.273 src/sys/kern/kern_proc.c
cvs rdiff -u -r1.304 -r1.305 src/sys/kern/uipc_socket.c
cvs rdiff -u -r1.207 -r1.208 src/sys/kern/uipc_syscalls.c
cvs rdiff -u -r1.89 -r1.90 src/sys/sys/kauth.h

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

Modified files:

Index: src/share/man/man9/kauth.9
diff -u src/share/man/man9/kauth.9:1.113 src/share/man/man9/kauth.9:1.114
--- src/share/man/man9/kauth.9:1.113	Sat Aug  7 03:28:42 2021
+++ src/share/man/man9/kauth.9	Wed Oct  4 22:17:10 2023
@@ -1,4 +1,4 @@
-.\" $NetBSD: kauth.9,v 1.113 2021/08/07 03:28:42 isaki Exp $
+.\" $NetBSD: kauth.9,v 1.114 2023/10/04 22:17:10 ad Exp $
 .\"
 .\" Copyright (c) 2005, 2006 Elad Efrat 
 .\" All rights reserved.
@@ -25,7 +25,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd August 7, 2021
+.Dd October 4, 2023
 .Dt KAUTH 9
 .Os
 .Sh NAME
@@ -1746,10 +1746,12 @@ LWPs, files, etc.) reference it.
 The following routines are available for managing credentials reference
 counting:
 .Bl -tag -width compact
-.It Ft void Fn kauth_cred_hold "kauth_cred_t cred"
+.It Ft kauth_cred_t Fn kauth_cred_hold "kauth_cred_t cred"
 Increases reference count to
 .Ar cred
-by one.
+by one and returns
+.Ar cred
+verbatim.
 .It Ft void Fn kauth_cred_free "kauth_cred_t cred"
 Decreases the reference count to
 .Ar cred

Index: src/sys/kern/kern_auth.c
diff -u src/sys/kern/kern_auth.c:1.83 src/sys/kern/kern_auth.c:1.84
--- src/sys/kern/kern_auth.c:1.83	Mon Oct  2 20:59:12 2023
+++ src/sys/kern/kern_auth.c	Wed Oct  4 22:17:09 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_auth.c,v 1.83 2023/10/02 20:59:12 ad Exp $ */
+/* $NetBSD: kern_auth.c,v 1.84 2023/10/04 22:17:09 ad Exp $ */
 
 /*-
  * Copyright (c) 2005, 2006 Elad Efrat 
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_auth.c,v 1.83 2023/10/02 20:59:12 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_auth.c,v 1.84 2023/10/04 22:17:09 ad Exp $");
 
 #include 
 #include 
@@ -122,7 +122,7 @@ kauth_cred_alloc(void)
 }
 
 /* Increment reference count to cred. */
-void
+kauth_cred_t
 kauth_cred_hold(kauth_cred_t cred)
 {
 	KASSERT(cred != NULL);
@@ -131,6 +131,7 @@ kauth_cred_hold(kauth_cred_t cred)
 	KASSERT(cred->cr_refcnt > 0);
 
 	atomic_inc_uint(>cr_refcnt);
+	return cred;
 }
 
 /* Decrease reference count to cred. If reached zero, free it. */
@@ -237,8 +238,7 @@ kauth_proc_fork(struct proc *parent, str
 {
 
 	mutex_enter(parent->p_lock);
-	kauth_cred_hold(parent->p_cred);
-	child->p_cred = parent->p_cred;
+	child->p_cred = kauth_cred_hold(parent->p_cred);
 	mutex_exit(parent->p_lock);
 
 	/* XXX: relies on parent process stalling during fork() */

Index: src/sys/kern/kern_core.c
diff -u src/sys/kern/kern_core.c:1.38 src/sys/kern/kern_core.c:1.39
--- src/sys/kern/kern_core.c:1.38	Tue Jul 11 09:48:56 2023
+++ src/sys/kern/kern_core.c	Wed Oct  4 22:17:09 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_core.c,v 1.38 2023/07/11 09:48:56 riastradh Exp $	*/
+/*	$NetBSD: kern_core.c,v 1.39 2023/10/04 22:17:09 ad Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_core.c,v 1.38 2023/07/11 09:48:56 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_core.c,v 1.39 2023/10/04 22:17:09 ad Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_execfmt.h"
@@ -153,8 +153,7 @@ coredump(struct lwp *l, const char *patt
 	 * It may well not be curproc, so grab a reference to its current
 	 * credentials.
 	 */
-	kauth_cred_hold(p->p_cred);
-	cred = p->p_cred;
+	cred = kauth_cred_hold(p->p_cred);
 
 	/*
 	 * Make sure the process has not set-id, to prevent data leaks,

Index: src/sys/kern/kern_descrip.c
diff -u src/sys/kern/kern_descrip.c:1.261 src/sys/kern/kern_descrip.c:1.262
--- src/sys/kern/kern_descrip.c:1.261	Sat Sep 23 18:21:11 2023
+++ src/sys/kern/kern_descrip.c	Wed Oct  4 22:17:09 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_descrip.c,v 1.261 2023/09/23 18:21:11 ad Exp $	*/
+/*	$NetBSD: kern_descrip.c,v 1.262 2023/10/04 22:17:09 ad Exp $	*/
 
 /*-
  * Copyright (c) 

CVS commit: src

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 22:17:10 UTC 2023

Modified Files:
src/share/man/man9: kauth.9
src/sys/kern: kern_auth.c kern_core.c kern_descrip.c kern_exec.c
kern_lwp.c kern_proc.c uipc_socket.c uipc_syscalls.c
src/sys/sys: kauth.h

Log Message:
kauth_cred_hold(): return cred verbatim so that donating a reference to
another data structure can be done more elegantly.


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/share/man/man9/kauth.9
cvs rdiff -u -r1.83 -r1.84 src/sys/kern/kern_auth.c
cvs rdiff -u -r1.38 -r1.39 src/sys/kern/kern_core.c
cvs rdiff -u -r1.261 -r1.262 src/sys/kern/kern_descrip.c
cvs rdiff -u -r1.519 -r1.520 src/sys/kern/kern_exec.c
cvs rdiff -u -r1.262 -r1.263 src/sys/kern/kern_lwp.c
cvs rdiff -u -r1.272 -r1.273 src/sys/kern/kern_proc.c
cvs rdiff -u -r1.304 -r1.305 src/sys/kern/uipc_socket.c
cvs rdiff -u -r1.207 -r1.208 src/sys/kern/uipc_syscalls.c
cvs rdiff -u -r1.89 -r1.90 src/sys/sys/kauth.h

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



CVS commit: src/sys/kern

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 22:12:23 UTC 2023

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

Log Message:
pipe_read(): try to skip locking the pipe if a non-blocking fd is used, as
is very often the case with BSD make (from FreeBSD/mjg@).


To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/sys/kern/sys_pipe.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

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 22:12:23 UTC 2023

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

Log Message:
pipe_read(): try to skip locking the pipe if a non-blocking fd is used, as
is very often the case with BSD make (from FreeBSD/mjg@).


To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/sys/kern/sys_pipe.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/sys_pipe.c
diff -u src/sys/kern/sys_pipe.c:1.160 src/sys/kern/sys_pipe.c:1.161
--- src/sys/kern/sys_pipe.c:1.160	Sat Apr 22 13:53:02 2023
+++ src/sys/kern/sys_pipe.c	Wed Oct  4 22:12:23 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_pipe.c,v 1.160 2023/04/22 13:53:02 riastradh Exp $	*/
+/*	$NetBSD: sys_pipe.c,v 1.161 2023/10/04 22:12:23 ad Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sys_pipe.c,v 1.160 2023/04/22 13:53:02 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_pipe.c,v 1.161 2023/10/04 22:12:23 ad Exp $");
 
 #include 
 #include 
@@ -434,6 +434,23 @@ pipe_read(file_t *fp, off_t *offset, str
 	size_t ocnt;
 	unsigned int wakeup_state = 0;
 
+	/*
+	 * Try to avoid locking the pipe if we have nothing to do.
+	 *
+	 * There are programs which share one pipe amongst multiple processes
+	 * and perform non-blocking reads in parallel, even if the pipe is
+	 * empty.  This in particular is the case with BSD make, which when
+	 * spawned with a high -j number can find itself with over half of the
+	 * calls failing to find anything.
+	 */
+	if ((fp->f_flag & FNONBLOCK) != 0) {
+		if (__predict_false(uio->uio_resid == 0))
+			return (0);
+		if (atomic_load_relaxed(>cnt) == 0 &&
+		(atomic_load_relaxed(>pipe_state) & PIPE_EOF) == 0)
+			return (EAGAIN);
+	}
+
 	mutex_enter(lock);
 	++rpipe->pipe_busy;
 	ocnt = bp->cnt;



CVS commit: src/sys/rump/librump/rumpkern

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 21:56:16 UTC 2023

Modified Files:
src/sys/rump/librump/rumpkern: threads.c

Log Message:
rump now needs lwp_need_userret()


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/rump/librump/rumpkern/threads.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/rump/librump/rumpkern/threads.c
diff -u src/sys/rump/librump/rumpkern/threads.c:1.27 src/sys/rump/librump/rumpkern/threads.c:1.28
--- src/sys/rump/librump/rumpkern/threads.c:1.27	Sat Aug  1 22:30:57 2020
+++ src/sys/rump/librump/rumpkern/threads.c	Wed Oct  4 21:56:15 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: threads.c,v 1.27 2020/08/01 22:30:57 riastradh Exp $	*/
+/*	$NetBSD: threads.c,v 1.28 2023/10/04 21:56:15 ad Exp $	*/
 
 /*
  * Copyright (c) 2007-2009 Antti Kantee.  All Rights Reserved.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: threads.c,v 1.27 2020/08/01 22:30:57 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: threads.c,v 1.28 2023/10/04 21:56:15 ad Exp $");
 
 #include 
 #include 
@@ -377,3 +377,10 @@ lwp_userret(struct lwp *l)
 	rump_unschedule();
 	rumpuser_thread_exit();
 }
+
+void
+lwp_need_userret(struct lwp *l)
+{
+
+	/* do what? */
+}



CVS commit: src/sys/rump/librump/rumpkern

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 21:56:16 UTC 2023

Modified Files:
src/sys/rump/librump/rumpkern: threads.c

Log Message:
rump now needs lwp_need_userret()


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/rump/librump/rumpkern/threads.c

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



CVS commit: src/sys/sys

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 20:52:07 UTC 2023

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

Log Message:
p->p_stat is actually locked by proc_lock so document it that way and
shuffle some fields around so it's not next to p->p_trace_enabled (that
needs some attention too, in a later change).


To generate a diff of this commit:
cvs rdiff -u -r1.372 -r1.373 src/sys/sys/proc.h

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

Modified files:

Index: src/sys/sys/proc.h
diff -u src/sys/sys/proc.h:1.372 src/sys/sys/proc.h:1.373
--- src/sys/sys/proc.h:1.372	Tue Jul 11 09:48:56 2023
+++ src/sys/sys/proc.h	Wed Oct  4 20:52:07 2023
@@ -1,7 +1,7 @@
-/*	$NetBSD: proc.h,v 1.372 2023/07/11 09:48:56 riastradh Exp $	*/
+/*	$NetBSD: proc.h,v 1.373 2023/10/04 20:52:07 ad Exp $	*/
 
 /*-
- * Copyright (c) 2006, 2007, 2008, 2020 The NetBSD Foundation, Inc.
+ * Copyright (c) 2006, 2007, 2008, 2020, 2023 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
@@ -252,12 +252,12 @@ struct proc {
 	int		p_exitsig;	/* l: signal to send to parent on exit */
 	int		p_flag;		/* p: PK_* flags */
 	int		p_sflag;	/* p: PS_* flags */
-	int		p_slflag;	/* p, l: PSL_* flags */
-	int		p_lflag;	/* l: PL_* flags */
 	int		p_stflag;	/* t: PST_* flags */
-	char		p_stat;		/* p: S* process status. */
+	short		p_slflag;	/* l, p: PSL_* flags */
+	char		p_stat;		/* l: S* process status. */
+	char		p_lflag;	/* l: PL_* flags */
 	char		p_trace_enabled;/* p: cached by syscall_intern() */
-	char		p_pad1[2];	/*  unused */
+	char		p_pad1[3];	/*  unused */
 
 	pid_t		p_pid;		/* :: Process identifier. */
 	LIST_ENTRY(proc) p_pglist;	/* l: List of processes in pgrp. */
@@ -414,11 +414,11 @@ struct proc {
 #define	PSL_TRACEPOSIX_SPAWN	\
 			0x0020 /* traced process wants posix_spawn events */
 
-#define	PSL_TRACED	0x0800 /* Debugged process being traced */
-#define	PSL_TRACEDCHILD 0x1000 /* Report process birth */
-#define	PSL_CHTRACED	0x0040 /* Child has been traced & reparented */
-#define	PSL_SYSCALL	0x0400 /* process has PT_SYSCALL enabled */
-#define	PSL_SYSCALLEMU	0x0800 /* cancel in-progress syscall */
+#define	PSL_TRACED	0x0040 /* Debugged process being traced */
+#define	PSL_TRACEDCHILD 0x0080 /* Report process birth */
+#define	PSL_CHTRACED	0x0100 /* Child has been traced & reparented */
+#define	PSL_SYSCALL	0x0200 /* process has PT_SYSCALL enabled */
+#define	PSL_SYSCALLEMU	0x0400 /* cancel in-progress syscall */
 
 /*
  * Kept in p_stflag and protected by p_stmutex.
@@ -429,10 +429,10 @@ struct proc {
  * Kept in p_lflag and protected by the proc_lock.  Access
  * from process context only.
  */
-#define	PL_CONTROLT	0x0002 /* Has a controlling terminal */
-#define	PL_PPWAIT	0x0010 /* Parent is waiting for child exec/exit */
-#define	PL_SIGCOMPAT	0x0200 /* Has used compat signal trampoline */
-#define	PL_ORPHANPG	0x2000 /* Member of an orphaned pgrp */
+#define	PL_CONTROLT	0x0001 /* Has a controlling terminal */
+#define	PL_PPWAIT	0x0002 /* Parent is waiting for child exec/exit */
+#define	PL_SIGCOMPAT	0x0004 /* Has used compat signal trampoline */
+#define	PL_ORPHANPG	0x0008 /* Member of an orphaned pgrp */
 
 #if defined(_KMEMUSER) || defined(_KERNEL)
 



CVS commit: src/sys/sys

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 20:52:07 UTC 2023

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

Log Message:
p->p_stat is actually locked by proc_lock so document it that way and
shuffle some fields around so it's not next to p->p_trace_enabled (that
needs some attention too, in a later change).


To generate a diff of this commit:
cvs rdiff -u -r1.372 -r1.373 src/sys/sys/proc.h

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



CVS commit: src/sys/kern

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 20:46:33 UTC 2023

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

Log Message:
Do cv_broadcast(>p_lwpcv) after dropping p->p_lock in a few places, to
reduce contention.


To generate a diff of this commit:
cvs rdiff -u -r1.261 -r1.262 src/sys/kern/kern_lwp.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_lwp.c
diff -u src/sys/kern/kern_lwp.c:1.261 src/sys/kern/kern_lwp.c:1.262
--- src/sys/kern/kern_lwp.c:1.261	Wed Oct  4 20:45:13 2023
+++ src/sys/kern/kern_lwp.c	Wed Oct  4 20:46:33 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_lwp.c,v 1.261 2023/10/04 20:45:13 ad Exp $	*/
+/*	$NetBSD: kern_lwp.c,v 1.262 2023/10/04 20:46:33 ad Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2019, 2020, 2023
@@ -217,7 +217,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.261 2023/10/04 20:45:13 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.262 2023/10/04 20:46:33 ad Exp $");
 
 #include "opt_ddb.h"
 #include "opt_lockdebug.h"
@@ -1219,10 +1219,10 @@ lwp_exit(struct lwp *l)
 	}
 	lwp_unlock(l);
 	p->p_nrlwps--;
-	cv_broadcast(>p_lwpcv);
 	if (l->l_lwpctl != NULL)
 		l->l_lwpctl->lc_curcpu = LWPCTL_CPU_EXITED;
 	mutex_exit(p->p_lock);
+	cv_broadcast(>p_lwpcv);
 
 	/*
 	 * We can no longer block.  At this point, lwp_free() may already
@@ -1311,13 +1311,13 @@ lwp_free(struct lwp *l, bool recycle, bo
 		p->p_nzlwps--;
 		if ((l->l_prflag & LPR_DETACHED) != 0)
 			p->p_ndlwps--;
+		mutex_exit(p->p_lock);
 
 		/*
 		 * Have any LWPs sleeping in lwp_wait() recheck for
 		 * deadlock.
 		 */
 		cv_broadcast(>p_lwpcv);
-		mutex_exit(p->p_lock);
 
 		/* Free the LWP ID. */
 		mutex_enter(_lock);
@@ -1759,11 +1759,11 @@ lwp_userret(struct lwp *l)
 			pcu_save_all(l);
 			mutex_enter(p->p_lock);
 			p->p_nrlwps--;
-			cv_broadcast(>p_lwpcv);
 			lwp_lock(l);
 			l->l_stat = LSSUSPENDED;
 			lwp_unlock(l);
 			mutex_exit(p->p_lock);
+			cv_broadcast(>p_lwpcv);
 			lwp_lock(l);
 			spc_lock(l->l_cpu);
 			mi_switch(l);



CVS commit: src/sys/kern

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 20:48:13 UTC 2023

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

Log Message:
match_process(): most of the fields being inspected are covered by proc_lock
so don't grab p->p_lock so much.


To generate a diff of this commit:
cvs rdiff -u -r1.296 -r1.297 src/sys/kern/kern_exit.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_exit.c
diff -u src/sys/kern/kern_exit.c:1.296 src/sys/kern/kern_exit.c:1.297
--- src/sys/kern/kern_exit.c:1.296	Wed Oct  4 20:42:38 2023
+++ src/sys/kern/kern_exit.c	Wed Oct  4 20:48:13 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exit.c,v 1.296 2023/10/04 20:42:38 ad Exp $	*/
+/*	$NetBSD: kern_exit.c,v 1.297 2023/10/04 20:48:13 ad Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2006, 2007, 2008, 2020, 2023
@@ -68,7 +68,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.296 2023/10/04 20:42:38 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.297 2023/10/04 20:48:13 ad Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_dtrace.h"
@@ -836,50 +836,57 @@ match_process(const struct proc *pp, str
 	struct proc *p = *q;
 	int rv = 1;
 
-	mutex_enter(p->p_lock);
 	switch (idtype) {
 	case P_ALL:
+		mutex_enter(p->p_lock);
 		break;
 	case P_PID:
 		if (p->p_pid != (pid_t)id) {
-			mutex_exit(p->p_lock);
 			p = *q = proc_find_raw((pid_t)id);
 			if (p == NULL || p->p_stat == SIDL || p->p_pptr != pp) {
 *q = NULL;
 return -1;
 			}
-			mutex_enter(p->p_lock);
 		}
+		mutex_enter(p->p_lock);
 		rv++;
 		break;
 	case P_PGID:
 		if (p->p_pgid != (pid_t)id)
-			goto out;
+			return 0;
+		mutex_enter(p->p_lock);
 		break;
 	case P_SID:
 		if (p->p_session->s_sid != (pid_t)id)
-			goto out;
+			return 0;
+		mutex_enter(p->p_lock);
 		break;
 	case P_UID:
-		if (kauth_cred_geteuid(p->p_cred) != (uid_t)id)
-			goto out;
+		mutex_enter(p->p_lock);
+		if (kauth_cred_geteuid(p->p_cred) != (uid_t)id) {
+			mutex_exit(p->p_lock);
+			return 0;
+		}
 		break;
 	case P_GID:
-		if (kauth_cred_getegid(p->p_cred) != (gid_t)id)
-			goto out;
+		mutex_enter(p->p_lock);
+		if (kauth_cred_getegid(p->p_cred) != (gid_t)id) {
+			mutex_exit(p->p_lock);
+			return 0;
+		}
 		break;
 	case P_CID:
 	case P_PSETID:
 	case P_CPUID:
 		/* XXX: Implement me */
 	default:
-	out:
-		mutex_exit(p->p_lock);
 		return 0;
 	}
 
-	if ((options & WEXITED) == 0 && p->p_stat == SZOMB)
-		goto out;
+	if ((options & WEXITED) == 0 && p->p_stat == SZOMB) {
+		mutex_exit(p->p_lock);
+		return 0;
+	}
 
 	if (siginfo != NULL) {
 		siginfo->si_errno = 0;
@@ -1024,9 +1031,7 @@ find_stopped_child(struct proc *parent, 
 	}
 
 	if ((pid_t)id == WAIT_MYPGRP && (idtype == P_PID || idtype == P_PGID)) {
-		mutex_enter(parent->p_lock);
 		id = (id_t)parent->p_pgid;
-		mutex_exit(parent->p_lock);
 		idtype = P_PGID;
 	}
 



CVS commit: src/sys/kern

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 20:46:33 UTC 2023

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

Log Message:
Do cv_broadcast(>p_lwpcv) after dropping p->p_lock in a few places, to
reduce contention.


To generate a diff of this commit:
cvs rdiff -u -r1.261 -r1.262 src/sys/kern/kern_lwp.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

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 20:48:13 UTC 2023

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

Log Message:
match_process(): most of the fields being inspected are covered by proc_lock
so don't grab p->p_lock so much.


To generate a diff of this commit:
cvs rdiff -u -r1.296 -r1.297 src/sys/kern/kern_exit.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

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 20:44:15 UTC 2023

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

Log Message:
Sprinkle a bunch more calls to lwp_need_userret().  There should be no
functional change but it does get rid of a bunch of assumptions about how
mi_userret() works making it easier to adjust in that in the future, and
works as a kind of documentation too.


To generate a diff of this commit:
cvs rdiff -u -r1.259 -r1.260 src/sys/kern/kern_lwp.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_lwp.c
diff -u src/sys/kern/kern_lwp.c:1.259 src/sys/kern/kern_lwp.c:1.260
--- src/sys/kern/kern_lwp.c:1.259	Wed Oct  4 20:42:38 2023
+++ src/sys/kern/kern_lwp.c	Wed Oct  4 20:44:15 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_lwp.c,v 1.259 2023/10/04 20:42:38 ad Exp $	*/
+/*	$NetBSD: kern_lwp.c,v 1.260 2023/10/04 20:44:15 ad Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2019, 2020, 2023
@@ -217,7 +217,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.259 2023/10/04 20:42:38 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.260 2023/10/04 20:44:15 ad Exp $");
 
 #include "opt_ddb.h"
 #include "opt_lockdebug.h"
@@ -1003,6 +1003,7 @@ lwp_start(lwp_t *l, int flags)
 	if ((flags & LWP_SUSPENDED) != 0) {
 		/* It'll suspend itself in lwp_userret(). */
 		l->l_flag |= LW_WSUSPEND;
+		lwp_need_userret(l);
 	}
 	if (p->p_stat == SSTOP || (p->p_sflag & PS_STOPPING) != 0) {
 		KASSERT(l->l_wchan == NULL);



CVS commit: src/sys/kern

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 20:45:14 UTC 2023

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

Log Message:
lwp_wait(): restart the loop if p->p_lock dropped to reap zombie (paranoid).


To generate a diff of this commit:
cvs rdiff -u -r1.260 -r1.261 src/sys/kern/kern_lwp.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_lwp.c
diff -u src/sys/kern/kern_lwp.c:1.260 src/sys/kern/kern_lwp.c:1.261
--- src/sys/kern/kern_lwp.c:1.260	Wed Oct  4 20:44:15 2023
+++ src/sys/kern/kern_lwp.c	Wed Oct  4 20:45:13 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_lwp.c,v 1.260 2023/10/04 20:44:15 ad Exp $	*/
+/*	$NetBSD: kern_lwp.c,v 1.261 2023/10/04 20:45:13 ad Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2019, 2020, 2023
@@ -217,7 +217,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.260 2023/10/04 20:44:15 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.261 2023/10/04 20:45:13 ad Exp $");
 
 #include "opt_ddb.h"
 #include "opt_lockdebug.h"
@@ -612,10 +612,11 @@ lwp_wait(struct lwp *l, lwpid_t lid, lwp
 		 * First off, drain any detached LWP that is waiting to be
 		 * reaped.
 		 */
-		while ((l2 = p->p_zomblwp) != NULL) {
+		if ((l2 = p->p_zomblwp) != NULL) {
 			p->p_zomblwp = NULL;
 			lwp_free(l2, false, false);/* releases proc mutex */
 			mutex_enter(p->p_lock);
+			continue;
 		}
 
 		/*



CVS commit: src/sys/kern

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 20:45:14 UTC 2023

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

Log Message:
lwp_wait(): restart the loop if p->p_lock dropped to reap zombie (paranoid).


To generate a diff of this commit:
cvs rdiff -u -r1.260 -r1.261 src/sys/kern/kern_lwp.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

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 20:44:15 UTC 2023

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

Log Message:
Sprinkle a bunch more calls to lwp_need_userret().  There should be no
functional change but it does get rid of a bunch of assumptions about how
mi_userret() works making it easier to adjust in that in the future, and
works as a kind of documentation too.


To generate a diff of this commit:
cvs rdiff -u -r1.259 -r1.260 src/sys/kern/kern_lwp.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

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 20:42:38 UTC 2023

Modified Files:
src/sys/kern: kern_exit.c kern_lwp.c kern_sig.c sys_sig.c

Log Message:
Sprinkle a bunch more calls to lwp_need_userret().  There should be no
functional change but it does get rid of a bunch of assumptions about how
mi_userret() works making it easier to adjust in that in the future, and
works as a kind of documentation too.


To generate a diff of this commit:
cvs rdiff -u -r1.295 -r1.296 src/sys/kern/kern_exit.c
cvs rdiff -u -r1.258 -r1.259 src/sys/kern/kern_lwp.c
cvs rdiff -u -r1.406 -r1.407 src/sys/kern/kern_sig.c
cvs rdiff -u -r1.56 -r1.57 src/sys/kern/sys_sig.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_exit.c
diff -u src/sys/kern/kern_exit.c:1.295 src/sys/kern/kern_exit.c:1.296
--- src/sys/kern/kern_exit.c:1.295	Wed Oct  4 20:29:18 2023
+++ src/sys/kern/kern_exit.c	Wed Oct  4 20:42:38 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exit.c,v 1.295 2023/10/04 20:29:18 ad Exp $	*/
+/*	$NetBSD: kern_exit.c,v 1.296 2023/10/04 20:42:38 ad Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2006, 2007, 2008, 2020, 2023
@@ -68,7 +68,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.295 2023/10/04 20:29:18 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.296 2023/10/04 20:42:38 ad Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_dtrace.h"
@@ -632,6 +632,7 @@ retry:
 			continue;
 		lwp_lock(l2);
 		l2->l_flag |= LW_WEXIT;
+		lwp_need_userret(l2);
 		if ((l2->l_stat == LSSLEEP && (l2->l_flag & LW_SINTR)) ||
 		l2->l_stat == LSSUSPENDED || l2->l_stat == LSSTOP) {
 			l2->l_flag &= ~LW_DBGSUSPEND;
@@ -639,7 +640,6 @@ retry:
 			setrunnable(l2);
 			continue;
 		}
-		lwp_need_userret(l2);
 		lwp_unlock(l2);
 	}
 

Index: src/sys/kern/kern_lwp.c
diff -u src/sys/kern/kern_lwp.c:1.258 src/sys/kern/kern_lwp.c:1.259
--- src/sys/kern/kern_lwp.c:1.258	Wed Oct  4 20:28:06 2023
+++ src/sys/kern/kern_lwp.c	Wed Oct  4 20:42:38 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_lwp.c,v 1.258 2023/10/04 20:28:06 ad Exp $	*/
+/*	$NetBSD: kern_lwp.c,v 1.259 2023/10/04 20:42:38 ad Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2019, 2020, 2023
@@ -217,7 +217,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.258 2023/10/04 20:28:06 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.259 2023/10/04 20:42:38 ad Exp $");
 
 #include "opt_ddb.h"
 #include "opt_lockdebug.h"
@@ -468,6 +468,7 @@ lwp_suspend(struct lwp *curl, struct lwp
 
 	case LSSLEEP:
 		t->l_flag |= LW_WSUSPEND;
+		lwp_need_userret(t);
 
 		/*
 		 * Kick the LWP and try to get it to the kernel boundary
@@ -486,6 +487,7 @@ lwp_suspend(struct lwp *curl, struct lwp
 
 	case LSSTOP:
 		t->l_flag |= LW_WSUSPEND;
+		lwp_need_userret(t);
 		setrunnable(t);
 		break;
 
@@ -962,6 +964,11 @@ lwp_create(lwp_t *l1, proc_t *p2, vaddr_
 		lwp_unlock(l1);
 	}
 
+	/* Ensure a trip through lwp_userret() if needed. */
+	if ((l2->l_flag & LW_USERRET) != 0) {
+		lwp_need_userret(l2);
+	}
+
 	/* This marks the end of the "must be atomic" section. */
 	mutex_exit(p2->p_lock);
 
@@ -1794,7 +1801,7 @@ lwp_need_userret(struct lwp *l)
 {
 
 	KASSERT(!cpu_intr_p());
-	KASSERT(lwp_locked(l, NULL));
+	KASSERT(lwp_locked(l, NULL) || l->l_stat == LSIDL);
 
 	/*
 	 * If the LWP is in any state other than LSONPROC, we know that it

Index: src/sys/kern/kern_sig.c
diff -u src/sys/kern/kern_sig.c:1.406 src/sys/kern/kern_sig.c:1.407
--- src/sys/kern/kern_sig.c:1.406	Wed Oct  4 20:29:18 2023
+++ src/sys/kern/kern_sig.c	Wed Oct  4 20:42:38 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_sig.c,v 1.406 2023/10/04 20:29:18 ad Exp $	*/
+/*	$NetBSD: kern_sig.c,v 1.407 2023/10/04 20:42:38 ad Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008, 2019, 2023 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.406 2023/10/04 20:29:18 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.407 2023/10/04 20:42:38 ad Exp $");
 
 #include "opt_execfmt.h"
 #include "opt_ptrace.h"
@@ -2266,6 +2266,7 @@ sigexit(struct lwp *l, int signo)
 	if ((p->p_sflag & PS_WCORE) != 0) {
 		lwp_lock(l);
 		l->l_flag |= (LW_WCORE | LW_WEXIT | LW_WSUSPEND);
+		lwp_need_userret(l);
 		lwp_unlock(l);
 		mutex_exit(p->p_lock);
 		lwp_userret(l);
@@ -2297,6 +2298,7 @@ sigexit(struct lwp *l, int signo)
 	continue;
 }
 t->l_flag |= (LW_WCORE | LW_WEXIT);
+lwp_need_userret(t);
 lwp_suspend(l, t);
 			}
 

Index: src/sys/kern/sys_sig.c
diff -u src/sys/kern/sys_sig.c:1.56 src/sys/kern/sys_sig.c:1.57
--- src/sys/kern/sys_sig.c:1.56	Thu Apr 21 21:31:11 2022
+++ src/sys/kern/sys_sig.c	Wed Oct  4 20:42:38 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_sig.c,v 1.56 2022/04/21 21:31:11 andvar Exp $	*/
+/*	$NetBSD: sys_sig.c,v 1.57 2023/10/04 20:42:38 ad Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ 

CVS commit: src/sys/kern

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 20:42:38 UTC 2023

Modified Files:
src/sys/kern: kern_exit.c kern_lwp.c kern_sig.c sys_sig.c

Log Message:
Sprinkle a bunch more calls to lwp_need_userret().  There should be no
functional change but it does get rid of a bunch of assumptions about how
mi_userret() works making it easier to adjust in that in the future, and
works as a kind of documentation too.


To generate a diff of this commit:
cvs rdiff -u -r1.295 -r1.296 src/sys/kern/kern_exit.c
cvs rdiff -u -r1.258 -r1.259 src/sys/kern/kern_lwp.c
cvs rdiff -u -r1.406 -r1.407 src/sys/kern/kern_sig.c
cvs rdiff -u -r1.56 -r1.57 src/sys/kern/sys_sig.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

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 20:39:35 UTC 2023

Modified Files:
src/sys/kern: kern_rwlock.c kern_turnstile.c

Log Message:
Turnstiles: use the syncobj name for ps/top wmesg when sleeping since it's
more informative than "tstile".


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/kern/kern_rwlock.c
cvs rdiff -u -r1.51 -r1.52 src/sys/kern/kern_turnstile.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_rwlock.c
diff -u src/sys/kern/kern_rwlock.c:1.73 src/sys/kern/kern_rwlock.c:1.74
--- src/sys/kern/kern_rwlock.c:1.73	Sat Sep 23 18:48:04 2023
+++ src/sys/kern/kern_rwlock.c	Wed Oct  4 20:39:35 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_rwlock.c,v 1.73 2023/09/23 18:48:04 ad Exp $	*/
+/*	$NetBSD: kern_rwlock.c,v 1.74 2023/10/04 20:39:35 ad Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2006, 2007, 2008, 2009, 2019, 2020, 2023
@@ -45,7 +45,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.73 2023/09/23 18:48:04 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.74 2023/10/04 20:39:35 ad Exp $");
 
 #include "opt_lockdebug.h"
 
@@ -125,7 +125,7 @@ lockops_t rwlock_lockops = {
  * direct handoff.  XXX To be revisited.
  */
 syncobj_t rw_syncobj = {
-	.sobj_name	= "rw",
+	.sobj_name	= "rwlock",
 	.sobj_flag	= SOBJ_SLEEPQ_SORTED,
 	.sobj_boostpri  = PRI_KTHREAD,
 	.sobj_unsleep	= turnstile_unsleep,

Index: src/sys/kern/kern_turnstile.c
diff -u src/sys/kern/kern_turnstile.c:1.51 src/sys/kern/kern_turnstile.c:1.52
--- src/sys/kern/kern_turnstile.c:1.51	Wed Oct  4 20:29:18 2023
+++ src/sys/kern/kern_turnstile.c	Wed Oct  4 20:39:35 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_turnstile.c,v 1.51 2023/10/04 20:29:18 ad Exp $	*/
+/*	$NetBSD: kern_turnstile.c,v 1.52 2023/10/04 20:39:35 ad Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2006, 2007, 2009, 2019, 2020, 2023
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_turnstile.c,v 1.51 2023/10/04 20:29:18 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_turnstile.c,v 1.52 2023/10/04 20:39:35 ad Exp $");
 
 #include 
 #include 
@@ -417,7 +417,7 @@ turnstile_block(turnstile_t *ts, int q, 
 	ts->ts_waiters[q]++;
 	nlocks = sleepq_enter(sq, l, lock);
 	LOCKDEBUG_BARRIER(lock, 1);
-	sleepq_enqueue(sq, obj, "tstile", sobj, false);
+	sleepq_enqueue(sq, obj, sobj->sobj_name, sobj, false);
 
 	/*
 	 * Disable preemption across this entire block, as we may drop



CVS commit: src/sys/kern

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 20:39:35 UTC 2023

Modified Files:
src/sys/kern: kern_rwlock.c kern_turnstile.c

Log Message:
Turnstiles: use the syncobj name for ps/top wmesg when sleeping since it's
more informative than "tstile".


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/kern/kern_rwlock.c
cvs rdiff -u -r1.51 -r1.52 src/sys/kern/kern_turnstile.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

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 20:34:19 UTC 2023

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

Log Message:
Remove unneeded test of ci->ci_want_resched.


To generate a diff of this commit:
cvs rdiff -u -r1.181 -r1.182 src/sys/uvm/uvm_glue.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_glue.c
diff -u src/sys/uvm/uvm_glue.c:1.181 src/sys/uvm/uvm_glue.c:1.182
--- src/sys/uvm/uvm_glue.c:1.181	Sun Jun 14 21:41:42 2020
+++ src/sys/uvm/uvm_glue.c	Wed Oct  4 20:34:19 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_glue.c,v 1.181 2020/06/14 21:41:42 ad Exp $	*/
+/*	$NetBSD: uvm_glue.c,v 1.182 2023/10/04 20:34:19 ad Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_glue.c,v 1.181 2020/06/14 21:41:42 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_glue.c,v 1.182 2023/10/04 20:34:19 ad Exp $");
 
 #include "opt_kgdb.h"
 #include "opt_kstack.h"
@@ -529,6 +529,5 @@ uvm_idle(void)
 
 	KASSERT(kpreempt_disabled());
 
-	if (!ci->ci_want_resched)
-		uvmpdpol_idle(ucpu);
+	uvmpdpol_idle(ucpu);
 }



CVS commit: src/sys/uvm

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 20:34:19 UTC 2023

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

Log Message:
Remove unneeded test of ci->ci_want_resched.


To generate a diff of this commit:
cvs rdiff -u -r1.181 -r1.182 src/sys/uvm/uvm_glue.c

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



CVS commit: src/sys/sys

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 20:29:59 UTC 2023

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

Log Message:
NetBSD 10.99.10: struct lwp and related things changed.


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

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

Modified files:

Index: src/sys/sys/param.h
diff -u src/sys/sys/param.h:1.732 src/sys/sys/param.h:1.733
--- src/sys/sys/param.h:1.732	Sat Sep 23 18:49:16 2023
+++ src/sys/sys/param.h	Wed Oct  4 20:29:59 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.732 2023/09/23 18:49:16 ad Exp $	*/
+/*	$NetBSD: param.h,v 1.733 2023/10/04 20:29:59 ad Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -67,7 +67,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	1099000900	/* NetBSD 10.99.9 */
+#define	__NetBSD_Version__	1099001000	/* NetBSD 10.99.10 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) <= __NetBSD_Version__)



CVS commit: src/sys/sys

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 20:29:59 UTC 2023

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

Log Message:
NetBSD 10.99.10: struct lwp and related things changed.


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

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



CVS commit: src/sys

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 20:29:18 UTC 2023

Modified Files:
src/sys/kern: kern_condvar.c kern_exec.c kern_exit.c kern_sig.c
kern_sleepq.c kern_synch.c kern_timeout.c kern_turnstile.c
sys_lwp.c sys_select.c
src/sys/rump/librump/rumpkern: lwproc.c sleepq.c
src/sys/sys: lwp.h sleepq.h

Log Message:
Eliminate l->l_biglocks.  Originally I think it had a use but these days a
local variable will do.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/kern/kern_condvar.c
cvs rdiff -u -r1.518 -r1.519 src/sys/kern/kern_exec.c
cvs rdiff -u -r1.294 -r1.295 src/sys/kern/kern_exit.c
cvs rdiff -u -r1.405 -r1.406 src/sys/kern/kern_sig.c
cvs rdiff -u -r1.76 -r1.77 src/sys/kern/kern_sleepq.c
cvs rdiff -u -r1.361 -r1.362 src/sys/kern/kern_synch.c
cvs rdiff -u -r1.77 -r1.78 src/sys/kern/kern_timeout.c
cvs rdiff -u -r1.50 -r1.51 src/sys/kern/kern_turnstile.c
cvs rdiff -u -r1.85 -r1.86 src/sys/kern/sys_lwp.c
cvs rdiff -u -r1.62 -r1.63 src/sys/kern/sys_select.c
cvs rdiff -u -r1.55 -r1.56 src/sys/rump/librump/rumpkern/lwproc.c
cvs rdiff -u -r1.24 -r1.25 src/sys/rump/librump/rumpkern/sleepq.c
cvs rdiff -u -r1.225 -r1.226 src/sys/sys/lwp.h
cvs rdiff -u -r1.38 -r1.39 src/sys/sys/sleepq.h

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



CVS commit: src/sys

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 20:29:18 UTC 2023

Modified Files:
src/sys/kern: kern_condvar.c kern_exec.c kern_exit.c kern_sig.c
kern_sleepq.c kern_synch.c kern_timeout.c kern_turnstile.c
sys_lwp.c sys_select.c
src/sys/rump/librump/rumpkern: lwproc.c sleepq.c
src/sys/sys: lwp.h sleepq.h

Log Message:
Eliminate l->l_biglocks.  Originally I think it had a use but these days a
local variable will do.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/kern/kern_condvar.c
cvs rdiff -u -r1.518 -r1.519 src/sys/kern/kern_exec.c
cvs rdiff -u -r1.294 -r1.295 src/sys/kern/kern_exit.c
cvs rdiff -u -r1.405 -r1.406 src/sys/kern/kern_sig.c
cvs rdiff -u -r1.76 -r1.77 src/sys/kern/kern_sleepq.c
cvs rdiff -u -r1.361 -r1.362 src/sys/kern/kern_synch.c
cvs rdiff -u -r1.77 -r1.78 src/sys/kern/kern_timeout.c
cvs rdiff -u -r1.50 -r1.51 src/sys/kern/kern_turnstile.c
cvs rdiff -u -r1.85 -r1.86 src/sys/kern/sys_lwp.c
cvs rdiff -u -r1.62 -r1.63 src/sys/kern/sys_select.c
cvs rdiff -u -r1.55 -r1.56 src/sys/rump/librump/rumpkern/lwproc.c
cvs rdiff -u -r1.24 -r1.25 src/sys/rump/librump/rumpkern/sleepq.c
cvs rdiff -u -r1.225 -r1.226 src/sys/sys/lwp.h
cvs rdiff -u -r1.38 -r1.39 src/sys/sys/sleepq.h

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

Modified files:

Index: src/sys/kern/kern_condvar.c
diff -u src/sys/kern/kern_condvar.c:1.56 src/sys/kern/kern_condvar.c:1.57
--- src/sys/kern/kern_condvar.c:1.56	Sat Sep 23 18:48:04 2023
+++ src/sys/kern/kern_condvar.c	Wed Oct  4 20:29:18 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_condvar.c,v 1.56 2023/09/23 18:48:04 ad Exp $	*/
+/*	$NetBSD: kern_condvar.c,v 1.57 2023/10/04 20:29:18 ad Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008, 2019, 2020, 2023
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_condvar.c,v 1.56 2023/09/23 18:48:04 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_condvar.c,v 1.57 2023/10/04 20:29:18 ad Exp $");
 
 #include 
 #include 
@@ -119,11 +119,12 @@ cv_destroy(kcondvar_t *cv)
  *	Look up and lock the sleep queue corresponding to the given
  *	condition variable, and increment the number of waiters.
  */
-static inline void
+static inline int
 cv_enter(kcondvar_t *cv, kmutex_t *mtx, lwp_t *l, bool catch_p)
 {
 	sleepq_t *sq;
 	kmutex_t *mp;
+	int nlocks;
 
 	KASSERT(cv_is_valid(cv));
 	KASSERT(!cpu_intr_p());
@@ -131,10 +132,11 @@ cv_enter(kcondvar_t *cv, kmutex_t *mtx, 
 
 	mp = sleepq_hashlock(cv);
 	sq = CV_SLEEPQ(cv);
-	sleepq_enter(sq, l, mp);
+	nlocks = sleepq_enter(sq, l, mp);
 	sleepq_enqueue(sq, cv, CV_WMESG(cv), _syncobj, catch_p);
 	mutex_exit(mtx);
 	KASSERT(cv_has_waiters(cv));
+	return nlocks;
 }
 
 /*
@@ -169,11 +171,12 @@ void
 cv_wait(kcondvar_t *cv, kmutex_t *mtx)
 {
 	lwp_t *l = curlwp;
+	int nlocks;
 
 	KASSERT(mutex_owned(mtx));
 
-	cv_enter(cv, mtx, l, false);
-	(void)sleepq_block(0, false, _syncobj);
+	nlocks = cv_enter(cv, mtx, l, false);
+	(void)sleepq_block(0, false, _syncobj, nlocks);
 	mutex_enter(mtx);
 }
 
@@ -189,12 +192,12 @@ int
 cv_wait_sig(kcondvar_t *cv, kmutex_t *mtx)
 {
 	lwp_t *l = curlwp;
-	int error;
+	int error, nlocks;
 
 	KASSERT(mutex_owned(mtx));
 
-	cv_enter(cv, mtx, l, true);
-	error = sleepq_block(0, true, _syncobj);
+	nlocks = cv_enter(cv, mtx, l, true);
+	error = sleepq_block(0, true, _syncobj, nlocks);
 	mutex_enter(mtx);
 	return error;
 }
@@ -212,12 +215,12 @@ int
 cv_timedwait(kcondvar_t *cv, kmutex_t *mtx, int timo)
 {
 	lwp_t *l = curlwp;
-	int error;
+	int error, nlocks;
 
 	KASSERT(mutex_owned(mtx));
 
-	cv_enter(cv, mtx, l, false);
-	error = sleepq_block(timo, false, _syncobj);
+	nlocks = cv_enter(cv, mtx, l, false);
+	error = sleepq_block(timo, false, _syncobj, nlocks);
 	mutex_enter(mtx);
 	return error;
 }
@@ -237,12 +240,12 @@ int
 cv_timedwait_sig(kcondvar_t *cv, kmutex_t *mtx, int timo)
 {
 	lwp_t *l = curlwp;
-	int error;
+	int error, nlocks;
 
 	KASSERT(mutex_owned(mtx));
 
-	cv_enter(cv, mtx, l, true);
-	error = sleepq_block(timo, true, _syncobj);
+	nlocks = cv_enter(cv, mtx, l, true);
+	error = sleepq_block(timo, true, _syncobj, nlocks);
 	mutex_enter(mtx);
 	return error;
 }

Index: src/sys/kern/kern_exec.c
diff -u src/sys/kern/kern_exec.c:1.518 src/sys/kern/kern_exec.c:1.519
--- src/sys/kern/kern_exec.c:1.518	Fri Jul  1 01:05:31 2022
+++ src/sys/kern/kern_exec.c	Wed Oct  4 20:29:18 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exec.c,v 1.518 2022/07/01 01:05:31 riastradh Exp $	*/
+/*	$NetBSD: kern_exec.c,v 1.519 2023/10/04 20:29:18 ad Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2019, 2020 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.518 2022/07/01 01:05:31 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.519 2023/10/04 20:29:18 ad Exp $");
 
 #include "opt_exec.h"
 #include "opt_execfmt.h"
@@ -1408,7 +1408,7 @@ execve_runproc(struct lwp *l, struct 

CVS commit: src/sys

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 20:28:06 UTC 2023

Modified Files:
src/sys/arch/aarch64/aarch64: trap.c
src/sys/arch/amd64/amd64: cpufunc.S genassym.cf
src/sys/arch/arm/arm: arm_machdep.c
src/sys/arch/i386/i386: cpufunc.S genassym.cf
src/sys/arch/mips/mips: cpu_subr.c
src/sys/arch/sparc64/sparc64: machdep.c
src/sys/arch/usermode/dev: cpu.c
src/sys/arch/x86/include: pmap_private.h
src/sys/arch/x86/x86: pmap.c x86_machdep.c
src/sys/kern: kern_cctr.c kern_entropy.c kern_exit.c kern_lock.c
kern_lwp.c kern_proc.c kern_resource.c kern_synch.c
subr_pserialize.c
src/sys/rump/librump/rumpkern: lwproc.c scheduler.c
src/sys/sys: lwp.h

Log Message:
Eliminate l->l_ncsw and l->l_nivcsw.  From memory think they were added
before we had per-LWP struct rusage; the same is now tracked there.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/aarch64/aarch64/trap.c
cvs rdiff -u -r1.65 -r1.66 src/sys/arch/amd64/amd64/cpufunc.S
cvs rdiff -u -r1.96 -r1.97 src/sys/arch/amd64/amd64/genassym.cf
cvs rdiff -u -r1.67 -r1.68 src/sys/arch/arm/arm/arm_machdep.c
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/i386/i386/cpufunc.S
cvs rdiff -u -r1.134 -r1.135 src/sys/arch/i386/i386/genassym.cf
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/mips/mips/cpu_subr.c
cvs rdiff -u -r1.306 -r1.307 src/sys/arch/sparc64/sparc64/machdep.c
cvs rdiff -u -r1.83 -r1.84 src/sys/arch/usermode/dev/cpu.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/x86/include/pmap_private.h
cvs rdiff -u -r1.425 -r1.426 src/sys/arch/x86/x86/pmap.c
cvs rdiff -u -r1.153 -r1.154 src/sys/arch/x86/x86/x86_machdep.c
cvs rdiff -u -r1.12 -r1.13 src/sys/kern/kern_cctr.c
cvs rdiff -u -r1.65 -r1.66 src/sys/kern/kern_entropy.c
cvs rdiff -u -r1.293 -r1.294 src/sys/kern/kern_exit.c
cvs rdiff -u -r1.186 -r1.187 src/sys/kern/kern_lock.c
cvs rdiff -u -r1.257 -r1.258 src/sys/kern/kern_lwp.c
cvs rdiff -u -r1.271 -r1.272 src/sys/kern/kern_proc.c
cvs rdiff -u -r1.194 -r1.195 src/sys/kern/kern_resource.c
cvs rdiff -u -r1.360 -r1.361 src/sys/kern/kern_synch.c
cvs rdiff -u -r1.23 -r1.24 src/sys/kern/subr_pserialize.c
cvs rdiff -u -r1.54 -r1.55 src/sys/rump/librump/rumpkern/lwproc.c
cvs rdiff -u -r1.53 -r1.54 src/sys/rump/librump/rumpkern/scheduler.c
cvs rdiff -u -r1.224 -r1.225 src/sys/sys/lwp.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/arch/aarch64/aarch64/trap.c
diff -u src/sys/arch/aarch64/aarch64/trap.c:1.49 src/sys/arch/aarch64/aarch64/trap.c:1.50
--- src/sys/arch/aarch64/aarch64/trap.c:1.49	Sun Jul 16 21:36:40 2023
+++ src/sys/arch/aarch64/aarch64/trap.c	Wed Oct  4 20:28:05 2023
@@ -1,7 +1,7 @@
-/* $NetBSD: trap.c,v 1.49 2023/07/16 21:36:40 riastradh Exp $ */
+/* $NetBSD: trap.c,v 1.50 2023/10/04 20:28:05 ad Exp $ */
 
 /*-
- * Copyright (c) 2014 The NetBSD Foundation, Inc.
+ * Copyright (c) 2014, 2023 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
@@ -31,7 +31,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.49 2023/07/16 21:36:40 riastradh Exp $");
+__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.50 2023/10/04 20:28:05 ad Exp $");
 
 #include "opt_arm_intr_impl.h"
 #include "opt_compat_netbsd32.h"
@@ -1034,8 +1034,8 @@ do_trapsignal1(
 bool
 cpu_intr_p(void)
 {
-	uint64_t ncsw;
 	int idepth;
+	long pctr;
 	lwp_t *l;
 
 #ifdef __HAVE_PIC_FAST_SOFTINTS
@@ -1050,11 +1050,9 @@ cpu_intr_p(void)
 		return false;
 	}
 	do {
-		ncsw = l->l_ncsw;
-		__insn_barrier();
+		pctr = lwp_pctr();
 		idepth = l->l_cpu->ci_intr_depth;
-		__insn_barrier();
-	} while (__predict_false(ncsw != l->l_ncsw));
+	} while (__predict_false(pctr != lwp_pctr()));
 
 	return idepth > 0;
 }

Index: src/sys/arch/amd64/amd64/cpufunc.S
diff -u src/sys/arch/amd64/amd64/cpufunc.S:1.65 src/sys/arch/amd64/amd64/cpufunc.S:1.66
--- src/sys/arch/amd64/amd64/cpufunc.S:1.65	Mon Nov 30 17:02:27 2020
+++ src/sys/arch/amd64/amd64/cpufunc.S	Wed Oct  4 20:28:05 2023
@@ -1,7 +1,7 @@
-/*	$NetBSD: cpufunc.S,v 1.65 2020/11/30 17:02:27 bouyer Exp $	*/
+/*	$NetBSD: cpufunc.S,v 1.66 2023/10/04 20:28:05 ad Exp $	*/
 
 /*
- * Copyright (c) 1998, 2007, 2008, 2020 The NetBSD Foundation, Inc.
+ * Copyright (c) 1998, 2007, 2008, 2020, 2023 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
@@ -234,12 +234,13 @@ END(x86_hotpatch)
 #define CPU_COUNTER_FENCE(counter, fence)	\
 ENTRY(cpu_ ## counter ## _ ## fence)		;\
 	movq	CPUVAR(CURLWP), %rcx		;\
+	leaq	L_RU+RU_NIVCSW(%rcx), %rcx	;\
 1:		;\
-	movq	L_NCSW(%rcx), %rdi		;\
+	movq	(%rcx), %rdi			;\
 	SERIALIZE_ ## fence			;\
 	rdtsc	;\
 	ADD_ ## counter;\
-	cmpq	%rdi, L_NCSW(%rcx)		;\
+	cmpq	%rdi, (%rcx)			;\
 	jne	2f;\
 	KMSAN_INIT_RET(RSIZE_ ## counter)	;\
 	ret	

CVS commit: src/sys

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 20:28:06 UTC 2023

Modified Files:
src/sys/arch/aarch64/aarch64: trap.c
src/sys/arch/amd64/amd64: cpufunc.S genassym.cf
src/sys/arch/arm/arm: arm_machdep.c
src/sys/arch/i386/i386: cpufunc.S genassym.cf
src/sys/arch/mips/mips: cpu_subr.c
src/sys/arch/sparc64/sparc64: machdep.c
src/sys/arch/usermode/dev: cpu.c
src/sys/arch/x86/include: pmap_private.h
src/sys/arch/x86/x86: pmap.c x86_machdep.c
src/sys/kern: kern_cctr.c kern_entropy.c kern_exit.c kern_lock.c
kern_lwp.c kern_proc.c kern_resource.c kern_synch.c
subr_pserialize.c
src/sys/rump/librump/rumpkern: lwproc.c scheduler.c
src/sys/sys: lwp.h

Log Message:
Eliminate l->l_ncsw and l->l_nivcsw.  From memory think they were added
before we had per-LWP struct rusage; the same is now tracked there.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/aarch64/aarch64/trap.c
cvs rdiff -u -r1.65 -r1.66 src/sys/arch/amd64/amd64/cpufunc.S
cvs rdiff -u -r1.96 -r1.97 src/sys/arch/amd64/amd64/genassym.cf
cvs rdiff -u -r1.67 -r1.68 src/sys/arch/arm/arm/arm_machdep.c
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/i386/i386/cpufunc.S
cvs rdiff -u -r1.134 -r1.135 src/sys/arch/i386/i386/genassym.cf
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/mips/mips/cpu_subr.c
cvs rdiff -u -r1.306 -r1.307 src/sys/arch/sparc64/sparc64/machdep.c
cvs rdiff -u -r1.83 -r1.84 src/sys/arch/usermode/dev/cpu.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/x86/include/pmap_private.h
cvs rdiff -u -r1.425 -r1.426 src/sys/arch/x86/x86/pmap.c
cvs rdiff -u -r1.153 -r1.154 src/sys/arch/x86/x86/x86_machdep.c
cvs rdiff -u -r1.12 -r1.13 src/sys/kern/kern_cctr.c
cvs rdiff -u -r1.65 -r1.66 src/sys/kern/kern_entropy.c
cvs rdiff -u -r1.293 -r1.294 src/sys/kern/kern_exit.c
cvs rdiff -u -r1.186 -r1.187 src/sys/kern/kern_lock.c
cvs rdiff -u -r1.257 -r1.258 src/sys/kern/kern_lwp.c
cvs rdiff -u -r1.271 -r1.272 src/sys/kern/kern_proc.c
cvs rdiff -u -r1.194 -r1.195 src/sys/kern/kern_resource.c
cvs rdiff -u -r1.360 -r1.361 src/sys/kern/kern_synch.c
cvs rdiff -u -r1.23 -r1.24 src/sys/kern/subr_pserialize.c
cvs rdiff -u -r1.54 -r1.55 src/sys/rump/librump/rumpkern/lwproc.c
cvs rdiff -u -r1.53 -r1.54 src/sys/rump/librump/rumpkern/scheduler.c
cvs rdiff -u -r1.224 -r1.225 src/sys/sys/lwp.h

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

2023-10-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Oct  4 15:18:13 UTC 2023

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

Log Message:
Ticket #1908


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.200 -r1.1.2.201 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

2023-10-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Oct  4 15:18:13 UTC 2023

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

Log Message:
Ticket #1908


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.200 -r1.1.2.201 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.200 src/doc/CHANGES-8.3:1.1.2.201
--- src/doc/CHANGES-8.3:1.1.2.200	Tue Oct  3 10:15:31 2023
+++ src/doc/CHANGES-8.3	Wed Oct  4 15:18:13 2023
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES-8.3,v 1.1.2.200 2023/10/03 10:15:31 martin Exp $
+$NetBSD: CHANGES-8.3,v 1.1.2.201 2023/10/04 15:18:13 martin Exp $
 
 A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3
 release:
@@ -3939,3 +3939,19 @@ libexec/ftpd/version.h1.80
 	- fix pam_set_item call with proper struct passed as PAM_SOCKADDR
 	[lukem, ticket #1907]
 
+xsrc/external/mit/libXpm/dist/src/CrPFrBuf.c		(apply patch)
+xsrc/external/mit/libXpm/dist/src/CrPFrDat.c		(apply patch)
+xsrc/external/mit/libXpm/dist/src/CrPFrI.c		(apply patch)
+xsrc/external/mit/libXpm/dist/src/RdFToP.c		(apply patch)
+xsrc/external/mit/libXpm/dist/src/XpmI.h		(apply patch)
+xsrc/external/mit/libXpm/dist/src/create.c		(apply patch)
+xsrc/external/mit/libXpm/dist/src/data.c		(apply patch)
+xsrc/external/mit/libX11/dist/src/CrPixmap.c		(apply patch)
+xsrc/external/mit/libX11/dist/src/ImUtil.c		(apply patch)
+xsrc/external/mit/libX11/dist/src/PutImage.c		(apply patch)
+xsrc/external/mit/libX11/dist/src/xkb/XKBGetMap.c	(apply patch)
+
+	Backport of upstream libX11 and libXpm 2023-10 security updates,
+	fixing: CVE-2023-43785, CVE-2023-43786, CVE-2023-43787, CVE-2023-43788,
+	CVE-2023-43789
+	[mrg, ticket #1908]



CVS commit: [netbsd-8] xsrc/external/mit

2023-10-04 Thread Martin Husemann
Module Name:xsrc
Committed By:   martin
Date:   Wed Oct  4 15:17:13 UTC 2023

Modified Files:
xsrc/external/mit/libX11/dist/src [netbsd-8]: CrPixmap.c ImUtil.c
PutImage.c
xsrc/external/mit/libX11/dist/src/xkb [netbsd-8]: XKBGetMap.c
xsrc/external/mit/libXpm/dist/src [netbsd-8]: CrPFrBuf.c CrPFrDat.c
CrPFrI.c RdFToP.c XpmI.h create.c data.c

Log Message:
Apply patch, requested by mrg in ticket #1908:

xsrc/external/mit/libXpm/dist/src/CrPFrBuf.c(apply patch)
xsrc/external/mit/libXpm/dist/src/CrPFrDat.c(apply patch)
xsrc/external/mit/libXpm/dist/src/CrPFrI.c  (apply patch)
xsrc/external/mit/libXpm/dist/src/RdFToP.c  (apply patch)
xsrc/external/mit/libXpm/dist/src/XpmI.h(apply patch)
xsrc/external/mit/libXpm/dist/src/create.c  (apply patch)
xsrc/external/mit/libXpm/dist/src/data.c(apply patch)
xsrc/external/mit/libX11/dist/src/CrPixmap.c(apply patch)
xsrc/external/mit/libX11/dist/src/ImUtil.c  (apply patch)
xsrc/external/mit/libX11/dist/src/PutImage.c(apply patch)
xsrc/external/mit/libX11/dist/src/xkb/XKBGetMap.c   (apply patch)

Backport of upstream libX11 and libXpm 2023-10 security updates,
fixing: CVE-2023-43785, CVE-2023-43786, CVE-2023-43787, CVE-2023-43788,
CVE-2023-43789


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.1.1.2.16.1 \
xsrc/external/mit/libX11/dist/src/CrPixmap.c
cvs rdiff -u -r1.1.1.8 -r1.1.1.8.2.1 \
xsrc/external/mit/libX11/dist/src/ImUtil.c
cvs rdiff -u -r1.1.1.7.2.1 -r1.1.1.7.2.2 \
xsrc/external/mit/libX11/dist/src/PutImage.c
cvs rdiff -u -r1.1.1.6.8.1 -r1.1.1.6.8.2 \
xsrc/external/mit/libX11/dist/src/xkb/XKBGetMap.c
cvs rdiff -u -r1.1.1.2 -r1.1.1.2.16.1 \
xsrc/external/mit/libXpm/dist/src/CrPFrBuf.c \
xsrc/external/mit/libXpm/dist/src/CrPFrDat.c \
xsrc/external/mit/libXpm/dist/src/CrPFrI.c
cvs rdiff -u -r1.1.1.3 -r1.1.1.3.8.1 \
xsrc/external/mit/libXpm/dist/src/RdFToP.c
cvs rdiff -u -r1.1.1.3 -r1.1.1.3.10.1 \
xsrc/external/mit/libXpm/dist/src/XpmI.h
cvs rdiff -u -r1.3.2.1 -r1.3.2.2 xsrc/external/mit/libXpm/dist/src/create.c
cvs rdiff -u -r1.1.1.4.10.1 -r1.1.1.4.10.2 \
xsrc/external/mit/libXpm/dist/src/data.c

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

Modified files:

Index: xsrc/external/mit/libX11/dist/src/CrPixmap.c
diff -u xsrc/external/mit/libX11/dist/src/CrPixmap.c:1.1.1.2 xsrc/external/mit/libX11/dist/src/CrPixmap.c:1.1.1.2.16.1
--- xsrc/external/mit/libX11/dist/src/CrPixmap.c:1.1.1.2	Sat May 22 01:22:12 2010
+++ xsrc/external/mit/libX11/dist/src/CrPixmap.c	Wed Oct  4 15:17:12 2023
@@ -28,6 +28,7 @@ in this Software without prior written a
 #include 
 #endif
 #include "Xlibint.h"
+#include 
 
 #ifdef USE_DYNAMIC_XCURSOR
 void
@@ -47,6 +48,16 @@ Pixmap XCreatePixmap (
 Pixmap pid;
 register xCreatePixmapReq *req;
 
+/*
+ * Force a BadValue X Error if the requested dimensions are larger
+ * than the X11 protocol has room for, since that's how callers expect
+ * to get notified of errors.
+ */
+if (width > USHRT_MAX)
+width = 0;
+if (height > USHRT_MAX)
+height = 0;
+
 LockDisplay(dpy);
 GetReq(CreatePixmap, req);
 req->drawable = d;

Index: xsrc/external/mit/libX11/dist/src/ImUtil.c
diff -u xsrc/external/mit/libX11/dist/src/ImUtil.c:1.1.1.8 xsrc/external/mit/libX11/dist/src/ImUtil.c:1.1.1.8.2.1
--- xsrc/external/mit/libX11/dist/src/ImUtil.c:1.1.1.8	Sun Jul 19 08:08:36 2015
+++ xsrc/external/mit/libX11/dist/src/ImUtil.c	Wed Oct  4 15:17:12 2023
@@ -30,6 +30,7 @@ in this Software without prior written a
 #include 
 #include 
 #include 
+#include 
 #include "ImUtil.h"
 
 static int _XDestroyImage(XImage *);
@@ -361,13 +362,22 @@ XImage *XCreateImage (
 	/*
 	 * compute per line accelerator.
 	 */
-	{
-	if (format == ZPixmap)
+	if (format == ZPixmap) {
+	if ((INT_MAX / bits_per_pixel) < width) {
+		Xfree(image);
+		return NULL;
+	}
+
 	min_bytes_per_line =
-	   ROUNDUP((bits_per_pixel * width), image->bitmap_pad);
-	else
+		ROUNDUP((bits_per_pixel * width), image->bitmap_pad);
+	} else {
+	if ((INT_MAX - offset) < width) {
+		Xfree(image);
+		return NULL;
+	}
+
 	min_bytes_per_line =
-	ROUNDUP((width + offset), image->bitmap_pad);
+		ROUNDUP((width + offset), image->bitmap_pad);
 	}
 	if (image_bytes_per_line == 0) {
 	image->bytes_per_line = min_bytes_per_line;

Index: xsrc/external/mit/libX11/dist/src/PutImage.c
diff -u xsrc/external/mit/libX11/dist/src/PutImage.c:1.1.1.7.2.1 xsrc/external/mit/libX11/dist/src/PutImage.c:1.1.1.7.2.2
--- xsrc/external/mit/libX11/dist/src/PutImage.c:1.1.1.7.2.1	Wed Aug  5 14:10:19 2020
+++ xsrc/external/mit/libX11/dist/src/PutImage.c	Wed Oct  4 

CVS commit: [netbsd-8] xsrc/external/mit

2023-10-04 Thread Martin Husemann
Module Name:xsrc
Committed By:   martin
Date:   Wed Oct  4 15:17:13 UTC 2023

Modified Files:
xsrc/external/mit/libX11/dist/src [netbsd-8]: CrPixmap.c ImUtil.c
PutImage.c
xsrc/external/mit/libX11/dist/src/xkb [netbsd-8]: XKBGetMap.c
xsrc/external/mit/libXpm/dist/src [netbsd-8]: CrPFrBuf.c CrPFrDat.c
CrPFrI.c RdFToP.c XpmI.h create.c data.c

Log Message:
Apply patch, requested by mrg in ticket #1908:

xsrc/external/mit/libXpm/dist/src/CrPFrBuf.c(apply patch)
xsrc/external/mit/libXpm/dist/src/CrPFrDat.c(apply patch)
xsrc/external/mit/libXpm/dist/src/CrPFrI.c  (apply patch)
xsrc/external/mit/libXpm/dist/src/RdFToP.c  (apply patch)
xsrc/external/mit/libXpm/dist/src/XpmI.h(apply patch)
xsrc/external/mit/libXpm/dist/src/create.c  (apply patch)
xsrc/external/mit/libXpm/dist/src/data.c(apply patch)
xsrc/external/mit/libX11/dist/src/CrPixmap.c(apply patch)
xsrc/external/mit/libX11/dist/src/ImUtil.c  (apply patch)
xsrc/external/mit/libX11/dist/src/PutImage.c(apply patch)
xsrc/external/mit/libX11/dist/src/xkb/XKBGetMap.c   (apply patch)

Backport of upstream libX11 and libXpm 2023-10 security updates,
fixing: CVE-2023-43785, CVE-2023-43786, CVE-2023-43787, CVE-2023-43788,
CVE-2023-43789


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.1.1.2.16.1 \
xsrc/external/mit/libX11/dist/src/CrPixmap.c
cvs rdiff -u -r1.1.1.8 -r1.1.1.8.2.1 \
xsrc/external/mit/libX11/dist/src/ImUtil.c
cvs rdiff -u -r1.1.1.7.2.1 -r1.1.1.7.2.2 \
xsrc/external/mit/libX11/dist/src/PutImage.c
cvs rdiff -u -r1.1.1.6.8.1 -r1.1.1.6.8.2 \
xsrc/external/mit/libX11/dist/src/xkb/XKBGetMap.c
cvs rdiff -u -r1.1.1.2 -r1.1.1.2.16.1 \
xsrc/external/mit/libXpm/dist/src/CrPFrBuf.c \
xsrc/external/mit/libXpm/dist/src/CrPFrDat.c \
xsrc/external/mit/libXpm/dist/src/CrPFrI.c
cvs rdiff -u -r1.1.1.3 -r1.1.1.3.8.1 \
xsrc/external/mit/libXpm/dist/src/RdFToP.c
cvs rdiff -u -r1.1.1.3 -r1.1.1.3.10.1 \
xsrc/external/mit/libXpm/dist/src/XpmI.h
cvs rdiff -u -r1.3.2.1 -r1.3.2.2 xsrc/external/mit/libXpm/dist/src/create.c
cvs rdiff -u -r1.1.1.4.10.1 -r1.1.1.4.10.2 \
xsrc/external/mit/libXpm/dist/src/data.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

2023-10-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Oct  4 15:14:00 UTC 2023

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

Log Message:
Ticket #1744


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.104 -r1.1.2.105 src/doc/CHANGES-9.4

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

Modified files:

Index: src/doc/CHANGES-9.4
diff -u src/doc/CHANGES-9.4:1.1.2.104 src/doc/CHANGES-9.4:1.1.2.105
--- src/doc/CHANGES-9.4:1.1.2.104	Mon Oct  2 17:40:28 2023
+++ src/doc/CHANGES-9.4	Wed Oct  4 15:14:00 2023
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.104 2023/10/02 17:40:28 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.105 2023/10/04 15:14:00 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -2197,3 +2197,19 @@ libexec/ftpd/version.h1.80
 	- fix pam_set_item call with proper struct passed as PAM_SOCKADDR
 	[lukem, ticket #1743]
 
+xsrc/external/mit/libXpm/dist/src/CrPFrBuf.c		(apply patch)
+xsrc/external/mit/libXpm/dist/src/CrPFrDat.c		(apply patch)
+xsrc/external/mit/libXpm/dist/src/CrPFrI.c		(apply patch)
+xsrc/external/mit/libXpm/dist/src/RdFToP.c		(apply patch)
+xsrc/external/mit/libXpm/dist/src/XpmI.h		(apply patch)
+xsrc/external/mit/libXpm/dist/src/create.c		(apply patch)
+xsrc/external/mit/libXpm/dist/src/data.c		(apply patch)
+xsrc/external/mit/libX11/dist/src/CrPixmap.c		(apply patch)
+xsrc/external/mit/libX11/dist/src/ImUtil.c		(apply patch)
+xsrc/external/mit/libX11/dist/src/PutImage.c		(apply patch)
+xsrc/external/mit/libX11/dist/src/xkb/XKBGetMap.c	(apply patch)
+
+	Backport of upstream libX11 and libXpm 2023-10 security updates,
+	fixing: CVE-2023-43785, CVE-2023-43786, CVE-2023-43787, CVE-2023-43788,
+	CVE-2023-43789
+	[mrg, ticket #1744]



CVS commit: [netbsd-9] src/doc

2023-10-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Oct  4 15:14:00 UTC 2023

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

Log Message:
Ticket #1744


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.104 -r1.1.2.105 src/doc/CHANGES-9.4

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



CVS commit: [netbsd-9] xsrc/external/mit

2023-10-04 Thread Martin Husemann
Module Name:xsrc
Committed By:   martin
Date:   Wed Oct  4 15:12:26 UTC 2023

Modified Files:
xsrc/external/mit/libX11/dist/src [netbsd-9]: CrPixmap.c ImUtil.c
PutImage.c
xsrc/external/mit/libX11/dist/src/xkb [netbsd-9]: XKBGetMap.c
xsrc/external/mit/libXpm/dist/src [netbsd-9]: CrPFrBuf.c CrPFrDat.c
CrPFrI.c RdFToP.c XpmI.h create.c data.c

Log Message:
Apply patch, requested by mrg in ticket #1744:

xsrc/external/mit/libXpm/dist/src/CrPFrBuf.c(apply patch)
xsrc/external/mit/libXpm/dist/src/CrPFrDat.c(apply patch)
xsrc/external/mit/libXpm/dist/src/CrPFrI.c  (apply patch)
xsrc/external/mit/libXpm/dist/src/RdFToP.c  (apply patch)
xsrc/external/mit/libXpm/dist/src/XpmI.h(apply patch)
xsrc/external/mit/libXpm/dist/src/create.c  (apply patch)
xsrc/external/mit/libXpm/dist/src/data.c(apply patch)
xsrc/external/mit/libX11/dist/src/CrPixmap.c(apply patch)
xsrc/external/mit/libX11/dist/src/ImUtil.c  (apply patch)
xsrc/external/mit/libX11/dist/src/PutImage.c(apply patch)
xsrc/external/mit/libX11/dist/src/xkb/XKBGetMap.c   (apply patch)

Backport of upstream libX11 and libXpm 2023-10 security updates,
fixing: CVE-2023-43785, CVE-2023-43786, CVE-2023-43787, CVE-2023-43788,
CVE-2023-43789


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.1.1.2.18.1 \
xsrc/external/mit/libX11/dist/src/CrPixmap.c
cvs rdiff -u -r1.1.1.8 -r1.1.1.8.4.1 \
xsrc/external/mit/libX11/dist/src/ImUtil.c
cvs rdiff -u -r1.1.1.8 -r1.1.1.8.2.1 \
xsrc/external/mit/libX11/dist/src/PutImage.c
cvs rdiff -u -r1.1.1.7 -r1.1.1.7.2.1 \
xsrc/external/mit/libX11/dist/src/xkb/XKBGetMap.c
cvs rdiff -u -r1.1.1.2 -r1.1.1.2.18.1 \
xsrc/external/mit/libXpm/dist/src/CrPFrBuf.c \
xsrc/external/mit/libXpm/dist/src/CrPFrDat.c \
xsrc/external/mit/libXpm/dist/src/CrPFrI.c
cvs rdiff -u -r1.1.1.3 -r1.1.1.3.10.1 \
xsrc/external/mit/libXpm/dist/src/RdFToP.c
cvs rdiff -u -r1.1.1.3 -r1.1.1.3.12.1 \
xsrc/external/mit/libXpm/dist/src/XpmI.h
cvs rdiff -u -r1.3.4.1 -r1.3.4.2 xsrc/external/mit/libXpm/dist/src/create.c
cvs rdiff -u -r1.1.1.4.12.1 -r1.1.1.4.12.2 \
xsrc/external/mit/libXpm/dist/src/data.c

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

Modified files:

Index: xsrc/external/mit/libX11/dist/src/CrPixmap.c
diff -u xsrc/external/mit/libX11/dist/src/CrPixmap.c:1.1.1.2 xsrc/external/mit/libX11/dist/src/CrPixmap.c:1.1.1.2.18.1
--- xsrc/external/mit/libX11/dist/src/CrPixmap.c:1.1.1.2	Sat May 22 01:22:12 2010
+++ xsrc/external/mit/libX11/dist/src/CrPixmap.c	Wed Oct  4 15:12:26 2023
@@ -28,6 +28,7 @@ in this Software without prior written a
 #include 
 #endif
 #include "Xlibint.h"
+#include 
 
 #ifdef USE_DYNAMIC_XCURSOR
 void
@@ -47,6 +48,16 @@ Pixmap XCreatePixmap (
 Pixmap pid;
 register xCreatePixmapReq *req;
 
+/*
+ * Force a BadValue X Error if the requested dimensions are larger
+ * than the X11 protocol has room for, since that's how callers expect
+ * to get notified of errors.
+ */
+if (width > USHRT_MAX)
+width = 0;
+if (height > USHRT_MAX)
+height = 0;
+
 LockDisplay(dpy);
 GetReq(CreatePixmap, req);
 req->drawable = d;

Index: xsrc/external/mit/libX11/dist/src/ImUtil.c
diff -u xsrc/external/mit/libX11/dist/src/ImUtil.c:1.1.1.8 xsrc/external/mit/libX11/dist/src/ImUtil.c:1.1.1.8.4.1
--- xsrc/external/mit/libX11/dist/src/ImUtil.c:1.1.1.8	Sun Jul 19 08:08:36 2015
+++ xsrc/external/mit/libX11/dist/src/ImUtil.c	Wed Oct  4 15:12:26 2023
@@ -30,6 +30,7 @@ in this Software without prior written a
 #include 
 #include 
 #include 
+#include 
 #include "ImUtil.h"
 
 static int _XDestroyImage(XImage *);
@@ -361,13 +362,22 @@ XImage *XCreateImage (
 	/*
 	 * compute per line accelerator.
 	 */
-	{
-	if (format == ZPixmap)
+	if (format == ZPixmap) {
+	if ((INT_MAX / bits_per_pixel) < width) {
+		Xfree(image);
+		return NULL;
+	}
+
 	min_bytes_per_line =
-	   ROUNDUP((bits_per_pixel * width), image->bitmap_pad);
-	else
+		ROUNDUP((bits_per_pixel * width), image->bitmap_pad);
+	} else {
+	if ((INT_MAX - offset) < width) {
+		Xfree(image);
+		return NULL;
+	}
+
 	min_bytes_per_line =
-	ROUNDUP((width + offset), image->bitmap_pad);
+		ROUNDUP((width + offset), image->bitmap_pad);
 	}
 	if (image_bytes_per_line == 0) {
 	image->bytes_per_line = min_bytes_per_line;

Index: xsrc/external/mit/libX11/dist/src/PutImage.c
diff -u xsrc/external/mit/libX11/dist/src/PutImage.c:1.1.1.8 xsrc/external/mit/libX11/dist/src/PutImage.c:1.1.1.8.2.1
--- xsrc/external/mit/libX11/dist/src/PutImage.c:1.1.1.8	Mon Jul  8 22:58:27 2019
+++ xsrc/external/mit/libX11/dist/src/PutImage.c	Wed Oct  4 15:12:26 2023
@@ 

CVS commit: [netbsd-9] xsrc/external/mit

2023-10-04 Thread Martin Husemann
Module Name:xsrc
Committed By:   martin
Date:   Wed Oct  4 15:12:26 UTC 2023

Modified Files:
xsrc/external/mit/libX11/dist/src [netbsd-9]: CrPixmap.c ImUtil.c
PutImage.c
xsrc/external/mit/libX11/dist/src/xkb [netbsd-9]: XKBGetMap.c
xsrc/external/mit/libXpm/dist/src [netbsd-9]: CrPFrBuf.c CrPFrDat.c
CrPFrI.c RdFToP.c XpmI.h create.c data.c

Log Message:
Apply patch, requested by mrg in ticket #1744:

xsrc/external/mit/libXpm/dist/src/CrPFrBuf.c(apply patch)
xsrc/external/mit/libXpm/dist/src/CrPFrDat.c(apply patch)
xsrc/external/mit/libXpm/dist/src/CrPFrI.c  (apply patch)
xsrc/external/mit/libXpm/dist/src/RdFToP.c  (apply patch)
xsrc/external/mit/libXpm/dist/src/XpmI.h(apply patch)
xsrc/external/mit/libXpm/dist/src/create.c  (apply patch)
xsrc/external/mit/libXpm/dist/src/data.c(apply patch)
xsrc/external/mit/libX11/dist/src/CrPixmap.c(apply patch)
xsrc/external/mit/libX11/dist/src/ImUtil.c  (apply patch)
xsrc/external/mit/libX11/dist/src/PutImage.c(apply patch)
xsrc/external/mit/libX11/dist/src/xkb/XKBGetMap.c   (apply patch)

Backport of upstream libX11 and libXpm 2023-10 security updates,
fixing: CVE-2023-43785, CVE-2023-43786, CVE-2023-43787, CVE-2023-43788,
CVE-2023-43789


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.1.1.2.18.1 \
xsrc/external/mit/libX11/dist/src/CrPixmap.c
cvs rdiff -u -r1.1.1.8 -r1.1.1.8.4.1 \
xsrc/external/mit/libX11/dist/src/ImUtil.c
cvs rdiff -u -r1.1.1.8 -r1.1.1.8.2.1 \
xsrc/external/mit/libX11/dist/src/PutImage.c
cvs rdiff -u -r1.1.1.7 -r1.1.1.7.2.1 \
xsrc/external/mit/libX11/dist/src/xkb/XKBGetMap.c
cvs rdiff -u -r1.1.1.2 -r1.1.1.2.18.1 \
xsrc/external/mit/libXpm/dist/src/CrPFrBuf.c \
xsrc/external/mit/libXpm/dist/src/CrPFrDat.c \
xsrc/external/mit/libXpm/dist/src/CrPFrI.c
cvs rdiff -u -r1.1.1.3 -r1.1.1.3.10.1 \
xsrc/external/mit/libXpm/dist/src/RdFToP.c
cvs rdiff -u -r1.1.1.3 -r1.1.1.3.12.1 \
xsrc/external/mit/libXpm/dist/src/XpmI.h
cvs rdiff -u -r1.3.4.1 -r1.3.4.2 xsrc/external/mit/libXpm/dist/src/create.c
cvs rdiff -u -r1.1.1.4.12.1 -r1.1.1.4.12.2 \
xsrc/external/mit/libXpm/dist/src/data.c

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



CVS commit: [netbsd-10] src/doc

2023-10-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Oct  4 12:31:49 UTC 2023

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

Log Message:
Ticket #392


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

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

Modified files:

Index: src/doc/CHANGES-10.0
diff -u src/doc/CHANGES-10.0:1.1.2.127 src/doc/CHANGES-10.0:1.1.2.128
--- src/doc/CHANGES-10.0:1.1.2.127	Mon Oct  2 17:39:38 2023
+++ src/doc/CHANGES-10.0	Wed Oct  4 12:31:48 2023
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-10.0,v 1.1.2.127 2023/10/02 17:39:38 martin Exp $
+# $NetBSD: CHANGES-10.0,v 1.1.2.128 2023/10/04 12:31:48 martin Exp $
 
 A complete list of changes from the initial NetBSD 10.0 branch on 2022-12-16
 until the 10.0 release:
@@ -12042,3 +12042,99 @@ external/bsd/jemalloc/lib/jemalloc_stub.
 	libjemalloc: Compile in empty jemalloc_stub.c for HAVE_JEMALLOC=100.
 	[rin, ticket #391]
 
+xsrc/external/mit/libX11/dist/man/xkb/XkbKeyKeyTypeIndex.man up to 1.1.1.1
+xsrc/external/mit/libX11/dist/man/xkb/XkbKeyKeyType.man up to 1.1.1.1
+xsrc/external/mit/libX11/dist/man/xkb/XkbActionSetCtrls.man up to 1.1.1.1
+xsrc/external/mit/libX11/dist/man/xkb/XkbAllocDeviceLedInfo.man delete
+xsrc/external/mit/libX11/dist/man/xkb/XkbChangeIndicators.man delete
+xsrc/external/mit/libX11/dist/man/xkb/XkbGetAccessXTimeout.man delete
+xsrc/external/mit/libX11/dist/man/xkb/XkbGetBounceKeysDelay.man delete
+xsrc/external/mit/libX11/dist/man/xkb/XkbGetIndicatorChanges.man delete
+xsrc/external/mit/libX11/dist/man/xkb/XkbGetNameChanges.man delete
+xsrc/external/mit/libX11/dist/man/xkb/XkbGetSlowKeysDelay.man delete
+xsrc/external/mit/libX11/dist/man/xkb/XkbGetStickyKeysOptions.man delete
+xsrc/external/mit/libX11/dist/man/xkb/XkbKeySymsOffset.man delete
+xsrc/external/mit/libX11/dist/man/xkb/XkbKeyType.man delete
+xsrc/external/mit/libX11/dist/man/xkb/XkbKeyTypeIndex.man delete
+xsrc/external/mit/libX11/dist/man/xkb/XkbNoteIndicatorChanges.man delete
+xsrc/external/mit/libX11/dist/man/xkb/XkbSAActionSetCtrls.man delete
+xsrc/external/mit/libX11/dist/man/xkb/XkbSetAccessXTimeout.man delete
+xsrc/external/mit/libX11/dist/man/xkb/XkbSetBounceKeysDelay.man delete
+xsrc/external/mit/libX11/dist/ChangeLog  up to 1.6
+xsrc/external/mit/libX11/dist/README.md  up to 1.5
+xsrc/external/mit/libX11/dist/configure  up to 1.6
+xsrc/external/mit/libX11/dist/configure.ac   up to 1.6
+xsrc/external/mit/libX11/dist/include/X11/Xutil.hup to 1.1.1.6
+xsrc/external/mit/libX11/dist/man/xkb/Makefile.amup to 1.1.1.7
+xsrc/external/mit/libX11/dist/man/xkb/Makefile.inup to 1.1.1.27
+xsrc/external/mit/libX11/dist/man/xkb/XkbAllocDeviceInfo.man up to 1.1.1.6
+xsrc/external/mit/libX11/dist/man/xkb/XkbChangeControls.man up to 1.1.1.7
+xsrc/external/mit/libX11/dist/man/xkb/XkbGetKeyTypes.man up to 1.1.1.5
+xsrc/external/mit/libX11/dist/nls/am_ET.UTF-8/Compose.pre up to 1.1.1.5
+xsrc/external/mit/libX11/dist/nls/en_US.UTF-8/Compose.pre up to 1.13
+xsrc/external/mit/libX11/dist/specs/XKB/ch08.xml up to 1.1.1.5
+xsrc/external/mit/libX11/dist/specs/XKB/ch10.xml up to 1.1.1.4
+xsrc/external/mit/libX11/dist/specs/XKB/ch15.xml up to 1.1.1.4
+xsrc/external/mit/libX11/dist/specs/XKB/ch16.xml up to 1.1.1.4
+xsrc/external/mit/libX11/dist/specs/XKB/ch18.xml up to 1.1.1.4
+xsrc/external/mit/libX11/dist/specs/XKB/ch21.xml up to 1.1.1.4
+xsrc/external/mit/libX11/dist/src/CrPixmap.c up to 1.1.1.3
+xsrc/external/mit/libX11/dist/src/ImUtil.c   up to 1.1.1.10
+xsrc/external/mit/libX11/dist/src/OpenDis.c  up to 1.4
+xsrc/external/mit/libX11/dist/src/PutImage.c up to 1.1.1.10
+xsrc/external/mit/libX11/dist/src/xkb/XKBGetMap.cup to 1.1.1.8
+xsrc/external/mit/libXpm/dist/test/rgb.txt   up to 1.1.1.1
+xsrc/external/mit/libXpm/dist/test/rgb.c up to 1.1.1.2
+xsrc/external/mit/libXpm/dist/ChangeLog  up to 1.1.1.11
+xsrc/external/mit/libXpm/dist/Makefile.inup to 1.1.1.10
+xsrc/external/mit/libXpm/dist/aclocal.m4 up to 1.1.1.11
+xsrc/external/mit/libXpm/dist/compileup to 1.1.1.5
+xsrc/external/mit/libXpm/dist/config.guess   up to 1.1.1.9
+xsrc/external/mit/libXpm/dist/config.h.inup to 1.1.1.8
+xsrc/external/mit/libXpm/dist/config.sub up to 1.1.1.10
+xsrc/external/mit/libXpm/dist/configure  up to 1.1.1.11
+xsrc/external/mit/libXpm/dist/configure.ac   up to 1.1.1.11
+xsrc/external/mit/libXpm/dist/depcompup to 1.1.1.7
+xsrc/external/mit/libXpm/dist/install-sh up to 1.1.1.7
+xsrc/external/mit/libXpm/dist/ltmain.sh  up to 1.1.1.11
+xsrc/external/mit/libXpm/dist/missingup to 1.1.1.8
+xsrc/external/mit/libXpm/dist/tap-driver.sh  up to 1.1.1.2

CVS commit: [netbsd-10] src/doc

2023-10-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Oct  4 12:31:49 UTC 2023

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

Log Message:
Ticket #392


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

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



CVS commit: [netbsd-10] xsrc/external/mit

2023-10-04 Thread Martin Husemann
Module Name:xsrc
Committed By:   martin
Date:   Wed Oct  4 12:29:56 UTC 2023

Modified Files:
xsrc/external/mit/libX11/dist [netbsd-10]: ChangeLog README.md
configure configure.ac
xsrc/external/mit/libX11/dist/include/X11 [netbsd-10]: Xutil.h
xsrc/external/mit/libX11/dist/man/xkb [netbsd-10]: Makefile.am
Makefile.in XkbAllocDeviceInfo.man XkbChangeControls.man
XkbGetKeyTypes.man
xsrc/external/mit/libX11/dist/nls/am_ET.UTF-8 [netbsd-10]: Compose.pre
xsrc/external/mit/libX11/dist/nls/en_US.UTF-8 [netbsd-10]: Compose.pre
xsrc/external/mit/libX11/dist/specs/XKB [netbsd-10]: ch08.xml ch10.xml
ch15.xml ch16.xml ch18.xml ch21.xml
xsrc/external/mit/libX11/dist/src [netbsd-10]: CrPixmap.c ImUtil.c
OpenDis.c PutImage.c
xsrc/external/mit/libX11/dist/src/xkb [netbsd-10]: XKBGetMap.c
xsrc/external/mit/libXpm/dist [netbsd-10]: ChangeLog Makefile.in
aclocal.m4 compile config.guess config.h.in config.sub configure
configure.ac depcomp install-sh ltmain.sh missing tap-driver.sh
test-driver
xsrc/external/mit/libXpm/dist/cxpm [netbsd-10]: Makefile.in
xsrc/external/mit/libXpm/dist/doc [netbsd-10]: Makefile.in
xsrc/external/mit/libXpm/dist/include [netbsd-10]: Makefile.in
xsrc/external/mit/libXpm/dist/include/X11 [netbsd-10]: xpm.h
xsrc/external/mit/libXpm/dist/m4 [netbsd-10]: libtool.m4 ltoptions.m4
ltsugar.m4 ltversion.m4 lt~obsolete.m4
xsrc/external/mit/libXpm/dist/man [netbsd-10]: Makefile.in
xsrc/external/mit/libXpm/dist/src [netbsd-10]: CrDatFrI.c CrPFrBuf.c
CrPFrDat.c CrPFrI.c Makefile.in RdFToBuf.c RdFToI.c RdFToP.c
WrFFrBuf.c WrFFrI.c XpmI.h create.c data.c parse.c rgb.c
xsrc/external/mit/libXpm/dist/sxpm [netbsd-10]: Makefile.in
xsrc/external/mit/libXpm/dist/test [netbsd-10]: Makefile.am Makefile.in
TestAllFiles.h XpmCreate.c XpmMisc.c XpmRead.c XpmWrite.c
Added Files:
xsrc/external/mit/libX11/dist/man/xkb [netbsd-10]:
XkbActionSetCtrls.man XkbKeyKeyType.man XkbKeyKeyTypeIndex.man
xsrc/external/mit/libXpm/dist/test [netbsd-10]: rgb.c rgb.txt
Removed Files:
xsrc/external/mit/libX11/dist/man/xkb [netbsd-10]:
XkbAllocDeviceLedInfo.man XkbChangeIndicators.man
XkbGetAccessXTimeout.man XkbGetBounceKeysDelay.man
XkbGetIndicatorChanges.man XkbGetNameChanges.man
XkbGetSlowKeysDelay.man XkbGetStickyKeysOptions.man
XkbKeySymsOffset.man XkbKeyType.man XkbKeyTypeIndex.man
XkbNoteIndicatorChanges.man XkbSAActionSetCtrls.man
XkbSetAccessXTimeout.man XkbSetBounceKeysDelay.man

Log Message:
Sync to to HEAD, requested by mrg in #392:

external/mit/libX11/dist/man/xkb/XkbKeyKeyTypeIndex.man up to 1.1.1.1
external/mit/libX11/dist/man/xkb/XkbKeyKeyType.man up to 1.1.1.1
external/mit/libX11/dist/man/xkb/XkbActionSetCtrls.man up to 1.1.1.1
external/mit/libX11/dist/man/xkb/XkbAllocDeviceLedInfo.man delete
external/mit/libX11/dist/man/xkb/XkbChangeIndicators.man delete
external/mit/libX11/dist/man/xkb/XkbGetAccessXTimeout.man delete
external/mit/libX11/dist/man/xkb/XkbGetBounceKeysDelay.man delete
external/mit/libX11/dist/man/xkb/XkbGetIndicatorChanges.man delete
external/mit/libX11/dist/man/xkb/XkbGetNameChanges.man delete
external/mit/libX11/dist/man/xkb/XkbGetSlowKeysDelay.man delete
external/mit/libX11/dist/man/xkb/XkbGetStickyKeysOptions.man delete
external/mit/libX11/dist/man/xkb/XkbKeySymsOffset.man delete
external/mit/libX11/dist/man/xkb/XkbKeyType.man delete
external/mit/libX11/dist/man/xkb/XkbKeyTypeIndex.man delete
external/mit/libX11/dist/man/xkb/XkbNoteIndicatorChanges.man delete
external/mit/libX11/dist/man/xkb/XkbSAActionSetCtrls.man delete
external/mit/libX11/dist/man/xkb/XkbSetAccessXTimeout.man delete
external/mit/libX11/dist/man/xkb/XkbSetBounceKeysDelay.man delete
external/mit/libX11/dist/ChangeLog  up to 1.6
external/mit/libX11/dist/README.md  up to 1.5
external/mit/libX11/dist/configure  up to 1.6
external/mit/libX11/dist/configure.ac   up to 1.6
external/mit/libX11/dist/include/X11/Xutil.hup to 1.1.1.6
external/mit/libX11/dist/man/xkb/Makefile.amup to 1.1.1.7
external/mit/libX11/dist/man/xkb/Makefile.inup to 1.1.1.27
external/mit/libX11/dist/man/xkb/XkbAllocDeviceInfo.man up to 1.1.1.6
external/mit/libX11/dist/man/xkb/XkbChangeControls.man up to 1.1.1.7
external/mit/libX11/dist/man/xkb/XkbGetKeyTypes.man up to 1.1.1.5
external/mit/libX11/dist/nls/am_ET.UTF-8/Compose.pre up to 1.1.1.5

CVS commit: [netbsd-10] xsrc/external/mit

2023-10-04 Thread Martin Husemann
Module Name:xsrc
Committed By:   martin
Date:   Wed Oct  4 12:29:56 UTC 2023

Modified Files:
xsrc/external/mit/libX11/dist [netbsd-10]: ChangeLog README.md
configure configure.ac
xsrc/external/mit/libX11/dist/include/X11 [netbsd-10]: Xutil.h
xsrc/external/mit/libX11/dist/man/xkb [netbsd-10]: Makefile.am
Makefile.in XkbAllocDeviceInfo.man XkbChangeControls.man
XkbGetKeyTypes.man
xsrc/external/mit/libX11/dist/nls/am_ET.UTF-8 [netbsd-10]: Compose.pre
xsrc/external/mit/libX11/dist/nls/en_US.UTF-8 [netbsd-10]: Compose.pre
xsrc/external/mit/libX11/dist/specs/XKB [netbsd-10]: ch08.xml ch10.xml
ch15.xml ch16.xml ch18.xml ch21.xml
xsrc/external/mit/libX11/dist/src [netbsd-10]: CrPixmap.c ImUtil.c
OpenDis.c PutImage.c
xsrc/external/mit/libX11/dist/src/xkb [netbsd-10]: XKBGetMap.c
xsrc/external/mit/libXpm/dist [netbsd-10]: ChangeLog Makefile.in
aclocal.m4 compile config.guess config.h.in config.sub configure
configure.ac depcomp install-sh ltmain.sh missing tap-driver.sh
test-driver
xsrc/external/mit/libXpm/dist/cxpm [netbsd-10]: Makefile.in
xsrc/external/mit/libXpm/dist/doc [netbsd-10]: Makefile.in
xsrc/external/mit/libXpm/dist/include [netbsd-10]: Makefile.in
xsrc/external/mit/libXpm/dist/include/X11 [netbsd-10]: xpm.h
xsrc/external/mit/libXpm/dist/m4 [netbsd-10]: libtool.m4 ltoptions.m4
ltsugar.m4 ltversion.m4 lt~obsolete.m4
xsrc/external/mit/libXpm/dist/man [netbsd-10]: Makefile.in
xsrc/external/mit/libXpm/dist/src [netbsd-10]: CrDatFrI.c CrPFrBuf.c
CrPFrDat.c CrPFrI.c Makefile.in RdFToBuf.c RdFToI.c RdFToP.c
WrFFrBuf.c WrFFrI.c XpmI.h create.c data.c parse.c rgb.c
xsrc/external/mit/libXpm/dist/sxpm [netbsd-10]: Makefile.in
xsrc/external/mit/libXpm/dist/test [netbsd-10]: Makefile.am Makefile.in
TestAllFiles.h XpmCreate.c XpmMisc.c XpmRead.c XpmWrite.c
Added Files:
xsrc/external/mit/libX11/dist/man/xkb [netbsd-10]:
XkbActionSetCtrls.man XkbKeyKeyType.man XkbKeyKeyTypeIndex.man
xsrc/external/mit/libXpm/dist/test [netbsd-10]: rgb.c rgb.txt
Removed Files:
xsrc/external/mit/libX11/dist/man/xkb [netbsd-10]:
XkbAllocDeviceLedInfo.man XkbChangeIndicators.man
XkbGetAccessXTimeout.man XkbGetBounceKeysDelay.man
XkbGetIndicatorChanges.man XkbGetNameChanges.man
XkbGetSlowKeysDelay.man XkbGetStickyKeysOptions.man
XkbKeySymsOffset.man XkbKeyType.man XkbKeyTypeIndex.man
XkbNoteIndicatorChanges.man XkbSAActionSetCtrls.man
XkbSetAccessXTimeout.man XkbSetBounceKeysDelay.man

Log Message:
Sync to to HEAD, requested by mrg in #392:

external/mit/libX11/dist/man/xkb/XkbKeyKeyTypeIndex.man up to 1.1.1.1
external/mit/libX11/dist/man/xkb/XkbKeyKeyType.man up to 1.1.1.1
external/mit/libX11/dist/man/xkb/XkbActionSetCtrls.man up to 1.1.1.1
external/mit/libX11/dist/man/xkb/XkbAllocDeviceLedInfo.man delete
external/mit/libX11/dist/man/xkb/XkbChangeIndicators.man delete
external/mit/libX11/dist/man/xkb/XkbGetAccessXTimeout.man delete
external/mit/libX11/dist/man/xkb/XkbGetBounceKeysDelay.man delete
external/mit/libX11/dist/man/xkb/XkbGetIndicatorChanges.man delete
external/mit/libX11/dist/man/xkb/XkbGetNameChanges.man delete
external/mit/libX11/dist/man/xkb/XkbGetSlowKeysDelay.man delete
external/mit/libX11/dist/man/xkb/XkbGetStickyKeysOptions.man delete
external/mit/libX11/dist/man/xkb/XkbKeySymsOffset.man delete
external/mit/libX11/dist/man/xkb/XkbKeyType.man delete
external/mit/libX11/dist/man/xkb/XkbKeyTypeIndex.man delete
external/mit/libX11/dist/man/xkb/XkbNoteIndicatorChanges.man delete
external/mit/libX11/dist/man/xkb/XkbSAActionSetCtrls.man delete
external/mit/libX11/dist/man/xkb/XkbSetAccessXTimeout.man delete
external/mit/libX11/dist/man/xkb/XkbSetBounceKeysDelay.man delete
external/mit/libX11/dist/ChangeLog  up to 1.6
external/mit/libX11/dist/README.md  up to 1.5
external/mit/libX11/dist/configure  up to 1.6
external/mit/libX11/dist/configure.ac   up to 1.6
external/mit/libX11/dist/include/X11/Xutil.hup to 1.1.1.6
external/mit/libX11/dist/man/xkb/Makefile.amup to 1.1.1.7
external/mit/libX11/dist/man/xkb/Makefile.inup to 1.1.1.27
external/mit/libX11/dist/man/xkb/XkbAllocDeviceInfo.man up to 1.1.1.6
external/mit/libX11/dist/man/xkb/XkbChangeControls.man up to 1.1.1.7
external/mit/libX11/dist/man/xkb/XkbGetKeyTypes.man up to 1.1.1.5
external/mit/libX11/dist/nls/am_ET.UTF-8/Compose.pre up to 1.1.1.5

CVS commit: src

2023-10-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Oct  4 07:51:36 UTC 2023

Modified Files:
src/distrib/sets/lists/man: mi
src/share/man/man4: Makefile
Added Files:
src/share/man/man4: igc.4

Log Message:
igc(4): Add and hook manpage


To generate a diff of this commit:
cvs rdiff -u -r1.1765 -r1.1766 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.732 -r1.733 src/share/man/man4/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man4/igc.4

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

Modified files:

Index: src/distrib/sets/lists/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1765 src/distrib/sets/lists/man/mi:1.1766
--- src/distrib/sets/lists/man/mi:1.1765	Sun Aug 27 15:50:47 2023
+++ src/distrib/sets/lists/man/mi	Wed Oct  4 07:51:36 2023
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1765 2023/08/27 15:50:47 rillig Exp $
+# $NetBSD: mi,v 1.1766 2023/10/04 07:51:36 rin Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1350,6 +1350,7 @@
 ./usr/share/man/cat4/ieee80211.0		man-sys-catman		.cat
 ./usr/share/man/cat4/ifmedia.0			man-sys-catman		.cat
 ./usr/share/man/cat4/ifpci.0			man-obsolete		obsolete
+./usr/share/man/cat4/igc.0			man-sys-catman		.cat
 ./usr/share/man/cat4/igmafb.0			man-sys-catman		.cat
 ./usr/share/man/cat4/igphy.0			man-sys-catman		.cat
 ./usr/share/man/cat4/igpio.0			man-sys-catman		.cat
@@ -4713,6 +4714,7 @@
 ./usr/share/man/html4/ieee80211.html		man-sys-htmlman		html
 ./usr/share/man/html4/ifmedia.html		man-sys-htmlman		html
 ./usr/share/man/html4/ifpci.html		man-obsolete		obsolete
+./usr/share/man/html4/igc.html			man-sys-htmlman		html
 ./usr/share/man/html4/igmafb.html		man-sys-htmlman		html
 ./usr/share/man/html4/igphy.html		man-sys-htmlman		html
 ./usr/share/man/html4/igpio.html		man-sys-htmlman		html
@@ -7910,6 +7912,7 @@
 ./usr/share/man/man4/ieee80211.4		man-sys-man		.man
 ./usr/share/man/man4/ifmedia.4			man-sys-man		.man
 ./usr/share/man/man4/ifpci.4			man-obsolete		obsolete
+./usr/share/man/man4/igc.4			man-sys-man		.man
 ./usr/share/man/man4/igmafb.4			man-sys-man		.man
 ./usr/share/man/man4/igphy.4			man-sys-man		.man
 ./usr/share/man/man4/igpio.4			man-sys-man		.man

Index: src/share/man/man4/Makefile
diff -u src/share/man/man4/Makefile:1.732 src/share/man/man4/Makefile:1.733
--- src/share/man/man4/Makefile:1.732	Fri Jun 30 00:48:03 2023
+++ src/share/man/man4/Makefile	Wed Oct  4 07:51:36 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.732 2023/06/30 00:48:03 gutteridge Exp $
+#	$NetBSD: Makefile,v 1.733 2023/10/04 07:51:36 rin Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/18/93
 
 MAN=	aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \
@@ -31,11 +31,11 @@ MAN=	aac.4 ac97.4 acardide.4 aceride.4 a
 	gpiosim.4 gre.4 gphyter.4 gsip.4 \
 	hdaudio.4 hifn.4 hme.4 hpacel.4 hpqlb.4 hptide.4 hvn.4 hythygtemp.4 \
 	iavf.4 ibmcd.4 ibmhawk.4 ichsmb.4 icmp.4 icp.4 icsphy.4 iee.4 \
-	ieee80211.4 ifmedia.4 igmafb.4 igphy.4 igpio.4 igsfb.4 iha.4 ihidev.4 \
-	ihphy.4 iic.4 ims.4 inet.4 ikphy.4 inphy.4 intersil7170.4 intro.4 \
-	ioasic.4 ioat.4 iop.4 iophy.4 iopsp.4 ip.4 ipgphy.4 ipmi.4 ipw.4 \
-	irmce.4 isp.4 ismt.4 isv.4 itesio.4 iteide.4 iwi.4 iwm.4 iwn.4 ixg.4 \
-	ixl.4 ixpide.4 ixv.4 \
+	ieee80211.4 ifmedia.4 igc.4 igmafb.4 igphy.4 igpio.4 igsfb.4 iha.4 \
+	ihidev.4 ihphy.4 iic.4 ims.4 inet.4 ikphy.4 inphy.4 intersil7170.4 \
+	intro.4 ioasic.4 ioat.4 iop.4 iophy.4 iopsp.4 ip.4 ipgphy.4 ipmi.4 \
+	ipw.4 irmce.4 isp.4 ismt.4 isv.4 itesio.4 iteide.4 iwi.4 iwm.4 iwn.4 \
+	ixg.4 ixl.4 ixpide.4 ixv.4 \
 	jme.4 jmide.4 jmphy.4 joy.4 \
 	kcov.4 kloader.4 kse.4 ksyms.4 kttcp.4 \
 	l2tp.4 lagg.4 lc.4 ld.4 lii.4 lo.4 lua.4 lxtphy.4 \

Added files:

Index: src/share/man/man4/igc.4
diff -u /dev/null src/share/man/man4/igc.4:1.1
--- /dev/null	Wed Oct  4 07:51:36 2023
+++ src/share/man/man4/igc.4	Wed Oct  4 07:51:36 2023
@@ -0,0 +1,68 @@
+.\" $NetBSD: igc.4,v 1.1 2023/10/04 07:51:36 rin Exp $
+.\" $OpenBSD: igc.4,v 1.3 2023/03/31 13:48:34 jmc Exp $
+.\"
+.\" Copyright (c) 2021 Patrick Wildt 
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: October 4 2023 $
+.Dt IGC 4
+.Os
+.Sh NAME
+.Nm igc
+.Nd Intel I225/I226 1Gb/2.5Gb Ethernet device
+.Sh SYNOPSIS
+.Cd "igc* at pci?"
+.Sh 

CVS commit: src

2023-10-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Oct  4 07:51:36 UTC 2023

Modified Files:
src/distrib/sets/lists/man: mi
src/share/man/man4: Makefile
Added Files:
src/share/man/man4: igc.4

Log Message:
igc(4): Add and hook manpage


To generate a diff of this commit:
cvs rdiff -u -r1.1765 -r1.1766 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.732 -r1.733 src/share/man/man4/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man4/igc.4

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



CVS commit: src/sys/arch

2023-10-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Oct  4 07:48:55 UTC 2023

Modified Files:
src/sys/arch/amd64/conf: ALL GENERIC XEN3_DOM0
src/sys/arch/evbarm/conf: GENERIC64
src/sys/arch/evbppc/conf: DHT

Log Message:
igc(4): Added to kernel config files for tested platforms

I.e., aarch64, amd64, and evbppc/DHT, at the moment.

Please feel free to add to other config files, and report us back
if you find problems :)


To generate a diff of this commit:
cvs rdiff -u -r1.180 -r1.181 src/sys/arch/amd64/conf/ALL
cvs rdiff -u -r1.605 -r1.606 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.199 -r1.200 src/sys/arch/amd64/conf/XEN3_DOM0
cvs rdiff -u -r1.212 -r1.213 src/sys/arch/evbarm/conf/GENERIC64
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbppc/conf/DHT

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/amd64/conf/ALL
diff -u src/sys/arch/amd64/conf/ALL:1.180 src/sys/arch/amd64/conf/ALL:1.181
--- src/sys/arch/amd64/conf/ALL:1.180	Sat Sep  2 07:15:30 2023
+++ src/sys/arch/amd64/conf/ALL	Wed Oct  4 07:48:55 2023
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.180 2023/09/02 07:15:30 andvar Exp $
+# $NetBSD: ALL,v 1.181 2023/10/04 07:48:55 rin Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"ALL-$Revision: 1.180 $"
+#ident		"ALL-$Revision: 1.181 $"
 
 maxusers	64		# estimated number of users
 
@@ -995,6 +995,7 @@ gem*	at pci? dev ? function ?	# Apple GM
 gsip*	at pci? dev ? function ?	# NS83820 Gigabit Ethernet
 hme*	at pci? dev ? function ?	# Sun Microelectronics STP2002-STQ
 iavf*	at pci? dev ? function ?	# Intel Adaptive Virtual Function
+igc*	at pci? dev ? function ?	# Intel I225 2.5 gigabit
 ipw*	at pci? dev ? function ?	# Intel PRO/Wireless 2100
 iwi*	at pci? dev ? function ?	# Intel PRO/Wireless 2200BG
 iwm*	at pci? dev ? function ?	# Intel Wireless WiFi Link 7xxx

Index: src/sys/arch/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.605 src/sys/arch/amd64/conf/GENERIC:1.606
--- src/sys/arch/amd64/conf/GENERIC:1.605	Wed Aug  9 09:36:26 2023
+++ src/sys/arch/amd64/conf/GENERIC	Wed Oct  4 07:48:55 2023
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.605 2023/08/09 09:36:26 andvar Exp $
+# $NetBSD: GENERIC,v 1.606 2023/10/04 07:48:55 rin Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"GENERIC-$Revision: 1.605 $"
+#ident		"GENERIC-$Revision: 1.606 $"
 
 maxusers	64		# estimated number of users
 
@@ -834,6 +834,7 @@ gem*	at pci? dev ? function ?	# Apple GM
 gsip*	at pci? dev ? function ?	# NS83820 Gigabit Ethernet
 hme*	at pci? dev ? function ?	# Sun Microelectronics STP2002-STQ
 iavf*	at pci? dev ? function ?	# Intel Adaptive Virtual Function
+igc*	at pci? dev ? function ?	# Intel I225 2.5 gigabit
 ipw*	at pci? dev ? function ?	# Intel PRO/Wireless 2100
 iwi*	at pci? dev ? function ?	# Intel PRO/Wireless 2200BG
 iwm*	at pci? dev ? function ?	# Intel Centrino 7260

Index: src/sys/arch/amd64/conf/XEN3_DOM0
diff -u src/sys/arch/amd64/conf/XEN3_DOM0:1.199 src/sys/arch/amd64/conf/XEN3_DOM0:1.200
--- src/sys/arch/amd64/conf/XEN3_DOM0:1.199	Sat Aug  5 14:38:43 2023
+++ src/sys/arch/amd64/conf/XEN3_DOM0	Wed Oct  4 07:48:55 2023
@@ -1,4 +1,4 @@
-# $NetBSD: XEN3_DOM0,v 1.199 2023/08/05 14:38:43 riastradh Exp $
+# $NetBSD: XEN3_DOM0,v 1.200 2023/10/04 07:48:55 rin Exp $
 
 # XEN3_DOM0 machine description file
 #
@@ -14,7 +14,7 @@ include 	"arch/amd64/conf/std.xen"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"XEN3_DOM0-$Revision: 1.199 $"
+#ident		"XEN3_DOM0-$Revision: 1.200 $"
 
 maxusers	32		# estimated number of users
 
@@ -845,6 +845,7 @@ gem*	at pci? dev ? function ?	# Apple GM
 gsip*	at pci? dev ? function ?	# NS83820 Gigabit Ethernet
 hme*	at pci? dev ? function ?	# Sun Microelectronics STP2002-STQ
 iavf*	at pci? dev ? function ?	# Intel Adaptive Virtual Function
+igc*	at pci? dev ? function ?	# Intel I225 2.5 gigabit
 ipw*	at pci? dev ? function ?	# Intel PRO/Wireless 2100
 iwi*	at pci? dev ? function ?	# Intel PRO/Wireless 2200BG
 iwm*	at pci? dev ? function ?	# Intel Centrino 7260

Index: src/sys/arch/evbarm/conf/GENERIC64
diff -u src/sys/arch/evbarm/conf/GENERIC64:1.212 src/sys/arch/evbarm/conf/GENERIC64:1.213
--- src/sys/arch/evbarm/conf/GENERIC64:1.212	Sat Jul 15 22:30:19 2023
+++ src/sys/arch/evbarm/conf/GENERIC64	Wed Oct  4 07:48:55 2023
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: GENERIC64,v 1.212 2023/07/15 22:30:19 riastradh Exp $
+#	$NetBSD: GENERIC64,v 1.213 2023/10/04 07:48:55 rin Exp $
 #
 #	GENERIC ARM (aarch64) kernel
 #
@@ -284,6 +284,7 @@ genet*		at fdt?
 aq*		at pci? dev ? function ?	# Aquantia AQC 10 gigabit
 bge*		at pci? dev ? 

CVS commit: src/sys/arch

2023-10-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Oct  4 07:48:55 UTC 2023

Modified Files:
src/sys/arch/amd64/conf: ALL GENERIC XEN3_DOM0
src/sys/arch/evbarm/conf: GENERIC64
src/sys/arch/evbppc/conf: DHT

Log Message:
igc(4): Added to kernel config files for tested platforms

I.e., aarch64, amd64, and evbppc/DHT, at the moment.

Please feel free to add to other config files, and report us back
if you find problems :)


To generate a diff of this commit:
cvs rdiff -u -r1.180 -r1.181 src/sys/arch/amd64/conf/ALL
cvs rdiff -u -r1.605 -r1.606 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.199 -r1.200 src/sys/arch/amd64/conf/XEN3_DOM0
cvs rdiff -u -r1.212 -r1.213 src/sys/arch/evbarm/conf/GENERIC64
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbppc/conf/DHT

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/igc

2023-10-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Oct  4 07:41:55 UTC 2023

Modified Files:
src/sys/dev/pci/igc: if_igc.c

Log Message:
igc(4): XXX: Temporally disable 64-bit DMA for aarch64

Until PR port-arm/57643 is properly addressed.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pci/igc/if_igc.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/igc/if_igc.c
diff -u src/sys/dev/pci/igc/if_igc.c:1.2 src/sys/dev/pci/igc/if_igc.c:1.3
--- src/sys/dev/pci/igc/if_igc.c:1.2	Wed Oct  4 07:35:27 2023
+++ src/sys/dev/pci/igc/if_igc.c	Wed Oct  4 07:41:55 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_igc.c,v 1.2 2023/10/04 07:35:27 rin Exp $	*/
+/*	$NetBSD: if_igc.c,v 1.3 2023/10/04 07:41:55 rin Exp $	*/
 /*	$OpenBSD: if_igc.c,v 1.13 2023/04/28 10:18:57 bluhm Exp $	*/
 /*-
  * SPDX-License-Identifier: BSD-2-Clause
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_igc.c,v 1.2 2023/10/04 07:35:27 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_igc.c,v 1.3 2023/10/04 07:41:55 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -363,8 +363,17 @@ igc_attach(device_t parent, device_t sel
 
 	sc->osdep.os_sc = sc;
 	sc->osdep.os_pa = *pa;
+#ifdef __aarch64__
+	/*
+	 * XXX PR port-arm/57643
+	 * 64-bit DMA does not work at least for LX2K with 32/64GB memory.
+	 * smmu(4) support may be required.
+	 */
+	sc->osdep.os_dmat = pa->pa_dmat;
+#else
 	sc->osdep.os_dmat = pci_dma64_available(pa) ?
 	pa->pa_dmat64 : pa->pa_dmat;
+#endif
 
 	/* Determine hardware and mac info */
 	igc_identify_hardware(sc);



CVS commit: src/sys/dev/pci/igc

2023-10-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Oct  4 07:41:55 UTC 2023

Modified Files:
src/sys/dev/pci/igc: if_igc.c

Log Message:
igc(4): XXX: Temporally disable 64-bit DMA for aarch64

Until PR port-arm/57643 is properly addressed.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pci/igc/if_igc.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

2023-10-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Oct  4 07:35:27 UTC 2023

Modified Files:
src/sys/dev/pci: files.pci
src/sys/dev/pci/igc: if_igc.c if_igc.h igc_api.c igc_api.h igc_base.c
igc_base.h igc_defines.h igc_hw.h igc_i225.c igc_i225.h igc_mac.c
igc_mac.h igc_nvm.c igc_nvm.h igc_phy.c igc_phy.h igc_regs.h
Added Files:
src/sys/dev/pci/igc: igc_evcnt.h

Log Message:
igc(4): Add support to Intel I225 / I226 series ethernet devices

Originally written by kevlo@o for OpenBSD, and ported by knakahara@,
msaitoh@, and myself.

The driver is *EXPERIMENTAL* at the moment, as some minor error
handling paths are not fully implemented.

Hardware VLAN tagging and TSO are not supported yet.

Although, we have never observed strange behaviors at least on amd64,
aarch64{,eb}, and evbppc (IBM405), except for PR port-arm/57643.

We will send pullup request to netbsd-10, after successful snapshot
build for -current.


To generate a diff of this commit:
cvs rdiff -u -r1.446 -r1.447 src/sys/dev/pci/files.pci
cvs rdiff -u -r1.1.1.1 -r1.2 src/sys/dev/pci/igc/if_igc.c \
src/sys/dev/pci/igc/if_igc.h src/sys/dev/pci/igc/igc_api.c \
src/sys/dev/pci/igc/igc_api.h src/sys/dev/pci/igc/igc_base.c \
src/sys/dev/pci/igc/igc_base.h src/sys/dev/pci/igc/igc_defines.h \
src/sys/dev/pci/igc/igc_hw.h src/sys/dev/pci/igc/igc_i225.c \
src/sys/dev/pci/igc/igc_i225.h src/sys/dev/pci/igc/igc_mac.c \
src/sys/dev/pci/igc/igc_mac.h src/sys/dev/pci/igc/igc_nvm.c \
src/sys/dev/pci/igc/igc_nvm.h src/sys/dev/pci/igc/igc_phy.c \
src/sys/dev/pci/igc/igc_phy.h src/sys/dev/pci/igc/igc_regs.h
cvs rdiff -u -r0 -r1.1 src/sys/dev/pci/igc/igc_evcnt.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/pci

2023-10-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Oct  4 07:19:37 UTC 2023

Modified Files:
src/sys/dev/pci: pcidevs.h pcidevs_data.h

Log Message:
Regen for pcidevs rev 1.1494


To generate a diff of this commit:
cvs rdiff -u -r1.1474 -r1.1475 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1473 -r1.1474 src/sys/dev/pci/pcidevs_data.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/pci

2023-10-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Oct  4 07:17:59 UTC 2023

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
pcidevs: Add missing I225/I226 series devices


To generate a diff of this commit:
cvs rdiff -u -r1.1493 -r1.1494 src/sys/dev/pci/pcidevs

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/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1493 src/sys/dev/pci/pcidevs:1.1494
--- src/sys/dev/pci/pcidevs:1.1493	Wed Oct  4 03:09:42 2023
+++ src/sys/dev/pci/pcidevs	Wed Oct  4 07:17:59 2023
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1493 2023/10/04 03:09:42 msaitoh Exp $
+$NetBSD: pcidevs,v 1.1494 2023/10/04 07:17:59 rin Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -3933,6 +3933,7 @@ product INTEL I219_LM11		0x0d4c	I219-LM 
 product INTEL I219_V11		0x0d4d	I219-V (11) Ethernet Connection
 product INTEL I219_LM10		0x0d4e	I219-LM (10) Ethernet Connection
 product INTEL I219_V10		0x0d4f	I219-V (10) Ethernet Connection
+product INTEL I225_IT		0x0d9f	I225-IT Ethernet Connection
 product INTEL I219_LM12		0x0d53	I219-LM (12) Ethernet Connection
 product INTEL I219_V12		0x0d55	I219-V (12) Ethernet Connection
 product INTEL E5V2_DMI2		0x0e00	E5 v2 DMI2
@@ -4249,6 +4250,8 @@ product INTEL 82439HX		0x1250	82439HX (T
 product INTEL I226_LM		0x125b	I226-LM Ethernet
 product INTEL I226_V		0x125c	I226-V Ethernet
 product INTEL I226_IT		0x125d	I226-IT Ethernet
+product INTEL I221_V		0x125e	I221-V Ethernet Connection
+product INTEL I226_BLANK_NVM	0x125f	I226 Ethernet Connection (blankNVM)
 product INTEL C3K_X553_10G	0x1306	C3000 X553 10G Ethernet
 product INTEL C3K_X553_1G	0x1307	C3000 X553 1G Ethernet
 product INTEL 82870P2_PPB	0x1460	82870P2 P64H2 PCI-PCI Bridge
@@ -4375,9 +4378,12 @@ product INTEL C3K_X553_SGMII	0x15e4	C300
 product INTEL C3K_X553_SGMII_L	0x15e5	C3000 X553 1GbE SGMII (non-10G SKU)
 product INTEL I225_LM		0x15f2	I225 LM Ethernet
 product INTEL I225_V		0x15f3	I225 V Ethernet
+product INTEL I220_V		0x15f7	I220-V Ethernet Connection
+product INTEL I225_BLANK_NVM	0x15fd	I225 Ethernet Connection (blankNVM)
 product INTEL I219_LM15		0x15f4	I219-LM (15) Ethernet Connection
 product INTEL I219_V15		0x15f5	I219-V (15) Ethernet Connection
 product INTEL I210_SGMII_WOF	0x15f6	I210 Ethernet (SGMII)
+product INTEL I225_I		0x15f8	I225-I Ethernet Connection
 product INTEL I219_LM14		0x15f9	I219-LM (14) Ethernet Connection
 product INTEL I219_V14		0x15fa	I219-V (14) Ethernet Connection
 product INTEL I219_LM13		0x15fb	I219-LM (13) Ethernet Connection
@@ -5410,6 +5416,9 @@ product INTEL XE5_V3_BRA4	0x2ffb  Xeon E
 product INTEL XE5_V3_SADBR1	0x2ffc  Xeon E7 v3/Xeon E5 v3/Core i7 System Address Decoder & Broadcast Registers
 product INTEL XE5_V3_SADBR2	0x2ffd  Xeon E7 v3/Xeon E5 v3/Core i7 System Address Decoder & Broadcast Registers
 product INTEL XE5_V3_SADBR3	0x2ffe  Xeon E7 v3/Xeon E5 v3/Core i7 System Address Decoder & Broadcast Registers
+product INTEL I225_K		0x3100	I225-K Ethernet Connection
+product INTEL I225_K2		0x3101	I225-K2 Ethernet Connection
+product INTEL I226_K		0x3102	I226-K Ethernet Connection
 product INTEL WIFI_LINK_3165_1	0x3165	Dual Band Wireless AC 3165
 product INTEL WIFI_LINK_3165_2	0x3166	Dual Band Wireless AC 3165
 product INTEL GLK_IGD_1		0x3184	UHD Graphics 605
@@ -6282,6 +6291,8 @@ product INTEL ADL_N_CNVI_4	0x54f3	Alder 
 product INTEL ADL_N_GSPI_2	0x54fb	Alder Lake-N GSPI 2
 product INTEL ADL_N_ISH		0x54fc	Alder Lake-N Integrated Sensor Hub
 product INTEL ADL_N_SCS_UFS	0x54ff	Alder Lake-N UFS
+product INTEL I225_LMVP		0x5502	I225-LMvP Ethernet Connection
+product INTEL I226_LMVP		0x5503	I226-LMvP Ethernet Connection
 product INTEL I219_LM18		0x550a	I219-LM (18) Ethernet Connection
 product INTEL I219_V18		0x550b	I219-V (18) Ethernet Connection
 product INTEL I219_LM19		0x550c	I219-LM (19) Ethernet Connection



CVS commit: src/sys/dev/pci

2023-10-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Oct  4 07:17:59 UTC 2023

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
pcidevs: Add missing I225/I226 series devices


To generate a diff of this commit:
cvs rdiff -u -r1.1493 -r1.1494 src/sys/dev/pci/pcidevs

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



CVS import: src/sys/dev/pci/igc

2023-10-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Oct  4 07:15:14 UTC 2023

Update of /cvsroot/src/sys/dev/pci/igc
In directory ivanova.netbsd.org:/tmp/cvs-serv20929

Log Message:
Import igc(4) from OpenBSD-current as of 2023-10-04

Status:

Vendor Tag: OPENBSD
Release Tags:   igc-20231004

N src/sys/dev/pci/igc/if_igc.c
N src/sys/dev/pci/igc/if_igc.h
N src/sys/dev/pci/igc/igc_api.c
N src/sys/dev/pci/igc/igc_api.h
N src/sys/dev/pci/igc/igc_base.c
N src/sys/dev/pci/igc/igc_base.h
N src/sys/dev/pci/igc/igc_defines.h
N src/sys/dev/pci/igc/igc_hw.h
N src/sys/dev/pci/igc/igc_i225.c
N src/sys/dev/pci/igc/igc_i225.h
N src/sys/dev/pci/igc/igc_mac.c
N src/sys/dev/pci/igc/igc_mac.h
N src/sys/dev/pci/igc/igc_nvm.c
N src/sys/dev/pci/igc/igc_nvm.h
N src/sys/dev/pci/igc/igc_phy.c
N src/sys/dev/pci/igc/igc_phy.h
N src/sys/dev/pci/igc/igc_regs.h

No conflicts created by this import



CVS import: src/sys/dev/pci/igc

2023-10-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Oct  4 07:15:14 UTC 2023

Update of /cvsroot/src/sys/dev/pci/igc
In directory ivanova.netbsd.org:/tmp/cvs-serv20929

Log Message:
Import igc(4) from OpenBSD-current as of 2023-10-04

Status:

Vendor Tag: OPENBSD
Release Tags:   igc-20231004

N src/sys/dev/pci/igc/if_igc.c
N src/sys/dev/pci/igc/if_igc.h
N src/sys/dev/pci/igc/igc_api.c
N src/sys/dev/pci/igc/igc_api.h
N src/sys/dev/pci/igc/igc_base.c
N src/sys/dev/pci/igc/igc_base.h
N src/sys/dev/pci/igc/igc_defines.h
N src/sys/dev/pci/igc/igc_hw.h
N src/sys/dev/pci/igc/igc_i225.c
N src/sys/dev/pci/igc/igc_i225.h
N src/sys/dev/pci/igc/igc_mac.c
N src/sys/dev/pci/igc/igc_mac.h
N src/sys/dev/pci/igc/igc_nvm.c
N src/sys/dev/pci/igc/igc_nvm.h
N src/sys/dev/pci/igc/igc_phy.c
N src/sys/dev/pci/igc/igc_phy.h
N src/sys/dev/pci/igc/igc_regs.h

No conflicts created by this import