CVS commit: src/tools

2024-03-26 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Mar 27 05:43:38 UTC 2024

Modified Files:
src/tools: Makefile

Log Message:
tools/Makefile: clean up TOOLDIR validation

At the point where tools/Makefile is loaded, TOOLDIR doesn't have to
exist yet, it will be created later.  Remove the redundant quotes from
the .error messages.


To generate a diff of this commit:
cvs rdiff -u -r1.216 -r1.217 src/tools/Makefile

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

Modified files:

Index: src/tools/Makefile
diff -u src/tools/Makefile:1.216 src/tools/Makefile:1.217
--- src/tools/Makefile:1.216	Fri Feb 23 05:34:41 2024
+++ src/tools/Makefile	Wed Mar 27 05:43:38 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.216 2024/02/23 05:34:41 mrg Exp $
+#	$NetBSD: Makefile,v 1.217 2024/03/27 05:43:38 rillig Exp $
 
 .include 
 .include 
@@ -9,13 +9,11 @@
 
 # TOOLDIR must be valid, unless MKTOOLS=no
 .if ${MKTOOLS:Uyes} != "no"
-.if "${TOOLDIR}" == ""
-.error "TOOLDIR is undefined or empty"
-.elif "${TOOLDIR:tW:M/*}" == ""
-.error "TOOLDIR is not an absolute path: ${TOOLDIR}"
-#.elif !exists(TOOLDIR) # XXX .exists fails for directories
-#.error "TOOLDIR does not exist: ${TOOLDIR}"
-.endif
+.  if "${TOOLDIR}" == ""
+.error TOOLDIR is undefined or empty
+.  elif ${TOOLDIR:tW:M/*} == ""
+.error TOOLDIR '${TOOLDIR}' is not an absolute path
+.  endif
 .endif # MKTOOLS != no
 
 # TOOLS_BUILDRUMP == yes builds only the subset of the tools required



CVS commit: src/tools

2024-03-26 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Mar 27 05:43:38 UTC 2024

Modified Files:
src/tools: Makefile

Log Message:
tools/Makefile: clean up TOOLDIR validation

At the point where tools/Makefile is loaded, TOOLDIR doesn't have to
exist yet, it will be created later.  Remove the redundant quotes from
the .error messages.


To generate a diff of this commit:
cvs rdiff -u -r1.216 -r1.217 src/tools/Makefile

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



CVS commit: src/usr.sbin/mountd

2024-03-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Mar 27 01:43:26 UTC 2024

Modified Files:
src/usr.sbin/mountd: exports.5

Log Message:
exports(5): Substantially rewrite for clarity.

Hope this is an improvement over the turgid paragraphs all about
first/second/third cases of everything.

PR misc/58063


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/usr.sbin/mountd/exports.5

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

Modified files:

Index: src/usr.sbin/mountd/exports.5
diff -u src/usr.sbin/mountd/exports.5:1.34 src/usr.sbin/mountd/exports.5:1.35
--- src/usr.sbin/mountd/exports.5:1.34	Wed Mar 27 00:46:17 2024
+++ src/usr.sbin/mountd/exports.5	Wed Mar 27 01:43:26 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: exports.5,v 1.34 2024/03/27 00:46:17 riastradh Exp $
+.\"	$NetBSD: exports.5,v 1.35 2024/03/27 01:43:26 riastradh Exp $
 .\"
 .\" Copyright (c) 1989, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -39,116 +39,147 @@
 mount requests
 .Sh DESCRIPTION
 The
-.Nm exports
+.Nm
 file on an
 .Tn NFS
-server, used by
-.Xr mountd 8 ,
-lists filesystems to be exported to
+server lists filesystems to be exported to
 .Tn NFS
 clients.
+It is read and applied by
+.Xr mountd 8
+on start and on
+.Dv SIGHUP .
+.Pp
+Each entry in
+.Nm
+is a line with a list of directories followed by a list of hosts,
+netgroups, and options, separated by spaces or tabs:
+.Pp
+.Dl Pf / Va dir "..." Oo Va host | Va netgroup | Fl Va option Oc "..."
+.Pp
+All directories in a single line must live in the same filesystem,
+which is exported to the hosts and netgroups listed, according to the
+options specified.
+Exported directories must not have pathname components that are
+symbolic links,
+.Ql "." ,
+or
+.Ql ".." .
 .Pp
+.Bf -symbolic
+Warning:
 Exporting a directory exposes the
 .Em entire
 content of the filesystem that the directory lives in to
 .Tn NFS
-clients, even it it isn't the root directory of a filesystem on the
-server.
-The list of exports is only what the server advertises to clients in
-the mount protocol, not a restriction on what files or directories
-within exported filesystems clients have access to with
-.Tn NFS .
-.Pp
-Each line in the file
-(other than comment lines that begin with a
-.Sq # )
-specifies the mount point(s) and export flags within one local server
-filesystem for one or more hosts.
-A host may be specified only once for each local filesystem on the
-server and there may be only one default entry for each server
-filesystem that applies to all other hosts.
-The latter exports the filesystem to the
-.Dq world
-and should
-be used only when the filesystem contains public information.
+clients.
+.Ef
+This happens even if an exported directory is not the root directory of
+a filesystem on the server.
+.Tn NFS
+clients are only prevented from access to files and directories on
+filesystems that are
+.Em not
+exported at all.
 .Pp
-If you have modified the
-.Pa /etc/exports
-file, send the mountd a SIGHUP to make it re-read the
-.Pa /etc/exports
-file:
-.Dq kill -HUP `cat /var/run/mountd.pid` .
+.Bf -symbolic
+Warning:
+Access control is only by network address.
+.Ef
+.Tn NFS
+servers with any non-public data should be exposed only to restricted
+or firewalled networks with ingress filtering.
+There is no authentication or encryption to make it safe for
+restricting access on the open internet.
+.Pp
+Blank lines are ignored.
+Text beginning with
+.Ql #
+until the end of line is ignored as a comment.
+Each line ending with
+.Ql \e
+has the next line appended, without the
+.Ql \e ,
+as a continuation line.
+Characters can be escaped with
+.Ql \e .
+.Pp
+All directories, which begin with
+.Ql / ,
+must come before any hosts, netgroups, or options on a line.
+Options begin with
+.Ql - .
+All other items on an export line are interpreted either as netgroups
+(see
+.Xr netgroup 5 )
+or as hosts, which can be either names, as in example.com, or numbers,
+as in 192.0.2.123 or 2001:db8:1234:abcd::42.
+Sets of hosts in a contiguous network range can be specified with the
+.Fl network
+option.
 .Pp
-In a mount entry,
-the first field(s) specify the directory path(s) within a server filesystem
-that can be mounted on by the corresponding client(s).
-There are two forms of this specification.
-The first is to list all mount points as absolute
-directory paths separated by whitespace.
-The second is to specify the pathname of the root of the filesystem
-followed by the
-.Fl alldirs
-flag;
-this form allows the host(s) to mount at any point within the filesystem,
+The same filesystem may be exported on multiple lines with different
+options to different sets of hosts, as long as it is exported at most
+once to each host, netgroup, or network.
+.Pp
+Export lines with no hosts, netgroups, or
+.Fl network
+options are exported to
+.Em any
+hosts on the network, with no access control.

CVS commit: src/usr.sbin/mountd

2024-03-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Mar 27 01:43:26 UTC 2024

Modified Files:
src/usr.sbin/mountd: exports.5

Log Message:
exports(5): Substantially rewrite for clarity.

Hope this is an improvement over the turgid paragraphs all about
first/second/third cases of everything.

PR misc/58063


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/usr.sbin/mountd/exports.5

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



CVS commit: src/usr.sbin/mountd

2024-03-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Mar 27 00:46:17 UTC 2024

Modified Files:
src/usr.sbin/mountd: exports.5

Log Message:
exports(5): Revert warning about `-ro' on read/write file systems.

Looks like the nfs server does enforce that after all, in spite of
the rather oblique commentary in the BUGS section about export
options being tied to local mount point options with which they must
be noncontradictory.

And there's no reason in principle it shouldn't enforce this -- it
just need to block various file system _operations_, rather than the
subtree issue where the criteria for evaluating whether operations
are allowed on particular _file handles_ are too painful to
contemplate.

PR misc/58063


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/usr.sbin/mountd/exports.5

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

Modified files:

Index: src/usr.sbin/mountd/exports.5
diff -u src/usr.sbin/mountd/exports.5:1.33 src/usr.sbin/mountd/exports.5:1.34
--- src/usr.sbin/mountd/exports.5:1.33	Tue Mar 26 23:32:43 2024
+++ src/usr.sbin/mountd/exports.5	Wed Mar 27 00:46:17 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: exports.5,v 1.33 2024/03/26 23:32:43 riastradh Exp $
+.\"	$NetBSD: exports.5,v 1.34 2024/03/27 00:46:17 riastradh Exp $
 .\"
 .\" Copyright (c) 1989, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -174,33 +174,14 @@ This option is currently not implemented
 .Pp
 The
 .Fl ro
-option should be specified for filesystems that are read-only (default
-is to assume read/write).
+option specifies that the filesystem should be exported read-only
+(default read/write).
 The option
 .Fl o
 is a synonym for
 .Fl ro
 in an effort to be backward compatible with older export file formats.
 .Pp
-.Bf -symbolic
-Warning:
-Exporting a read/write filesystem with
-.Fl ro
-.Em does not
-prevent clients from writing to it.
-.Ef
-To prevent clients from writing to a filesystem, it must be mounted
-read-only
-.Em on the server
-in the first place.
-To export a read/write filesystem so clients can only read from it, not
-write to it, you can mount a read-only nullfs from the filesystem with
-.Xr mount_null 8
-using the
-.Fl o Cm ro
-option, and then export the read-only nullfs instead.
-See also caveats about nullfs namespace below.
-.Pp
 The
 .Fl noresvport
 option specifies that NFS RPC calls for the filesystem do not have to come
@@ -424,7 +405,7 @@ systems.
 .Pp
 .Pp
 Filesystems that provide a namespace for a subtree of another
-filesystem such as nullfs 
+filesystem such as nullfs
 .No ( Xr mount_null 8 )
 and umapfs
 .No ( Xr mount_umap 8 )



CVS commit: src/usr.sbin/mountd

2024-03-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Mar 27 00:46:17 UTC 2024

Modified Files:
src/usr.sbin/mountd: exports.5

Log Message:
exports(5): Revert warning about `-ro' on read/write file systems.

Looks like the nfs server does enforce that after all, in spite of
the rather oblique commentary in the BUGS section about export
options being tied to local mount point options with which they must
be noncontradictory.

And there's no reason in principle it shouldn't enforce this -- it
just need to block various file system _operations_, rather than the
subtree issue where the criteria for evaluating whether operations
are allowed on particular _file handles_ are too painful to
contemplate.

PR misc/58063


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/usr.sbin/mountd/exports.5

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



CVS commit: src/usr.sbin/mountd

2024-03-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Mar 26 23:32:43 UTC 2024

Modified Files:
src/usr.sbin/mountd: exports.5 mountd.8

Log Message:
exports(5), mountd(8): First pass at clarifying export semantics.

The exports(5) man page is full of walls of turgid prose that should
be itemized lists with syntax templates, and I'm itching to rewrite
it, but let's get the security-relevant warnings out of the way
first.

PR misc/58063


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/usr.sbin/mountd/exports.5
cvs rdiff -u -r1.42 -r1.43 src/usr.sbin/mountd/mountd.8

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

Modified files:

Index: src/usr.sbin/mountd/exports.5
diff -u src/usr.sbin/mountd/exports.5:1.32 src/usr.sbin/mountd/exports.5:1.33
--- src/usr.sbin/mountd/exports.5:1.32	Thu Mar 28 22:54:25 2013
+++ src/usr.sbin/mountd/exports.5	Tue Mar 26 23:32:43 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: exports.5,v 1.32 2013/03/28 22:54:25 njoly Exp $
+.\"	$NetBSD: exports.5,v 1.33 2024/03/26 23:32:43 riastradh Exp $
 .\"
 .\" Copyright (c) 1989, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -34,22 +34,30 @@
 .Os
 .Sh NAME
 .Nm exports
-.Nd define remote mount points for
+.Nd exported filesystem mount points for
 .Tn NFS
 mount requests
-.Sh SYNOPSIS
-.Nm exports
 .Sh DESCRIPTION
 The
 .Nm exports
-file specifies remote mount points for the
+file on an
 .Tn NFS
-mount protocol per the
+server, used by
+.Xr mountd 8 ,
+lists filesystems to be exported to
 .Tn NFS
-server specification; see
-.%T "Network File System Protocol Specification RFC 1094, Appendix A"
-and
-.%T "NFS: Network File System Version 3 Specification, Appendix I" .
+clients.
+.Pp
+Exporting a directory exposes the
+.Em entire
+content of the filesystem that the directory lives in to
+.Tn NFS
+clients, even it it isn't the root directory of a filesystem on the
+server.
+The list of exports is only what the server advertises to clients in
+the mount protocol, not a restriction on what files or directories
+within exported filesystems clients have access to with
+.Tn NFS .
 .Pp
 Each line in the file
 (other than comment lines that begin with a
@@ -166,14 +174,33 @@ This option is currently not implemented
 .Pp
 The
 .Fl ro
-option specifies that the filesystem should be exported read-only
-(default read/write).
+option should be specified for filesystems that are read-only (default
+is to assume read/write).
 The option
 .Fl o
 is a synonym for
 .Fl ro
 in an effort to be backward compatible with older export file formats.
 .Pp
+.Bf -symbolic
+Warning:
+Exporting a read/write filesystem with
+.Fl ro
+.Em does not
+prevent clients from writing to it.
+.Ef
+To prevent clients from writing to a filesystem, it must be mounted
+read-only
+.Em on the server
+in the first place.
+To export a read/write filesystem so clients can only read from it, not
+write to it, you can mount a read-only nullfs from the filesystem with
+.Xr mount_null 8
+using the
+.Fl o Cm ro
+option, and then export the read-only nullfs instead.
+See also caveats about nullfs namespace below.
+.Pp
 The
 .Fl noresvport
 option specifies that NFS RPC calls for the filesystem do not have to come
@@ -369,6 +396,23 @@ The default remote mount-point file.
 .Xr mountd 8 ,
 .Xr nfsd 8 ,
 .Xr showmount 8
+.Rs
+.%T NFS: Network File System Protocol Specification
+.%R RFC 1094
+.%I IETF Network Working Group
+.%O Appendix A
+.%U https://datatracker.ietf.org/doc/html/rfc1094#appendix-A.1
+.Re
+.Rs
+.%A B. Callaghan
+.%A B. Pawlowski
+.%A P. Staubach
+.%T NFS Version 3 Protocol Specification
+.%R RFC 1813
+.%I IETF Network Working Group
+.%O Appendix I
+.%U https://datatracker.ietf.org/doc/html/rfc1813#section-5.0
+.Re
 .Sh CAVEATS
 Don't re-export NFS-mounted filesystems unless you are sure of the
 implications.
@@ -377,6 +421,21 @@ systems being exported, e.g. when timest
 Re-exporting should work to some extent and can even be useful in
 some cases, but don't expect it works as well as with local file
 systems.
+.Pp
+.Pp
+Filesystems that provide a namespace for a subtree of another
+filesystem such as nullfs 
+.No ( Xr mount_null 8 )
+and umapfs
+.No ( Xr mount_umap 8 )
+.Em do not
+restrict
+.Tn NFS
+clients to that namespace, so they cannot be used to securely limit
+.Tn NFS
+clients to a subtree of a filesystem.
+If you want to export one subtree and prevent access to other subtrees,
+the exported subtree must be on its own filesystem on the server.
 .Sh BUGS
 The export options are tied to the local mount points in the kernel and
 must be non-contradictory for any exported subdirectory of the local

Index: src/usr.sbin/mountd/mountd.8
diff -u src/usr.sbin/mountd/mountd.8:1.42 src/usr.sbin/mountd/mountd.8:1.43
--- src/usr.sbin/mountd/mountd.8:1.42	Wed Mar 15 20:39:12 2023
+++ src/usr.sbin/mountd/mountd.8	Tue Mar 26 23:32:43 2024
@@ -1,4 +1,4 @@
-.\"	

CVS commit: src/usr.sbin/mountd

2024-03-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Mar 26 23:32:43 UTC 2024

Modified Files:
src/usr.sbin/mountd: exports.5 mountd.8

Log Message:
exports(5), mountd(8): First pass at clarifying export semantics.

The exports(5) man page is full of walls of turgid prose that should
be itemized lists with syntax templates, and I'm itching to rewrite
it, but let's get the security-relevant warnings out of the way
first.

PR misc/58063


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/usr.sbin/mountd/exports.5
cvs rdiff -u -r1.42 -r1.43 src/usr.sbin/mountd/mountd.8

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



CVS commit: src/sys/dev/acpi

2024-03-26 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Mar 26 22:16:12 UTC 2024

Modified Files:
src/sys/dev/acpi: apei_cper.h

Log Message:
apei: fix typos in comments and snprintb bitfmt


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/acpi/apei_cper.h

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

Modified files:

Index: src/sys/dev/acpi/apei_cper.h
diff -u src/sys/dev/acpi/apei_cper.h:1.1 src/sys/dev/acpi/apei_cper.h:1.2
--- src/sys/dev/acpi/apei_cper.h:1.1	Wed Mar 20 17:11:43 2024
+++ src/sys/dev/acpi/apei_cper.h	Tue Mar 26 22:16:12 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: apei_cper.h,v 1.1 2024/03/20 17:11:43 riastradh Exp $	*/
+/*	$NetBSD: apei_cper.h,v 1.2 2024/03/26 22:16:12 rillig Exp $	*/
 
 /*-
  * Copyright (c) 2024 The NetBSD Foundation, Inc.
@@ -43,9 +43,9 @@
  * https://uefi.org/specs/UEFI/2.10/Apx_N_Common_Platform_Error_Record.html#record-header
  */
 struct cper_header {
-	char		SignatureStart[4];	/* `CPER" */
+	char		SignatureStart[4];	/* `CPER' */
 	uint16_t	Revision;
-	uint32_t	SignatureEnd;		/* 0xfff */
+	uint32_t	SignatureEnd;		/* 0x */
 	uint16_t	SectionCount;
 	uint32_t	ErrorSeverity;
 	uint32_t	ValidationBits;
@@ -179,7 +179,7 @@ enum {/* struct cper_memory_error::v
 	"b\006"	"BANK\0"		  \
 	"b\007"	"DEVICE\0"		  \
 	"b\010"	"ROW\0"			  \
-	"b\011"	"COLUJMN\0"		  \
+	"b\011"	"COLUMN\0"		  \
 	"b\012"	"BIT_POSITION\0"	  \
 	"b\013"	"REQUESTOR_ID\0"	  \
 	"b\014"	"RESPONDER_ID\0"	  \



CVS commit: src/sys/dev/acpi

2024-03-26 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Mar 26 22:16:12 UTC 2024

Modified Files:
src/sys/dev/acpi: apei_cper.h

Log Message:
apei: fix typos in comments and snprintb bitfmt


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/acpi/apei_cper.h

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



CVS commit: src/sys/dev/acpi

2024-03-26 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Mar 26 22:01:03 UTC 2024

Modified Files:
src/sys/dev/acpi: apei.c apei_einj.c

Log Message:
apei: fix typos in comments


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/acpi/apei.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/acpi/apei_einj.c

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



CVS commit: src/sys/dev/acpi

2024-03-26 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Mar 26 22:01:03 UTC 2024

Modified Files:
src/sys/dev/acpi: apei.c apei_einj.c

Log Message:
apei: fix typos in comments


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/acpi/apei.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/acpi/apei_einj.c

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

Modified files:

Index: src/sys/dev/acpi/apei.c
diff -u src/sys/dev/acpi/apei.c:1.2 src/sys/dev/acpi/apei.c:1.3
--- src/sys/dev/acpi/apei.c:1.2	Sat Mar 23 03:41:35 2024
+++ src/sys/dev/acpi/apei.c	Tue Mar 26 22:01:03 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: apei.c,v 1.2 2024/03/23 03:41:35 riastradh Exp $	*/
+/*	$NetBSD: apei.c,v 1.3 2024/03/26 22:01:03 rillig Exp $	*/
 
 /*-
  * Copyright (c) 2024 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: apei.c,v 1.2 2024/03/23 03:41:35 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: apei.c,v 1.3 2024/03/26 22:01:03 rillig Exp $");
 
 #include 
 #include 
@@ -305,7 +305,7 @@ apei_cper_guid_dec(const uint8_t buf[sta
  * apei_format_guid(uuid, s)
  *
  *	Format a UUID as a string.  This uses C initializer notation,
- *	not UUID notation, in order to match what the text in the UEFI
+ *	not UUID notation, in order to match the text in the UEFI
  *	specification.
  */
 static void

Index: src/sys/dev/acpi/apei_einj.c
diff -u src/sys/dev/acpi/apei_einj.c:1.5 src/sys/dev/acpi/apei_einj.c:1.6
--- src/sys/dev/acpi/apei_einj.c:1.5	Fri Mar 22 20:48:14 2024
+++ src/sys/dev/acpi/apei_einj.c	Tue Mar 26 22:01:03 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: apei_einj.c,v 1.5 2024/03/22 20:48:14 riastradh Exp $	*/
+/*	$NetBSD: apei_einj.c,v 1.6 2024/03/26 22:01:03 rillig Exp $	*/
 
 /*-
  * Copyright (c) 2024 The NetBSD Foundation, Inc.
@@ -44,7 +44,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: apei_einj.c,v 1.5 2024/03/22 20:48:14 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: apei_einj.c,v 1.6 2024/03/26 22:01:03 rillig Exp $");
 
 #include 
 
@@ -114,7 +114,7 @@ static const char *const apei_einj_instr
 /*
  * apei_einj_instreg
  *
- *	Table of which isntructions use a register operand.
+ *	Table of which instructions use a register operand.
  *
  *	Must match apei_einj_instfunc.
  */



CVS commit: src/tests/lib/libc/time

2024-03-26 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Mar 26 21:52:23 UTC 2024

Modified Files:
src/tests/lib/libc/time: t_strptime.c

Log Message:
t_strptime: fix typo in test description


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/tests/lib/libc/time/t_strptime.c

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



CVS commit: src/tests/lib/libc/time

2024-03-26 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Mar 26 21:52:23 UTC 2024

Modified Files:
src/tests/lib/libc/time: t_strptime.c

Log Message:
t_strptime: fix typo in test description


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/tests/lib/libc/time/t_strptime.c

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

Modified files:

Index: src/tests/lib/libc/time/t_strptime.c
diff -u src/tests/lib/libc/time/t_strptime.c:1.16 src/tests/lib/libc/time/t_strptime.c:1.17
--- src/tests/lib/libc/time/t_strptime.c:1.16	Sat Mar 16 00:06:37 2024
+++ src/tests/lib/libc/time/t_strptime.c	Tue Mar 26 21:52:23 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: t_strptime.c,v 1.16 2024/03/16 00:06:37 riastradh Exp $ */
+/* $NetBSD: t_strptime.c,v 1.17 2024/03/26 21:52:23 rillig Exp $ */
 
 /*-
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include 
 __COPYRIGHT("@(#) Copyright (c) 2008\
  The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_strptime.c,v 1.16 2024/03/16 00:06:37 riastradh Exp $");
+__RCSID("$NetBSD: t_strptime.c,v 1.17 2024/03/26 21:52:23 rillig Exp $");
 
 #include 
 #include 
@@ -449,7 +449,7 @@ ATF_TC_HEAD(posixtime_overflow, tc)
 {
 
 	atf_tc_set_md_var(tc, "descr",
-	"Checks strptime(3) safely rejects POSIX time overfow");
+	"Checks strptime(3) safely rejects POSIX time overflow");
 }
 
 ATF_TC_BODY(posixtime_overflow, tc)



CVS commit: src/games/larn

2024-03-26 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Tue Mar 26 20:50:29 UTC 2024

Modified Files:
src/games/larn: io.c

Log Message:
Fix header comment to align text using 8 space tabs.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/games/larn/io.c

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

Modified files:

Index: src/games/larn/io.c
diff -u src/games/larn/io.c:1.30 src/games/larn/io.c:1.31
--- src/games/larn/io.c:1.30	Sat Mar 23 21:10:45 2024
+++ src/games/larn/io.c	Tue Mar 26 20:50:29 2024
@@ -1,66 +1,66 @@
-/*	$NetBSD: io.c,v 1.30 2024/03/23 21:10:45 andvar Exp $	*/
+/*	$NetBSD: io.c,v 1.31 2024/03/26 20:50:29 andvar Exp $	*/
 
 /*
- * io.c			 Larn is copyrighted 1986 by Noah Morgan.
+ * io.c			Larn is copyrighted 1986 by Noah Morgan.
  *
  * Below are the functions in this file:
  *
  * setupvt100()		Subroutine to set up terminal in correct mode for game
  * clearvt100()		Subroutine to clean up terminal when the game is over
  * ttgetch()		Routine to read in one character from the terminal
- * scbr()			Function to set cbreak -echo for the terminal
- * sncbr()			Function to set -cbreak echo for the terminal
+ * scbr()		Function to set cbreak -echo for the terminal
+ * sncbr()		Function to set -cbreak echo for the terminal
  * newgame()		Subroutine to save the initial time and seed rnd()
  *
  * FILE OUTPUT ROUTINES
  *
- * lprintf(format,args . . .)	printf to the output buffer 
- * lprint(integer)send binary integer to output buffer
- * lwrite(buf,len)write a buffer to the output buffer
- * lprcat(str)	append a string to the output buffer
+ * lprintf(format,args . . .)	printf to the output buffer
+ * lprint(integer)		send binary integer to output buffer
+ * lwrite(buf,len)		write a buffer to the output buffer
+ * lprcat(str)			append a string to the output buffer
  *
  * FILE OUTPUT MACROS (in header.h)
  *
- * lprc(character)put the character into the output buffer
+ * lprc(character)		put the character into the output buffer
  *
  * FILE INPUT ROUTINES
  *
- * long lgetc()	read one character from input buffer
- * long larn_lrint()			read one integer from input buffer
- * lrfill(address,number)		put input bytes into a buffer char
- * *lgetw()		get a whitespace ended word from
- * input char *lgetl()			get a \n or EOF ended line from input
+ * long lgetc()			read one character from input buffer
+ * long larn_lrint()		read one integer from input buffer
+ * lrfill(address,number)	put input bytes into a buffer char
+ * *lgetw()			get a whitespace ended word from
+ * input char *lgetl()		get a \n or EOF ended line from input
  *
  * FILE OPEN / CLOSE ROUTINES
  *
- * lcreat(filename)create a new file for write
- * lopen(filename)open a file for read
- * lappend(filename)			open for append to an existing file
- * lrclose()	close the input file
- * lwclose()	close output file 
- * lflush()		flush the output buffer
+ * lcreat(filename)		create a new file for write
+ * lopen(filename)		open a file for read
+ * lappend(filename)		open for append to an existing file
+ * lrclose()			close the input file
+ * lwclose()			close output file
+ * lflush()			flush the output buffer
  *
  * Other Routines
  *
- * cursor(x,y)	position cursor at [x,y]
- * cursors()	position cursor at [1,24] (saves memory)
- * cl_line(x,y)	clear line at [1,y] and leave cursor at [x,y]
- * cl_up(x,y)	clear screen from [x,1] to current line
- * cl_dn(x,y)	clear screen from [1,y] to end of display
- * standout(str)print the string in standout mode
- * set_score_output()			called when output should be literally printed
- * ttputch(ch)	print one character in decoded output buffer
- * flush_buf()	flush buffer with decoded output
- * init_term()	terminal initialization -- setup termcap info
- * char *tmcapcnv(sd,ss)		routine to convert VT100 \33's to termcap format
- * beep()		routine to emit a beep if enabled
- * (see no-beep in .larnopts)
+ * cursor(x,y)			position cursor at [x,y]
+ * cursors()			position cursor at [1,24] (saves memory)
+ * cl_line(x,y)			clear line at [1,y] and leave cursor at [x,y]
+ * cl_up(x,y)			clear screen from [x,1] to current line
+ * cl_dn(x,y)			clear screen from [1,y] to end of display
+ * standout(str)		print the string in standout mode
+ * set_score_output()		called when output should be literally printed
+ * ttputch(ch)			print one character in decoded output buffer
+ * flush_buf()			flush buffer with decoded output
+ * init_term()			terminal initialization -- setup termcap info
+ * char *tmcapcnv(sd,ss)	routine to convert VT100 \33's to termcap format
+ * beep()			routine to emit a beep if enabled
+ * (see no-beep in .larnopts)
  *
  * Note: ** entries are available only in termcap mode.
  */
 #include 
 #ifndef lint
-__RCSID("$NetBSD: io.c,v 1.30 2024/03/23 21:10:45 andvar Exp $");
+__RCSID("$NetBSD: io.c,v 1.31 

CVS commit: src/games/larn

2024-03-26 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Tue Mar 26 20:50:29 UTC 2024

Modified Files:
src/games/larn: io.c

Log Message:
Fix header comment to align text using 8 space tabs.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/games/larn/io.c

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



CVS commit: src/lib/libm

2024-03-26 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Mar 26 20:12:47 UTC 2024

Modified Files:
src/lib/libm: Makefile

Log Message:
libm/s_logl: suppress lint warnings

Seen on sparc64.


To generate a diff of this commit:
cvs rdiff -u -r1.226 -r1.227 src/lib/libm/Makefile

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



CVS commit: src/lib/libm

2024-03-26 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Mar 26 20:12:47 UTC 2024

Modified Files:
src/lib/libm: Makefile

Log Message:
libm/s_logl: suppress lint warnings

Seen on sparc64.


To generate a diff of this commit:
cvs rdiff -u -r1.226 -r1.227 src/lib/libm/Makefile

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

Modified files:

Index: src/lib/libm/Makefile
diff -u src/lib/libm/Makefile:1.226 src/lib/libm/Makefile:1.227
--- src/lib/libm/Makefile:1.226	Fri Jan 26 22:01:40 2024
+++ src/lib/libm/Makefile	Tue Mar 26 20:12:47 2024
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.226 2024/01/26 22:01:40 nros Exp $
+#  $NetBSD: Makefile,v 1.227 2024/03/26 20:12:47 rillig Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -55,6 +55,9 @@ LIBC_MACHINE_CPU?=	${MACHINE_CPU}
 
 LINTFLAGS+=	-g		# compiler_rt uses typeof() and __extension__
 LINTFLAGS+=	-X 117		# GCC sign-extends '>>' on signed int
+LINTFLAGS.s_logl.c+=	-X 161	# constant in conditional context
+LINTFLAGS.s_logl.c+=	-X 193	# unreachable statement (due to 161)
+LINTFLAGS.s_logl.c+=	-X 177	# non-constant initializer
 
 .if (${LIBC_MACHINE_CPU} == "aarch64")
 .PATH: ${.CURDIR}/arch/aarch64



CVS commit: src/share/mk

2024-03-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Mar 26 18:38:52 UTC 2024

Modified Files:
src/share/mk: bsd.lib.mk

Log Message:
bsd.lib.mk: Avoid symbol check if we're not doing shared libraries.

Otherwise this fails on non-shlib builds like sun2.


To generate a diff of this commit:
cvs rdiff -u -r1.396 -r1.397 src/share/mk/bsd.lib.mk

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

Modified files:

Index: src/share/mk/bsd.lib.mk
diff -u src/share/mk/bsd.lib.mk:1.396 src/share/mk/bsd.lib.mk:1.397
--- src/share/mk/bsd.lib.mk:1.396	Sat Mar 23 21:56:47 2024
+++ src/share/mk/bsd.lib.mk	Tue Mar 26 18:38:52 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.lib.mk,v 1.396 2024/03/23 21:56:47 riastradh Exp $
+#	$NetBSD: bsd.lib.mk,v 1.397 2024/03/26 18:38:52 riastradh Exp $
 #	@(#)bsd.lib.mk	8.3 (Berkeley) 4/22/94
 
 .include 
@@ -656,7 +656,7 @@ LIB_EXPSYM?=	${LIB}.${MACHINE_ARCH}.exps
 LIB_EXPSYM?=	${LIB}.expsym
 .endif
 
-.if !empty(LIB_EXPSYM)
+.if !empty(LIB_EXPSYM) && ${MKPIC} != "no"
 realall: ${_LIB.so.full}.diffsym
 ${_LIB.so.full}.diffsym: ${LIB_EXPSYM} ${_LIB.so.full}.actsym
 	${_MKTARGET_CREATE}



CVS commit: src/share/mk

2024-03-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Mar 26 18:38:52 UTC 2024

Modified Files:
src/share/mk: bsd.lib.mk

Log Message:
bsd.lib.mk: Avoid symbol check if we're not doing shared libraries.

Otherwise this fails on non-shlib builds like sun2.


To generate a diff of this commit:
cvs rdiff -u -r1.396 -r1.397 src/share/mk/bsd.lib.mk

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



CVS commit: [netbsd-10] src/doc

2024-03-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Mar 26 18:10:21 UTC 2024

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

Log Message:
Ticket 650


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.214 -r1.1.2.215 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.214 src/doc/CHANGES-10.0:1.1.2.215
--- src/doc/CHANGES-10.0:1.1.2.214	Mon Mar 25 15:28:00 2024
+++ src/doc/CHANGES-10.0	Tue Mar 26 18:10:21 2024
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-10.0,v 1.1.2.214 2024/03/25 15:28:00 martin Exp $
+# $NetBSD: CHANGES-10.0,v 1.1.2.215 2024/03/26 18:10:21 martin Exp $
 
 A complete list of changes from the initial NetBSD 10.0 branch on 2022-12-16
 until the 10.0 release:
@@ -21570,3 +21570,8 @@ sys/dev/qbus/if_qe.c1.82
 	vax/qe(4): PR 58068: fix crash on various ifconfig operations.
 	[riastradh, ticket #647]
 
+sys/dev/audio/audio.c1.137
+
+	audio(4): fix byte swapped samples on big-endian machines.
+	[mlelstv, ticket #650]
+



CVS commit: [netbsd-10] src/doc

2024-03-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Mar 26 18:10:21 UTC 2024

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

Log Message:
Ticket 650


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.214 -r1.1.2.215 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/sys/dev/audio

2024-03-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Mar 26 18:09:22 UTC 2024

Modified Files:
src/sys/dev/audio [netbsd-10]: audio.c

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

sys/dev/audio/audio.c: revision 1.137

Input and output codecs produce and consume internal audio data, so
don't byteswap it.


To generate a diff of this commit:
cvs rdiff -u -r1.136 -r1.136.4.1 src/sys/dev/audio/audio.c

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

Modified files:

Index: src/sys/dev/audio/audio.c
diff -u src/sys/dev/audio/audio.c:1.136 src/sys/dev/audio/audio.c:1.136.4.1
--- src/sys/dev/audio/audio.c:1.136	Thu Aug 25 11:16:33 2022
+++ src/sys/dev/audio/audio.c	Tue Mar 26 18:09:21 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: audio.c,v 1.136 2022/08/25 11:16:33 riastradh Exp $	*/
+/*	$NetBSD: audio.c,v 1.136.4.1 2024/03/26 18:09:21 martin Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -181,7 +181,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.136 2022/08/25 11:16:33 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.136.4.1 2024/03/26 18:09:21 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -5628,7 +5628,7 @@ audio_pmixer_process(struct audio_softc 
 	}
 
 	m = mixer->mixsample;
-	if (mixer->swap_endian) {
+	if (!mixer->codec && mixer->swap_endian) {
 		for (i = 0; i < sample_count; i++) {
 			*h++ = bswap16(*m++);
 		}
@@ -6031,7 +6031,7 @@ audio_rmixer_process(struct audio_softc 
 		mixersrc = >hwbuf;
 	}
 
-	if (mixer->swap_endian) {
+	if (!mixer->codec && mixer->swap_endian) {
 		/* inplace conversion */
 		p = auring_headptr_aint(mixersrc);
 		for (i = 0; i < count * mixer->track_fmt.channels; i++, p++) {



CVS commit: [netbsd-10] src/sys/dev/audio

2024-03-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Mar 26 18:09:22 UTC 2024

Modified Files:
src/sys/dev/audio [netbsd-10]: audio.c

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

sys/dev/audio/audio.c: revision 1.137

Input and output codecs produce and consume internal audio data, so
don't byteswap it.


To generate a diff of this commit:
cvs rdiff -u -r1.136 -r1.136.4.1 src/sys/dev/audio/audio.c

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



CVS commit: src/lib/libedit

2024-03-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 26 18:02:04 UTC 2024

Modified Files:
src/lib/libedit: readline.c

Log Message:
fix insert key (Xose Vazquez Perez)


To generate a diff of this commit:
cvs rdiff -u -r1.181 -r1.182 src/lib/libedit/readline.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/libedit/readline.c
diff -u src/lib/libedit/readline.c:1.181 src/lib/libedit/readline.c:1.182
--- src/lib/libedit/readline.c:1.181	Tue Apr 25 13:51:32 2023
+++ src/lib/libedit/readline.c	Tue Mar 26 14:02:04 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: readline.c,v 1.181 2023/04/25 17:51:32 christos Exp $	*/
+/*	$NetBSD: readline.c,v 1.182 2024/03/26 18:02:04 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include "config.h"
 #if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: readline.c,v 1.181 2023/04/25 17:51:32 christos Exp $");
+__RCSID("$NetBSD: readline.c,v 1.182 2024/03/26 18:02:04 christos Exp $");
 #endif /* not lint && not SCCSID */
 
 #include 
@@ -402,7 +402,7 @@ rl_initialize(void)
 	 * Allow the use of the Delete/Insert keys.
 	 */
 	el_set(e, EL_BIND, "\\e[3~", "ed-delete-next-char", NULL);
-	el_set(e, EL_BIND, "\\e[2~", "ed-quoted-insert", NULL);
+	el_set(e, EL_BIND, "\\e[2~", "em-toggle-overwrite", NULL);
 
 	/*
 	 * Ctrl-left-arrow and Ctrl-right-arrow for word moving.



CVS commit: src/lib/libedit

2024-03-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 26 18:02:04 UTC 2024

Modified Files:
src/lib/libedit: readline.c

Log Message:
fix insert key (Xose Vazquez Perez)


To generate a diff of this commit:
cvs rdiff -u -r1.181 -r1.182 src/lib/libedit/readline.c

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



CVS commit: src/tools/elftoolchain/common

2024-03-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 26 16:52:04 UTC 2024

Modified Files:
src/tools/elftoolchain/common: Makefile
src/tools/elftoolchain/common/sys: Makefile

Log Message:
don't install headers as executable.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tools/elftoolchain/common/Makefile
cvs rdiff -u -r1.1 -r1.2 src/tools/elftoolchain/common/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/tools/elftoolchain/common/Makefile
diff -u src/tools/elftoolchain/common/Makefile:1.2 src/tools/elftoolchain/common/Makefile:1.3
--- src/tools/elftoolchain/common/Makefile:1.2	Mon May  2 14:28:38 2022
+++ src/tools/elftoolchain/common/Makefile	Tue Mar 26 12:52:03 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2022/05/02 18:28:38 jkoshy Exp $
+# $NetBSD: Makefile,v 1.3 2024/03/26 16:52:03 christos Exp $
 
 .include 
 
@@ -16,7 +16,7 @@ HOST_INCINSTFILES=
 HOST_INCINSTFILES+= ${HOST_INCSDIR}/${_f}
 ${HOST_INCSDIR}/${_f}: ${_f}
 	${_MKTARGET_INSTALL}
-	${HOST_INSTALL_FILE} ${.ALLSRC} ${.TARGET}
+	${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}
 .endfor
 
 .PHONY:	all clean depend obj

Index: src/tools/elftoolchain/common/sys/Makefile
diff -u src/tools/elftoolchain/common/sys/Makefile:1.1 src/tools/elftoolchain/common/sys/Makefile:1.2
--- src/tools/elftoolchain/common/sys/Makefile:1.1	Wed Apr 13 13:52:56 2022
+++ src/tools/elftoolchain/common/sys/Makefile	Tue Mar 26 12:52:03 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2022/04/13 17:52:56 jkoshy Exp $
+#	$NetBSD: Makefile,v 1.2 2024/03/26 16:52:03 christos Exp $
 
 .include 
 
@@ -25,7 +25,7 @@ ${HOST_INCSDIR}:
 HOST_INCINSTFILES+= ${HOST_INCSDIR}/${_f}
 ${HOST_INCSDIR}/${_f}: ${_f}
 	${_MKTARGET_INSTALL}
-	${HOST_INSTALL_FILE} ${.ALLSRC} ${.TARGET}
+	${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}
 .endfor
 
 includes: .PHONY ${HOST_INCSDIR} .WAIT ${HOST_INCINSTFILES}



CVS commit: src/tools/elftoolchain/common

2024-03-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 26 16:52:04 UTC 2024

Modified Files:
src/tools/elftoolchain/common: Makefile
src/tools/elftoolchain/common/sys: Makefile

Log Message:
don't install headers as executable.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tools/elftoolchain/common/Makefile
cvs rdiff -u -r1.1 -r1.2 src/tools/elftoolchain/common/sys/Makefile

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



CVS commit: src/tools

2024-03-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 26 16:48:34 UTC 2024

Modified Files:
src/tools: Makefile.nbincludes
src/tools/elftoolchain/libdwarf: Makefile

Log Message:
- fix nbincludes so that it can be included from any level
- add elftoolchain/common to the list of headers to be build before depend
- make libdwarf build the includes since it needs 
  which does not exist on non-netbsd systems.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tools/Makefile.nbincludes
cvs rdiff -u -r1.3 -r1.4 src/tools/elftoolchain/libdwarf/Makefile

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

Modified files:

Index: src/tools/Makefile.nbincludes
diff -u src/tools/Makefile.nbincludes:1.6 src/tools/Makefile.nbincludes:1.7
--- src/tools/Makefile.nbincludes:1.6	Sun Jun  4 06:00:20 2023
+++ src/tools/Makefile.nbincludes	Tue Mar 26 12:48:34 2024
@@ -1,18 +1,19 @@
-#	$NetBSD: Makefile.nbincludes,v 1.6 2023/06/04 10:00:20 lukem Exp $
+#	$NetBSD: Makefile.nbincludes,v 1.7 2024/03/26 16:48:34 christos Exp $
 
 .include 
 
-_ARCHDIR=	${.CURDIR}/../../sys/arch
-_INCDIR=	${.CURDIR}/../../include
-_SYSDIR=	${.CURDIR}/../../sys/sys
-_UFSDIR=	${.CURDIR}/../../sys/ufs
+_ARCHDIR:=	${.PARSEDIR}/../sys/arch
+_INCDIR:=	${.PARSEDIR}/../include
+_SYSDIR:=	${.PARSEDIR}/../sys/sys
+_UFSDIR:=	${.PARSEDIR}/../sys/ufs
+_ELFTOOLCHAINDIR:=	${.PARSEDIR}/elftoolchain
 _SUBDIR!=	cd ${_ARCHDIR} && ${MAKE} -V SUBDIR
 
 .if make(depend) || make(all) || make(dependall) || make(install)
 # There's no need to run these commands for "make cleandir" or "make obj",
 # and TOOL_SED will not yet have been built.
 _UFS_INCS!=	cd ${_UFSDIR} && find ffs ufs -name '*.h'
-_ARCH_INCS!=	${TOOL_SED} -e 's/^\#.*//' ${.CURDIR}/../headerlist
+_ARCH_INCS!=	${TOOL_SED} -e 's/^\#.*//' ${.PARSEDIR}/headerlist
 .endif
 
 _ARCH_INCS+=	ews4800mips/include/pdinfo.h ews4800mips/include/vtoc.h
@@ -45,3 +46,4 @@ beforedepend: 
 	${TOOL_PAX} -rw ${_UFS_INCS} ${TOOLDIR}/include/nbinclude/ufs
 	cd ${TOOLDIR}/include/nbinclude && rm -f machine && \
 	${HOST_INSTALL_SYMLINK} ${MACHINE} machine
+	cd ${_ELFTOOLCHAINDIR}/common && ${MAKE} includes

Index: src/tools/elftoolchain/libdwarf/Makefile
diff -u src/tools/elftoolchain/libdwarf/Makefile:1.3 src/tools/elftoolchain/libdwarf/Makefile:1.4
--- src/tools/elftoolchain/libdwarf/Makefile:1.3	Sun Mar  3 12:37:58 2024
+++ src/tools/elftoolchain/libdwarf/Makefile	Tue Mar 26 12:48:34 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2024/03/03 17:37:58 christos Exp $
+#	$NetBSD: Makefile,v 1.4 2024/03/26 16:48:34 christos Exp $
 
 HOSTLIB=dwarf
 
@@ -97,4 +97,5 @@ CPPFLAGS+=	-DHAVE_NBTOOL_CONFIG_H=1 -D_F
 HOST_CPPFLAGS:=	${CPPFLAGS} ${HOST_CPPFLAGS}
 CPPFLAGS:=	# empty
 
+.include "../../Makefile.nbincludes"
 .include 



CVS commit: src/tools

2024-03-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 26 16:48:34 UTC 2024

Modified Files:
src/tools: Makefile.nbincludes
src/tools/elftoolchain/libdwarf: Makefile

Log Message:
- fix nbincludes so that it can be included from any level
- add elftoolchain/common to the list of headers to be build before depend
- make libdwarf build the includes since it needs 
  which does not exist on non-netbsd systems.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tools/Makefile.nbincludes
cvs rdiff -u -r1.3 -r1.4 src/tools/elftoolchain/libdwarf/Makefile

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



CVS commit: src/sys/conf

2024-03-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Mar 26 10:56:34 UTC 2024

Modified Files:
src/sys/conf: std

Log Message:
conf/std: Update comment over rnd(4) to reflect current reality.

PR kern/46728


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/conf/std

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

Modified files:

Index: src/sys/conf/std
diff -u src/sys/conf/std:1.23 src/sys/conf/std:1.24
--- src/sys/conf/std:1.23	Sun Jan 27 02:08:41 2019
+++ src/sys/conf/std	Tue Mar 26 10:56:34 2024
@@ -1,4 +1,4 @@
-# $NetBSD: std,v 1.23 2019/01/27 02:08:41 pgoyette Exp $
+# $NetBSD: std,v 1.24 2024/03/26 10:56:34 riastradh Exp $
 #
 # standard MI 'options'
 #
@@ -51,9 +51,13 @@ options	SCHED_4BSD
 pseudo-device	cpuctl
 
 #
-# Kernel entropy pool and random-number generator pseudodevice.
-# The pseudodevice might stop being "std" when the two are torn
-# apart some day but the entropy pool itself never will (they are
-# presently implemented in the same source file)
+# /dev/random and /dev/urandom interfaces.
+#
+# This could be taken out of conf/std now that the entropy pool and
+# kernel random number generation API is part of kern proper --
+# provided that some care is taken in ensuring that we copy & paste
+# this line in essentially every kernel config, because many
+# applications, even embedded ones, will likely rely in some way or
+# other on reading from /dev/urandom.
 #
 pseudo-device	rnd



CVS commit: src/sys/conf

2024-03-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Mar 26 10:56:34 UTC 2024

Modified Files:
src/sys/conf: std

Log Message:
conf/std: Update comment over rnd(4) to reflect current reality.

PR kern/46728


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/conf/std

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



CVS commit: src/sys/arch/mips/conf

2024-03-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Mar 26 10:51:16 UTC 2024

Modified Files:
src/sys/arch/mips/conf: files.octeon

Log Message:
mips/conf/files.octeon: octrnm does not depend on rnd

Whether or not we have /dev/random and /dev/urandom baked into the
kernel, configuring `octrnm* at ...' in the kernel config requires
octeon_rnm.c.

Related to PR kern/46728.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/mips/conf/files.octeon

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



CVS commit: src/sys/arch/mips/conf

2024-03-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Mar 26 10:51:16 UTC 2024

Modified Files:
src/sys/arch/mips/conf: files.octeon

Log Message:
mips/conf/files.octeon: octrnm does not depend on rnd

Whether or not we have /dev/random and /dev/urandom baked into the
kernel, configuring `octrnm* at ...' in the kernel config requires
octeon_rnm.c.

Related to PR kern/46728.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/mips/conf/files.octeon

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/conf/files.octeon
diff -u src/sys/arch/mips/conf/files.octeon:1.12 src/sys/arch/mips/conf/files.octeon:1.13
--- src/sys/arch/mips/conf/files.octeon:1.12	Thu Jul 16 21:34:52 2020
+++ src/sys/arch/mips/conf/files.octeon	Tue Mar 26 10:51:16 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: files.octeon,v 1.12 2020/07/16 21:34:52 jmcneill Exp $
+#	$NetBSD: files.octeon,v 1.13 2024/03/26 10:51:16 riastradh Exp $
 
 file	arch/mips/mips/locore_octeon.S
 file	arch/mips/mips/bus_dma.c
@@ -60,7 +60,7 @@ options 	COM_REGMAP
 
 device	octrnm
 attach	octrnm at iobus
-file	arch/mips/cavium/dev/octeon_rnm.c	octrnm & rnd
+file	arch/mips/cavium/dev/octeon_rnm.c	octrnm
 
 device	octtwsi: i2cbus
 attach	octtwsi at iobus



CVS commit: src/sys/arch/evbmips/conf

2024-03-26 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Tue Mar 26 10:23:42 UTC 2024

Modified Files:
src/sys/arch/evbmips/conf: ADM5120-NB

Log Message:
Revert accidental change for root file system in previous commit.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/evbmips/conf/ADM5120-NB

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

Modified files:

Index: src/sys/arch/evbmips/conf/ADM5120-NB
diff -u src/sys/arch/evbmips/conf/ADM5120-NB:1.33 src/sys/arch/evbmips/conf/ADM5120-NB:1.34
--- src/sys/arch/evbmips/conf/ADM5120-NB:1.33	Tue Mar 26 10:16:47 2024
+++ src/sys/arch/evbmips/conf/ADM5120-NB	Tue Mar 26 10:23:42 2024
@@ -1,11 +1,11 @@
-#	$NetBSD: ADM5120-NB,v 1.33 2024/03/26 10:16:47 andvar Exp $
+#	$NetBSD: ADM5120-NB,v 1.34 2024/03/26 10:23:42 andvar Exp $
 #
 # Kernel config for the ADM5120 based boards and routers,
 # including the RouterBOARD 100 series.
 
 include 	"arch/evbmips/conf/std.adm5120"
 
-#ident 		"GENERIC-$Revision: 1.33 $"
+#ident 		"GENERIC-$Revision: 1.34 $"
 
 maxusers	32
 
@@ -101,7 +101,7 @@ options 	INET		# Internet protocols
 options 	NFS_BOOT_DHCP
 
 # Pretty much only one device to use for the root file system.
-config		netbsd		root on ? type ?
+config		netbsd-admsw0	root on admsw0 type nfs
 
 mainbus0 	at root
 



CVS commit: src/sys/arch/evbmips/conf

2024-03-26 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Tue Mar 26 10:23:42 UTC 2024

Modified Files:
src/sys/arch/evbmips/conf: ADM5120-NB

Log Message:
Revert accidental change for root file system in previous commit.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/evbmips/conf/ADM5120-NB

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



CVS commit: src/sys/arch/evbmips/conf

2024-03-26 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Tue Mar 26 10:16:47 UTC 2024

Modified Files:
src/sys/arch/evbmips/conf: ADM5120-NB

Log Message:
Remove netgraph options which are not supported and have no effect in NetBSD.

While here, reposition extio to reduce diff between ADM5120 and ADM5120-NB.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/evbmips/conf/ADM5120-NB

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

Modified files:

Index: src/sys/arch/evbmips/conf/ADM5120-NB
diff -u src/sys/arch/evbmips/conf/ADM5120-NB:1.32 src/sys/arch/evbmips/conf/ADM5120-NB:1.33
--- src/sys/arch/evbmips/conf/ADM5120-NB:1.32	Mon Jan 29 18:27:11 2024
+++ src/sys/arch/evbmips/conf/ADM5120-NB	Tue Mar 26 10:16:47 2024
@@ -1,11 +1,11 @@
-#	$NetBSD: ADM5120-NB,v 1.32 2024/01/29 18:27:11 christos Exp $
+#	$NetBSD: ADM5120-NB,v 1.33 2024/03/26 10:16:47 andvar Exp $
 #
 # Kernel config for the ADM5120 based boards and routers,
 # including the RouterBOARD 100 series.
 
 include 	"arch/evbmips/conf/std.adm5120"
 
-#ident 		"GENERIC-$Revision: 1.32 $"
+#ident 		"GENERIC-$Revision: 1.33 $"
 
 maxusers	32
 
@@ -77,30 +77,6 @@ options 	BUFQ_PRIOCSCAN
 # Networking options
 options 	GATEWAY		# IP packet forwarding
 options 	INET		# Internet protocols
-options 	NETGRAPH	# Netgraph
-options 	NETGRAPH_ASYNC
-options 	NETGRAPH_BPF
-options 	NETGRAPH_CISCO
-options 	NETGRAPH_ECHO
-options 	NETGRAPH_EIFACE
-options 	NETGRAPH_ETF
-options 	NETGRAPH_ETHER
-options 	NETGRAPH_FRAME_RELAY
-options 	NETGRAPH_HOLE
-options 	NETGRAPH_HUB
-options 	NETGRAPH_IFACE
-options 	NETGRAPH_KSOCKET
-options 	NETGRAPH_L2TP
-options 	NETGRAPH_LMI
-options 	NETGRAPH_ONE2MANY
-options 	NETGRAPH_PPP
-options 	NETGRAPH_PPPOE
-options 	NETGRAPH_PPTPGRE
-options 	NETGRAPH_RFC1490
-options 	NETGRAPH_TEE
-options 	NETGRAPH_UI
-options 	NETGRAPH_VJC
-options 	NETGRAPH_VLAN
 #options 	INET6		# IPV6
 #options 	IPSEC		# IP security
 #options 	IPSEC_DEBUG	# debug for IP security
@@ -125,7 +101,7 @@ options 	NETGRAPH_VLAN
 options 	NFS_BOOT_DHCP
 
 # Pretty much only one device to use for the root file system.
-config		netbsd-admsw0	root on admsw0 type nfs
+config		netbsd		root on ? type ?
 
 mainbus0 	at root
 
@@ -151,9 +127,8 @@ pseudo-device	pty# pseudo-terminals
 pseudo-device	ksyms
 
 obio*		at mainbus?
-extio*		at mainbus?
 gpio*		at mainbus?
-
+extio*		at mainbus?
 uart*		at obio? addr ?
 admsw*		at obio? addr ?
 #admflash*	at obio? addr ?



CVS commit: src/sys/arch/evbmips/conf

2024-03-26 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Tue Mar 26 10:16:47 UTC 2024

Modified Files:
src/sys/arch/evbmips/conf: ADM5120-NB

Log Message:
Remove netgraph options which are not supported and have no effect in NetBSD.

While here, reposition extio to reduce diff between ADM5120 and ADM5120-NB.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/evbmips/conf/ADM5120-NB

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