CVS commit: src/sys/modules/compat_90

2023-12-09 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Dec 10 00:29:25 UTC 2023

Modified Files:
src/sys/modules/compat_90: Makefile

Log Message:
Default the build of compat_90 module to include IPv6, as is done
for other INET6-sensitive modules (see if_lagg).

XXX Pullup to -10 (will add to existing ticket)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/compat_90/Makefile

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

Modified files:

Index: src/sys/modules/compat_90/Makefile
diff -u src/sys/modules/compat_90/Makefile:1.2 src/sys/modules/compat_90/Makefile:1.3
--- src/sys/modules/compat_90/Makefile:1.2	Sat Dec  9 15:21:01 2023
+++ src/sys/modules/compat_90/Makefile	Sun Dec 10 00:29:24 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2023/12/09 15:21:01 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.3 2023/12/10 00:29:24 pgoyette Exp $
 
 .include "../Makefile.inc"
 
@@ -7,6 +7,12 @@
 KMOD=	compat_90
 
 CPPFLAGS+=	-DCOMPAT_90
+CPPFLAGS+=	-DINET
+
+# Remove/comment the following if the target kernel on which the
+# module may be loaded doesn't have IPv6.  Enable this by default.
+
+CPPFLAGS+=	-DINET6
 
 SRCS+=	compat_90_mod.c
 SRCS+=	net_inet6_nd_90.c



CVS commit: src/sys/modules/compat_90

2023-12-09 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Dec 10 00:29:25 UTC 2023

Modified Files:
src/sys/modules/compat_90: Makefile

Log Message:
Default the build of compat_90 module to include IPv6, as is done
for other INET6-sensitive modules (see if_lagg).

XXX Pullup to -10 (will add to existing ticket)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/compat_90/Makefile

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



CVS commit: src/sys/compat/common

2023-12-09 Thread Greg Oster
Module Name:src
Committed By:   oster
Date:   Sat Dec  9 20:31:57 UTC 2023

Modified Files:
src/sys/compat/common: compat_90_mod.c net_inet6_nd_90.c

Log Message:
Allow kernels builds which don't define INET6 to compile compat bits too.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/compat/common/compat_90_mod.c
cvs rdiff -u -r1.1 -r1.2 src/sys/compat/common/net_inet6_nd_90.c

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



CVS commit: src/sys/compat/common

2023-12-09 Thread Greg Oster
Module Name:src
Committed By:   oster
Date:   Sat Dec  9 20:31:57 UTC 2023

Modified Files:
src/sys/compat/common: compat_90_mod.c net_inet6_nd_90.c

Log Message:
Allow kernels builds which don't define INET6 to compile compat bits too.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/compat/common/compat_90_mod.c
cvs rdiff -u -r1.1 -r1.2 src/sys/compat/common/net_inet6_nd_90.c

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

Modified files:

Index: src/sys/compat/common/compat_90_mod.c
diff -u src/sys/compat/common/compat_90_mod.c:1.5 src/sys/compat/common/compat_90_mod.c:1.6
--- src/sys/compat/common/compat_90_mod.c:1.5	Sat Dec  9 15:21:01 2023
+++ src/sys/compat/common/compat_90_mod.c	Sat Dec  9 20:31:57 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_90_mod.c,v 1.5 2023/12/09 15:21:01 pgoyette Exp $	*/
+/*	$NetBSD: compat_90_mod.c,v 1.6 2023/12/09 20:31:57 oster Exp $	*/
 
 /*-
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_90_mod.c,v 1.5 2023/12/09 15:21:01 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_90_mod.c,v 1.6 2023/12/09 20:31:57 oster Exp $");
 
 #include 
 #include 
@@ -50,7 +50,9 @@ int
 compat_90_init(void)
 {
 
+#ifdef INET6
 	net_inet6_nd_90_init();
+#endif
 	return vfs_syscalls_90_init();
 }
 
@@ -63,7 +65,9 @@ compat_90_fini(void)
 	if (error != 0)
 		return error;
 
+#ifdef INET6
 	net_inet6_nd_90_fini();
+#endif
 	return error;
 }
 

Index: src/sys/compat/common/net_inet6_nd_90.c
diff -u src/sys/compat/common/net_inet6_nd_90.c:1.1 src/sys/compat/common/net_inet6_nd_90.c:1.2
--- src/sys/compat/common/net_inet6_nd_90.c:1.1	Sat Dec  9 15:21:01 2023
+++ src/sys/compat/common/net_inet6_nd_90.c	Sat Dec  9 20:31:57 2023
@@ -1,6 +1,6 @@
-/*	$NetBSD: net_inet6_nd_90.c,v 1.1 2023/12/09 15:21:01 pgoyette Exp $ */
+/*	$NetBSD: net_inet6_nd_90.c,v 1.2 2023/12/09 20:31:57 oster Exp $ */
 
-/*  $NetBSD: net_inet6_nd_90.c,v 1.1 2023/12/09 15:21:01 pgoyette Exp $*/
+/*  $NetBSD: net_inet6_nd_90.c,v 1.2 2023/12/09 20:31:57 oster Exp $*/
 /*  $KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $   */
 
 /*
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: net_inet6_nd_90.c,v 1.1 2023/12/09 15:21:01 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: net_inet6_nd_90.c,v 1.2 2023/12/09 20:31:57 oster Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -60,6 +60,8 @@ __KERNEL_RCSID(0, "$NetBSD: net_inet6_nd
 
 #include 
 
+#ifdef INET6
+
 static struct sysctllog *nd6_clog;
 
 /*
@@ -128,3 +130,6 @@ net_inet6_nd_90_fini(void)
 	MODULE_HOOK_UNSET(net_inet6_nd_90_hook);
 	return 0;
 }
+
+#endif /* INET6 */
+



CVS commit: src/external/bsd/elftoolchain/dist/common/sys

2023-12-09 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Sat Dec  9 19:42:41 UTC 2023

Modified Files:
src/external/bsd/elftoolchain/dist/common/sys: elfconstants.m4

Log Message:
Update elfconstants.m4 to upstream [r4003]:

- Use signed integer literals for DT_* values.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/external/bsd/elftoolchain/dist/common/sys/elfconstants.m4

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

Modified files:

Index: src/external/bsd/elftoolchain/dist/common/sys/elfconstants.m4
diff -u src/external/bsd/elftoolchain/dist/common/sys/elfconstants.m4:1.5 src/external/bsd/elftoolchain/dist/common/sys/elfconstants.m4:1.6
--- src/external/bsd/elftoolchain/dist/common/sys/elfconstants.m4:1.5	Thu Dec  7 17:28:36 2023
+++ src/external/bsd/elftoolchain/dist/common/sys/elfconstants.m4	Sat Dec  9 19:42:41 2023
@@ -1,4 +1,4 @@
-dnl 	$NetBSD: elfconstants.m4,v 1.5 2023/12/07 17:28:36 jkoshy Exp $
+dnl 	$NetBSD: elfconstants.m4,v 1.6 2023/12/09 19:42:41 jkoshy Exp $
 # Copyright (c) 2010,2021 Joseph Koshy
 # All rights reserved.
 
@@ -33,7 +33,7 @@ dnl 	$NetBSD: elfconstants.m4,v 1.5 2023
 # - The "Linkers and Libraries Guide", from Sun Microsystems.
 
 define(`VCSID_ELFCONSTANTS_M4',
-	`$Id: elfconstants.m4,v 1.5 2023/12/07 17:28:36 jkoshy Exp $')
+	`$Id: elfconstants.m4,v 1.6 2023/12/09 19:42:41 jkoshy Exp $')
 
 # In the following definitions, `_' is an M4 macro that is meant to be
 # expanded later.  Its intended usage is:
@@ -188,205 +188,205 @@ _(`DT_PREINIT_ARRAYSZ',  33,
 	`size of pre-initialization array')
 _(`DT_MAXPOSTAGS',   34,
 	`the number of positive tags')
-_(`DT_LOOS', 0x600DUL,
+_(`DT_LOOS', 0x600D,
 	`start of OS-specific types')
-_(`DT_SUNW_AUXILIARY',   0x600DUL,
+_(`DT_SUNW_AUXILIARY',   0x600D,
 	`offset of string naming auxiliary filtees')
-_(`DT_SUNW_RTLDINF', 0x600EUL,
+_(`DT_SUNW_RTLDINF', 0x600E,
 	`rtld internal use')
-_(`DT_SUNW_FILTER',  0x600FUL,
+_(`DT_SUNW_FILTER',  0x600F,
 	`offset of string naming standard filtees')
-_(`DT_SUNW_CAP', 0x6010UL,
+_(`DT_SUNW_CAP', 0x6010,
 	`address of hardware capabilities section')
-_(`DT_SUNW_ASLR',0x6023UL,
+_(`DT_SUNW_ASLR',0x6023,
 	`Address Space Layout Randomization flag')
-_(`DT_HIOS', 0x6000UL,
+_(`DT_HIOS', 0x6000,
 	`end of OS-specific types')
-_(`DT_VALRNGLO', 0x6D00UL,
+_(`DT_VALRNGLO', 0x6D00,
 	`start of range using the d_val field')
-_(`DT_GNU_PRELINKED',0x6DF5UL,
+_(`DT_GNU_PRELINKED',0x6DF5,
 	`prelinking timestamp')
-_(`DT_GNU_CONFLICTSZ',   0x6DF6UL,
+_(`DT_GNU_CONFLICTSZ',   0x6DF6,
 	`size of conflict section')
-_(`DT_GNU_LIBLISTSZ',0x6DF7UL,
+_(`DT_GNU_LIBLISTSZ',0x6DF7,
 	`size of library list')
-_(`DT_CHECKSUM', 0x6DF8UL,
+_(`DT_CHECKSUM', 0x6DF8,
 	`checksum for the object')
-_(`DT_PLTPADSZ', 0x6DF9UL,
+_(`DT_PLTPADSZ', 0x6DF9,
 	`size of PLT padding')
-_(`DT_MOVEENT',  0x6DFAUL,
+_(`DT_MOVEENT',  0x6DFA,
 	`size of DT_MOVETAB entries')
-_(`DT_MOVESZ',   0x6DFBUL,
+_(`DT_MOVESZ',   0x6DFB,
 	`total size of the MOVETAB table')
-_(`DT_FEATURE',  0x6DFCUL,
+_(`DT_FEATURE',  0x6DFC,
 	`feature values')
-_(`DT_POSFLAG_1',0x6DFDUL,
+_(`DT_POSFLAG_1',0x6DFD,
 	`dynamic position flags')
-_(`DT_SYMINSZ',  0x6DFEUL,
+_(`DT_SYMINSZ',  0x6DFE,
 	`size of the DT_SYMINFO table')
-_(`DT_SYMINENT', 0x6DFFUL,
+_(`DT_SYMINENT', 0x6DFF,
 	`size of a DT_SYMINFO entry')
-_(`DT_VALRNGHI', 0x6DFFUL,
+_(`DT_VALRNGHI', 0x6DFF,
 	`end of range using the d_val field')
-_(`DT_ADDRRNGLO',0x6E00UL,
+_(`DT_ADDRRNGLO',0x6E00,
 	`start of range using the d_ptr field')
-_(`DT_GNU_HASH',	   0x6EF5UL,
+_(`DT_GNU_HASH',	   0x6EF5,
 	`GNU style hash tables')
-_(`DT_TLSDESC_PLT',  0x6EF6UL,
+_(`DT_TLSDESC_PLT',  0x6EF6,
 	`location of PLT entry for TLS descriptor resolver calls')
-_(`DT_TLSDESC_GOT',  0x6EF7UL,
+_(`DT_TLSDESC_GOT',  0x6EF7,
 	`location of GOT entry used by TLS descriptor resolver PLT entry')
-_(`DT_GNU_CONFLICT', 0x6EF8UL,
+_(`DT_GNU_CONFLICT', 0x6EF8,
 	`address of conflict section')
-_(`DT_GNU_LIBLIST',  0x6EF9UL,
+_(`DT_GNU_LIBLIST',  0x6EF9,
 	`address of conflict section')
-_(`DT_CONFIG',   0x6EFAUL,
+_(`DT_CONFIG',   0x6EFA,
 	`configuration file')
-_(`DT_DEPAUDIT', 0x6EFBUL,
+_(`DT_DEPAUDIT', 0x6EFB,
 	`string defining audit libraries')
-_(`DT_AUDIT',0x6EFCUL,
+_(`DT_AUDIT',0x6EFC,
 	`string defining audit 

CVS commit: src/external/bsd/elftoolchain/dist/common/sys

2023-12-09 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Sat Dec  9 19:42:41 UTC 2023

Modified Files:
src/external/bsd/elftoolchain/dist/common/sys: elfconstants.m4

Log Message:
Update elfconstants.m4 to upstream [r4003]:

- Use signed integer literals for DT_* values.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/external/bsd/elftoolchain/dist/common/sys/elfconstants.m4

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



CVS commit: src/doc

2023-12-09 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Dec  9 16:32:20 UTC 2023

Modified Files:
src/doc: 3RDPARTY

Log Message:
gdb-14.1 out.


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

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1965 src/doc/3RDPARTY:1.1966
--- src/doc/3RDPARTY:1.1965	Tue Nov 28 09:50:10 2023
+++ src/doc/3RDPARTY	Sat Dec  9 16:32:20 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1965 2023/11/28 09:50:10 taca Exp $
+#	$NetBSD: 3RDPARTY,v 1.1966 2023/12/09 16:32:20 wiz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -482,7 +482,7 @@ Before importing a new version of extern
 
 Package:	gdb
 Version:	13.2
-Current Vers:	13.2
+Current Vers:	14.1
 Maintainer:	FSF
 Archive Site:	ftp://ftp.gnu.org/gnu/gdb/
 Home Page:	http://www.gnu.org/software/gdb/



CVS commit: src/doc

2023-12-09 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Dec  9 16:32:20 UTC 2023

Modified Files:
src/doc: 3RDPARTY

Log Message:
gdb-14.1 out.


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

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



CVS commit: src/etc

2023-12-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec  9 16:18:48 UTC 2023

Modified Files:
src/etc: services

Log Message:
PR/57759: Hauke Fath: Restore local additions, lost in revision 1.104


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/etc/services

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

Modified files:

Index: src/etc/services
diff -u src/etc/services:1.105 src/etc/services:1.106
--- src/etc/services:1.105	Sun Jul 30 05:09:38 2023
+++ src/etc/services	Sat Dec  9 11:18:48 2023
@@ -1,4 +1,4 @@
-# $NetBSD: services,v 1.105 2023/07/30 09:09:38 tron Exp $
+# $NetBSD: services,v 1.106 2023/12/09 16:18:48 christos Exp $
 # See also: services(5), https://www.iana.org/assignments/service-names-port-numbers/
 #
 #  Service Name and Transport Protocol Port Number Registry
@@ -24818,4 +24818,98 @@ inspider   49150/tcp# InSpid
 #  configured experiments; they MUST NOT be shipped as defaults in
 #  implementations.  See RFC 3692 for details.
 # 
+
+# Local NetBSD additions [aliases or missing stuff]
+sink		9/tcp	null
+sink		9/udp	null
+users		11/tcp
+quote		17/tcp
+quote		17/udp
+ttytst		19/tcp	source
+ttytst		19/udp	source
+mail		25/tcp
+mail		25/udp
+timserver	37/tcp
+timserver	37/udp
+resource	39/tcp
+resource	39/udp
+netrjs		77/tcp
+netrjs		77/udp
+krb5		88/tcp
+krb5		88/udp
+hostnames	101/tcp
+hostnames	101/udp
+tsap		102/tcp
+tsap		102/udp
+cso-ns		105/tcp
+cso-ns		105/udp
+poppass		106/tcp	poppassd
+postoffice	109/tcp
+rpcbind		111/tcp
+rpcbind		111/udp
+authentications	113/tcp
+readnews	119/tcp	untp
+imap2		143/tcp imap4
+imap2		143/udp imap4
+z3950		210/tcp wais
+z3950		210/udp wais
+krcmd		544/tcp
+ekshell  	545/tcp
+whod		513/udp
+cmd		514/tcp
+spooler		515/tcp
+spooler		515/udp
+route		520/udp routed
+timeserver	525/tcp
+timeserver	525/udp
+newdate		526/tcp
+newdate		526/udp
+rpc		530/tcp
+rpc		530/udp
+chat		531/tcp
+chat		531/udp
+uucpd		540/tcp
+uucpd		540/udp
+rdist		541/tcp	rdistd
+rfs_server	556/tcp	rfs		# Brunhoff remote filesystem
+smtps		465/tcp			# smtp protocol over TLS/SSL
+smtps		465/udp			# smtp protocol over TLS/SSL
+kdc		750/tcp	kerberos4
+kdc		750/udp	kerberos4
+kerberos-master	751/udp			# Kerberos admin server udp
+kerberos-master	751/tcp			# Kerberos admin server tcp
+hprop		754/tcp			# Heimdal KDC database propagation
+krbupdate	760/tcp	 kreg		# BSD Kerberos registration
+kpwd		761/tcp			# old BSD Kerberos `passwd'
+supfilesrv	871/tcp			# SUP server
+swat		901/tcp			# Samba Web Administration Tool
+kpop		1109/tcp		# Kerberos POP server
+supfiledbg	1127/tcp		# SUP debugging
+radacct		1813/tcp
+radacct		1813/udp
+lmtp		2003/tcp		# Local Mail Transfer Protocol
+nfsd		2049/udp		# Sun NFS
+nfsd		2049/tcp		# Sun NFS
+eklogin		2105/tcp		# Kerberos encrypted `rlogin'
+zephyr-hm-srv   2105/udp		# Zephyr hm-serv connection
+ekshell2	2106/tcp		# Encrypted kshell - UColorado, Boulder
+iscsi		3260/tcp
+fud		4201/udp		# Cyrus IMAP finger-like service
+ttcp		5037/tcp 
+X11		6000/tcp		# X Window System
+ircd		6667/tcp		# Often used IRC port (also see 194)
+kamanda		10081/udp		# Amanda with Kerberos
+amandaidx	10082/tcp		# Amanda index server
+amidxtape	10083/tcp		# Amanda dump image server
+hunt		26740/udp		# multi-player/multi-host maze-wars
+#
+# Netatalk (in-kernel Appletalk) services
+# Note: The running kernel must be configured with "options NETATALK"
+# and software not included in NetBSD, such as Netatalk version 1.4b2
+# or later, must be used to take advantage of these services.
+#
+rtmp		1/ddp			# Routing Table Maintenance Protocol
+nbp		2/ddp			# Name Binding Protocol
+echo		4/ddp			# AppleTalk Echo Protocol
+zip		6/ddp			# Zone Information Protocol
 #  Licensing Terms



CVS commit: src/etc

2023-12-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec  9 16:18:48 UTC 2023

Modified Files:
src/etc: services

Log Message:
PR/57759: Hauke Fath: Restore local additions, lost in revision 1.104


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/etc/services

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



CVS commit: src/sys

2023-12-09 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Dec  9 15:21:02 UTC 2023

Modified Files:
src/sys/compat/common: compat_90_mod.c compat_mod.h files.common
src/sys/kern: compat_stub.c
src/sys/modules/compat_90: Makefile
src/sys/netinet6: icmp6.c in6.c nd6.c
src/sys/sys: compat_stub.h
Added Files:
src/sys/compat/common: net_inet6_nd_90.c

Log Message:
Modularize the COMPAT_90 code that resulted from the removal of
netinet6/nd6 from the kernel.  Now, the minimal compat code can
be successfully loaded and unloaded along with the rest of the
COMPAT_90 code.

XXX  pullup-10 - hopefully before RC2


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/compat/common/compat_90_mod.c
cvs rdiff -u -r1.9 -r1.10 src/sys/compat/common/compat_mod.h
cvs rdiff -u -r1.10 -r1.11 src/sys/compat/common/files.common
cvs rdiff -u -r0 -r1.1 src/sys/compat/common/net_inet6_nd_90.c
cvs rdiff -u -r1.22 -r1.23 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.1 -r1.2 src/sys/modules/compat_90/Makefile
cvs rdiff -u -r1.254 -r1.255 src/sys/netinet6/icmp6.c
cvs rdiff -u -r1.290 -r1.291 src/sys/netinet6/in6.c
cvs rdiff -u -r1.280 -r1.281 src/sys/netinet6/nd6.c
cvs rdiff -u -r1.26 -r1.27 src/sys/sys/compat_stub.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/compat/common/compat_90_mod.c
diff -u src/sys/compat/common/compat_90_mod.c:1.4 src/sys/compat/common/compat_90_mod.c:1.5
--- src/sys/compat/common/compat_90_mod.c:1.4	Mon Dec 19 23:19:51 2022
+++ src/sys/compat/common/compat_90_mod.c	Sat Dec  9 15:21:01 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_90_mod.c,v 1.4 2022/12/19 23:19:51 pgoyette Exp $	*/
+/*	$NetBSD: compat_90_mod.c,v 1.5 2023/12/09 15:21:01 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_90_mod.c,v 1.4 2022/12/19 23:19:51 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_90_mod.c,v 1.5 2023/12/09 15:21:01 pgoyette Exp $");
 
 #include 
 #include 
@@ -50,14 +50,21 @@ int
 compat_90_init(void)
 {
 
+	net_inet6_nd_90_init();
 	return vfs_syscalls_90_init();
 }
 
 int
 compat_90_fini(void)
 {
+	int error;
 
-	return vfs_syscalls_90_fini();
+	error = vfs_syscalls_90_fini();
+	if (error != 0)
+		return error;
+
+	net_inet6_nd_90_fini();
+	return error;
 }
 
 MODULE(MODULE_CLASS_EXEC, compat_90, "compat_100");

Index: src/sys/compat/common/compat_mod.h
diff -u src/sys/compat/common/compat_mod.h:1.9 src/sys/compat/common/compat_mod.h:1.10
--- src/sys/compat/common/compat_mod.h:1.9	Fri Aug 18 19:41:18 2023
+++ src/sys/compat/common/compat_mod.h	Sat Dec  9 15:21:01 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_mod.h,v 1.9 2023/08/18 19:41:18 christos Exp $	*/
+/*	$NetBSD: compat_mod.h,v 1.10 2023/12/09 15:21:01 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2013, 2019 The NetBSD Foundation, Inc.
@@ -46,6 +46,8 @@ int compat_90_init(void);
 int compat_90_fini(void);
 int vfs_syscalls_90_init(void);
 int vfs_syscalls_90_fini(void);
+int net_inet6_nd_90_init(void);
+int net_inet6_nd_90_fini(void);
 #endif
 
 #ifdef COMPAT_80

Index: src/sys/compat/common/files.common
diff -u src/sys/compat/common/files.common:1.10 src/sys/compat/common/files.common:1.11
--- src/sys/compat/common/files.common:1.10	Fri Aug 18 19:41:18 2023
+++ src/sys/compat/common/files.common	Sat Dec  9 15:21:01 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: files.common,v 1.10 2023/08/18 19:41:18 christos Exp $
+#	$NetBSD: files.common,v 1.11 2023/12/09 15:21:01 pgoyette Exp $
 
 #
 # Generic utility files, used by various compat options.
@@ -109,6 +109,7 @@ file	compat/common/if_media_80.c		compat
 # Compatibility code for NetBSD 9.0
 file	compat/common/compat_90_mod.c		compat_90
 file	compat/common/vfs_syscalls_90.c		compat_90
+file	compat/common/net_inet6_nd_90.c		compat_90
 
 # Compatibility code for NetBSD 10.0
 file	compat/common/compat_100_mod.c		compat_100

Index: src/sys/kern/compat_stub.c
diff -u src/sys/kern/compat_stub.c:1.22 src/sys/kern/compat_stub.c:1.23
--- src/sys/kern/compat_stub.c:1.22	Mon Aug  9 20:49:10 2021
+++ src/sys/kern/compat_stub.c	Sat Dec  9 15:21:01 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_stub.c,v 1.22 2021/08/09 20:49:10 andvar Exp $	*/
+/* $NetBSD: compat_stub.c,v 1.23 2023/12/09 15:21:01 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -286,4 +286,8 @@ struct coredump_elf64_hook_t coredump_el
 struct uvm_coredump_walkmap_hook_t uvm_coredump_walkmap_hook;
 struct uvm_coredump_count_segs_hook_t uvm_coredump_count_segs_hook;
 
+/*
+ * Hooks for interacting with remnants of netinet6/nd6 removal
+ */
+struct net_inet6_nd_90_hook_t net_inet6_nd_90_hook;
 

Index: src/sys/modules/compat_90/Makefile
diff -u src/sys/modules/compat_90/Makefile:1.1 src/sys/modules/compat_90/Makefile:1.2
--- src/sys/modules/compat_90/Makefile:1.1	Sun Sep 22 22:59:39 2019
+++ 

CVS commit: src/sys

2023-12-09 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Dec  9 15:21:02 UTC 2023

Modified Files:
src/sys/compat/common: compat_90_mod.c compat_mod.h files.common
src/sys/kern: compat_stub.c
src/sys/modules/compat_90: Makefile
src/sys/netinet6: icmp6.c in6.c nd6.c
src/sys/sys: compat_stub.h
Added Files:
src/sys/compat/common: net_inet6_nd_90.c

Log Message:
Modularize the COMPAT_90 code that resulted from the removal of
netinet6/nd6 from the kernel.  Now, the minimal compat code can
be successfully loaded and unloaded along with the rest of the
COMPAT_90 code.

XXX  pullup-10 - hopefully before RC2


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/compat/common/compat_90_mod.c
cvs rdiff -u -r1.9 -r1.10 src/sys/compat/common/compat_mod.h
cvs rdiff -u -r1.10 -r1.11 src/sys/compat/common/files.common
cvs rdiff -u -r0 -r1.1 src/sys/compat/common/net_inet6_nd_90.c
cvs rdiff -u -r1.22 -r1.23 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.1 -r1.2 src/sys/modules/compat_90/Makefile
cvs rdiff -u -r1.254 -r1.255 src/sys/netinet6/icmp6.c
cvs rdiff -u -r1.290 -r1.291 src/sys/netinet6/in6.c
cvs rdiff -u -r1.280 -r1.281 src/sys/netinet6/nd6.c
cvs rdiff -u -r1.26 -r1.27 src/sys/sys/compat_stub.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-12-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  9 13:39:36 UTC 2023

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

Log Message:
Ammend ticket #1920 for additional pullups.
Tickets #1923 and #1924.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.210 -r1.1.2.211 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.210 src/doc/CHANGES-8.3:1.1.2.211
--- src/doc/CHANGES-8.3:1.1.2.210	Wed Nov 29 18:54:37 2023
+++ src/doc/CHANGES-8.3	Sat Dec  9 13:39:36 2023
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES-8.3,v 1.1.2.210 2023/11/29 18:54:37 martin Exp $
+$NetBSD: CHANGES-8.3,v 1.1.2.211 2023/12/09 13:39:36 martin Exp $
 
 A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3
 release:
@@ -4100,6 +4100,7 @@ external/gpl3/binutils/dist/gas/config/t
 
 sys/kern/exec_subr.c1.86,1.87
 tests/lib/libc/sys/t_setrlimit.c		1.8,1.9
+tests/lib/libc/sys/Makefile			1.75
 
 	PR 57711: fix setrlimit(RLIMIT_STACK) in current process.
 	[riastradh, ticket #1920]
@@ -4114,3 +4115,19 @@ etc/namedb/root.cache1.24-1.26
 	Update root name servers to 2023112702 (November 27, 2023).
 	[taca, ticket #1922]
 
+lib/libc/gen/vis.c1.75-1.86
+tests/lib/libc/gen/t_vis.c			1.10-1.14
+
+	vis(3): PR 57573: fix buffer overruns in edge cases.
+	PR 56260: fix out-of-bounds stack read.
+	[riastradh, ticket #1923]
+
+distrib/sets/lists/debug/mi			1.424
+distrib/sets/lists/tests/mi			1.1297 (patch)
+lib/libpthread/pthread.c			1.184
+tests/lib/libpthread/Makefile			1.16
+tests/lib/libpthread/t_stack.c			1.1-1.6
+
+	pthread: PR 57721: fix user-allocated stack addressing.
+	[riastradh, ticket #1924]
+



CVS commit: [netbsd-8] src/doc

2023-12-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  9 13:39:36 UTC 2023

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

Log Message:
Ammend ticket #1920 for additional pullups.
Tickets #1923 and #1924.


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

2023-12-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  9 13:36:03 UTC 2023

Modified Files:
src/distrib/sets/lists/debug [netbsd-8]: mi
src/distrib/sets/lists/tests [netbsd-8]: mi
src/lib/libpthread [netbsd-8]: pthread.c
src/tests/lib/libpthread [netbsd-8]: Makefile
Added Files:
src/tests/lib/libpthread [netbsd-8]: t_stack.c

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

tests/lib/libpthread/Makefile: revision 1.16
lib/libpthread/pthread.c: revision 1.184
distrib/sets/lists/debug/mi: revision 1.424
distrib/sets/lists/tests/mi: revision 1.1297
tests/lib/libpthread/t_stack.c: revision 1.1
tests/lib/libpthread/t_stack.c: revision 1.2
tests/lib/libpthread/t_stack.c: revision 1.3
tests/lib/libpthread/t_stack.c: revision 1.4
tests/lib/libpthread/t_stack.c: revision 1.5
tests/lib/libpthread/t_stack.c: revision 1.6

pthread: Add tests for pthread user stack allocation.
PR lib/57721

libpthread/t_stack: Make this more robust to the guard size bug.
Make sure to allocate enough space for the thread's stack for a guard
even though there shouldn't be one, so that when we run the thread,
it doesn't start with the stack pointer pointing into someone else's
allocation (like malloc) causing stack frames to trash another data
structure -- or causing the user of that data structure to trash the
stack frames.
PR lib/57721

libpthread/t_stack: Omit needless cast in previous.
Arose from an earlier draft of the change.
PR lib/57721

libpthread/t_stack: Appease gcc12 maybe-uninitialized warning.
The jmp_buf is not, in fact, uninitialized at the point of use, but
it doesn't hurt to narrow the scope a bit to between when the jmp_buf
is initialized by setjmp, and when the signal handler might be called
after sigaction.
Noted by prlw1.
PR lib/57721

libpthread/t_stack: Fix format string for size_t.
Tested this on i386 since that had been crashing before, but i386
doesn't see %zu for unsigned int as a problem.
PR lib/57721

pthread: Don't adjust user-allocated stack addresses by guardsize.
PR lib/57721


To generate a diff of this commit:
cvs rdiff -u -r1.216.2.10 -r1.216.2.11 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.752.2.11 -r1.752.2.12 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.147.8.3 -r1.147.8.4 src/lib/libpthread/pthread.c
cvs rdiff -u -r1.12.6.1 -r1.12.6.2 src/tests/lib/libpthread/Makefile
cvs rdiff -u -r0 -r1.6.6.2 src/tests/lib/libpthread/t_stack.c

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/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.216.2.10 src/distrib/sets/lists/debug/mi:1.216.2.11
--- src/distrib/sets/lists/debug/mi:1.216.2.10	Wed Aug  9 16:16:40 2023
+++ src/distrib/sets/lists/debug/mi	Sat Dec  9 13:36:03 2023
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.216.2.10 2023/08/09 16:16:40 martin Exp $
+# $NetBSD: mi,v 1.216.2.11 2023/12/09 13:36:03 martin Exp $
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/lib	comp-sys-usr		compatdir
 ./usr/lib/i18n/libBIG5_g.a			comp-c-debuglib		debuglib,compatfile
@@ -2219,6 +2219,7 @@
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_sigmask.debug		tests-lib-tests		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_sigsuspend.debug		tests-lib-tests		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_sleep.debug		tests-lib-tests		debug,atf,compattestfile
+./usr/libdata/debug/usr/tests/lib/libpthread/t_stack.debug		tests-lib-tests		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_status.debug		tests-obsolete		obsolete,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_swapcontext.debug	tests-lib-tests		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_timedmutex.debug		tests-lib-tests		debug,atf,compattestfile

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.752.2.11 src/distrib/sets/lists/tests/mi:1.752.2.12
--- src/distrib/sets/lists/tests/mi:1.752.2.11	Wed Aug  9 16:16:40 2023
+++ src/distrib/sets/lists/tests/mi	Sat Dec  9 13:36:03 2023
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.752.2.11 2023/08/09 16:16:40 martin Exp $
+# $NetBSD: mi,v 1.752.2.12 2023/12/09 13:36:03 martin Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -3070,6 +3070,7 @@
 ./usr/tests/lib/libpthread/t_sigmask		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libpthread/t_sigsuspend		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libpthread/t_sleep		tests-lib-tests		compattestfile,atf
+./usr/tests/lib/libpthread/t_stack		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libpthread/t_status		tests-obsolete		obsolete
 ./usr/tests/lib/libpthread/t_swapcontext	tests-lib-tests		compattestfile,atf
 

CVS commit: [netbsd-8] src

2023-12-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  9 13:36:03 UTC 2023

Modified Files:
src/distrib/sets/lists/debug [netbsd-8]: mi
src/distrib/sets/lists/tests [netbsd-8]: mi
src/lib/libpthread [netbsd-8]: pthread.c
src/tests/lib/libpthread [netbsd-8]: Makefile
Added Files:
src/tests/lib/libpthread [netbsd-8]: t_stack.c

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

tests/lib/libpthread/Makefile: revision 1.16
lib/libpthread/pthread.c: revision 1.184
distrib/sets/lists/debug/mi: revision 1.424
distrib/sets/lists/tests/mi: revision 1.1297
tests/lib/libpthread/t_stack.c: revision 1.1
tests/lib/libpthread/t_stack.c: revision 1.2
tests/lib/libpthread/t_stack.c: revision 1.3
tests/lib/libpthread/t_stack.c: revision 1.4
tests/lib/libpthread/t_stack.c: revision 1.5
tests/lib/libpthread/t_stack.c: revision 1.6

pthread: Add tests for pthread user stack allocation.
PR lib/57721

libpthread/t_stack: Make this more robust to the guard size bug.
Make sure to allocate enough space for the thread's stack for a guard
even though there shouldn't be one, so that when we run the thread,
it doesn't start with the stack pointer pointing into someone else's
allocation (like malloc) causing stack frames to trash another data
structure -- or causing the user of that data structure to trash the
stack frames.
PR lib/57721

libpthread/t_stack: Omit needless cast in previous.
Arose from an earlier draft of the change.
PR lib/57721

libpthread/t_stack: Appease gcc12 maybe-uninitialized warning.
The jmp_buf is not, in fact, uninitialized at the point of use, but
it doesn't hurt to narrow the scope a bit to between when the jmp_buf
is initialized by setjmp, and when the signal handler might be called
after sigaction.
Noted by prlw1.
PR lib/57721

libpthread/t_stack: Fix format string for size_t.
Tested this on i386 since that had been crashing before, but i386
doesn't see %zu for unsigned int as a problem.
PR lib/57721

pthread: Don't adjust user-allocated stack addresses by guardsize.
PR lib/57721


To generate a diff of this commit:
cvs rdiff -u -r1.216.2.10 -r1.216.2.11 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.752.2.11 -r1.752.2.12 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.147.8.3 -r1.147.8.4 src/lib/libpthread/pthread.c
cvs rdiff -u -r1.12.6.1 -r1.12.6.2 src/tests/lib/libpthread/Makefile
cvs rdiff -u -r0 -r1.6.6.2 src/tests/lib/libpthread/t_stack.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-12-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  9 13:26:09 UTC 2023

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

Log Message:
Ammend ticket #1769 for additional pullups.
Tickets #1773 - #1775.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.118 -r1.1.2.119 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.118 src/doc/CHANGES-9.4:1.1.2.119
--- src/doc/CHANGES-9.4:1.1.2.118	Wed Nov 29 19:02:37 2023
+++ src/doc/CHANGES-9.4	Sat Dec  9 13:26:09 2023
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.118 2023/11/29 19:02:37 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.119 2023/12/09 13:26:09 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -2439,6 +2439,7 @@ sys/kern/uipc_mbuf.c1.252
 
 sys/kern/exec_subr.c1.86,1.87
 tests/lib/libc/sys/t_setrlimit.c		1.8,1.9
+tests/lib/libc/sys/Makefile			1.75
 
 	PR 57711: fix setrlimit(RLIMIT_STACK) in current process.
 	[riastradh, ticket #1769]
@@ -2459,3 +2460,24 @@ sys/dev/wscons/wsemul_vt100.c			1.47,1.4
 	"string" state.
 	[gutteridge, ticket #1772]
 
+sys/arch/mips/mips/lock_stubs_llsc.S		1.18
+
+	mips: fix compilation for some MP kernels (not build by default).
+	[andvar, ticket #1773]
+
+lib/libc/gen/vis.c1.75-1.86
+tests/lib/libc/gen/t_vis.c			1.10-1.14
+
+	vis(3): PR 57573: fix buffer overruns in edge cases.
+	PR 56260: fix out-of-bounds stack read.
+	[riastradh, ticket #1774]
+
+distrib/sets/lists/debug/mi			1.424
+distrib/sets/lists/tests/mi			1.1297 (patch)
+lib/libpthread/pthread.c			1.184
+tests/lib/libpthread/Makefile			1.16
+tests/lib/libpthread/t_stack.c			1.1-1.6
+
+	pthread: PR 57721: fix user-allocated stack addressing.
+	[riastradh, ticket #1775]
+



CVS commit: [netbsd-9] src/doc

2023-12-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  9 13:26:09 UTC 2023

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

Log Message:
Ammend ticket #1769 for additional pullups.
Tickets #1773 - #1775.


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

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



CVS commit: [netbsd-9] src

2023-12-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  9 13:24:24 UTC 2023

Modified Files:
src/distrib/sets/lists/debug [netbsd-9]: mi
src/distrib/sets/lists/tests [netbsd-9]: mi
src/lib/libpthread [netbsd-9]: pthread.c
src/tests/lib/libpthread [netbsd-9]: Makefile
Added Files:
src/tests/lib/libpthread [netbsd-9]: t_stack.c

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

tests/lib/libpthread/Makefile: revision 1.16
lib/libpthread/pthread.c: revision 1.184
distrib/sets/lists/debug/mi: revision 1.424
distrib/sets/lists/tests/mi: revision 1.1297
tests/lib/libpthread/t_stack.c: revision 1.1
tests/lib/libpthread/t_stack.c: revision 1.2
tests/lib/libpthread/t_stack.c: revision 1.3
tests/lib/libpthread/t_stack.c: revision 1.4
tests/lib/libpthread/t_stack.c: revision 1.5
tests/lib/libpthread/t_stack.c: revision 1.6

pthread: Add tests for pthread user stack allocation.
PR lib/57721

libpthread/t_stack: Make this more robust to the guard size bug.
Make sure to allocate enough space for the thread's stack for a guard
even though there shouldn't be one, so that when we run the thread,
it doesn't start with the stack pointer pointing into someone else's
allocation (like malloc) causing stack frames to trash another data
structure -- or causing the user of that data structure to trash the
stack frames.
PR lib/57721

libpthread/t_stack: Omit needless cast in previous.
Arose from an earlier draft of the change.
PR lib/57721

libpthread/t_stack: Appease gcc12 maybe-uninitialized warning.
The jmp_buf is not, in fact, uninitialized at the point of use, but
it doesn't hurt to narrow the scope a bit to between when the jmp_buf
is initialized by setjmp, and when the signal handler might be called
after sigaction.
Noted by prlw1.
PR lib/57721

libpthread/t_stack: Fix format string for size_t.
Tested this on i386 since that had been crashing before, but i386
doesn't see %zu for unsigned int as a problem.
PR lib/57721

pthread: Don't adjust user-allocated stack addresses by guardsize.
PR lib/57721


To generate a diff of this commit:
cvs rdiff -u -r1.285.2.2 -r1.285.2.3 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.818.2.3 -r1.818.2.4 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.153.2.2 -r1.153.2.3 src/lib/libpthread/pthread.c
cvs rdiff -u -r1.14 -r1.14.2.1 src/tests/lib/libpthread/Makefile
cvs rdiff -u -r0 -r1.6.4.2 src/tests/lib/libpthread/t_stack.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

2023-12-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  9 13:24:24 UTC 2023

Modified Files:
src/distrib/sets/lists/debug [netbsd-9]: mi
src/distrib/sets/lists/tests [netbsd-9]: mi
src/lib/libpthread [netbsd-9]: pthread.c
src/tests/lib/libpthread [netbsd-9]: Makefile
Added Files:
src/tests/lib/libpthread [netbsd-9]: t_stack.c

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

tests/lib/libpthread/Makefile: revision 1.16
lib/libpthread/pthread.c: revision 1.184
distrib/sets/lists/debug/mi: revision 1.424
distrib/sets/lists/tests/mi: revision 1.1297
tests/lib/libpthread/t_stack.c: revision 1.1
tests/lib/libpthread/t_stack.c: revision 1.2
tests/lib/libpthread/t_stack.c: revision 1.3
tests/lib/libpthread/t_stack.c: revision 1.4
tests/lib/libpthread/t_stack.c: revision 1.5
tests/lib/libpthread/t_stack.c: revision 1.6

pthread: Add tests for pthread user stack allocation.
PR lib/57721

libpthread/t_stack: Make this more robust to the guard size bug.
Make sure to allocate enough space for the thread's stack for a guard
even though there shouldn't be one, so that when we run the thread,
it doesn't start with the stack pointer pointing into someone else's
allocation (like malloc) causing stack frames to trash another data
structure -- or causing the user of that data structure to trash the
stack frames.
PR lib/57721

libpthread/t_stack: Omit needless cast in previous.
Arose from an earlier draft of the change.
PR lib/57721

libpthread/t_stack: Appease gcc12 maybe-uninitialized warning.
The jmp_buf is not, in fact, uninitialized at the point of use, but
it doesn't hurt to narrow the scope a bit to between when the jmp_buf
is initialized by setjmp, and when the signal handler might be called
after sigaction.
Noted by prlw1.
PR lib/57721

libpthread/t_stack: Fix format string for size_t.
Tested this on i386 since that had been crashing before, but i386
doesn't see %zu for unsigned int as a problem.
PR lib/57721

pthread: Don't adjust user-allocated stack addresses by guardsize.
PR lib/57721


To generate a diff of this commit:
cvs rdiff -u -r1.285.2.2 -r1.285.2.3 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.818.2.3 -r1.818.2.4 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.153.2.2 -r1.153.2.3 src/lib/libpthread/pthread.c
cvs rdiff -u -r1.14 -r1.14.2.1 src/tests/lib/libpthread/Makefile
cvs rdiff -u -r0 -r1.6.4.2 src/tests/lib/libpthread/t_stack.c

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/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.285.2.2 src/distrib/sets/lists/debug/mi:1.285.2.3
--- src/distrib/sets/lists/debug/mi:1.285.2.2	Fri Aug 11 12:13:09 2023
+++ src/distrib/sets/lists/debug/mi	Sat Dec  9 13:24:24 2023
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.285.2.2 2023/08/11 12:13:09 sborrill Exp $
+# $NetBSD: mi,v 1.285.2.3 2023/12/09 13:24:24 martin Exp $
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/lib	comp-sys-usr		compatdir
 ./usr/lib/i18n/libBIG5_g.a			comp-c-debuglib		debuglib,compatfile
@@ -2272,6 +2272,7 @@
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_sigmask.debug		tests-lib-tests		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_sigsuspend.debug		tests-lib-tests		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_sleep.debug		tests-lib-tests		debug,atf,compattestfile
+./usr/libdata/debug/usr/tests/lib/libpthread/t_stack.debug		tests-lib-tests		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_status.debug		tests-obsolete		obsolete,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_swapcontext.debug	tests-lib-tests		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_timedmutex.debug		tests-lib-tests		debug,atf,compattestfile

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.818.2.3 src/distrib/sets/lists/tests/mi:1.818.2.4
--- src/distrib/sets/lists/tests/mi:1.818.2.3	Fri Aug 11 12:13:09 2023
+++ src/distrib/sets/lists/tests/mi	Sat Dec  9 13:24:24 2023
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.818.2.3 2023/08/11 12:13:09 sborrill Exp $
+# $NetBSD: mi,v 1.818.2.4 2023/12/09 13:24:24 martin Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -3270,6 +3270,7 @@
 ./usr/tests/lib/libpthread/t_sigmask		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libpthread/t_sigsuspend		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libpthread/t_sleep		tests-lib-tests		compattestfile,atf
+./usr/tests/lib/libpthread/t_stack		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libpthread/t_status		tests-obsolete		obsolete
 ./usr/tests/lib/libpthread/t_swapcontext	tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libpthread/t_thrd		

CVS commit: [netbsd-10] src/doc

2023-12-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  9 13:15:20 UTC 2023

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

Log Message:
Ammend ticket #477 for additional pullups.
Tickets #484 - #486


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.166 -r1.1.2.167 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.166 src/doc/CHANGES-10.0:1.1.2.167
--- src/doc/CHANGES-10.0:1.1.2.166	Wed Nov 29 12:36:24 2023
+++ src/doc/CHANGES-10.0	Sat Dec  9 13:15:20 2023
@@ -1,5 +1,5 @@
 
-# $NetBSD: CHANGES-10.0,v 1.1.2.166 2023/11/29 12:36:24 martin Exp $
+# $NetBSD: CHANGES-10.0,v 1.1.2.167 2023/12/09 13:15:20 martin Exp $
 
 A complete list of changes from the initial NetBSD 10.0 branch on 2022-12-16
 until the 10.0 release:
@@ -14204,6 +14204,7 @@ sys/net/lagg/if_lagg_lacp.c			1.26,1.27
 
 sys/kern/exec_subr.c1.86,1.87
 tests/lib/libc/sys/t_setrlimit.c		1.8,1.9
+tests/lib/libc/sys/Makefile			1.75
 
 	PR 57711: fix setrlimit(RLIMIT_STACK) in current process.
 	[riastradh, ticket #477]
@@ -14245,3 +14246,21 @@ sys/dev/pci/pci_resource.c			1.4
 	pci: Improve resource allocation for non-prefetchable BARs.
 	[jmcneill, ticket #483]
 
+sys/arch/mips/mips/lock_stubs_llsc.S		1.18
+
+	mips: fix compilation for some MP kernels (not build by default).
+	[andvar, ticket #484]
+
+lib/libc/gen/vis.c1.76-1.86
+tests/lib/libc/gen/t_vis.c			1.10-1.14
+
+	vis(3): PR 57573: fix buffer overruns in edge cases.
+	[riastradh, ticket #485]
+
+distrib/sets/lists/man/mi			1.1767
+share/man/man7/Makefile1.38,1.39
+share/man/man7/stack.71.1-1.6
+
+	stack(7): New man page to help with PR 57708 and related inquiries.
+	[riastradh, ticket #486]
+



CVS commit: [netbsd-10] src/doc

2023-12-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  9 13:15:20 UTC 2023

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

Log Message:
Ammend ticket #477 for additional pullups.
Tickets #484 - #486


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

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



CVS commit: [netbsd-10] src

2023-12-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  9 13:13:49 UTC 2023

Modified Files:
src/distrib/sets/lists/man [netbsd-10]: mi
src/share/man/man7 [netbsd-10]: Makefile
Added Files:
src/share/man/man7 [netbsd-10]: stack.7

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

distrib/sets/lists/man/mi: revision 1.1767
share/man/man7/Makefile: revision 1.38
share/man/man7/Makefile: revision 1.39
share/man/man7/stack.7: revision 1.1
share/man/man7/stack.7: revision 1.2
share/man/man7/stack.7: revision 1.3
share/man/man7/stack.7: revision 1.4
share/man/man7/stack.7: revision 1.5
share/man/man7/stack.7: revision 1.6

share/man/man7/Makefile: Split MAN on separate lines, and sort.
Makes sorting and merging changes easier.
No functional change intended.

Preparing for a new stack(7) in the service of PR pkg/57708.

stack(7): New man page.
Should help with PR pkg/57708.

stack(7): Clarify thread stack guard vs program stack guard.
Just in case this confuses anyone dealing with PR pkg/57708.

stack(7): Clarify some wording and diagrams.
PR pkg/57708

stack(7): Consistently say `(in)accessible pages', not `... stack'.
PR pkg/57708

share/man/man7/Makefile: Hook stack.7
stack(7): Minor clarifications and wording tweaks.
Suggested by pgoyette@ and uwe@.
PR pkg/57708

stack(7): Fix diagram of non-main thread stacks.
Had stackaddr (pthread_attr_setstack parameter, lowest-numbered
virtual address of stack region) confused with stack base (where the
stack grows from, which is the highest-numbered virtual address on
machines where stack grows down).
PR pkg/57708


To generate a diff of this commit:
cvs rdiff -u -r1.1757.2.5 -r1.1757.2.6 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.36 -r1.36.6.1 src/share/man/man7/Makefile
cvs rdiff -u -r0 -r1.6.2.2 src/share/man/man7/stack.7

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.1757.2.5 src/distrib/sets/lists/man/mi:1.1757.2.6
--- src/distrib/sets/lists/man/mi:1.1757.2.5	Sun Oct  8 13:19:33 2023
+++ src/distrib/sets/lists/man/mi	Sat Dec  9 13:13:48 2023
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1757.2.5 2023/10/08 13:19:33 martin Exp $
+# $NetBSD: mi,v 1.1757.2.6 2023/12/09 13:13:48 martin Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -2539,6 +2539,7 @@
 ./usr/share/man/cat7/setuid.0			man-reference-catman	.cat
 ./usr/share/man/cat7/signal.0			man-reference-catman	.cat
 ./usr/share/man/cat7/src.0			man-reference-catman	.cat
+./usr/share/man/cat7/stack.0			man-reference-catman	.cat
 ./usr/share/man/cat7/sticky.0			man-reference-catman	.cat
 ./usr/share/man/cat7/symlink.0			man-reference-catman	.cat
 ./usr/share/man/cat7/sysctl.0			man-reference-catman	.cat
@@ -5828,6 +5829,7 @@
 ./usr/share/man/html7/setuid.html		man-reference-htmlman	html
 ./usr/share/man/html7/signal.html		man-reference-htmlman	html
 ./usr/share/man/html7/src.html			man-reference-htmlman	html
+./usr/share/man/html7/stack.html		man-reference-htmlman	html
 ./usr/share/man/html7/sticky.html		man-reference-htmlman	html
 ./usr/share/man/html7/symlink.html		man-reference-htmlman	html
 ./usr/share/man/html7/sysctl.html		man-reference-htmlman	html
@@ -9094,6 +9096,7 @@
 ./usr/share/man/man7/setuid.7			man-reference-man	.man
 ./usr/share/man/man7/signal.7			man-reference-man	.man
 ./usr/share/man/man7/src.7			man-reference-man	.man
+./usr/share/man/man7/stack.7			man-reference-man	.man
 ./usr/share/man/man7/sticky.7			man-reference-man	.man
 ./usr/share/man/man7/symlink.7			man-reference-man	.man
 ./usr/share/man/man7/sysctl.7			man-reference-man	.man

Index: src/share/man/man7/Makefile
diff -u src/share/man/man7/Makefile:1.36 src/share/man/man7/Makefile:1.36.6.1
--- src/share/man/man7/Makefile:1.36	Sun Jan 10 23:24:26 2021
+++ src/share/man/man7/Makefile	Sat Dec  9 13:13:49 2023
@@ -1,16 +1,39 @@
-#	$NetBSD: Makefile,v 1.36 2021/01/10 23:24:26 riastradh Exp $
+#	$NetBSD: Makefile,v 1.36.6.1 2023/12/09 13:13:49 martin Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/5/93
 
 .include 
 
 # missing: eqnchar.7 man.7 ms.7 term.7
 
-MAN=	ascii.7 c.7 entropy.7 environ.7 glob.7 groups.7 hier.7 hostname.7 \
-	intro.7 \
-	kernel_sanitizers.7 mailaddr.7 module.7 nls.7 operator.7 orders.7 \
-	pkgsrc.7 release.7 \
-	rfc6056.7 security.7 script.7 setuid.7 signal.7 src.7 sticky.7 \
-	symlink.7 sysctl.7 tests.7 users.7
+MAN+=	ascii.7
+MAN+=	c.7
+MAN+=	entropy.7
+MAN+=	environ.7
+MAN+=	glob.7
+MAN+=	groups.7
+MAN+=	hier.7
+MAN+=	hostname.7
+MAN+=	intro.7
+MAN+=	kernel_sanitizers.7
+MAN+=	mailaddr.7
+MAN+=	module.7
+MAN+=	nls.7
+MAN+=	operator.7
+MAN+=	orders.7
+MAN+=	pkgsrc.7
+MAN+=	release.7
+MAN+=	rfc6056.7
+MAN+=	script.7
+MAN+=	security.7
+MAN+=	setuid.7
+MAN+=	signal.7
+MAN+=	src.7
+MAN+=	stack.7

CVS commit: [netbsd-10] src

2023-12-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  9 13:13:49 UTC 2023

Modified Files:
src/distrib/sets/lists/man [netbsd-10]: mi
src/share/man/man7 [netbsd-10]: Makefile
Added Files:
src/share/man/man7 [netbsd-10]: stack.7

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

distrib/sets/lists/man/mi: revision 1.1767
share/man/man7/Makefile: revision 1.38
share/man/man7/Makefile: revision 1.39
share/man/man7/stack.7: revision 1.1
share/man/man7/stack.7: revision 1.2
share/man/man7/stack.7: revision 1.3
share/man/man7/stack.7: revision 1.4
share/man/man7/stack.7: revision 1.5
share/man/man7/stack.7: revision 1.6

share/man/man7/Makefile: Split MAN on separate lines, and sort.
Makes sorting and merging changes easier.
No functional change intended.

Preparing for a new stack(7) in the service of PR pkg/57708.

stack(7): New man page.
Should help with PR pkg/57708.

stack(7): Clarify thread stack guard vs program stack guard.
Just in case this confuses anyone dealing with PR pkg/57708.

stack(7): Clarify some wording and diagrams.
PR pkg/57708

stack(7): Consistently say `(in)accessible pages', not `... stack'.
PR pkg/57708

share/man/man7/Makefile: Hook stack.7
stack(7): Minor clarifications and wording tweaks.
Suggested by pgoyette@ and uwe@.
PR pkg/57708

stack(7): Fix diagram of non-main thread stacks.
Had stackaddr (pthread_attr_setstack parameter, lowest-numbered
virtual address of stack region) confused with stack base (where the
stack grows from, which is the highest-numbered virtual address on
machines where stack grows down).
PR pkg/57708


To generate a diff of this commit:
cvs rdiff -u -r1.1757.2.5 -r1.1757.2.6 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.36 -r1.36.6.1 src/share/man/man7/Makefile
cvs rdiff -u -r0 -r1.6.2.2 src/share/man/man7/stack.7

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



CVS commit: [netbsd-8] src

2023-12-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  9 13:10:16 UTC 2023

Modified Files:
src/lib/libc/gen [netbsd-8]: vis.c
src/tests/lib/libc/gen [netbsd-8]: t_vis.c

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

lib/libc/gen/vis.c: revision 1.75-1.86
tests/lib/libc/gen/t_vis.c: revision 1.10-1.14

PR 56260: fix out-of-bounds stack read.

vis(3): Avoid nonportable MIN in portable code.

vis(3) tests: Add xfail test for encoding overflow.

>From Kyle Evans .
PR lib/57573

vis(3) tests: Expand tests and diagnostic outputs on failure.
PR lib/57573

vis(3) tests: Test another overflow edge case.
Related to PR lib/57573.

vis(3): Make maxolen unsigned size_t, not ssize_t.
It is initialized once either to *dlen, which is unsigned size_t, or
to wcslen(start) * MB_MAX_LEN + 1, and wcslen returns unsigned size_t
too.  So there appears to have never been any reason for this to be
signed.
Part of PR lib/57573.

vis(3): Make mbslength unsigned.
Sprinkle assertions and comments justifying the proposition that it
would never go negative if signed.
Obviates need to worry about mblength > SSIZE_MAX.
Prompted by PR lib/57573.

vis(3): Avoid arithmetic overflow before calloc(3).
Prompted by PR lib/57573.

vis(3): Call wcslen(start) only once.
It had better not change between these two times!
Prompted by PR lib/57573.

vis(3): Avoid potential arithmetic overflow in maxolen.
Can't easily prove that this overflow is impossible, so let's add a
check.
Prompted by PR lib/57573.

vis(3): Fix main part of PR lib/57573.
>From Kyle Evans .

vis(3): Fix one more buffer overrun in an edge case.
PR lib/57573

vis(3): Sort includes.  No functional change intended.
Prompted by PR lib/57573.

vis(3): Need  for SIZE_MAX, per C standard.
>From Kyle Evans .
Followup to PR lib/57573.

vis(3): Per KNF, sys/param.h comes before sys/types.h.
Which is nice because that's also lexicographic.


To generate a diff of this commit:
cvs rdiff -u -r1.73.4.1 -r1.73.4.2 src/lib/libc/gen/vis.c
cvs rdiff -u -r1.9 -r1.9.6.1 src/tests/lib/libc/gen/t_vis.c

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

Modified files:

Index: src/lib/libc/gen/vis.c
diff -u src/lib/libc/gen/vis.c:1.73.4.1 src/lib/libc/gen/vis.c:1.73.4.2
--- src/lib/libc/gen/vis.c:1.73.4.1	Tue Jan 16 14:15:50 2018
+++ src/lib/libc/gen/vis.c	Sat Dec  9 13:10:16 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: vis.c,v 1.73.4.1 2018/01/16 14:15:50 martin Exp $	*/
+/*	$NetBSD: vis.c,v 1.73.4.2 2023/12/09 13:10:16 martin Exp $	*/
 
 /*-
  * Copyright (c) 1989, 1993
@@ -57,7 +57,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: vis.c,v 1.73.4.1 2018/01/16 14:15:50 martin Exp $");
+__RCSID("$NetBSD: vis.c,v 1.73.4.2 2023/12/09 13:10:16 martin Exp $");
 #endif /* LIBC_SCCS and not lint */
 #ifdef __FBSDID
 __FBSDID("$FreeBSD$");
@@ -65,13 +65,15 @@ __FBSDID("$FreeBSD$");
 #endif
 
 #include "namespace.h"
-#include 
+
 #include 
+#include 
 
 #include 
-#include 
 #include 
+#include 
 #include 
+#include 
 #include 
 #include 
 
@@ -353,12 +355,15 @@ makeextralist(int flags, const char *src
 	wchar_t *dst, *d;
 	size_t len;
 	const wchar_t *s;
+	mbstate_t mbstate;
 
 	len = strlen(src);
 	if ((dst = calloc(len + MAXEXTRAS, sizeof(*dst))) == NULL)
 		return NULL;
 
-	if ((flags & VIS_NOLOCALE) || mbstowcs(dst, src, len) == (size_t)-1) {
+	memset(, 0, sizeof(mbstate));
+	if ((flags & VIS_NOLOCALE)
+	|| mbsrtowcs(dst, , len, ) == (size_t)-1) {
 		size_t i;
 		for (i = 0; i < len; i++)
 			dst[i] = (wchar_t)(u_char)src[i];
@@ -393,20 +398,23 @@ static int
 istrsenvisx(char **mbdstp, size_t *dlen, const char *mbsrc, size_t mblength,
 int flags, const char *mbextra, int *cerr_ptr)
 {
+	char mbbuf[MB_LEN_MAX];
 	wchar_t *dst, *src, *pdst, *psrc, *start, *extra;
 	size_t len, olen;
 	uint64_t bmsk, wmsk;
 	wint_t c;
 	visfun_t f;
 	int clen = 0, cerr, error = -1, i, shft;
-	char *mbdst, *mdst;
-	ssize_t mbslength, maxolen;
+	char *mbdst, *mbwrite, *mdst;
+	size_t mbslength;
+	size_t maxolen;
+	mbstate_t mbstate;
 
 	_DIAGASSERT(mbdstp != NULL);
 	_DIAGASSERT(mbsrc != NULL || mblength == 0);
 	_DIAGASSERT(mbextra != NULL);
 
-	mbslength = (ssize_t)mblength;
+	mbslength = mblength;
 	/*
 	 * When inputing a single character, must also read in the
 	 * next character for nextc, the look-ahead character.
@@ -427,6 +435,14 @@ istrsenvisx(char **mbdstp, size_t *dlen,
 	 * return to the caller.
 	 */
 
+	/*
+	 * Guarantee the arithmetic on input to calloc won't overflow.
+	 */
+	if (mbslength > (SIZE_MAX - 1)/16) {
+		errno = ENOMEM;
+		return -1;
+	}
+
 	/* Allocate space for the wide char strings */
 	psrc = pdst = extra = NULL;
 	mdst = NULL;
@@ -458,10 +474,18 @@ istrsenvisx(char **mbdstp, size_t *dlen,
 	 * stop at NULs because we may be processing a block of data
 	 * that includes NULs.
 	 */
+	memset(, 0, sizeof(mbstate));
 	while 

CVS commit: [netbsd-8] src

2023-12-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  9 13:10:16 UTC 2023

Modified Files:
src/lib/libc/gen [netbsd-8]: vis.c
src/tests/lib/libc/gen [netbsd-8]: t_vis.c

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

lib/libc/gen/vis.c: revision 1.75-1.86
tests/lib/libc/gen/t_vis.c: revision 1.10-1.14

PR 56260: fix out-of-bounds stack read.

vis(3): Avoid nonportable MIN in portable code.

vis(3) tests: Add xfail test for encoding overflow.

>From Kyle Evans .
PR lib/57573

vis(3) tests: Expand tests and diagnostic outputs on failure.
PR lib/57573

vis(3) tests: Test another overflow edge case.
Related to PR lib/57573.

vis(3): Make maxolen unsigned size_t, not ssize_t.
It is initialized once either to *dlen, which is unsigned size_t, or
to wcslen(start) * MB_MAX_LEN + 1, and wcslen returns unsigned size_t
too.  So there appears to have never been any reason for this to be
signed.
Part of PR lib/57573.

vis(3): Make mbslength unsigned.
Sprinkle assertions and comments justifying the proposition that it
would never go negative if signed.
Obviates need to worry about mblength > SSIZE_MAX.
Prompted by PR lib/57573.

vis(3): Avoid arithmetic overflow before calloc(3).
Prompted by PR lib/57573.

vis(3): Call wcslen(start) only once.
It had better not change between these two times!
Prompted by PR lib/57573.

vis(3): Avoid potential arithmetic overflow in maxolen.
Can't easily prove that this overflow is impossible, so let's add a
check.
Prompted by PR lib/57573.

vis(3): Fix main part of PR lib/57573.
>From Kyle Evans .

vis(3): Fix one more buffer overrun in an edge case.
PR lib/57573

vis(3): Sort includes.  No functional change intended.
Prompted by PR lib/57573.

vis(3): Need  for SIZE_MAX, per C standard.
>From Kyle Evans .
Followup to PR lib/57573.

vis(3): Per KNF, sys/param.h comes before sys/types.h.
Which is nice because that's also lexicographic.


To generate a diff of this commit:
cvs rdiff -u -r1.73.4.1 -r1.73.4.2 src/lib/libc/gen/vis.c
cvs rdiff -u -r1.9 -r1.9.6.1 src/tests/lib/libc/gen/t_vis.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

2023-12-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  9 13:09:04 UTC 2023

Modified Files:
src/lib/libc/gen [netbsd-9]: vis.c
src/tests/lib/libc/gen [netbsd-9]: t_vis.c

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

lib/libc/gen/vis.c: revision 1.75-1.86
tests/lib/libc/gen/t_vis.c: revision 1.10-1.14

PR 56260: fix out-of-bounds stack read.

vis(3): Avoid nonportable MIN in portable code.

vis(3) tests: Add xfail test for encoding overflow.

>From Kyle Evans .
PR lib/57573

vis(3) tests: Expand tests and diagnostic outputs on failure.
PR lib/57573

vis(3) tests: Test another overflow edge case.
Related to PR lib/57573.

vis(3): Make maxolen unsigned size_t, not ssize_t.
It is initialized once either to *dlen, which is unsigned size_t, or
to wcslen(start) * MB_MAX_LEN + 1, and wcslen returns unsigned size_t
too.  So there appears to have never been any reason for this to be
signed.
Part of PR lib/57573.

vis(3): Make mbslength unsigned.
Sprinkle assertions and comments justifying the proposition that it
would never go negative if signed.
Obviates need to worry about mblength > SSIZE_MAX.
Prompted by PR lib/57573.

vis(3): Avoid arithmetic overflow before calloc(3).
Prompted by PR lib/57573.

vis(3): Call wcslen(start) only once.
It had better not change between these two times!
Prompted by PR lib/57573.

vis(3): Avoid potential arithmetic overflow in maxolen.
Can't easily prove that this overflow is impossible, so let's add a
check.
Prompted by PR lib/57573.

vis(3): Fix main part of PR lib/57573.
>From Kyle Evans .

vis(3): Fix one more buffer overrun in an edge case.
PR lib/57573

vis(3): Sort includes.  No functional change intended.
Prompted by PR lib/57573.

vis(3): Need  for SIZE_MAX, per C standard.
>From Kyle Evans .
Followup to PR lib/57573.

vis(3): Per KNF, sys/param.h comes before sys/types.h.
Which is nice because that's also lexicographic.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.74.6.1 src/lib/libc/gen/vis.c
cvs rdiff -u -r1.9 -r1.9.16.1 src/tests/lib/libc/gen/t_vis.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

2023-12-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  9 13:09:04 UTC 2023

Modified Files:
src/lib/libc/gen [netbsd-9]: vis.c
src/tests/lib/libc/gen [netbsd-9]: t_vis.c

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

lib/libc/gen/vis.c: revision 1.75-1.86
tests/lib/libc/gen/t_vis.c: revision 1.10-1.14

PR 56260: fix out-of-bounds stack read.

vis(3): Avoid nonportable MIN in portable code.

vis(3) tests: Add xfail test for encoding overflow.

>From Kyle Evans .
PR lib/57573

vis(3) tests: Expand tests and diagnostic outputs on failure.
PR lib/57573

vis(3) tests: Test another overflow edge case.
Related to PR lib/57573.

vis(3): Make maxolen unsigned size_t, not ssize_t.
It is initialized once either to *dlen, which is unsigned size_t, or
to wcslen(start) * MB_MAX_LEN + 1, and wcslen returns unsigned size_t
too.  So there appears to have never been any reason for this to be
signed.
Part of PR lib/57573.

vis(3): Make mbslength unsigned.
Sprinkle assertions and comments justifying the proposition that it
would never go negative if signed.
Obviates need to worry about mblength > SSIZE_MAX.
Prompted by PR lib/57573.

vis(3): Avoid arithmetic overflow before calloc(3).
Prompted by PR lib/57573.

vis(3): Call wcslen(start) only once.
It had better not change between these two times!
Prompted by PR lib/57573.

vis(3): Avoid potential arithmetic overflow in maxolen.
Can't easily prove that this overflow is impossible, so let's add a
check.
Prompted by PR lib/57573.

vis(3): Fix main part of PR lib/57573.
>From Kyle Evans .

vis(3): Fix one more buffer overrun in an edge case.
PR lib/57573

vis(3): Sort includes.  No functional change intended.
Prompted by PR lib/57573.

vis(3): Need  for SIZE_MAX, per C standard.
>From Kyle Evans .
Followup to PR lib/57573.

vis(3): Per KNF, sys/param.h comes before sys/types.h.
Which is nice because that's also lexicographic.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.74.6.1 src/lib/libc/gen/vis.c
cvs rdiff -u -r1.9 -r1.9.16.1 src/tests/lib/libc/gen/t_vis.c

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

Modified files:

Index: src/lib/libc/gen/vis.c
diff -u src/lib/libc/gen/vis.c:1.74 src/lib/libc/gen/vis.c:1.74.6.1
--- src/lib/libc/gen/vis.c:1.74	Mon Nov 27 16:37:21 2017
+++ src/lib/libc/gen/vis.c	Sat Dec  9 13:09:03 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: vis.c,v 1.74 2017/11/27 16:37:21 christos Exp $	*/
+/*	$NetBSD: vis.c,v 1.74.6.1 2023/12/09 13:09:03 martin Exp $	*/
 
 /*-
  * Copyright (c) 1989, 1993
@@ -57,7 +57,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: vis.c,v 1.74 2017/11/27 16:37:21 christos Exp $");
+__RCSID("$NetBSD: vis.c,v 1.74.6.1 2023/12/09 13:09:03 martin Exp $");
 #endif /* LIBC_SCCS and not lint */
 #ifdef __FBSDID
 __FBSDID("$FreeBSD$");
@@ -65,13 +65,15 @@ __FBSDID("$FreeBSD$");
 #endif
 
 #include "namespace.h"
-#include 
+
 #include 
+#include 
 
 #include 
-#include 
 #include 
+#include 
 #include 
+#include 
 #include 
 #include 
 
@@ -353,12 +355,15 @@ makeextralist(int flags, const char *src
 	wchar_t *dst, *d;
 	size_t len;
 	const wchar_t *s;
+	mbstate_t mbstate;
 
 	len = strlen(src);
 	if ((dst = calloc(len + MAXEXTRAS, sizeof(*dst))) == NULL)
 		return NULL;
 
-	if ((flags & VIS_NOLOCALE) || mbstowcs(dst, src, len) == (size_t)-1) {
+	memset(, 0, sizeof(mbstate));
+	if ((flags & VIS_NOLOCALE)
+	|| mbsrtowcs(dst, , len, ) == (size_t)-1) {
 		size_t i;
 		for (i = 0; i < len; i++)
 			dst[i] = (wchar_t)(u_char)src[i];
@@ -393,20 +398,23 @@ static int
 istrsenvisx(char **mbdstp, size_t *dlen, const char *mbsrc, size_t mblength,
 int flags, const char *mbextra, int *cerr_ptr)
 {
+	char mbbuf[MB_LEN_MAX];
 	wchar_t *dst, *src, *pdst, *psrc, *start, *extra;
 	size_t len, olen;
 	uint64_t bmsk, wmsk;
 	wint_t c;
 	visfun_t f;
 	int clen = 0, cerr, error = -1, i, shft;
-	char *mbdst, *mdst;
-	ssize_t mbslength, maxolen;
+	char *mbdst, *mbwrite, *mdst;
+	size_t mbslength;
+	size_t maxolen;
+	mbstate_t mbstate;
 
 	_DIAGASSERT(mbdstp != NULL);
 	_DIAGASSERT(mbsrc != NULL || mblength == 0);
 	_DIAGASSERT(mbextra != NULL);
 
-	mbslength = (ssize_t)mblength;
+	mbslength = mblength;
 	/*
 	 * When inputing a single character, must also read in the
 	 * next character for nextc, the look-ahead character.
@@ -427,6 +435,14 @@ istrsenvisx(char **mbdstp, size_t *dlen,
 	 * return to the caller.
 	 */
 
+	/*
+	 * Guarantee the arithmetic on input to calloc won't overflow.
+	 */
+	if (mbslength > (SIZE_MAX - 1)/16) {
+		errno = ENOMEM;
+		return -1;
+	}
+
 	/* Allocate space for the wide char strings */
 	psrc = pdst = extra = NULL;
 	mdst = NULL;
@@ -458,10 +474,18 @@ istrsenvisx(char **mbdstp, size_t *dlen,
 	 * stop at NULs because we may be processing a block of data
 	 * that includes NULs.
 	 */
+	memset(, 0, sizeof(mbstate));
 	while (mbslength > 0) {
 		

CVS commit: [netbsd-10] src

2023-12-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  9 13:03:34 UTC 2023

Modified Files:
src/lib/libc/gen [netbsd-10]: vis.c
src/tests/lib/libc/gen [netbsd-10]: t_vis.c

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

lib/libc/gen/vis.c: revision 1.76-1.86
tests/lib/libc/gen/t_vis.c: revision 1.10-1.14

vis(3): Avoid nonportable MIN in portable code.

vis(3) tests: Add xfail test for encoding overflow.

>From Kyle Evans .
PR lib/57573

vis(3) tests: Expand tests and diagnostic outputs on failure.
PR lib/57573

vis(3) tests: Test another overflow edge case.
Related to PR lib/57573.

vis(3): Make maxolen unsigned size_t, not ssize_t.
It is initialized once either to *dlen, which is unsigned size_t, or
to wcslen(start) * MB_MAX_LEN + 1, and wcslen returns unsigned size_t
too.  So there appears to have never been any reason for this to be
signed.
Part of PR lib/57573.

vis(3): Make mbslength unsigned.
Sprinkle assertions and comments justifying the proposition that it
would never go negative if signed.
Obviates need to worry about mblength > SSIZE_MAX.
Prompted by PR lib/57573.

vis(3): Avoid arithmetic overflow before calloc(3).
Prompted by PR lib/57573.

vis(3): Call wcslen(start) only once.
It had better not change between these two times!
Prompted by PR lib/57573.

vis(3): Avoid potential arithmetic overflow in maxolen.
Can't easily prove that this overflow is impossible, so let's add a
check.
Prompted by PR lib/57573.

vis(3): Fix main part of PR lib/57573.
>From Kyle Evans .

vis(3): Fix one more buffer overrun in an edge case.
PR lib/57573

vis(3): Sort includes.  No functional change intended.
Prompted by PR lib/57573.

vis(3): Need  for SIZE_MAX, per C standard.
>From Kyle Evans .
Followup to PR lib/57573.

vis(3): Per KNF, sys/param.h comes before sys/types.h.
Which is nice because that's also lexicographic.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.75.2.1 src/lib/libc/gen/vis.c
cvs rdiff -u -r1.9 -r1.9.24.1 src/tests/lib/libc/gen/t_vis.c

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



CVS commit: [netbsd-10] src

2023-12-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  9 13:03:34 UTC 2023

Modified Files:
src/lib/libc/gen [netbsd-10]: vis.c
src/tests/lib/libc/gen [netbsd-10]: t_vis.c

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

lib/libc/gen/vis.c: revision 1.76-1.86
tests/lib/libc/gen/t_vis.c: revision 1.10-1.14

vis(3): Avoid nonportable MIN in portable code.

vis(3) tests: Add xfail test for encoding overflow.

>From Kyle Evans .
PR lib/57573

vis(3) tests: Expand tests and diagnostic outputs on failure.
PR lib/57573

vis(3) tests: Test another overflow edge case.
Related to PR lib/57573.

vis(3): Make maxolen unsigned size_t, not ssize_t.
It is initialized once either to *dlen, which is unsigned size_t, or
to wcslen(start) * MB_MAX_LEN + 1, and wcslen returns unsigned size_t
too.  So there appears to have never been any reason for this to be
signed.
Part of PR lib/57573.

vis(3): Make mbslength unsigned.
Sprinkle assertions and comments justifying the proposition that it
would never go negative if signed.
Obviates need to worry about mblength > SSIZE_MAX.
Prompted by PR lib/57573.

vis(3): Avoid arithmetic overflow before calloc(3).
Prompted by PR lib/57573.

vis(3): Call wcslen(start) only once.
It had better not change between these two times!
Prompted by PR lib/57573.

vis(3): Avoid potential arithmetic overflow in maxolen.
Can't easily prove that this overflow is impossible, so let's add a
check.
Prompted by PR lib/57573.

vis(3): Fix main part of PR lib/57573.
>From Kyle Evans .

vis(3): Fix one more buffer overrun in an edge case.
PR lib/57573

vis(3): Sort includes.  No functional change intended.
Prompted by PR lib/57573.

vis(3): Need  for SIZE_MAX, per C standard.
>From Kyle Evans .
Followup to PR lib/57573.

vis(3): Per KNF, sys/param.h comes before sys/types.h.
Which is nice because that's also lexicographic.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.75.2.1 src/lib/libc/gen/vis.c
cvs rdiff -u -r1.9 -r1.9.24.1 src/tests/lib/libc/gen/t_vis.c

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

Modified files:

Index: src/lib/libc/gen/vis.c
diff -u src/lib/libc/gen/vis.c:1.75 src/lib/libc/gen/vis.c:1.75.2.1
--- src/lib/libc/gen/vis.c:1.75	Fri Jun 18 10:57:14 2021
+++ src/lib/libc/gen/vis.c	Sat Dec  9 13:03:34 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: vis.c,v 1.75 2021/06/18 10:57:14 christos Exp $	*/
+/*	$NetBSD: vis.c,v 1.75.2.1 2023/12/09 13:03:34 martin Exp $	*/
 
 /*-
  * Copyright (c) 1989, 1993
@@ -57,7 +57,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: vis.c,v 1.75 2021/06/18 10:57:14 christos Exp $");
+__RCSID("$NetBSD: vis.c,v 1.75.2.1 2023/12/09 13:03:34 martin Exp $");
 #endif /* LIBC_SCCS and not lint */
 #ifdef __FBSDID
 __FBSDID("$FreeBSD$");
@@ -65,13 +65,15 @@ __FBSDID("$FreeBSD$");
 #endif
 
 #include "namespace.h"
-#include 
+
 #include 
+#include 
 
 #include 
-#include 
 #include 
+#include 
 #include 
+#include 
 #include 
 #include 
 
@@ -396,21 +398,23 @@ static int
 istrsenvisx(char **mbdstp, size_t *dlen, const char *mbsrc, size_t mblength,
 int flags, const char *mbextra, int *cerr_ptr)
 {
+	char mbbuf[MB_LEN_MAX];
 	wchar_t *dst, *src, *pdst, *psrc, *start, *extra;
 	size_t len, olen;
 	uint64_t bmsk, wmsk;
 	wint_t c;
 	visfun_t f;
 	int clen = 0, cerr, error = -1, i, shft;
-	char *mbdst, *mdst;
-	ssize_t mbslength, maxolen;
+	char *mbdst, *mbwrite, *mdst;
+	size_t mbslength;
+	size_t maxolen;
 	mbstate_t mbstate;
 
 	_DIAGASSERT(mbdstp != NULL);
 	_DIAGASSERT(mbsrc != NULL || mblength == 0);
 	_DIAGASSERT(mbextra != NULL);
 
-	mbslength = (ssize_t)mblength;
+	mbslength = mblength;
 	/*
 	 * When inputing a single character, must also read in the
 	 * next character for nextc, the look-ahead character.
@@ -431,6 +435,14 @@ istrsenvisx(char **mbdstp, size_t *dlen,
 	 * return to the caller.
 	 */
 
+	/*
+	 * Guarantee the arithmetic on input to calloc won't overflow.
+	 */
+	if (mbslength > (SIZE_MAX - 1)/16) {
+		errno = ENOMEM;
+		return -1;
+	}
+
 	/* Allocate space for the wide char strings */
 	psrc = pdst = extra = NULL;
 	mdst = NULL;
@@ -465,9 +477,15 @@ istrsenvisx(char **mbdstp, size_t *dlen,
 	memset(, 0, sizeof(mbstate));
 	while (mbslength > 0) {
 		/* Convert one multibyte character to wchar_t. */
-		if (!cerr)
-			clen = mbrtowc(src, mbsrc, MIN(mbslength, MB_LEN_MAX),
+		if (!cerr) {
+			clen = mbrtowc(src, mbsrc,
+			(mbslength < MB_LEN_MAX
+? mbslength
+: MB_LEN_MAX),
 			);
+			assert(clen < 0 || (size_t)clen <= mbslength);
+			assert(clen <= MB_LEN_MAX);
+		}
 		if (cerr || clen < 0) {
 			/* Conversion error, process as a byte instead. */
 			*src = (wint_t)(u_char)*mbsrc;
@@ -481,6 +499,20 @@ istrsenvisx(char **mbdstp, size_t *dlen,
 			 */
 			clen = 1;
 		}
+		/*
+		 * Let n := MIN(mbslength, MB_LEN_MAX).  We have:
+		 *
+		 *	mbslength >= 1
+		 *	

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

2023-12-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  9 12:57:16 UTC 2023

Modified Files:
src/sys/arch/mips/mips [netbsd-9]: lock_stubs_llsc.S

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

sys/arch/mips/mips/lock_stubs_llsc.S: revision 1.18

Add missing PTR_WORD command in front of 0.
Likely accidentally missed in the commit, since rev 1.9.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.9.4.1 src/sys/arch/mips/mips/lock_stubs_llsc.S

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

Modified files:

Index: src/sys/arch/mips/mips/lock_stubs_llsc.S
diff -u src/sys/arch/mips/mips/lock_stubs_llsc.S:1.9 src/sys/arch/mips/mips/lock_stubs_llsc.S:1.9.4.1
--- src/sys/arch/mips/mips/lock_stubs_llsc.S:1.9	Sat Apr  6 03:06:26 2019
+++ src/sys/arch/mips/mips/lock_stubs_llsc.S	Sat Dec  9 12:57:16 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: lock_stubs_llsc.S,v 1.9 2019/04/06 03:06:26 thorpej Exp $	*/
+/*	$NetBSD: lock_stubs_llsc.S,v 1.9.4.1 2023/12/09 12:57:16 martin Exp $	*/
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 
 #include 
 
-RCSID("$NetBSD: lock_stubs_llsc.S,v 1.9 2019/04/06 03:06:26 thorpej Exp $")
+RCSID("$NetBSD: lock_stubs_llsc.S,v 1.9.4.1 2023/12/09 12:57:16 martin Exp $")
 
 #include "assym.h"
 
@@ -364,7 +364,7 @@ EXPORT(mips_llsc_locore_atomicvec)
 #ifdef _LP64
 	PTR_WORD	llsc_ucas_64
 #else
-			0
+	PTR_WORD	0
 #endif /* _LP64 */
 #ifdef LOCKDEBUG
 	PTR_WORD	mutex_vector_enter



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

2023-12-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  9 12:57:16 UTC 2023

Modified Files:
src/sys/arch/mips/mips [netbsd-9]: lock_stubs_llsc.S

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

sys/arch/mips/mips/lock_stubs_llsc.S: revision 1.18

Add missing PTR_WORD command in front of 0.
Likely accidentally missed in the commit, since rev 1.9.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.9.4.1 src/sys/arch/mips/mips/lock_stubs_llsc.S

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



CVS commit: [netbsd-10] src/sys/arch/mips/mips

2023-12-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  9 12:55:33 UTC 2023

Modified Files:
src/sys/arch/mips/mips [netbsd-10]: lock_stubs_llsc.S

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

sys/arch/mips/mips/lock_stubs_llsc.S: revision 1.18

Add missing PTR_WORD command in front of 0.
Likely accidentally missed in the commit, since rev 1.9.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.17.4.1 src/sys/arch/mips/mips/lock_stubs_llsc.S

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



CVS commit: [netbsd-10] src/sys/arch/mips/mips

2023-12-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  9 12:55:33 UTC 2023

Modified Files:
src/sys/arch/mips/mips [netbsd-10]: lock_stubs_llsc.S

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

sys/arch/mips/mips/lock_stubs_llsc.S: revision 1.18

Add missing PTR_WORD command in front of 0.
Likely accidentally missed in the commit, since rev 1.9.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.17.4.1 src/sys/arch/mips/mips/lock_stubs_llsc.S

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

Modified files:

Index: src/sys/arch/mips/mips/lock_stubs_llsc.S
diff -u src/sys/arch/mips/mips/lock_stubs_llsc.S:1.17 src/sys/arch/mips/mips/lock_stubs_llsc.S:1.17.4.1
--- src/sys/arch/mips/mips/lock_stubs_llsc.S:1.17	Sun Feb 27 19:22:29 2022
+++ src/sys/arch/mips/mips/lock_stubs_llsc.S	Sat Dec  9 12:55:33 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: lock_stubs_llsc.S,v 1.17 2022/02/27 19:22:29 riastradh Exp $	*/
+/*	$NetBSD: lock_stubs_llsc.S,v 1.17.4.1 2023/12/09 12:55:33 martin Exp $	*/
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
 
 #include 
 
-RCSID("$NetBSD: lock_stubs_llsc.S,v 1.17 2022/02/27 19:22:29 riastradh Exp $")
+RCSID("$NetBSD: lock_stubs_llsc.S,v 1.17.4.1 2023/12/09 12:55:33 martin Exp $")
 
 #include "assym.h"
 
@@ -362,7 +362,7 @@ EXPORT_OBJECT(mips_llsc_locore_atomicvec
 #ifdef _LP64
 	PTR_WORD	llsc_ucas_64
 #else
-			0
+	PTR_WORD	0
 #endif /* _LP64 */
 #ifdef LOCKDEBUG
 	PTR_WORD	mutex_vector_enter



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

2023-12-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  9 12:46:06 UTC 2023

Modified Files:
src/tests/lib/libc/sys [netbsd-8]: Makefile

Log Message:
Additionally pull up following revision(s) (requested by riastradh in ticket 
#1920):

tests/lib/libc/sys/Makefile: revision 1.75 (via patch)

t_setrlimit uses alloca now


To generate a diff of this commit:
cvs rdiff -u -r1.49.4.3 -r1.49.4.4 src/tests/lib/libc/sys/Makefile

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

Modified files:

Index: src/tests/lib/libc/sys/Makefile
diff -u src/tests/lib/libc/sys/Makefile:1.49.4.3 src/tests/lib/libc/sys/Makefile:1.49.4.4
--- src/tests/lib/libc/sys/Makefile:1.49.4.3	Wed Mar 21 10:08:03 2018
+++ src/tests/lib/libc/sys/Makefile	Sat Dec  9 12:46:06 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.49.4.3 2018/03/21 10:08:03 martin Exp $
+# $NetBSD: Makefile,v 1.49.4.4 2023/12/09 12:46:06 martin Exp $
 
 MKMAN=	no
 
@@ -111,4 +111,6 @@ truncate_test.root_owned:
 
 WARNS=			4
 
+COPTS.t_setrlimit.c+=	-Wno-error=stack-protector
+
 .include 



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

2023-12-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  9 12:46:06 UTC 2023

Modified Files:
src/tests/lib/libc/sys [netbsd-8]: Makefile

Log Message:
Additionally pull up following revision(s) (requested by riastradh in ticket 
#1920):

tests/lib/libc/sys/Makefile: revision 1.75 (via patch)

t_setrlimit uses alloca now


To generate a diff of this commit:
cvs rdiff -u -r1.49.4.3 -r1.49.4.4 src/tests/lib/libc/sys/Makefile

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



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

2023-12-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  9 12:43:48 UTC 2023

Modified Files:
src/tests/lib/libc/sys [netbsd-9]: Makefile

Log Message:
Additionally pull up following revision(s) (requested by riastradh in ticket 
#1769):

tests/lib/libc/sys/Makefile: revision 1.75 (via patch)

t_setrlimit uses alloca now


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.57.2.1 src/tests/lib/libc/sys/Makefile

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

Modified files:

Index: src/tests/lib/libc/sys/Makefile
diff -u src/tests/lib/libc/sys/Makefile:1.57 src/tests/lib/libc/sys/Makefile:1.57.2.1
--- src/tests/lib/libc/sys/Makefile:1.57	Sun Jun 30 21:20:04 2019
+++ src/tests/lib/libc/sys/Makefile	Sat Dec  9 12:43:48 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.57 2019/06/30 21:20:04 mgorny Exp $
+# $NetBSD: Makefile,v 1.57.2.1 2023/12/09 12:43:48 martin Exp $
 
 MKMAN=	no
 
@@ -123,4 +123,6 @@ truncate_test.root_owned:
 
 WARNS=			4
 
+COPTS.t_setrlimit.c+=	-Wno-error=stack-protector
+
 .include 



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

2023-12-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  9 12:43:48 UTC 2023

Modified Files:
src/tests/lib/libc/sys [netbsd-9]: Makefile

Log Message:
Additionally pull up following revision(s) (requested by riastradh in ticket 
#1769):

tests/lib/libc/sys/Makefile: revision 1.75 (via patch)

t_setrlimit uses alloca now


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.57.2.1 src/tests/lib/libc/sys/Makefile

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



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

2023-12-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  9 12:40:49 UTC 2023

Modified Files:
src/tests/lib/libc/sys [netbsd-10]: Makefile

Log Message:
Additionally pull up following revision(s) (requested by riastradh in ticket 
#477):

tests/lib/libc/sys/Makefile: revision 1.75 (via patch)

t_setrlimit uses alloca now


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.72.2.1 src/tests/lib/libc/sys/Makefile

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

Modified files:

Index: src/tests/lib/libc/sys/Makefile
diff -u src/tests/lib/libc/sys/Makefile:1.72 src/tests/lib/libc/sys/Makefile:1.72.2.1
--- src/tests/lib/libc/sys/Makefile:1.72	Mon Aug  1 15:48:39 2022
+++ src/tests/lib/libc/sys/Makefile	Sat Dec  9 12:40:49 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.72 2022/08/01 15:48:39 kre Exp $
+# $NetBSD: Makefile,v 1.72.2.1 2023/12/09 12:40:49 martin Exp $
 
 MKMAN=	no
 
@@ -156,4 +156,6 @@ WARNS=			4
 CWARNFLAGS.gcc+=	${GCC_NO_ADDR_OF_PACKED_MEMBER} \
 			${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-error=deprecated :}
 
+COPTS.t_setrlimit.c+=	-Wno-error=stack-protector
+
 .include 



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

2023-12-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  9 12:40:49 UTC 2023

Modified Files:
src/tests/lib/libc/sys [netbsd-10]: Makefile

Log Message:
Additionally pull up following revision(s) (requested by riastradh in ticket 
#477):

tests/lib/libc/sys/Makefile: revision 1.75 (via patch)

t_setrlimit uses alloca now


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.72.2.1 src/tests/lib/libc/sys/Makefile

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