CVS commit: src/share/misc

2023-05-25 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Fri May 26 03:30:57 UTC 2023

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

Log Message:
+CRDT   conflict-free replicated data type
+UDSUnix Domain Socket


To generate a diff of this commit:
cvs rdiff -u -r1.352 -r1.353 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.352 src/share/misc/acronyms.comp:1.353
--- src/share/misc/acronyms.comp:1.352	Mon May 15 20:54:53 2023
+++ src/share/misc/acronyms.comp	Fri May 26 03:30:57 2023
@@ -1,4 +1,4 @@
-$NetBSD: acronyms.comp,v 1.352 2023/05/15 20:54:53 andvar Exp $
+$NetBSD: acronyms.comp,v 1.353 2023/05/26 03:30:57 jschauma Exp $
 3WHS	three-way handshake
 8VSB	8-state vestigial side band modulation
 AA	anti-aliasing
@@ -311,6 +311,7 @@ CPT	command pass through
 CPU	central processing unit
 CR	carriage return
 CRC	cyclic redundancy check
+CRDT	conflict-free replicated data type
 CRL	carrier recovery loop
 CRLF	carriage return line feed
 CSPM	cloud security posture management
@@ -1730,6 +1731,7 @@ UDI	uniform driver interface
 UDMA	ultra DMA
 UDO	ultra density optical
 UDP	User Datagram Protocol
+UDS	Unix Domain Socket
 UEFI	unified extensible firmware interface
 UFO	UDP fragmentation offload
 UFS	Unix File System



CVS commit: src/share/misc

2023-05-25 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Fri May 26 03:30:57 UTC 2023

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

Log Message:
+CRDT   conflict-free replicated data type
+UDSUnix Domain Socket


To generate a diff of this commit:
cvs rdiff -u -r1.352 -r1.353 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/sys/ddb

2023-05-25 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Thu May 25 21:46:55 UTC 2023

Modified Files:
src/sys/ddb: db_command.c

Log Message:
ddb: PR kern/57435 - fix duplicate "show mount"

Bolivar cannot carry double.  One of these commands should have been
"show mounts", cf. page/pages and a few others.  While here fix the
function name to be db_show_all_mounts to conform to the pattern.


To generate a diff of this commit:
cvs rdiff -u -r1.181 -r1.182 src/sys/ddb/db_command.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/ddb/db_command.c
diff -u src/sys/ddb/db_command.c:1.181 src/sys/ddb/db_command.c:1.182
--- src/sys/ddb/db_command.c:1.181	Thu Apr 28 07:08:38 2022
+++ src/sys/ddb/db_command.c	Thu May 25 21:46:55 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_command.c,v 1.181 2022/04/28 07:08:38 msaitoh Exp $	*/
+/*	$NetBSD: db_command.c,v 1.182 2023/05/25 21:46:55 uwe Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2009, 2019
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.181 2022/04/28 07:08:38 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.182 2023/05/25 21:46:55 uwe Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_aio.h"
@@ -203,7 +203,7 @@ static void	db_show_all_locks(db_expr_t,
 static void	db_show_lockstats(db_expr_t, bool, db_expr_t, const char *);
 static void	db_show_all_freelists(db_expr_t, bool, db_expr_t, const char *);
 static void	db_mount_print_cmd(db_expr_t, bool, db_expr_t, const char *);
-static void	db_show_all_mount(db_expr_t, bool, db_expr_t, const char *);
+static void	db_show_all_mounts(db_expr_t, bool, db_expr_t, const char *);
 static void	db_mbuf_print_cmd(db_expr_t, bool, db_expr_t, const char *);
 static void	db_kqueue_print_cmd(db_expr_t, bool, db_expr_t, const char *);
 static void	db_map_print_cmd(db_expr_t, bool, db_expr_t, const char *);
@@ -279,10 +279,10 @@ static const struct db_command db_show_c
 	"-c prints all mbuf chains") },
 	{ DDB_ADD_CMD("module", db_show_module_cmd,	0,
 	"Print kernel modules", NULL, NULL) },
-	{ DDB_ADD_CMD("mount",	db_show_all_mount,	0,
-	"Print all mount structures.", "[/f]", NULL) },
 	{ DDB_ADD_CMD("mount",	db_mount_print_cmd,	0,
 	"Print the mount structure at address.", "[/f] address",NULL) },
+	{ DDB_ADD_CMD("mounts",	db_show_all_mounts,	0,
+	"Print all mount structures.", "[/f]", NULL) },
 #ifdef MQUEUE
 	{ DDB_ADD_CMD("mqueue", db_show_mqueue_cmd,	0,
 	"Print the message queues", NULL, NULL) },
@@ -1244,7 +1244,7 @@ db_mount_print_cmd(db_expr_t addr, bool 
 }
 
 static void
-db_show_all_mount(db_expr_t addr, bool have_addr, db_expr_t count, const char *modif)
+db_show_all_mounts(db_expr_t addr, bool have_addr, db_expr_t count, const char *modif)
 {
 #ifdef _KERNEL	/* XXX CRASH(8) */
 	bool full = false;



CVS commit: src/sys/ddb

2023-05-25 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Thu May 25 21:46:55 UTC 2023

Modified Files:
src/sys/ddb: db_command.c

Log Message:
ddb: PR kern/57435 - fix duplicate "show mount"

Bolivar cannot carry double.  One of these commands should have been
"show mounts", cf. page/pages and a few others.  While here fix the
function name to be db_show_all_mounts to conform to the pattern.


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

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



CVS commit: src/crypto

2023-05-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May 25 19:12:51 UTC 2023

Modified Files:
src/crypto: Makefile.openssl

Log Message:
openssl: CWARNFLAGS, not COPTS, for -Wno-error=...

COPTS gets put too early, so these are cancelled out by -W flags
added later by bsd.sys.mk.  (How did this ever work???)


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/crypto/Makefile.openssl

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



CVS commit: src/crypto

2023-05-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May 25 19:12:51 UTC 2023

Modified Files:
src/crypto: Makefile.openssl

Log Message:
openssl: CWARNFLAGS, not COPTS, for -Wno-error=...

COPTS gets put too early, so these are cancelled out by -W flags
added later by bsd.sys.mk.  (How did this ever work???)


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/crypto/Makefile.openssl

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

Modified files:

Index: src/crypto/Makefile.openssl
diff -u src/crypto/Makefile.openssl:1.18 src/crypto/Makefile.openssl:1.19
--- src/crypto/Makefile.openssl:1.18	Thu May 25 19:12:42 2023
+++ src/crypto/Makefile.openssl	Thu May 25 19:12:51 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.openssl,v 1.18 2023/05/25 19:12:42 riastradh Exp $
+#	$NetBSD: Makefile.openssl,v 1.19 2023/05/25 19:12:51 riastradh Exp $
 
 .ifndef _MAKEFILE_OPENSSL_INCLUDED
 _MAKEFILE_OPENSSL_INCLUDED=1
@@ -7,10 +7,10 @@ _MAKEFILE_OPENSSL_INCLUDED=1
 WARNS=3
 
 # would require changing a lot of code
-COPTS+= -Wno-error=cast-qual
-COPTS+= -Wno-error=char-subscripts # XXX likely real ctype(3) missing cast bugs
-COPTS+= -Wno-error=missing-field-initializers
-COPTS+= -Wno-error=shadow
+CWARNFLAGS+= -Wno-error=cast-qual
+CWARNFLAGS+= -Wno-error=char-subscripts # XXX likely real ctype(3) missing cast bugs
+CWARNFLAGS+= -Wno-error=missing-field-initializers
+CWARNFLAGS+= -Wno-error=shadow
 
 CWARNFLAGS.gcc+= -Wno-error=discarded-qualifiers
 CWARNFLAGS.clang+= -Wno-error=ignored-qualifiers



CVS commit: src/crypto

2023-05-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May 25 19:12:42 UTC 2023

Modified Files:
src/crypto: Makefile.openssl

Log Message:
openssl: Note that -Wno-error=char-subscripts likely masks real bugs.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/crypto/Makefile.openssl

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

Modified files:

Index: src/crypto/Makefile.openssl
diff -u src/crypto/Makefile.openssl:1.17 src/crypto/Makefile.openssl:1.18
--- src/crypto/Makefile.openssl:1.17	Thu May 25 19:12:06 2023
+++ src/crypto/Makefile.openssl	Thu May 25 19:12:42 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.openssl,v 1.17 2023/05/25 19:12:06 riastradh Exp $
+#	$NetBSD: Makefile.openssl,v 1.18 2023/05/25 19:12:42 riastradh Exp $
 
 .ifndef _MAKEFILE_OPENSSL_INCLUDED
 _MAKEFILE_OPENSSL_INCLUDED=1
@@ -8,7 +8,8 @@ WARNS=3
 
 # would require changing a lot of code
 COPTS+= -Wno-error=cast-qual
-COPTS+= -Wno-error=missing-field-initializers -Wno-error=char-subscripts
+COPTS+= -Wno-error=char-subscripts # XXX likely real ctype(3) missing cast bugs
+COPTS+= -Wno-error=missing-field-initializers
 COPTS+= -Wno-error=shadow
 
 CWARNFLAGS.gcc+= -Wno-error=discarded-qualifiers



CVS commit: src/crypto

2023-05-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May 25 19:12:42 UTC 2023

Modified Files:
src/crypto: Makefile.openssl

Log Message:
openssl: Note that -Wno-error=char-subscripts likely masks real bugs.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/crypto/Makefile.openssl

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



CVS commit: src/crypto

2023-05-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May 25 19:12:06 UTC 2023

Modified Files:
src/crypto: Makefile.openssl
src/crypto/external/bsd/openssl/lib/libapps: Makefile
src/crypto/external/bsd/openssl/lib/libcrypto: Makefile
src/crypto/external/bsd/openssl/lib/libssl: Makefile

Log Message:
openssl: Consolidate new CWARNFLAGS.clang stuff in Makefile.openssl.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/crypto/Makefile.openssl
cvs rdiff -u -r1.5 -r1.6 src/crypto/external/bsd/openssl/lib/libapps/Makefile
cvs rdiff -u -r1.31 -r1.32 \
src/crypto/external/bsd/openssl/lib/libcrypto/Makefile
cvs rdiff -u -r1.16 -r1.17 \
src/crypto/external/bsd/openssl/lib/libssl/Makefile

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

Modified files:

Index: src/crypto/Makefile.openssl
diff -u src/crypto/Makefile.openssl:1.16 src/crypto/Makefile.openssl:1.17
--- src/crypto/Makefile.openssl:1.16	Tue May 23 12:05:10 2023
+++ src/crypto/Makefile.openssl	Thu May 25 19:12:06 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.openssl,v 1.16 2023/05/23 12:05:10 christos Exp $
+#	$NetBSD: Makefile.openssl,v 1.17 2023/05/25 19:12:06 riastradh Exp $
 
 .ifndef _MAKEFILE_OPENSSL_INCLUDED
 _MAKEFILE_OPENSSL_INCLUDED=1
@@ -14,6 +14,10 @@ COPTS+= -Wno-error=shadow
 CWARNFLAGS.gcc+= -Wno-error=discarded-qualifiers
 CWARNFLAGS.clang+= -Wno-error=ignored-qualifiers
 
+# OpenSSL extensively uses string literals as char *, which clang
+# (reasonably if not exactly rightly) objects to.
+CWARNFLAGS.clang+= -Wno-error=incompatible-pointer-types-discards-qualifiers
+
 # XXX: re-examine the below
 CWARNFLAGS.clang+= -Wno-empty-body -Wno-unused-value -Wno-parentheses
 CWARNFLAGS.clang+= -Wno-implicit-int-float-conversion

Index: src/crypto/external/bsd/openssl/lib/libapps/Makefile
diff -u src/crypto/external/bsd/openssl/lib/libapps/Makefile:1.5 src/crypto/external/bsd/openssl/lib/libapps/Makefile:1.6
--- src/crypto/external/bsd/openssl/lib/libapps/Makefile:1.5	Thu May 25 16:05:27 2023
+++ src/crypto/external/bsd/openssl/lib/libapps/Makefile	Thu May 25 19:12:06 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2023/05/25 16:05:27 riastradh Exp $
+#	$NetBSD: Makefile,v 1.6 2023/05/25 19:12:06 riastradh Exp $
 
 # RCSid:
 #	Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp
@@ -33,10 +33,6 @@ CPPFLAGS+= -I${OPENSSLSRC}/../include
 CPPFLAGS+= -I${OPENSSLSRC}/apps/lib
 CPPFLAGS+= -I${OPENSSLSRC}/apps/include
 
-# OpenSSL extensively uses string literals as char *, which clang
-# (reasonably if not exactly rightly) objects to.
-CWARNFLAGS.clang+=-Wno-error=incompatible-pointer-types-discards-qualifiers
-
 CRYPTODIST=	${NETBSDSRCDIR}/crypto
 OPENSSLINC=	${OPENSSLSRC}/include/openssl
 

Index: src/crypto/external/bsd/openssl/lib/libcrypto/Makefile
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/Makefile:1.31 src/crypto/external/bsd/openssl/lib/libcrypto/Makefile:1.32
--- src/crypto/external/bsd/openssl/lib/libcrypto/Makefile:1.31	Thu May 25 16:05:28 2023
+++ src/crypto/external/bsd/openssl/lib/libcrypto/Makefile	Thu May 25 19:12:06 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.31 2023/05/25 16:05:28 riastradh Exp $
+#	$NetBSD: Makefile,v 1.32 2023/05/25 19:12:06 riastradh Exp $
 
 # RCSid:
 #	Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp
@@ -31,10 +31,6 @@ CPPFLAGS+= -I${OPENSSLSRC}/crypto/asn1 -
 CPPFLAGS+= -I${OPENSSLSRC}/crypto/modes
 CPPFLAGS+= -I${OPENSSLSRC}/../include
 
-# OpenSSL extensively uses string literals as char *, which clang
-# (reasonably if not exactly rightly) objects to.
-CWARNFLAGS.clang+=-Wno-error=incompatible-pointer-types-discards-qualifiers
-
 CRYPTODIST=	${NETBSDSRCDIR}/crypto
 OPENSSLINC=	${OPENSSLSRC}/include/openssl
 

Index: src/crypto/external/bsd/openssl/lib/libssl/Makefile
diff -u src/crypto/external/bsd/openssl/lib/libssl/Makefile:1.16 src/crypto/external/bsd/openssl/lib/libssl/Makefile:1.17
--- src/crypto/external/bsd/openssl/lib/libssl/Makefile:1.16	Thu May 25 16:05:28 2023
+++ src/crypto/external/bsd/openssl/lib/libssl/Makefile	Thu May 25 19:12:06 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.16 2023/05/25 16:05:28 riastradh Exp $
+#	$NetBSD: Makefile,v 1.17 2023/05/25 19:12:06 riastradh Exp $
 
 # RCSid:
 #	Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp
@@ -24,10 +24,6 @@ CWARNFLAGS.clang+=	-Wno-unused-value
 # XXX: This warning seems to trigger incorrectly
 CWARNFLAGS.clang+=	-Wno-atomic-alignment
 
-# OpenSSL extensively uses string literals as char *, which clang
-# (reasonably if not exactly rightly) objects to.
-CWARNFLAGS.clang+=-Wno-error=incompatible-pointer-types-discards-qualifiers
-
 LIB=	ssl
 CPPFLAGS+= -Dlib${LIB} -I${OPENSSLSRC} -I${OPENSSLSRC}/crypto
 CPPFLAGS+= -I${OPENSSLSRC}/include



CVS commit: src/crypto

2023-05-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May 25 19:12:06 UTC 2023

Modified Files:
src/crypto: Makefile.openssl
src/crypto/external/bsd/openssl/lib/libapps: Makefile
src/crypto/external/bsd/openssl/lib/libcrypto: Makefile
src/crypto/external/bsd/openssl/lib/libssl: Makefile

Log Message:
openssl: Consolidate new CWARNFLAGS.clang stuff in Makefile.openssl.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/crypto/Makefile.openssl
cvs rdiff -u -r1.5 -r1.6 src/crypto/external/bsd/openssl/lib/libapps/Makefile
cvs rdiff -u -r1.31 -r1.32 \
src/crypto/external/bsd/openssl/lib/libcrypto/Makefile
cvs rdiff -u -r1.16 -r1.17 \
src/crypto/external/bsd/openssl/lib/libssl/Makefile

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



CVS commit: src/sbin/mount

2023-05-25 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu May 25 17:37:05 UTC 2023

Modified Files:
src/sbin/mount: pathadj.c

Log Message:
pathadj() is required to succeed.   If it cannot, simply issuing a
warning and continuing is not good enough.  Change the warning to
an error (and hence immediate exit) instead, that's all we can do.

Problem pointed out by tlaro...@polynum.com

XXX - pullup -10 (others?)


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sbin/mount/pathadj.c

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

Modified files:

Index: src/sbin/mount/pathadj.c
diff -u src/sbin/mount/pathadj.c:1.3 src/sbin/mount/pathadj.c:1.4
--- src/sbin/mount/pathadj.c:1.3	Sun Jul 26 08:20:22 2020
+++ src/sbin/mount/pathadj.c	Thu May 25 17:37:05 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pathadj.c,v 1.3 2020/07/26 08:20:22 mlelstv Exp $	*/
+/*	$NetBSD: pathadj.c,v 1.4 2023/05/25 17:37:05 kre Exp $	*/
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation.  All Rights Reserved.
@@ -37,10 +37,8 @@ void
 pathadj(const char *input, char *adjusted)
 {
 
-	if (realpath(input, adjusted) == NULL) {
-		warn("Warning: realpath %s", input);
-		return;
-	}
+	if (realpath(input, adjusted) == NULL)
+		err(EXIT_FAILURE, "realpath '%s' failed", input);
 
 	if (input[0] != '/') {
 		warnx("\"%s\" is a relative path.", input);



CVS commit: src/sbin/mount

2023-05-25 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu May 25 17:37:05 UTC 2023

Modified Files:
src/sbin/mount: pathadj.c

Log Message:
pathadj() is required to succeed.   If it cannot, simply issuing a
warning and continuing is not good enough.  Change the warning to
an error (and hence immediate exit) instead, that's all we can do.

Problem pointed out by tlaro...@polynum.com

XXX - pullup -10 (others?)


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sbin/mount/pathadj.c

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



CVS commit: src/usr.bin/realpath

2023-05-25 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu May 25 17:24:17 UTC 2023

Modified Files:
src/usr.bin/realpath: realpath.c

Log Message:
If it isn't possible to determine the realpath() of ".", then simply
give up on attempting to resolve any relative path - there's no hope.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/realpath/realpath.c

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

Modified files:

Index: src/usr.bin/realpath/realpath.c
diff -u src/usr.bin/realpath/realpath.c:1.2 src/usr.bin/realpath/realpath.c:1.3
--- src/usr.bin/realpath/realpath.c:1.2	Thu Jul 21 09:47:31 2022
+++ src/usr.bin/realpath/realpath.c	Thu May 25 17:24:17 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: realpath.c,v 1.2 2022/07/21 09:47:31 kre Exp $	*/
+/*	$NetBSD: realpath.c,v 1.3 2023/05/25 17:24:17 kre Exp $	*/
 /*-
  * SPDX-License-Identifier: BSD-3-Clause
  *
@@ -35,7 +35,7 @@
 #if 0
 __FBSDID("$FreeBSD: head/bin/realpath/realpath.c 326025 2017-11-20 19:49:47Z pfg $");
 #else
-__RCSID("$NetBSD: realpath.c,v 1.2 2022/07/21 09:47:31 kre Exp $");
+__RCSID("$NetBSD: realpath.c,v 1.3 2023/05/25 17:24:17 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -132,6 +132,10 @@ process(char *path)
 
 	if (p == NULL) {
 		p = realpath(".", buf);
+		if (p == NULL) {
+			warnx("relative path; current location unknown");
+			return false;
+		}
 		if ((size_t)snprintf(buf2, sizeof buf2, "%s/%s", buf, path)
 		>= sizeof buf2) {
 			if (!qflag)



CVS commit: src/usr.bin/realpath

2023-05-25 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu May 25 17:24:17 UTC 2023

Modified Files:
src/usr.bin/realpath: realpath.c

Log Message:
If it isn't possible to determine the realpath() of ".", then simply
give up on attempting to resolve any relative path - there's no hope.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/realpath/realpath.c

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



CVS commit: src/crypto/external/bsd/openssl/dist/apps

2023-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu May 25 17:20:15 UTC 2023

Modified Files:
src/crypto/external/bsd/openssl/dist/apps/include: apps.h
src/crypto/external/bsd/openssl/dist/apps/lib: apps.c

Log Message:
add a little const to help clang


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/openssl/dist/apps/include/apps.h
cvs rdiff -u -r1.2 -r1.3 src/crypto/external/bsd/openssl/dist/apps/lib/apps.c

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



CVS commit: src/crypto/external/bsd/openssl/dist/apps

2023-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu May 25 17:20:15 UTC 2023

Modified Files:
src/crypto/external/bsd/openssl/dist/apps/include: apps.h
src/crypto/external/bsd/openssl/dist/apps/lib: apps.c

Log Message:
add a little const to help clang


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/openssl/dist/apps/include/apps.h
cvs rdiff -u -r1.2 -r1.3 src/crypto/external/bsd/openssl/dist/apps/lib/apps.c

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

Modified files:

Index: src/crypto/external/bsd/openssl/dist/apps/include/apps.h
diff -u src/crypto/external/bsd/openssl/dist/apps/include/apps.h:1.1.1.1 src/crypto/external/bsd/openssl/dist/apps/include/apps.h:1.2
--- src/crypto/external/bsd/openssl/dist/apps/include/apps.h:1.1.1.1	Sun May  7 14:29:13 2023
+++ src/crypto/external/bsd/openssl/dist/apps/include/apps.h	Thu May 25 13:20:14 2023
@@ -218,7 +218,7 @@ typedef struct ca_db_st {
 # endif
 } CA_DB;
 
-void app_bail_out(char *fmt, ...);
+void app_bail_out(const char *fmt, ...);
 void *app_malloc(size_t sz, const char *what);
 
 /* load_serial, save_serial, and rotate_serial are also used for CRL numbers */

Index: src/crypto/external/bsd/openssl/dist/apps/lib/apps.c
diff -u src/crypto/external/bsd/openssl/dist/apps/lib/apps.c:1.2 src/crypto/external/bsd/openssl/dist/apps/lib/apps.c:1.3
--- src/crypto/external/bsd/openssl/dist/apps/lib/apps.c:1.2	Sun May  7 14:40:15 2023
+++ src/crypto/external/bsd/openssl/dist/apps/lib/apps.c	Thu May 25 13:20:14 2023
@@ -614,7 +614,7 @@ EVP_PKEY *load_keyparams(const char *uri
 return load_keyparams_suppress(uri, format, maybe_stdin, keytype, desc, 0);
 }
 
-void app_bail_out(char *fmt, ...)
+void app_bail_out(const char *fmt, ...)
 {
 va_list args;
 



CVS commit: src/crypto/external/bsd/openssl/lib

2023-05-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May 25 16:05:28 UTC 2023

Modified Files:
src/crypto/external/bsd/openssl/lib/libapps: Makefile
src/crypto/external/bsd/openssl/lib/libcrypto: Makefile
src/crypto/external/bsd/openssl/lib/libssl: Makefile

Log Message:
openssl: Suppress clang warnings for using string literals as char *.

Not sure this is actually forbidden by the C standard.  There may be
bugs lurking here, but OpenSSL uses this extensively, so let's just
get the build going again.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/crypto/external/bsd/openssl/lib/libapps/Makefile
cvs rdiff -u -r1.30 -r1.31 \
src/crypto/external/bsd/openssl/lib/libcrypto/Makefile
cvs rdiff -u -r1.15 -r1.16 \
src/crypto/external/bsd/openssl/lib/libssl/Makefile

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



CVS commit: src/crypto/external/bsd/openssl/lib

2023-05-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May 25 16:05:28 UTC 2023

Modified Files:
src/crypto/external/bsd/openssl/lib/libapps: Makefile
src/crypto/external/bsd/openssl/lib/libcrypto: Makefile
src/crypto/external/bsd/openssl/lib/libssl: Makefile

Log Message:
openssl: Suppress clang warnings for using string literals as char *.

Not sure this is actually forbidden by the C standard.  There may be
bugs lurking here, but OpenSSL uses this extensively, so let's just
get the build going again.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/crypto/external/bsd/openssl/lib/libapps/Makefile
cvs rdiff -u -r1.30 -r1.31 \
src/crypto/external/bsd/openssl/lib/libcrypto/Makefile
cvs rdiff -u -r1.15 -r1.16 \
src/crypto/external/bsd/openssl/lib/libssl/Makefile

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

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libapps/Makefile
diff -u src/crypto/external/bsd/openssl/lib/libapps/Makefile:1.4 src/crypto/external/bsd/openssl/lib/libapps/Makefile:1.5
--- src/crypto/external/bsd/openssl/lib/libapps/Makefile:1.4	Thu May 25 15:52:28 2023
+++ src/crypto/external/bsd/openssl/lib/libapps/Makefile	Thu May 25 16:05:27 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2023/05/25 15:52:28 riastradh Exp $
+#	$NetBSD: Makefile,v 1.5 2023/05/25 16:05:27 riastradh Exp $
 
 # RCSid:
 #	Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp
@@ -33,6 +33,9 @@ CPPFLAGS+= -I${OPENSSLSRC}/../include
 CPPFLAGS+= -I${OPENSSLSRC}/apps/lib
 CPPFLAGS+= -I${OPENSSLSRC}/apps/include
 
+# OpenSSL extensively uses string literals as char *, which clang
+# (reasonably if not exactly rightly) objects to.
+CWARNFLAGS.clang+=-Wno-error=incompatible-pointer-types-discards-qualifiers
 
 CRYPTODIST=	${NETBSDSRCDIR}/crypto
 OPENSSLINC=	${OPENSSLSRC}/include/openssl

Index: src/crypto/external/bsd/openssl/lib/libcrypto/Makefile
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/Makefile:1.30 src/crypto/external/bsd/openssl/lib/libcrypto/Makefile:1.31
--- src/crypto/external/bsd/openssl/lib/libcrypto/Makefile:1.30	Thu May 25 15:52:28 2023
+++ src/crypto/external/bsd/openssl/lib/libcrypto/Makefile	Thu May 25 16:05:28 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.30 2023/05/25 15:52:28 riastradh Exp $
+#	$NetBSD: Makefile,v 1.31 2023/05/25 16:05:28 riastradh Exp $
 
 # RCSid:
 #	Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp
@@ -31,6 +31,10 @@ CPPFLAGS+= -I${OPENSSLSRC}/crypto/asn1 -
 CPPFLAGS+= -I${OPENSSLSRC}/crypto/modes
 CPPFLAGS+= -I${OPENSSLSRC}/../include
 
+# OpenSSL extensively uses string literals as char *, which clang
+# (reasonably if not exactly rightly) objects to.
+CWARNFLAGS.clang+=-Wno-error=incompatible-pointer-types-discards-qualifiers
+
 CRYPTODIST=	${NETBSDSRCDIR}/crypto
 OPENSSLINC=	${OPENSSLSRC}/include/openssl
 

Index: src/crypto/external/bsd/openssl/lib/libssl/Makefile
diff -u src/crypto/external/bsd/openssl/lib/libssl/Makefile:1.15 src/crypto/external/bsd/openssl/lib/libssl/Makefile:1.16
--- src/crypto/external/bsd/openssl/lib/libssl/Makefile:1.15	Thu May 25 15:52:29 2023
+++ src/crypto/external/bsd/openssl/lib/libssl/Makefile	Thu May 25 16:05:28 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.15 2023/05/25 15:52:29 riastradh Exp $
+#	$NetBSD: Makefile,v 1.16 2023/05/25 16:05:28 riastradh Exp $
 
 # RCSid:
 #	Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp
@@ -24,6 +24,10 @@ CWARNFLAGS.clang+=	-Wno-unused-value
 # XXX: This warning seems to trigger incorrectly
 CWARNFLAGS.clang+=	-Wno-atomic-alignment
 
+# OpenSSL extensively uses string literals as char *, which clang
+# (reasonably if not exactly rightly) objects to.
+CWARNFLAGS.clang+=-Wno-error=incompatible-pointer-types-discards-qualifiers
+
 LIB=	ssl
 CPPFLAGS+= -Dlib${LIB} -I${OPENSSLSRC} -I${OPENSSLSRC}/crypto
 CPPFLAGS+= -I${OPENSSLSRC}/include



CVS commit: src/crypto/external/bsd/openssl/lib

2023-05-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May 25 15:52:30 UTC 2023

Modified Files:
src/crypto/external/bsd/openssl/lib/engines: engines.mk
src/crypto/external/bsd/openssl/lib/libapps: Makefile
src/crypto/external/bsd/openssl/lib/libcommon: Makefile
src/crypto/external/bsd/openssl/lib/libcrypto: Makefile bf.inc gen
libc-sha256.c libc-sha512.c mkinc rc4.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386: ec.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64: ec.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc: crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64: crypto.inc
ec.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64: crypto.inc
ec.inc sha.inc
src/crypto/external/bsd/openssl/lib/libcrypto/man: Makefile
src/crypto/external/bsd/openssl/lib/libdefault: Makefile
src/crypto/external/bsd/openssl/lib/liblegacy: Makefile
src/crypto/external/bsd/openssl/lib/libssl: Makefile statem.inc

Log Message:
openssl: Nix trailing whitespace in build goo.

No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/engines/engines.mk
cvs rdiff -u -r1.3 -r1.4 src/crypto/external/bsd/openssl/lib/libapps/Makefile
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/lib/libcommon/Makefile
cvs rdiff -u -r1.29 -r1.30 \
src/crypto/external/bsd/openssl/lib/libcrypto/Makefile
cvs rdiff -u -r1.2 -r1.3 src/crypto/external/bsd/openssl/lib/libcrypto/bf.inc
cvs rdiff -u -r1.1 -r1.2 src/crypto/external/bsd/openssl/lib/libcrypto/gen \
src/crypto/external/bsd/openssl/lib/libcrypto/mkinc
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/lib/libcrypto/libc-sha256.c
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/lib/libcrypto/libc-sha512.c \
src/crypto/external/bsd/openssl/lib/libcrypto/rc4.inc
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/ec.inc
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/ec.inc
cvs rdiff -u -r1.14 -r1.15 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc
cvs rdiff -u -r1.8 -r1.9 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64/crypto.inc
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64/ec.inc
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/crypto.inc \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/sha.inc
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/ec.inc
cvs rdiff -u -r1.8 -r1.9 \
src/crypto/external/bsd/openssl/lib/libcrypto/man/Makefile
cvs rdiff -u -r1.5 -r1.6 \
src/crypto/external/bsd/openssl/lib/libdefault/Makefile
cvs rdiff -u -r1.6 -r1.7 \
src/crypto/external/bsd/openssl/lib/liblegacy/Makefile
cvs rdiff -u -r1.14 -r1.15 \
src/crypto/external/bsd/openssl/lib/libssl/Makefile
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libssl/statem.inc

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

Modified files:

Index: src/crypto/external/bsd/openssl/lib/engines/engines.mk
diff -u src/crypto/external/bsd/openssl/lib/engines/engines.mk:1.2 src/crypto/external/bsd/openssl/lib/engines/engines.mk:1.3
--- src/crypto/external/bsd/openssl/lib/engines/engines.mk:1.2	Sun May  7 16:21:19 2023
+++ src/crypto/external/bsd/openssl/lib/engines/engines.mk	Thu May 25 15:52:28 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: engines.mk,v 1.2 2023/05/07 16:21:19 christos Exp $
+#	$NetBSD: engines.mk,v 1.3 2023/05/25 15:52:28 riastradh Exp $
 
 NOLINT=		# don't build a lint library
 NOPROFILE=	# don't build a profile library
@@ -14,7 +14,7 @@ CRYPTODIST= ${NETBSDSRCDIR}/crypto
 .PATH: ${OPENSSLSRC}/engines
 
 CPPFLAGS+= -I${OPENSSLSRC}/include -I${OPENSSLSRC}/../include
- 
+
 LIBDIR=${OSSL_ENGINESDIR}
 
 .if ${MKPIC} != "no"

Index: src/crypto/external/bsd/openssl/lib/libapps/Makefile
diff -u src/crypto/external/bsd/openssl/lib/libapps/Makefile:1.3 src/crypto/external/bsd/openssl/lib/libapps/Makefile:1.4
--- src/crypto/external/bsd/openssl/lib/libapps/Makefile:1.3	Tue May 23 12:04:42 2023
+++ src/crypto/external/bsd/openssl/lib/libapps/Makefile	Thu May 25 15:52:28 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2023/05/23 12:04:42 christos Exp $
+#	$NetBSD: Makefile,v 1.4 2023/05/25 15:52:28 riastradh Exp $
 
 # RCSid:
 #	Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp
@@ -8,10 +8,10 @@
 #	This file is provided in the hope that it will
 #	be of use.  There is absolutely NO WARRANTY.
 #	Permission to copy, redistribute or otherwise
-#	use this file is hereby granted provided that 
+#	use this file is hereby granted provided that
 #	the above 

CVS commit: src/crypto/external/bsd/openssl/lib

2023-05-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May 25 15:52:30 UTC 2023

Modified Files:
src/crypto/external/bsd/openssl/lib/engines: engines.mk
src/crypto/external/bsd/openssl/lib/libapps: Makefile
src/crypto/external/bsd/openssl/lib/libcommon: Makefile
src/crypto/external/bsd/openssl/lib/libcrypto: Makefile bf.inc gen
libc-sha256.c libc-sha512.c mkinc rc4.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386: ec.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64: ec.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc: crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64: crypto.inc
ec.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64: crypto.inc
ec.inc sha.inc
src/crypto/external/bsd/openssl/lib/libcrypto/man: Makefile
src/crypto/external/bsd/openssl/lib/libdefault: Makefile
src/crypto/external/bsd/openssl/lib/liblegacy: Makefile
src/crypto/external/bsd/openssl/lib/libssl: Makefile statem.inc

Log Message:
openssl: Nix trailing whitespace in build goo.

No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/engines/engines.mk
cvs rdiff -u -r1.3 -r1.4 src/crypto/external/bsd/openssl/lib/libapps/Makefile
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/lib/libcommon/Makefile
cvs rdiff -u -r1.29 -r1.30 \
src/crypto/external/bsd/openssl/lib/libcrypto/Makefile
cvs rdiff -u -r1.2 -r1.3 src/crypto/external/bsd/openssl/lib/libcrypto/bf.inc
cvs rdiff -u -r1.1 -r1.2 src/crypto/external/bsd/openssl/lib/libcrypto/gen \
src/crypto/external/bsd/openssl/lib/libcrypto/mkinc
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/lib/libcrypto/libc-sha256.c
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/lib/libcrypto/libc-sha512.c \
src/crypto/external/bsd/openssl/lib/libcrypto/rc4.inc
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/ec.inc
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/ec.inc
cvs rdiff -u -r1.14 -r1.15 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc
cvs rdiff -u -r1.8 -r1.9 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64/crypto.inc
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64/ec.inc
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/crypto.inc \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/sha.inc
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/ec.inc
cvs rdiff -u -r1.8 -r1.9 \
src/crypto/external/bsd/openssl/lib/libcrypto/man/Makefile
cvs rdiff -u -r1.5 -r1.6 \
src/crypto/external/bsd/openssl/lib/libdefault/Makefile
cvs rdiff -u -r1.6 -r1.7 \
src/crypto/external/bsd/openssl/lib/liblegacy/Makefile
cvs rdiff -u -r1.14 -r1.15 \
src/crypto/external/bsd/openssl/lib/libssl/Makefile
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libssl/statem.inc

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



Re: CVS commit: src/usr.bin/chflags

2023-05-25 Thread Robert Elz
Date:Thu, 25 May 2023 09:59:41 -0400
From:Greg Troxel 
Message-ID:  


  | Also, the man page does not explain that because "nodump" is the name of
  | a flag, one does "chflags dump foo" to remove the nodump flag.

It doesn't really need to, as while that works, so does nonodump, which
is more consistent with the others.

kre



CVS commit: src/lib/libpthread

2023-05-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May 25 14:30:03 UTC 2023

Modified Files:
src/lib/libpthread: pthread_int.h pthread_spin.c
src/lib/libpthread/arch/aarch64: pthread_md.h
src/lib/libpthread/arch/arm: pthread_md.h
src/lib/libpthread/arch/i386: pthread_md.h
src/lib/libpthread/arch/x86_64: pthread_md.h

Log Message:
libpthread: New pthread__smt_wait to put CPU in low power for spin.

This is now distinct from pthread__smt_pause, which is for spin lock
backoff with no paired wakeup.

On Arm, there is a single-bit event register per CPU, and there are two
instructions to manage it:

- wfe, wait for event -- if event register is clear, enter low power
  mode and wait until event register is set; then exit low power mode
  and clear event register

- sev, signal event -- sets event register on all CPUs (other
  circumstances like interrupts also set the event register and cause
  wfe to wake)

These can be used to reduce the power consumption of spinning for a
lock, but only if they are actually paired -- if there's no sev, wfe
might hang indefinitely.  Currently only pthread_spin(3) actually
pairs them; the other lock primitives (internal lock, mutex, rwlock)
do not -- they have spin lock backoff loops, but no corresponding
wakeup to cancel a wfe.

It may be worthwhile to teach the other lock primitives to pair
wfe/sev, but that requires some performance measurement to verify
it's actually worthwhile.  So for now, we just make sure not to use
wfe when there's no sev, and keep everything else the same -- this
should fix severe performance degredation in libpthread on Arm
without hurting anything else.

No change in the generated code on amd64 and i386.  No change in the
generated code for pthread_spin.c on arm and aarch64 -- changes only
the generated code for pthread_lock.c, pthread_mutex.c, and
pthread_rwlock.c, as intended.

PR port-arm/57437

XXX pullup-10


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/lib/libpthread/pthread_int.h
cvs rdiff -u -r1.10 -r1.11 src/lib/libpthread/pthread_spin.c
cvs rdiff -u -r1.1 -r1.2 src/lib/libpthread/arch/aarch64/pthread_md.h
cvs rdiff -u -r1.12 -r1.13 src/lib/libpthread/arch/arm/pthread_md.h
cvs rdiff -u -r1.20 -r1.21 src/lib/libpthread/arch/i386/pthread_md.h
cvs rdiff -u -r1.12 -r1.13 src/lib/libpthread/arch/x86_64/pthread_md.h

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

Modified files:

Index: src/lib/libpthread/pthread_int.h
diff -u src/lib/libpthread/pthread_int.h:1.110 src/lib/libpthread/pthread_int.h:1.111
--- src/lib/libpthread/pthread_int.h:1.110	Thu May 25 14:29:45 2023
+++ src/lib/libpthread/pthread_int.h	Thu May 25 14:30:03 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread_int.h,v 1.110 2023/05/25 14:29:45 riastradh Exp $	*/
+/*	$NetBSD: pthread_int.h,v 1.111 2023/05/25 14:30:03 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008, 2020
@@ -303,6 +303,9 @@ int	pthread__add_specific(pthread_t, pth
 #ifndef pthread__smt_pause
 #define	pthread__smt_pause()	__nothing
 #endif
+#ifndef pthread__smt_wait
+#define	pthread__smt_wait()	__nothing
+#endif
 #ifndef pthread__smt_wake
 #define	pthread__smt_wake()	__nothing
 #endif

Index: src/lib/libpthread/pthread_spin.c
diff -u src/lib/libpthread/pthread_spin.c:1.10 src/lib/libpthread/pthread_spin.c:1.11
--- src/lib/libpthread/pthread_spin.c:1.10	Sun Apr 10 10:38:33 2022
+++ src/lib/libpthread/pthread_spin.c	Thu May 25 14:30:03 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread_spin.c,v 1.10 2022/04/10 10:38:33 riastradh Exp $	*/
+/*	$NetBSD: pthread_spin.c,v 1.11 2023/05/25 14:30:03 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2006, 2007 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: pthread_spin.c,v 1.10 2022/04/10 10:38:33 riastradh Exp $");
+__RCSID("$NetBSD: pthread_spin.c,v 1.11 2023/05/25 14:30:03 riastradh Exp $");
 
 /* Need to use libc-private names for atomic operations. */
 #include "../../common/lib/libc/atomic/atomic_op_namespace.h"
@@ -98,7 +98,7 @@ pthread_spin_lock(pthread_spinlock_t *lo
 
 	self = pthread__self();
 	while (pthread__spintrylock(self, >pts_spin) == 0) {
-		pthread__smt_pause();
+		pthread__smt_wait();
 	}
 
 	return 0;

Index: src/lib/libpthread/arch/aarch64/pthread_md.h
diff -u src/lib/libpthread/arch/aarch64/pthread_md.h:1.1 src/lib/libpthread/arch/aarch64/pthread_md.h:1.2
--- src/lib/libpthread/arch/aarch64/pthread_md.h:1.1	Sun Aug 10 05:47:37 2014
+++ src/lib/libpthread/arch/aarch64/pthread_md.h	Thu May 25 14:30:02 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread_md.h,v 1.1 2014/08/10 05:47:37 matt Exp $ */
+/* $NetBSD: pthread_md.h,v 1.2 2023/05/25 14:30:02 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@ pthread__sp(void)
 	return ret;
 }
 
-#define pthread__smt_pause()	__asm __volatile("wfe") /* wfe */
+#define pthread__smt_wait()	__asm 

CVS commit: src/lib/libpthread

2023-05-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May 25 14:30:03 UTC 2023

Modified Files:
src/lib/libpthread: pthread_int.h pthread_spin.c
src/lib/libpthread/arch/aarch64: pthread_md.h
src/lib/libpthread/arch/arm: pthread_md.h
src/lib/libpthread/arch/i386: pthread_md.h
src/lib/libpthread/arch/x86_64: pthread_md.h

Log Message:
libpthread: New pthread__smt_wait to put CPU in low power for spin.

This is now distinct from pthread__smt_pause, which is for spin lock
backoff with no paired wakeup.

On Arm, there is a single-bit event register per CPU, and there are two
instructions to manage it:

- wfe, wait for event -- if event register is clear, enter low power
  mode and wait until event register is set; then exit low power mode
  and clear event register

- sev, signal event -- sets event register on all CPUs (other
  circumstances like interrupts also set the event register and cause
  wfe to wake)

These can be used to reduce the power consumption of spinning for a
lock, but only if they are actually paired -- if there's no sev, wfe
might hang indefinitely.  Currently only pthread_spin(3) actually
pairs them; the other lock primitives (internal lock, mutex, rwlock)
do not -- they have spin lock backoff loops, but no corresponding
wakeup to cancel a wfe.

It may be worthwhile to teach the other lock primitives to pair
wfe/sev, but that requires some performance measurement to verify
it's actually worthwhile.  So for now, we just make sure not to use
wfe when there's no sev, and keep everything else the same -- this
should fix severe performance degredation in libpthread on Arm
without hurting anything else.

No change in the generated code on amd64 and i386.  No change in the
generated code for pthread_spin.c on arm and aarch64 -- changes only
the generated code for pthread_lock.c, pthread_mutex.c, and
pthread_rwlock.c, as intended.

PR port-arm/57437

XXX pullup-10


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/lib/libpthread/pthread_int.h
cvs rdiff -u -r1.10 -r1.11 src/lib/libpthread/pthread_spin.c
cvs rdiff -u -r1.1 -r1.2 src/lib/libpthread/arch/aarch64/pthread_md.h
cvs rdiff -u -r1.12 -r1.13 src/lib/libpthread/arch/arm/pthread_md.h
cvs rdiff -u -r1.20 -r1.21 src/lib/libpthread/arch/i386/pthread_md.h
cvs rdiff -u -r1.12 -r1.13 src/lib/libpthread/arch/x86_64/pthread_md.h

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



CVS commit: src/lib/libpthread

2023-05-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May 25 14:29:45 UTC 2023

Modified Files:
src/lib/libpthread: pthread_int.h
src/lib/libpthread/arch/arm: pthread_md.h

Log Message:
libpthread: Use __nothing, not /* nothing */, for empty macros.

No functional change intended -- just safer to do it this way in case
the macros are used in if branches or comma expressions.

PR port-arm/57437 (pthread__smt_pause/wake issue)

XXX pullup-10


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 src/lib/libpthread/pthread_int.h
cvs rdiff -u -r1.11 -r1.12 src/lib/libpthread/arch/arm/pthread_md.h

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

Modified files:

Index: src/lib/libpthread/pthread_int.h
diff -u src/lib/libpthread/pthread_int.h:1.109 src/lib/libpthread/pthread_int.h:1.110
--- src/lib/libpthread/pthread_int.h:1.109	Tue Apr 19 20:32:17 2022
+++ src/lib/libpthread/pthread_int.h	Thu May 25 14:29:45 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread_int.h,v 1.109 2022/04/19 20:32:17 rillig Exp $	*/
+/*	$NetBSD: pthread_int.h,v 1.110 2023/05/25 14:29:45 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008, 2020
@@ -301,10 +301,10 @@ int	pthread__checkpri(int) PTHREAD_HIDE;
 int	pthread__add_specific(pthread_t, pthread_key_t, const void *) PTHREAD_HIDE;
 
 #ifndef pthread__smt_pause
-#define	pthread__smt_pause()	/* nothing */
+#define	pthread__smt_pause()	__nothing
 #endif
 #ifndef pthread__smt_wake
-#define	pthread__smt_wake()	/* nothing */
+#define	pthread__smt_wake()	__nothing
 #endif
 
 /*

Index: src/lib/libpthread/arch/arm/pthread_md.h
diff -u src/lib/libpthread/arch/arm/pthread_md.h:1.11 src/lib/libpthread/arch/arm/pthread_md.h:1.12
--- src/lib/libpthread/arch/arm/pthread_md.h:1.11	Thu Nov 22 20:38:59 2018
+++ src/lib/libpthread/arch/arm/pthread_md.h	Thu May 25 14:29:45 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread_md.h,v 1.11 2018/11/22 20:38:59 skrll Exp $	*/
+/*	$NetBSD: pthread_md.h,v 1.12 2023/05/25 14:29:45 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -56,8 +56,8 @@ pthread__sp(void)
 #define pthread__smt_pause()	__asm __volatile(".inst 0xe320f002") /* wfe */
 #define pthread__smt_wake()	__asm __volatile(".inst 0xe320f004") /* sev */
 #else
-#define pthread__smt_pause()
-#define pthread__smt_wake()
+#define pthread__smt_pause()	__nothing
+#define pthread__smt_wake()	__nothing
 #endif
 
 #define	pthread__uc_sp(ucp)	((ucp)->uc_mcontext.__gregs[_REG_SP])



CVS commit: src/lib/libpthread

2023-05-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May 25 14:29:45 UTC 2023

Modified Files:
src/lib/libpthread: pthread_int.h
src/lib/libpthread/arch/arm: pthread_md.h

Log Message:
libpthread: Use __nothing, not /* nothing */, for empty macros.

No functional change intended -- just safer to do it this way in case
the macros are used in if branches or comma expressions.

PR port-arm/57437 (pthread__smt_pause/wake issue)

XXX pullup-10


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 src/lib/libpthread/pthread_int.h
cvs rdiff -u -r1.11 -r1.12 src/lib/libpthread/arch/arm/pthread_md.h

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



Re: CVS commit: src/usr.bin/chflags

2023-05-25 Thread Greg Troxel
Taylor R Campbell  writes:

> jschauma@'s change did help clarify (1) and (2).  Let's try to work
> together to make it better?

Well said.


I can shed a little light on some of the questions.

> 1. What is `arch' or `archived' supposed to mean?  Who sets it, who
>pays attention to it, and what consequences does it have?  Is it
>obsolete?  What was it used for?  From the current text, I have no
>idea!

>From reading sources, I think it is exactly "the archive bit is set in
the foreign filesystem entry that this vnode is representting" and that
it is basically an MS-DOS thing that is likely not important (even to
people that do not dismiss all things Windows!) any more.

> 2. What is `nodump' supposed to mean?  Who sets it, who pays attention
>to it, and what consequences does it have?  Does the kernel do
>anything about it, or is it just an extra bit of storage that
>programs like dump(8) can choose to examine?  From the current
>text, I have no idea!

I believe it is just a bit that other programs can query, and that the
intent is that dump(8) will decline to dump files with the bit set.

(I intend, in my Copious Spare Time, to extend pkgsrc/sysutils/bup to
respect this flag.  I have previously made extensive use of nodump with
dump.  Partly because of lack of the bit in bup and partly for
organizational sanity, I use /u0 and /n0 for things that should and
should not be backed up.  But that's me in case it helps motivate why
nodump is useful, not about flag docs.)

I believe that nodump continues to be relevant today.

> 3. What is the difference between `system' and `user' immutable or
>append-only?  If I set uchg, does that mean the _owner_ can't
>modify the file, or that _nobody_ can modify the file?

Not useful for a 1 man page, but

  egrep '[SU]F_' /usr/include/sys/stat.h

is illuminating to programmers.

I believe, but would have to read the code to be 100% sure, that

  only root can modify schg and sappnd flags (and archive)

  either root or the owner can modify other flags (except on
  device files, on which only root may modify flags, for reasons that
  are unclear, but the rationale seems unimportant)

  etiher schg or uchg means the file can't be modified, probably, but
  it's possible that uchg applies to everybody but root and schg applies
  to everybody.  A quick experiment shows that root cannot write to a
  gdt-owned file with the uchg bit set.

Fundamentally there are 16 flag bits for user and 16 for system and I
think it is baked in hard that only root can modify the system set.

> jschauma@'s change did help clarify (1) and (2).  Let's try to work
> together to make it better?

The fundamental issue is that the table attempts to

  - map the tokens used by chflags(1) (good)

  - to names that sort of represent the flags (which are fundamentally C
preprocessor token) but are a third namespace that exists only here
(bad)

  - describe the flags permissions as if they are individual, instead of
simly saying that schg and sappend may be changed by superuser
only (confusing)

  - does not give semantics (ok, because that is not consistent with a
table)

Also, the man page does not explain that because "nodump" is the name of
a flag, one does "chflags dump foo" to remove the nodump flag.

(I don't think it needs explanation that the design decision is that
nodump is a flag, instead of dump, because the norms are that files tend
not to have any flags set and that all files should be backed up.)



I would recommend:

  Noting that archive flag represents something in some foreign
  filesystems, currently known to exist only for some MSDOS filesystems,
  and that the specific filesystem should document that.

  Explaining that the nodump flag is a request that backup programs omit
  the file from backups and to see dump(8).

  Be clearer about permissions.

  Drop the restatement of tokens into a third only-here namespace.
  Instead, use paragraphs following to describe that each token means.


CVS commit: src/external/cddl/osnet/sys/sys

2023-05-25 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Thu May 25 13:18:44 UTC 2023

Modified Files:
src/external/cddl/osnet/sys/sys: opentypes.h

Log Message:
osnet: on macOS, use  for boolean_t

macOS/x86_64 defines boolean_t as 'unsigned int' not 'int',
which causes a build issue with tools/ctfmerge on that host
after my recent fixes for macOS semaphores.
So use the  instead of a local typedef ifdef __APPLE__.

May fix a macOS/x86_64 build issue reported by cjep@.
Builds fine on NetBSD/amd64 or macOS/arm.

Note: this compat stuff is clunky, and based on the commit log,
annoyingly error prone. A newer sync of osnet from upstream /may/
improve a lot of these compat typedef workarounds for solaris types...


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/cddl/osnet/sys/sys/opentypes.h

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

Modified files:

Index: src/external/cddl/osnet/sys/sys/opentypes.h
diff -u src/external/cddl/osnet/sys/sys/opentypes.h:1.6 src/external/cddl/osnet/sys/sys/opentypes.h:1.7
--- src/external/cddl/osnet/sys/sys/opentypes.h:1.6	Thu Apr 15 07:00:50 2021
+++ src/external/cddl/osnet/sys/sys/opentypes.h	Thu May 25 13:18:44 2023
@@ -37,8 +37,12 @@ typedef id_t		ctid_t;
 #define	B_FALSE	0
 #define	B_TRUE	1
 #ifndef _KERNEL
+#if defined(__APPLE__)
+#include 
+#else
 typedef int		boolean_t;
 #endif
+#endif
 
 #ifndef __defined_hr_t
 #define __defined_hr_t



CVS commit: src/external/cddl/osnet/sys/sys

2023-05-25 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Thu May 25 13:18:44 UTC 2023

Modified Files:
src/external/cddl/osnet/sys/sys: opentypes.h

Log Message:
osnet: on macOS, use  for boolean_t

macOS/x86_64 defines boolean_t as 'unsigned int' not 'int',
which causes a build issue with tools/ctfmerge on that host
after my recent fixes for macOS semaphores.
So use the  instead of a local typedef ifdef __APPLE__.

May fix a macOS/x86_64 build issue reported by cjep@.
Builds fine on NetBSD/amd64 or macOS/arm.

Note: this compat stuff is clunky, and based on the commit log,
annoyingly error prone. A newer sync of osnet from upstream /may/
improve a lot of these compat typedef workarounds for solaris types...


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/cddl/osnet/sys/sys/opentypes.h

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



Re: CVS commit: src/usr.bin/chflags

2023-05-25 Thread Taylor R Campbell
> Date: Thu, 25 May 2023 15:10:41 +0300
> From: Valery Ushakov 
> 
> This new paragraph is wedged right between the list of the options and
> the continuation of that same paragraph that says that they can be
> prefixed with "no".
> 
> A description of an obsolete flag right in the middle of the manpage
> is a very poor narrative choice.
> 
> Calling nodump "not intuitive" is not intuitive.
> 
> Anyway, this change is strictly for the worse.  If you want to keep
> these random tidbits of information, move them elsewhere, like HISTORY
> section (which is probably the most appropriate place for the
> obsolete, unused, compat-only msdos flag).

Can I suggest framing this a little more constructively and a little
less derisively?

Personally I find the chflags options confusing, and I appreciate
jschauma@ taking the time to sort them out and clarify the
documentation even if it's not perfect the first time around.

Here are some questions that come to mind when I read the man page as
it is:

1. What is `arch' or `archived' supposed to mean?  Who sets it, who
   pays attention to it, and what consequences does it have?  Is it
   obsolete?  What was it used for?  From the current text, I have no
   idea!

2. What is `nodump' supposed to mean?  Who sets it, who pays attention
   to it, and what consequences does it have?  Does the kernel do
   anything about it, or is it just an extra bit of storage that
   programs like dump(8) can choose to examine?  From the current
   text, I have no idea!

3. What is the difference between `system' and `user' immutable or
   append-only?  If I set uchg, does that mean the _owner_ can't
   modify the file, or that _nobody_ can modify the file?

jschauma@'s change did help clarify (1) and (2).  Let's try to work
together to make it better?


Re: CVS commit: src/usr.bin/chflags

2023-05-25 Thread Jan Schaumann
Valery Ushakov  wrote:
> Anyway, this change is strictly for the worse.

¯\_(ツ)_/¯ 

I've reverted the change.

-Jan


CVS commit: src/usr.bin/chflags

2023-05-25 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Thu May 25 12:57:38 UTC 2023

Modified Files:
src/usr.bin/chflags: chflags.1

Log Message:
revert my previous commit as there is no agreement on it being either desired
or appropriate


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/usr.bin/chflags/chflags.1

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

Modified files:

Index: src/usr.bin/chflags/chflags.1
diff -u src/usr.bin/chflags/chflags.1:1.30 src/usr.bin/chflags/chflags.1:1.31
--- src/usr.bin/chflags/chflags.1:1.30	Thu May 25 01:31:27 2023
+++ src/usr.bin/chflags/chflags.1	Thu May 25 12:57:37 2023
@@ -1,4 +1,4 @@
-.\"	$NetBSD: chflags.1,v 1.30 2023/05/25 01:31:27 uwe Exp $
+.\"	$NetBSD: chflags.1,v 1.31 2023/05/25 12:57:37 jschauma Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\"	@(#)chflags.1	8.4 (Berkeley) 5/2/95
 .\"
-.Dd May 24, 2023
+.Dd May 25, 2023
 .Dt CHFLAGS 1
 .Os
 .Sh NAME
@@ -104,18 +104,6 @@ The following keywords are currently def
 .It Li uchg Ta user immutable Ta owner or super-user
 .El
 .Pp
-The
-.Cm arch
-flag is only used in connection with certain foreign
-filesystems (e.g., MS-DOS, where it indicates whether
-a file has been modified since it was last backed up).
-.Pp
-A file with the
-.Cm nodump
-flag set will by default only be backed up by
-.Xr dump 8
-during full backups.
-.Pp
 Putting the letters
 .Sq Cm no
 before a keyword causes the flag to be turned off.



CVS commit: src/usr.bin/chflags

2023-05-25 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Thu May 25 12:57:38 UTC 2023

Modified Files:
src/usr.bin/chflags: chflags.1

Log Message:
revert my previous commit as there is no agreement on it being either desired
or appropriate


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/usr.bin/chflags/chflags.1

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



CVS commit: src/external/cddl/osnet/dist/tools/ctf/cvt

2023-05-25 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Thu May 25 12:53:56 UTC 2023

Modified Files:
src/external/cddl/osnet/dist/tools/ctf/cvt: barrier.c

Log Message:
ctfmerge: fix macOS semaphore implementation, part 2

dispatch_semaphore_signal() doesn't return an error, just an
indicator of whether a thread was woken or not, so there's
no need to fail on non-zero return.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/cddl/osnet/dist/tools/ctf/cvt/barrier.c

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



CVS commit: src/external/cddl/osnet/dist/tools/ctf/cvt

2023-05-25 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Thu May 25 12:53:56 UTC 2023

Modified Files:
src/external/cddl/osnet/dist/tools/ctf/cvt: barrier.c

Log Message:
ctfmerge: fix macOS semaphore implementation, part 2

dispatch_semaphore_signal() doesn't return an error, just an
indicator of whether a thread was woken or not, so there's
no need to fail on non-zero return.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/cddl/osnet/dist/tools/ctf/cvt/barrier.c

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

Modified files:

Index: src/external/cddl/osnet/dist/tools/ctf/cvt/barrier.c
diff -u src/external/cddl/osnet/dist/tools/ctf/cvt/barrier.c:1.7 src/external/cddl/osnet/dist/tools/ctf/cvt/barrier.c:1.8
--- src/external/cddl/osnet/dist/tools/ctf/cvt/barrier.c:1.7	Tue May 23 19:53:24 2023
+++ src/external/cddl/osnet/dist/tools/ctf/cvt/barrier.c	Thu May 25 12:53:56 2023
@@ -109,9 +109,8 @@ barrier_wait(barrier_t *bar)
 			if ((errno = sema_post(>bar_sem)) != 0)
 terminate("%s: sema_post(bar_sem)", __func__);
 #elif defined(HAVE_DISPATCH_SEMAPHORE_CREATE)
-			if ((error = dispatch_semaphore_signal(bar->bar_sem)) != 0)
-terminate("%s: dispatch_semaphore_signal(bar_sem) = %ld\n",
-__func__, error);
+			/* return value doesn't matter */
+			dispatch_semaphore_signal(bar->bar_sem);
 #else
 			if (sem_post(>bar_sem) == -1)
 terminate("%s: sem_post(bar_sem)", __func__);



Re: CVS commit: src/usr.bin/chflags

2023-05-25 Thread Greg Troxel
Valery Ushakov  writes:

> On Thu, May 25, 2023 at 07:17:52 -0400, Greg Troxel wrote:
>
>> Jan Schaumann  writes:
>> 
>> > Valery Ushakov  wrote:
>> >> On Wed, May 24, 2023 at 22:33:17 +, Jan Schaumann wrote:
>> >
>> >> > Briefly describe the 'arch' and 'nodump' flags.
>> >> 
>> >> What makes them special and why is that these two have to be described
>> >> here and not in chflags(2), where the flags are actually defined?
>> >
>> > Unlike the other flags, they are not intuitive.  As
>> > they are exposed to the end-user (versus the
>> > programmer), it seems useful to describe them in
>> > section 1 of the manual pages.
>> 
>> FWIW, I agree that the flags are user-facing rather than (only)
>> programmer-facing, and thus should be described in a 1/8 manpage vs only
>> a 2 manpage.
>
> Then *all* of them should be described in a proper narration.  I'm not
> objecting to that.  I'm objecting to sticking the description of two
> of them chosen seemingly at random in a place selected seemingly at
> random.

OK, that's a perfectly reasonable objection.


Re: CVS commit: src/usr.bin/chflags

2023-05-25 Thread Valery Ushakov
On Thu, May 25, 2023 at 07:17:52 -0400, Greg Troxel wrote:

> Jan Schaumann  writes:
> 
> > Valery Ushakov  wrote:
> >> On Wed, May 24, 2023 at 22:33:17 +, Jan Schaumann wrote:
> >
> >> > Briefly describe the 'arch' and 'nodump' flags.
> >> 
> >> What makes them special and why is that these two have to be described
> >> here and not in chflags(2), where the flags are actually defined?
> >
> > Unlike the other flags, they are not intuitive.  As
> > they are exposed to the end-user (versus the
> > programmer), it seems useful to describe them in
> > section 1 of the manual pages.
> 
> FWIW, I agree that the flags are user-facing rather than (only)
> programmer-facing, and thus should be described in a 1/8 manpage vs only
> a 2 manpage.

Then *all* of them should be described in a proper narration.  I'm not
objecting to that.  I'm objecting to sticking the description of two
of them chosen seemingly at random in a place selected seemingly at
random.

Yes, I can see how archive vs dump might be puzzling.  But I still
maintain that the last change made the narration strictly worse
compositionally.

-uwe


Re: CVS commit: src/usr.bin/chflags

2023-05-25 Thread Valery Ushakov
On Wed, May 24, 2023 at 23:44:07 -0400, Jan Schaumann wrote:

> Valery Ushakov  wrote:
> > On Wed, May 24, 2023 at 22:33:17 +, Jan Schaumann wrote:
> 
> > > Briefly describe the 'arch' and 'nodump' flags.
> > 
> > What makes them special and why is that these two have to be described
> > here and not in chflags(2), where the flags are actually defined?
> 
> Unlike the other flags, they are not intuitive.  As
> they are exposed to the end-user (versus the
> programmer), it seems useful to describe them in
> section 1 of the manual pages.

This new paragraph is wedged right between the list of the options and
the continuation of that same paragraph that says that they can be
prefixed with "no".

A description of an obsolete flag right in the middle of the manpage
is a very poor narrative choice.

Calling nodump "not intuitive" is not intuitive.

Anyway, this change is strictly for the worse.  If you want to keep
these random tidbits of information, move them elsewhere, like HISTORY
section (which is probably the most appropriate place for the
obsolete, unused, compat-only msdos flag).

-uwe


CVS commit: src/sys/external/bsd/drm2/dist/drm/amd/amdgpu

2023-05-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May 25 12:07:43 UTC 2023

Modified Files:
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu: amdgpu_device.c

Log Message:
amdgpu: Fix mostly harmless merge botch.

Avoids confusing error message that should have been confined to an
error branch.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 \
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_device.c

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



CVS commit: src/sys/external/bsd/drm2/dist/drm/amd/amdgpu

2023-05-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May 25 12:07:43 UTC 2023

Modified Files:
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu: amdgpu_device.c

Log Message:
amdgpu: Fix mostly harmless merge botch.

Avoids confusing error message that should have been confined to an
error branch.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 \
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_device.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/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_device.c
diff -u src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_device.c:1.18 src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_device.c:1.19
--- src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_device.c:1.18	Tue Feb 21 11:39:39 2023
+++ src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_device.c	Thu May 25 12:07:43 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: amdgpu_device.c,v 1.18 2023/02/21 11:39:39 riastradh Exp $	*/
+/*	$NetBSD: amdgpu_device.c,v 1.19 2023/05/25 12:07:43 riastradh Exp $	*/
 
 /*
  * Copyright 2008 Advanced Micro Devices, Inc.
@@ -28,7 +28,7 @@
  *  Jerome Glisse
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: amdgpu_device.c,v 1.18 2023/02/21 11:39:39 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdgpu_device.c,v 1.19 2023/05/25 12:07:43 riastradh Exp $");
 
 #include 
 #include 
@@ -3085,7 +3085,6 @@ int amdgpu_device_init(struct amdgpu_dev
 	}
 #ifdef __NetBSD__
 	if (i == DEVICE_COUNT_RESOURCE)
-		DRM_ERROR("Unable to find PCI I/O BAR\n");
 #else
 	if (adev->rio_mem == NULL)
 #endif



Re: CVS commit: src/usr.bin/chflags

2023-05-25 Thread Greg Troxel
Jan Schaumann  writes:

> Valery Ushakov  wrote:
>> On Wed, May 24, 2023 at 22:33:17 +, Jan Schaumann wrote:
>
>> > Briefly describe the 'arch' and 'nodump' flags.
>> 
>> What makes them special and why is that these two have to be described
>> here and not in chflags(2), where the flags are actually defined?
>
> Unlike the other flags, they are not intuitive.  As
> they are exposed to the end-user (versus the
> programmer), it seems useful to describe them in
> section 1 of the manual pages.

FWIW, I agree that the flags are user-facing rather than (only)
programmer-facing, and thus should be described in a 1/8 manpage vs only
a 2 manpage.


CVS commit: src/sys/arch/riscv/include

2023-05-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu May 25 06:17:18 UTC 2023

Modified Files:
src/sys/arch/riscv/include: cpu.h

Log Message:
Fix CLKF_INTR so that not all time is shown as being spent in interrupts.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/riscv/include/cpu.h

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



CVS commit: src/sys/arch/riscv/include

2023-05-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu May 25 06:17:18 UTC 2023

Modified Files:
src/sys/arch/riscv/include: cpu.h

Log Message:
Fix CLKF_INTR so that not all time is shown as being spent in interrupts.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/riscv/include/cpu.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/riscv/include/cpu.h
diff -u src/sys/arch/riscv/include/cpu.h:1.10 src/sys/arch/riscv/include/cpu.h:1.11
--- src/sys/arch/riscv/include/cpu.h:1.10	Sun May  7 12:41:48 2023
+++ src/sys/arch/riscv/include/cpu.h	Thu May 25 06:17:18 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.10 2023/05/07 12:41:48 skrll Exp $ */
+/* $NetBSD: cpu.h,v 1.11 2023/05/25 06:17:18 skrll Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@ struct clockframe {
 
 #define CLKF_USERMODE(cf)	(((cf)->cf_status & SR_SPP) == 0)
 #define CLKF_PC(cf)		((cf)->cf_epc)
-#define CLKF_INTR(cf)		((cf)->cf_intr_depth > 0)
+#define CLKF_INTR(cf)		((cf)->cf_intr_depth > 1)
 
 #include 
 #include