CVS commit: [netbsd-9] src/doc

2022-05-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed May  4 17:52:41 UTC 2022

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

Log Message:
Ticket #1441


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.88 -r1.1.2.89 src/doc/CHANGES-9.3

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



CVS commit: [netbsd-9] src/doc

2022-05-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed May  4 17:52:41 UTC 2022

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

Log Message:
Ticket #1441


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.88 -r1.1.2.89 src/doc/CHANGES-9.3

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

Modified files:

Index: src/doc/CHANGES-9.3
diff -u src/doc/CHANGES-9.3:1.1.2.88 src/doc/CHANGES-9.3:1.1.2.89
--- src/doc/CHANGES-9.3:1.1.2.88	Wed May  4 15:16:27 2022
+++ src/doc/CHANGES-9.3	Wed May  4 17:52:41 2022
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.3,v 1.1.2.88 2022/05/04 15:16:27 sborrill Exp $
+# $NetBSD: CHANGES-9.3,v 1.1.2.89 2022/05/04 17:52:41 martin Exp $
 
 A complete list of changes from the NetBSD 9.2 release to the NetBSD 9.3
 release:
@@ -1567,3 +1567,8 @@ sys/net/if_pppoe.c1.179
 	mbuf corruption.
 	[martin, ticket #1442]
 
+sys/nfs/nfs_vfsops.c1.243
+
+	nfs: fix file size limit.
+	[gavan, ticket #1441]
+



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

2022-05-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed May  4 17:51:20 UTC 2022

Modified Files:
src/sys/nfs [netbsd-9]: nfs_vfsops.c

Log Message:
Pull up following revision(s) (requested by gavan in ticket #1441):

sys/nfs/nfs_vfsops.c: revision 1.243

Don't pretend that files are limited to 1TB on NFSv3.


To generate a diff of this commit:
cvs rdiff -u -r1.237 -r1.237.4.1 src/sys/nfs/nfs_vfsops.c

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



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

2022-05-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed May  4 17:51:20 UTC 2022

Modified Files:
src/sys/nfs [netbsd-9]: nfs_vfsops.c

Log Message:
Pull up following revision(s) (requested by gavan in ticket #1441):

sys/nfs/nfs_vfsops.c: revision 1.243

Don't pretend that files are limited to 1TB on NFSv3.


To generate a diff of this commit:
cvs rdiff -u -r1.237 -r1.237.4.1 src/sys/nfs/nfs_vfsops.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/nfs/nfs_vfsops.c
diff -u src/sys/nfs/nfs_vfsops.c:1.237 src/sys/nfs/nfs_vfsops.c:1.237.4.1
--- src/sys/nfs/nfs_vfsops.c:1.237	Mon Sep  3 16:29:36 2018
+++ src/sys/nfs/nfs_vfsops.c	Wed May  4 17:51:20 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_vfsops.c,v 1.237 2018/09/03 16:29:36 riastradh Exp $	*/
+/*	$NetBSD: nfs_vfsops.c,v 1.237.4.1 2022/05/04 17:51:20 martin Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993, 1995
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nfs_vfsops.c,v 1.237 2018/09/03 16:29:36 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_vfsops.c,v 1.237.4.1 2022/05/04 17:51:20 martin Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_nfs.h"
@@ -307,8 +307,7 @@ nfs_fsinfo(struct nfsmount *nmp, struct 
 			if (nmp->nm_readdirsize == 0)
 nmp->nm_readdirsize = xmax;
 		}
-		/* XXX */
-		nmp->nm_maxfilesize = (u_int64_t)0x8000 * DEV_BSIZE - 1;
+		nmp->nm_maxfilesize = 0xull;
 		maxfsize = fxdr_hyper(>fs_maxfilesize);
 		if (maxfsize > 0 && maxfsize < nmp->nm_maxfilesize)
 			nmp->nm_maxfilesize = maxfsize;



CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs

2022-05-04 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Wed May  4 15:49:55 UTC 2022

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: arc.c

Log Message:
fix ARC checks for available memory:
there's an extra check that we inherited from FreeBSD that tries to
detect KVA exhaustion on platforms with limited KVA, but the condition
that decided whether to use the extra check was using a FreeBSDism
that doesn't exist on NetBSD, resulting in this check being used on
all platforms.  on amd64 systems with lots of memory, this extra check
would result in the ARC thinking that it constantly needed to reclaim memory,
resulting in all the xcall threads running all the time but not doing
anything useful.  change this condition so that this extra check for
KVA exhaustion is only used on 32-bit platforms.  fixes PR 55707.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/arc.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/uts/common/fs/zfs/arc.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/arc.c:1.20 src/external/cddl/osnet/dist/uts/common/fs/zfs/arc.c:1.21
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/arc.c:1.20	Wed Apr 21 10:02:34 2021
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/arc.c	Wed May  4 15:49:55 2022
@@ -3963,7 +3963,7 @@ arc_available_memory(void)
 	}
 
 #endif	/* illumos */
-#if defined(__i386) || !defined(UMA_MD_SMALL_ALLOC)
+#if !defined(_LP64)
 	/*
 	 * If we're on an i386 platform, it's possible that we'll exhaust the
 	 * kernel heap space before we ever run out of available physical
@@ -5750,7 +5750,7 @@ arc_memory_throttle(uint64_t reserve, ui
 	static uint64_t page_load = 0;
 	static uint64_t last_txg = 0;
 
-#if defined(__i386) || !defined(UMA_MD_SMALL_ALLOC)
+#if !defined(_LP64)
 	available_memory =
 	MIN(available_memory, ptob(vmem_size(heap_arena, VMEM_FREE)));
 #endif



CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs

2022-05-04 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Wed May  4 15:49:55 UTC 2022

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: arc.c

Log Message:
fix ARC checks for available memory:
there's an extra check that we inherited from FreeBSD that tries to
detect KVA exhaustion on platforms with limited KVA, but the condition
that decided whether to use the extra check was using a FreeBSDism
that doesn't exist on NetBSD, resulting in this check being used on
all platforms.  on amd64 systems with lots of memory, this extra check
would result in the ARC thinking that it constantly needed to reclaim memory,
resulting in all the xcall threads running all the time but not doing
anything useful.  change this condition so that this extra check for
KVA exhaustion is only used on 32-bit platforms.  fixes PR 55707.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/arc.c

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



CVS commit: [netbsd-8] src/doc

2022-05-04 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Wed May  4 15:37:12 UTC 2022

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

Log Message:
Ticket #1740


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

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

Modified files:

Index: src/doc/CHANGES-8.3
diff -u src/doc/CHANGES-8.3:1.1.2.126 src/doc/CHANGES-8.3:1.1.2.127
--- src/doc/CHANGES-8.3:1.1.2.126	Wed Apr 27 16:56:09 2022
+++ src/doc/CHANGES-8.3	Wed May  4 15:37:12 2022
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.3,v 1.1.2.126 2022/04/27 16:56:09 martin Exp $
+# $NetBSD: CHANGES-8.3,v 1.1.2.127 2022/05/04 15:37:12 sborrill Exp $
 
 A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3
 release:
@@ -2567,3 +2567,9 @@ usr.sbin/quotaon/quotaon.c			1.31
 	verbose output.  Avoids possibly corrupted quota data.
 	[hannken, ticket #1739]
 
+sys/net/if_pppoe.c			1.179
+
+	pppoe(4): fix CVE-2022-29867 - discovery phase local network
+	mbuf corruption.
+	[martin, ticket #1740]
+



CVS commit: [netbsd-8] src/doc

2022-05-04 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Wed May  4 15:37:12 UTC 2022

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

Log Message:
Ticket #1740


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

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



CVS commit: [netbsd-8] src/sys/net

2022-05-04 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Wed May  4 15:36:35 UTC 2022

Modified Files:
src/sys/net [netbsd-8]: if_pppoe.c

Log Message:
Pull up the following revisions(s) (requested by martin in ticket #1740):
sys/net/if_pppoe.c: revision 1.179

pppoe(4): fix CVE-2022-29867 - discovery phase local network
mbuf corruption.


To generate a diff of this commit:
cvs rdiff -u -r1.125.6.10 -r1.125.6.11 src/sys/net/if_pppoe.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/net/if_pppoe.c
diff -u src/sys/net/if_pppoe.c:1.125.6.10 src/sys/net/if_pppoe.c:1.125.6.11
--- src/sys/net/if_pppoe.c:1.125.6.10	Thu Feb 13 19:37:39 2020
+++ src/sys/net/if_pppoe.c	Wed May  4 15:36:35 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: if_pppoe.c,v 1.125.6.10 2020/02/13 19:37:39 martin Exp $ */
+/* $NetBSD: if_pppoe.c,v 1.125.6.11 2022/05/04 15:36:35 sborrill Exp $ */
 
 /*-
  * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.125.6.10 2020/02/13 19:37:39 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.125.6.11 2022/05/04 15:36:35 sborrill Exp $");
 
 #ifdef _KERNEL_OPT
 #include "pppoe.h"
@@ -871,6 +871,10 @@ breakbreak:;
 			}
 			sc->sc_ac_cookie_len = ac_cookie_len;
 			memcpy(sc->sc_ac_cookie, ac_cookie, ac_cookie_len);
+		} else if (sc->sc_ac_cookie) {
+			free(sc->sc_ac_cookie, M_DEVBUF);
+			sc->sc_ac_cookie = NULL;
+			sc->sc_ac_cookie_len = 0;
 		}
 		if (relay_sid) {
 			if (sc->sc_relay_sid)
@@ -886,6 +890,10 @@ breakbreak:;
 			}
 			sc->sc_relay_sid_len = relay_sid_len;
 			memcpy(sc->sc_relay_sid, relay_sid, relay_sid_len);
+		} else if (sc->sc_relay_sid) {
+			free(sc->sc_relay_sid, M_DEVBUF);
+			sc->sc_relay_sid = NULL;
+			sc->sc_relay_sid_len = 0;
 		}
 		memcpy(>sc_dest, eh->ether_shost, sizeof sc->sc_dest);
 		callout_stop(>sc_timeout);
@@ -1313,6 +1321,9 @@ pppoe_get_mbuf(size_t len)
 {
 	struct mbuf *m;
 
+	if (len + sizeof(struct ether_header) > MCLBYTES)
+		return NULL;
+
 	MGETHDR(m, M_DONTWAIT, MT_DATA);
 	if (m == NULL)
 		return NULL;



CVS commit: [netbsd-8] src/sys/net

2022-05-04 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Wed May  4 15:36:35 UTC 2022

Modified Files:
src/sys/net [netbsd-8]: if_pppoe.c

Log Message:
Pull up the following revisions(s) (requested by martin in ticket #1740):
sys/net/if_pppoe.c: revision 1.179

pppoe(4): fix CVE-2022-29867 - discovery phase local network
mbuf corruption.


To generate a diff of this commit:
cvs rdiff -u -r1.125.6.10 -r1.125.6.11 src/sys/net/if_pppoe.c

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



CVS commit: [netbsd-9] src/doc

2022-05-04 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Wed May  4 15:16:27 UTC 2022

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

Log Message:
Ticket #1442


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.87 -r1.1.2.88 src/doc/CHANGES-9.3

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

Modified files:

Index: src/doc/CHANGES-9.3
diff -u src/doc/CHANGES-9.3:1.1.2.87 src/doc/CHANGES-9.3:1.1.2.88
--- src/doc/CHANGES-9.3:1.1.2.87	Wed Apr 27 16:54:20 2022
+++ src/doc/CHANGES-9.3	Wed May  4 15:16:27 2022
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.3,v 1.1.2.87 2022/04/27 16:54:20 martin Exp $
+# $NetBSD: CHANGES-9.3,v 1.1.2.88 2022/05/04 15:16:27 sborrill Exp $
 
 A complete list of changes from the NetBSD 9.2 release to the NetBSD 9.3
 release:
@@ -1561,3 +1561,9 @@ usr.sbin/quotaon/quotaon.c			1.31
 	verbose output.  Avoids possibly corrupted quota data.
 	[hannken, ticket #1440]
 
+sys/net/if_pppoe.c1.179
+
+	pppoe(4): fix CVE-2022-29867 - discovery phase local network
+	mbuf corruption.
+	[martin, ticket #1442]
+



CVS commit: [netbsd-9] src/doc

2022-05-04 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Wed May  4 15:16:27 UTC 2022

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

Log Message:
Ticket #1442


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.87 -r1.1.2.88 src/doc/CHANGES-9.3

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



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

2022-05-04 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Wed May  4 15:08:47 UTC 2022

Modified Files:
src/sys/net [netbsd-9]: if_pppoe.c

Log Message:
Pull up the following revisions(s) (requested by martin in ticket #1442):
sys/net/if_pppoe.c: revision 1.179

pppoe(4): fix CVE-2022-29867 - discovery phase local network
mbuf corruption.


To generate a diff of this commit:
cvs rdiff -u -r1.147.4.1 -r1.147.4.2 src/sys/net/if_pppoe.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/net/if_pppoe.c
diff -u src/sys/net/if_pppoe.c:1.147.4.1 src/sys/net/if_pppoe.c:1.147.4.2
--- src/sys/net/if_pppoe.c:1.147.4.1	Thu Feb 13 19:40:05 2020
+++ src/sys/net/if_pppoe.c	Wed May  4 15:08:47 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: if_pppoe.c,v 1.147.4.1 2020/02/13 19:40:05 martin Exp $ */
+/* $NetBSD: if_pppoe.c,v 1.147.4.2 2022/05/04 15:08:47 sborrill Exp $ */
 
 /*
  * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.147.4.1 2020/02/13 19:40:05 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.147.4.2 2022/05/04 15:08:47 sborrill Exp $");
 
 #ifdef _KERNEL_OPT
 #include "pppoe.h"
@@ -887,6 +887,10 @@ breakbreak:;
 			}
 			sc->sc_ac_cookie_len = ac_cookie_len;
 			memcpy(sc->sc_ac_cookie, ac_cookie, ac_cookie_len);
+		} else if (sc->sc_ac_cookie) {
+			free(sc->sc_ac_cookie, M_DEVBUF);
+			sc->sc_ac_cookie = NULL;
+			sc->sc_ac_cookie_len = 0;
 		}
 		if (relay_sid) {
 			if (sc->sc_relay_sid)
@@ -902,6 +906,10 @@ breakbreak:;
 			}
 			sc->sc_relay_sid_len = relay_sid_len;
 			memcpy(sc->sc_relay_sid, relay_sid, relay_sid_len);
+		} else if (sc->sc_relay_sid) {
+			free(sc->sc_relay_sid, M_DEVBUF);
+			sc->sc_relay_sid = NULL;
+			sc->sc_relay_sid_len = 0;
 		}
 		memcpy(>sc_dest, eh->ether_shost, sizeof sc->sc_dest);
 		callout_stop(>sc_timeout);
@@ -1324,6 +1332,9 @@ pppoe_get_mbuf(size_t len)
 {
 	struct mbuf *m;
 
+	if (len + sizeof(struct ether_header) > MCLBYTES)
+		return NULL;
+
 	MGETHDR(m, M_DONTWAIT, MT_DATA);
 	if (m == NULL)
 		return NULL;



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

2022-05-04 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Wed May  4 15:08:47 UTC 2022

Modified Files:
src/sys/net [netbsd-9]: if_pppoe.c

Log Message:
Pull up the following revisions(s) (requested by martin in ticket #1442):
sys/net/if_pppoe.c: revision 1.179

pppoe(4): fix CVE-2022-29867 - discovery phase local network
mbuf corruption.


To generate a diff of this commit:
cvs rdiff -u -r1.147.4.1 -r1.147.4.2 src/sys/net/if_pppoe.c

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



CVS commit: src/sys/net

2022-05-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed May  4 14:30:04 UTC 2022

Modified Files:
src/sys/net: if_pppoe.c

Log Message:
Do not allocate mbuf clusters when the caller (eroneously) asks
for more than MCLBYTES size, instead fail the allocation.

When we have received multiple PADO offer packets in the discovery
phase, do not combine tags from different packets. We are supposed
to pick one PADO packet and continue session establishment with that.

The second bug could cause code to trigger the first and create
invalid response packets and also overwrite data outside of
the allocated mbuf cluster.

Fixes CVE-2022-29867.


To generate a diff of this commit:
cvs rdiff -u -r1.178 -r1.179 src/sys/net/if_pppoe.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/net/if_pppoe.c
diff -u src/sys/net/if_pppoe.c:1.178 src/sys/net/if_pppoe.c:1.179
--- src/sys/net/if_pppoe.c:1.178	Mon Oct 11 05:13:11 2021
+++ src/sys/net/if_pppoe.c	Wed May  4 14:30:04 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: if_pppoe.c,v 1.178 2021/10/11 05:13:11 knakahara Exp $ */
+/* $NetBSD: if_pppoe.c,v 1.179 2022/05/04 14:30:04 martin Exp $ */
 
 /*
  * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.178 2021/10/11 05:13:11 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.179 2022/05/04 14:30:04 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "pppoe.h"
@@ -958,6 +958,10 @@ breakbreak:;
 			}
 			sc->sc_ac_cookie_len = ac_cookie_len;
 			memcpy(sc->sc_ac_cookie, ac_cookie, ac_cookie_len);
+		} else if (sc->sc_ac_cookie) {
+			free(sc->sc_ac_cookie, M_DEVBUF);
+			sc->sc_ac_cookie = NULL;
+			sc->sc_ac_cookie_len = 0;
 		}
 		if (relay_sid) {
 			if (sc->sc_relay_sid)
@@ -972,6 +976,10 @@ breakbreak:;
 			}
 			sc->sc_relay_sid_len = relay_sid_len;
 			memcpy(sc->sc_relay_sid, relay_sid, relay_sid_len);
+		} else if (sc->sc_relay_sid) {
+			free(sc->sc_relay_sid, M_DEVBUF);
+			sc->sc_relay_sid = NULL;
+			sc->sc_relay_sid_len = 0;
 		}
 		memcpy(>sc_dest, eh->ether_shost, sizeof sc->sc_dest);
 		callout_stop(>sc_timeout);
@@ -1418,6 +1426,9 @@ pppoe_get_mbuf(size_t len)
 {
 	struct mbuf *m;
 
+	if (len + sizeof(struct ether_header) > MCLBYTES)
+		return NULL;
+
 	MGETHDR(m, M_DONTWAIT, MT_DATA);
 	if (m == NULL)
 		return NULL;



CVS commit: src/sys/net

2022-05-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed May  4 14:30:04 UTC 2022

Modified Files:
src/sys/net: if_pppoe.c

Log Message:
Do not allocate mbuf clusters when the caller (eroneously) asks
for more than MCLBYTES size, instead fail the allocation.

When we have received multiple PADO offer packets in the discovery
phase, do not combine tags from different packets. We are supposed
to pick one PADO packet and continue session establishment with that.

The second bug could cause code to trigger the first and create
invalid response packets and also overwrite data outside of
the allocated mbuf cluster.

Fixes CVE-2022-29867.


To generate a diff of this commit:
cvs rdiff -u -r1.178 -r1.179 src/sys/net/if_pppoe.c

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



CVS commit: src/usr.sbin/autofs

2022-05-04 Thread Tomohiro Kusumi
Module Name:src
Committed By:   tkusumi
Date:   Wed May  4 11:27:54 UTC 2022

Modified Files:
src/usr.sbin/autofs: automount.c common.c

Log Message:
usr.sbin/autofs: Fix absolute path when creating a mountpoint

taken-from freebsd 63640b2f552c0476f50484635eb9888eafcd22dc


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/autofs/automount.c
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/autofs/common.c

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

Modified files:

Index: src/usr.sbin/autofs/automount.c
diff -u src/usr.sbin/autofs/automount.c:1.3 src/usr.sbin/autofs/automount.c:1.4
--- src/usr.sbin/autofs/automount.c:1.3	Mon Jan 15 14:38:06 2018
+++ src/usr.sbin/autofs/automount.c	Wed May  4 11:27:54 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: automount.c,v 1.3 2018/01/15 14:38:06 christos Exp $	*/
+/*	$NetBSD: automount.c,v 1.4 2022/05/04 11:27:54 tkusumi Exp $	*/
 
 /*-
  * Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  * SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: automount.c,v 1.3 2018/01/15 14:38:06 christos Exp $");
+__RCSID("$NetBSD: automount.c,v 1.4 2022/05/04 11:27:54 tkusumi Exp $");
 
 #include 
 #include 
@@ -83,18 +83,8 @@ mount_autofs(const char *from, const cha
 {
 	struct autofs_args args;
 	int error;
-	char *cwd;
 
-	/*
-	 * There is no guarantee we are at /, so chdir to /.
-	 */
-	cwd = getcwd(NULL, 0);
-	if (chdir("/") != 0)
-		log_warn("failed to chdir to /");
 	create_directory(fspath);
-	if (chdir(cwd) != 0)
-		log_warn("failed to restore cwd");
-	free(cwd);
 
 	log_debugx("mounting %s on %s, prefix \"%s\", options \"%s\"",
 	from, fspath, prefix, options);

Index: src/usr.sbin/autofs/common.c
diff -u src/usr.sbin/autofs/common.c:1.4 src/usr.sbin/autofs/common.c:1.5
--- src/usr.sbin/autofs/common.c:1.4	Tue Sep 14 20:40:55 2021
+++ src/usr.sbin/autofs/common.c	Wed May  4 11:27:54 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: common.c,v 1.4 2021/09/14 20:40:55 rillig Exp $	*/
+/*	$NetBSD: common.c,v 1.5 2022/05/04 11:27:54 tkusumi Exp $	*/
 
 /*-
  * Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  * $FreeBSD: head/usr.sbin/autofs/common.c 303527 2016-07-30 01:10:05Z bapt $
  */
 #include 
-__RCSID("$NetBSD: common.c,v 1.4 2021/09/14 20:40:55 rillig Exp $");
+__RCSID("$NetBSD: common.c,v 1.5 2022/05/04 11:27:54 tkusumi Exp $");
 
 #include 
 #include 
@@ -132,7 +132,7 @@ create_directory(const char *path)
 	 */
 	copy = tofree = checked_strdup(path + 1);
 
-	partial = checked_strdup("");
+	partial = checked_strdup("/");
 	for (;;) {
 		component = strsep(, "/");
 		if (component == NULL)



CVS commit: src/usr.sbin/autofs

2022-05-04 Thread Tomohiro Kusumi
Module Name:src
Committed By:   tkusumi
Date:   Wed May  4 11:27:54 UTC 2022

Modified Files:
src/usr.sbin/autofs: automount.c common.c

Log Message:
usr.sbin/autofs: Fix absolute path when creating a mountpoint

taken-from freebsd 63640b2f552c0476f50484635eb9888eafcd22dc


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/autofs/automount.c
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/autofs/common.c

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



CVS commit: src/external/bsd/elftoolchain/dist/tools

2022-05-04 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Wed May  4 11:07:43 UTC 2022

Added Files:
src/external/bsd/elftoolchain/dist/tools: netbsd-base-system-import.sh

Log Message:
Add a script from upstream that assists with importing upstream
Elftoolchain sources.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 \
src/external/bsd/elftoolchain/dist/tools/netbsd-base-system-import.sh

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

Added files:

Index: src/external/bsd/elftoolchain/dist/tools/netbsd-base-system-import.sh
diff -u /dev/null src/external/bsd/elftoolchain/dist/tools/netbsd-base-system-import.sh:1.1
--- /dev/null	Wed May  4 11:07:43 2022
+++ src/external/bsd/elftoolchain/dist/tools/netbsd-base-system-import.sh	Wed May  4 11:07:43 2022
@@ -0,0 +1,230 @@
+#!/bin/sh
+#
+# Copy files from an Elftoolchain checkout and prepare them for import
+# into the NetBSD 'src' tree.
+#
+# Usage:
+#
+#   netbsd-base-system-import.sh [-D] -s SRCDIR -d DISTDIR -m MODULE \
+# [-m MODULE]...
+
+usage() {
+  echo "Usage: $0 [options]"
+  echo
+  echo "Prepare elftoolchain sources for importing into NetBSD src."
+  echo
+  echo "Options:"
+  echo "  -DOnly show diffs."
+  echo "  -d DISTDIRSet the 'dist' directory for the elftoolchain import."
+  echo "Defaults to './dist'."
+  echo "  -hDisplay this help text."
+  echo "  -m MODULE A subdirectory of the elftoolchain tree to be"
+  echo "imported, e.g. 'libelf', 'common', 'libdwarf', etc."
+  echo "  -s SRCDIR The 'trunk' directory of an elftoolchain checkout."
+  echo "  -vBe verbose."
+}
+
+err() {
+  echo ERROR: "$@" 1>&2
+  echo
+  usage
+  exit 1
+}
+
+## Parse options.
+diff_only=NO
+verbose=NO
+options=":d:hs:m:vD"
+while getopts "$options" var; do
+  case $var in
+  d) dstdir="$OPTARG";;
+  h) usage; exit 0;;
+  m) modules="$OPTARG $modules";;
+  s) srcdir="$OPTARG";;
+  v) verbose=YES;;
+  D) diff_only=YES;;
+  '?') err "Unknown option: '-$OPTARG'.";;
+  ':') err "Option '-$OPTARG' expects an argument.";;
+  esac
+  shift $((OPTIND - 1))
+done
+
+[ -n "${srcdir}" ] || err "Option -s must be specified."
+[ -n "${modules}" ] || err "Option -m must be specified at least once."
+
+if [ -z "${dstdir}" ]; then 
+  dstdir="./dist"
+fi
+
+[ -d ${srcdir} ] || err "Missing source directory '$srcdir'."
+[ -d ${dstdir} ] || err "Missing destination directory '$dstdir'."
+
+# Verify that the source modules exist.
+for m in ${modules}; do
+  [ -d ${srcdir}/${m} ] || err "Missing source module '${srcdir}/${m}'"
+done
+
+## Helpers.
+rename_svn_id() {
+  sed -e '/\$Id:/ {
+s/\$Id:/Id:/;
+s/[ ]*\$//
+  }'
+}
+
+handle_block_comment() {
+  sed -e '/^\/\*-/ { i\
+/*	\$NetBSD\$	*/\
+
+}'
+}
+
+transform_placeholders() {
+  sed -e \
+'/@ELFTC-DECLARE-DOWNSTREAM-VCSID@/ {
+c \
+#if !defined(__RCSID)\
+#define __RCSID(ID) /**/\
+#endif  /* !defined(__RCSID) */
+}' -e \
+'/@ELFTC-DEFINE-ELFTC-VCSID@/ {
+c \
+#ifndef	ELFTC_VCSID\
+#define	ELFTC_VCSID(ID)		/**/\
+#endif
+}' -e \
+'/@ELFTC-USE-DOWNSTREAM-VCSID@/ {
+c \
+__RCSID("$NetBSD: netbsd-base-system-import.sh,v 1.1 2022/05/04 11:07:43 jkoshy Exp $");
+}' -e \
+'/@ELFTC-INCLUDE-SYS-CDEFS@/ {
+c \
+#include 
+}'
+}
+
+# compare_and_move_or_diff filename generated_temp_file
+compare_and_move_or_diff() {
+  local dstfile=${dstdir}/${1}
+
+  egrep -v '\$NetBSD.*\$' ${2}   > ${srccmptmp}
+  egrep -v '\$NetBSD.*\$' ${dstfile} > ${dstcmptmp} 2> /dev/null
+
+  if cmp -s ${srccmptmp} ${dstcmptmp}; then
+return 0
+  fi
+
+  if [ "${diff_only}" = YES ]; then
+# Show the changes needed to update the destination.
+if [ -f ${dstfile} ]; then
+  diff -u ${dstfile} ${2}
+else
+  echo '--- new file' ${file}
+  diff -u /dev/null ${2}
+fi
+  else
+mv ${2} ${dstfile} || exit ${?}
+changed_file="${1}"
+  fi
+}
+
+# Manual pages need a CVS ID, and renaming of their SVN IDs.
+handle_manual_page() {
+  echo '.\"	$NetBSD: netbsd-base-system-import.sh,v 1.1 2022/05/04 11:07:43 jkoshy Exp $' > ${srctmp}
+  echo '.\"' >> ${srctmp}
+  rename_svn_id < ${srcdir}/${1} >> ${srctmp}
+
+  compare_and_move_or_diff ${1} ${srctmp}
+}
+
+# M4 files need a NetBSD RCS Id prepended, and any embedded
+# VCS IDs transformed.
+handle_m4_file() {
+  echo 'dnl 	$NetBSD: netbsd-base-system-import.sh,v 1.1 2022/05/04 11:07:43 jkoshy Exp $'  > ${srctmp}
+  transform_placeholders   <  ${srcdir}/${1} | \
+rename_svn_id >> ${srctmp}
+
+  compare_and_move_or_diff ${1} ${srctmp}
+}
+
+# Regular files only need their SVN IDs renamed.
+handle_regular_file() {
+  rename_svn_id < ${srcdir}/${1} > ${srctmp}
+
+  compare_and_move_or_diff ${1} ${srctmp}
+}
+
+# C sources need a NetBSD RCS Id prepended, the
+# ELFTC macros and SVN ids transformed.
+handle_c_source() {
+  handle_block_comment < ${srcdir}/${1} | \
+

CVS commit: src/external/bsd/elftoolchain/dist/tools

2022-05-04 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Wed May  4 11:07:43 UTC 2022

Added Files:
src/external/bsd/elftoolchain/dist/tools: netbsd-base-system-import.sh

Log Message:
Add a script from upstream that assists with importing upstream
Elftoolchain sources.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 \
src/external/bsd/elftoolchain/dist/tools/netbsd-base-system-import.sh

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



CVS commit: src/sys/dev/pci

2022-05-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed May  4 07:55:51 UTC 2022

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

Log Message:
Regen


To generate a diff of this commit:
cvs rdiff -u -r1.1438 -r1.1439 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1437 -r1.1438 src/sys/dev/pci/pcidevs_data.h

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

Modified files:

Index: src/sys/dev/pci/pcidevs.h
diff -u src/sys/dev/pci/pcidevs.h:1.1438 src/sys/dev/pci/pcidevs.h:1.1439
--- src/sys/dev/pci/pcidevs.h:1.1438	Wed May  4 06:45:53 2022
+++ src/sys/dev/pci/pcidevs.h	Wed May  4 07:55:50 2022
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs.h,v 1.1438 2022/05/04 06:45:53 nia Exp $	*/
+/*	$NetBSD: pcidevs.h,v 1.1439 2022/05/04 07:55:50 martin Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.1455 2022/05/04 06:42:43 nia Exp
+ *	NetBSD: pcidevs,v 1.1456 2022/05/04 07:55:05 martin Exp
  */
 
 /*
@@ -4573,7 +4573,7 @@
 #define	PCI_PRODUCT_INTEL_XEONSC_RAS	0x2025		/* Xeon Scalable RAS */
 #define	PCI_PRODUCT_INTEL_XEONSC_IOAPIC	0x2026		/* Xeon Scalable I/O APIC */
 #define	PCI_PRODUCT_INTEL_XEONSC_VTD	0x2034		/* Xeon Scalable VT-d */
-#define	PCI_PRODUCT_INTEL_XEONSC_RAS	0x2035		/* Xeon Scalable RAS */
+#define	PCI_PRODUCT_INTEL_XEONSC_RAS_CFG	0x2035		/* Xeon Scalable RAS Configuration */
 #define	PCI_PRODUCT_INTEL_XEONSC_IOAPIC_C	0x2036		/* Xeon Scalable IOxAPIC */
 #define	PCI_PRODUCT_INTEL_XEONSC_IMC_1	0x2041		/* Xeon Scalable IMC */
 #define	PCI_PRODUCT_INTEL_XEONSC_IMC_2	0x2042		/* Xeon Scalable IMC */

Index: src/sys/dev/pci/pcidevs_data.h
diff -u src/sys/dev/pci/pcidevs_data.h:1.1437 src/sys/dev/pci/pcidevs_data.h:1.1438
--- src/sys/dev/pci/pcidevs_data.h:1.1437	Wed May  4 06:45:53 2022
+++ src/sys/dev/pci/pcidevs_data.h	Wed May  4 07:55:50 2022
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs_data.h,v 1.1437 2022/05/04 06:45:53 nia Exp $	*/
+/*	$NetBSD: pcidevs_data.h,v 1.1438 2022/05/04 07:55:50 martin Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.1455 2022/05/04 06:42:43 nia Exp
+ *	NetBSD: pcidevs,v 1.1456 2022/05/04 07:55:05 martin Exp
  */
 
 /*
@@ -7843,8 +7843,8 @@ static const uint32_t pci_products[] = {
 	23771, 26476, 8711, 23999, 0,
 	PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_XEONSC_VTD, 
 	23771, 26476, 26510, 0,
-	PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_XEONSC_RAS, 
-	23771, 26476, 23995, 0,
+	PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_XEONSC_RAS_CFG, 
+	23771, 26476, 23995, 7978, 0,
 	PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_XEONSC_IOAPIC_C, 
 	23771, 26476, 23255, 0,
 	PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_XEONSC_IMC_1, 
@@ -18442,7 +18442,7 @@ static const char pci_words[] = { "." 
 	"K8\0" /* 4 refs @ 7954 */
 	"AMD64\0" /* 14 refs @ 7957 */
 	"HyperTransport\0" /* 9 refs @ 7963 */
-	"Configuration\0" /* 46 refs @ 7978 */
+	"Configuration\0" /* 47 refs @ 7978 */
 	"Address\0" /* 48 refs @ 7992 */
 	"Map\0" /* 10 refs @ 8000 */
 	"DRAM\0" /* 49 refs @ 8004 */



CVS commit: src/sys/dev/pci

2022-05-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed May  4 07:55:51 UTC 2022

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

Log Message:
Regen


To generate a diff of this commit:
cvs rdiff -u -r1.1438 -r1.1439 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1437 -r1.1438 src/sys/dev/pci/pcidevs_data.h

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



CVS commit: src/sys/dev/pci

2022-05-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed May  4 07:55:05 UTC 2022

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

Log Message:
Rename one of the XEONSC_RAS entries slightly to avoid conflicts


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

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



CVS commit: src/sys/dev/pci

2022-05-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed May  4 07:55:05 UTC 2022

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

Log Message:
Rename one of the XEONSC_RAS entries slightly to avoid conflicts


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

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

Modified files:

Index: src/sys/dev/pci/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1455 src/sys/dev/pci/pcidevs:1.1456
--- src/sys/dev/pci/pcidevs:1.1455	Wed May  4 06:42:43 2022
+++ src/sys/dev/pci/pcidevs	Wed May  4 07:55:05 2022
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1455 2022/05/04 06:42:43 nia Exp $
+$NetBSD: pcidevs,v 1.1456 2022/05/04 07:55:05 martin Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -4566,7 +4566,7 @@ product INTEL XEONSC_MMVTD	0x2024	Xeon S
 product INTEL XEONSC_RAS	0x2025	Xeon Scalable RAS
 product INTEL XEONSC_IOAPIC	0x2026	Xeon Scalable I/O APIC
 product INTEL XEONSC_VTD	0x2034	Xeon Scalable VT-d
-product INTEL XEONSC_RAS	0x2035	Xeon Scalable RAS
+product INTEL XEONSC_RAS_CFG	0x2035	Xeon Scalable RAS Configuration
 product INTEL XEONSC_IOAPIC_C	0x2036	Xeon Scalable IOxAPIC
 product INTEL XEONSC_IMC_1	0x2041	Xeon Scalable IMC
 product INTEL XEONSC_IMC_2	0x2042	Xeon Scalable IMC



CVS commit: src/sys

2022-05-04 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed May  4 07:48:35 UTC 2022

Modified Files:
src/sys/arch/sun3/sun3x: pmap.c
src/sys/arch/x68k/dev: mha.c
src/sys/dev/i2o: iopsp.c
src/sys/dev/sbus: stp4020.c
src/sys/net: ppp_tty.c

Log Message:
fix various typos in comments and log messages.


To generate a diff of this commit:
cvs rdiff -u -r1.119 -r1.120 src/sys/arch/sun3/sun3x/pmap.c
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/x68k/dev/mha.c
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/i2o/iopsp.c
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/sbus/stp4020.c
cvs rdiff -u -r1.69 -r1.70 src/sys/net/ppp_tty.c

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



CVS commit: src/sys

2022-05-04 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed May  4 07:48:35 UTC 2022

Modified Files:
src/sys/arch/sun3/sun3x: pmap.c
src/sys/arch/x68k/dev: mha.c
src/sys/dev/i2o: iopsp.c
src/sys/dev/sbus: stp4020.c
src/sys/net: ppp_tty.c

Log Message:
fix various typos in comments and log messages.


To generate a diff of this commit:
cvs rdiff -u -r1.119 -r1.120 src/sys/arch/sun3/sun3x/pmap.c
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/x68k/dev/mha.c
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/i2o/iopsp.c
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/sbus/stp4020.c
cvs rdiff -u -r1.69 -r1.70 src/sys/net/ppp_tty.c

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

Modified files:

Index: src/sys/arch/sun3/sun3x/pmap.c
diff -u src/sys/arch/sun3/sun3x/pmap.c:1.119 src/sys/arch/sun3/sun3x/pmap.c:1.120
--- src/sys/arch/sun3/sun3x/pmap.c:1.119	Tue May  3 20:52:31 2022
+++ src/sys/arch/sun3/sun3x/pmap.c	Wed May  4 07:48:34 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.119 2022/05/03 20:52:31 andvar Exp $	*/
+/*	$NetBSD: pmap.c,v 1.120 2022/05/04 07:48:34 andvar Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -105,7 +105,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.119 2022/05/03 20:52:31 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.120 2022/05/04 07:48:34 andvar Exp $");
 
 #include "opt_ddb.h"
 #include "opt_pmap_debug.h"
@@ -222,7 +222,7 @@ int pmap_debug = 0;
  * For every A table in the MMU A area, there will be a corresponding
  * a_tmgr structure in the TMGR A area.  The same will be true for
  * the B and C tables.  This arrangement will make it easy to find the
- * controling tmgr structure for any table in the system by use of
+ * controlling tmgr structure for any table in the system by use of
  * (relatively) simple macros.
  */
 
@@ -293,7 +293,7 @@ struct pool	pmap_pmap_pool;
  * physical memory.  Memory is divided into 4 banks which are physically
  * locatable on the system board.  Although the size of these banks varies
  * with the size of memory they contain, their base addresses are
- * permenently fixed.  The following structure, which describes these
+ * permanently fixed.  The following structure, which describes these
  * banks, is initialized by pmap_bootstrap() after it reads from a similar
  * structure provided by the ROM Monitor.
  *
@@ -1218,7 +1218,7 @@ pmap_init_pv(void)
  *
  * Note: A "managed" address is one that was reported to the VM system as
  * a "usable page" during system startup.  As such, the VM system expects the
- * pmap module to keep an accurate track of the useage of those pages.
+ * pmap module to keep an accurate track of the usage of those pages.
  * Any page not given to the VM system at startup does not exist (as far as
  * the VM system is concerned) and is therefore "unmanaged."  Examples are
  * those pages which belong to the ROM monitor and the memory allocated before
@@ -1704,7 +1704,7 @@ pmap_enter(pmap_t pmap, vaddr_t va, padd
 	/*
 	 * Determine if the physical address being mapped is on-board RAM.
 	 * Any other area of the address space is likely to belong to a
-	 * device and hence it would be disasterous to cache its contents.
+	 * device and hence it would be disastrous to cache its contents.
 	 */
 	if ((managed = is_managed(pa)) == false)
 		mapflags |= PMAP_NC;
@@ -2064,7 +2064,7 @@ pmap_enter(pmap_t pmap, vaddr_t va, padd
  * Note that the kernel should never take a fault on any page
  * between [ KERNBASE .. virtual_avail ] and this is checked in
  * trap.c for kernel-mode MMU faults.  This means that mappings
- * created in that range must be implicily wired. -gwr
+ * created in that range must be implicitly wired. -gwr
  */
 void
 pmap_enter_kernel(vaddr_t va, paddr_t pa, vm_prot_t prot)
@@ -3026,7 +3026,7 @@ pmap_remove(pmap_t pmap, vaddr_t sva, va
 	 * If we just modified the current address space,
 	 * make sure to flush the MMU cache.
 	 *
-	 * XXX - this could be an unecessarily large flush.
+	 * XXX - this could be an unnecessarily large flush.
 	 * XXX - Could decide, based on the size of the VA range
 	 * to be removed, whether to flush "by pages" or "all".
 	 */
@@ -3060,7 +3060,7 @@ pmap_remove_a(a_tmgr_t *a_tbl, vaddr_t s
 
 	/*
 	 * The following code works with what I call a 'granularity
-	 * reduction algorithim'.  A range of addresses will always have
+	 * reduction algorithm'.  A range of addresses will always have
 	 * the following properties, which are classified according to
 	 * how the range relates to the size of the current granularity
 	 * - an A table entry:
@@ -3071,13 +3071,13 @@ pmap_remove_a(a_tmgr_t *a_tbl, vaddr_t s
 	 *
 	 * A range will always start on a granularity boundary, illustrated
 	 * by '+' signs in the table above, or it will start at some point
-	 * inbetween a granularity boundary, as illustrated by point 1.
+	 * in-between a granularity boundary, as 

CVS commit: src/sys/ufs/ext2fs

2022-05-04 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed May  4 07:34:29 UTC 2022

Modified Files:
src/sys/ufs/ext2fs: ext2fs_htree.c

Log Message:
s/entires/entries/ in local variable definition.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/ufs/ext2fs/ext2fs_htree.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/ufs/ext2fs/ext2fs_htree.c
diff -u src/sys/ufs/ext2fs/ext2fs_htree.c:1.9 src/sys/ufs/ext2fs/ext2fs_htree.c:1.10
--- src/sys/ufs/ext2fs/ext2fs_htree.c:1.9	Tue Aug 23 06:23:26 2016
+++ src/sys/ufs/ext2fs/ext2fs_htree.c	Wed May  4 07:34:28 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: ext2fs_htree.c,v 1.9 2016/08/23 06:23:26 christos Exp $	*/
+/*	$NetBSD: ext2fs_htree.c,v 1.10 2022/05/04 07:34:28 andvar Exp $	*/
 
 /*-
  * Copyright (c) 2010, 2012 Zheng Liu 
@@ -29,7 +29,7 @@
  * $FreeBSD: head/sys/fs/ext2fs/ext2fs_htree.c 294653 2016-01-24 02:41:49Z pfg $
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ext2fs_htree.c,v 1.9 2016/08/23 06:23:26 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ext2fs_htree.c,v 1.10 2022/05/04 07:34:28 andvar Exp $");
 
 #include 
 #include 
@@ -495,7 +495,7 @@ ext2fs_htree_add_entry(struct vnode *dvp
 	char *newidxblock = NULL;
 	struct ext2fs_htree_node *dst_node;
 	struct ext2fs_htree_entry *dst_entries;
-	struct ext2fs_htree_entry *root_entires;
+	struct ext2fs_htree_entry *root_entries;
 	struct buf *dst_bp = NULL;
 	int error, write_bp = 0, write_dst_bp = 0, write_info = 0;
 
@@ -517,7 +517,7 @@ ext2fs_htree_add_entry(struct vnode *dvp
 	ent_num = ext2fs_htree_get_count(entries);
 	if (ent_num == ext2fs_htree_get_limit(entries)) {
 		/* Split the index node. */
-		root_entires = info.h_levels[0].h_entries;
+		root_entries = info.h_levels[0].h_entries;
 		newidxblock = malloc(blksize, M_TEMP, M_WAITOK | M_ZERO);
 		dst_node = (struct ext2fs_htree_node *)newidxblock;
 		dst_entries = dst_node->h_entries;
@@ -543,8 +543,8 @@ ext2fs_htree_add_entry(struct vnode *dvp
 		if (info.h_levels_num == 2) {
 			uint16_t src_ent_num, dst_ent_num;
 
-			if (ext2fs_htree_get_count(root_entires) ==
-			ext2fs_htree_get_limit(root_entires)) {
+			if (ext2fs_htree_get_count(root_entries) ==
+			ext2fs_htree_get_limit(root_entries)) {
 /* Directory index is full */
 error = EIO;
 goto finish;



CVS commit: src/sys/ufs/ext2fs

2022-05-04 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed May  4 07:34:29 UTC 2022

Modified Files:
src/sys/ufs/ext2fs: ext2fs_htree.c

Log Message:
s/entires/entries/ in local variable definition.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/ufs/ext2fs/ext2fs_htree.c

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



CVS commit: src

2022-05-04 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed May  4 07:32:50 UTC 2022

Modified Files:
src/sys/arch/mips/cavium/dev: octeon_gmx.c
src/sys/dev/ic: aic6915reg.h aic6915var.h
src/usr.sbin/arp: arp.4
src/usr.sbin/sysinst: bsddisklabel.c

Log Message:
s/entires/entries/


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/mips/cavium/dev/octeon_gmx.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/ic/aic6915reg.h
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/ic/aic6915var.h
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/arp/arp.4
cvs rdiff -u -r1.60 -r1.61 src/usr.sbin/sysinst/bsddisklabel.c

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

Modified files:

Index: src/sys/arch/mips/cavium/dev/octeon_gmx.c
diff -u src/sys/arch/mips/cavium/dev/octeon_gmx.c:1.20 src/sys/arch/mips/cavium/dev/octeon_gmx.c:1.21
--- src/sys/arch/mips/cavium/dev/octeon_gmx.c:1.20	Sat Aug  7 16:18:59 2021
+++ src/sys/arch/mips/cavium/dev/octeon_gmx.c	Wed May  4 07:32:50 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: octeon_gmx.c,v 1.20 2021/08/07 16:18:59 thorpej Exp $	*/
+/*	$NetBSD: octeon_gmx.c,v 1.21 2022/05/04 07:32:50 andvar Exp $	*/
 
 /*
  * Copyright (c) 2007 Internet Initiative Japan, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: octeon_gmx.c,v 1.20 2021/08/07 16:18:59 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: octeon_gmx.c,v 1.21 2022/05/04 07:32:50 andvar Exp $");
 
 #include 
 #include 
@@ -593,7 +593,7 @@ octgmx_set_filter(struct octgmx_port_sof
 	}
 
 	/*
-	 * Note first entry is self MAC address; other 7 entires are available
+	 * Note first entry is self MAC address; other 7 entries are available
 	 * for multicast addresses.
 	 */
 

Index: src/sys/dev/ic/aic6915reg.h
diff -u src/sys/dev/ic/aic6915reg.h:1.6 src/sys/dev/ic/aic6915reg.h:1.7
--- src/sys/dev/ic/aic6915reg.h:1.6	Thu Aug  1 15:21:09 2019
+++ src/sys/dev/ic/aic6915reg.h	Wed May  4 07:32:50 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: aic6915reg.h,v 1.6 2019/08/01 15:21:09 msaitoh Exp $	*/
+/*	$NetBSD: aic6915reg.h,v 1.7 2022/05/04 07:32:50 andvar Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -224,7 +224,7 @@ struct sf_tcd {
 
 /*
  * To make matters worse, the manual lies about the indices in the
- * completion queue entires.  It claims they are in 8-byte units,
+ * completion queue entries.  It claims they are in 8-byte units,
  * but they're actually *BYTES*, which means we need to divide by
  * 128 to get the actual index.
  */

Index: src/sys/dev/ic/aic6915var.h
diff -u src/sys/dev/ic/aic6915var.h:1.4 src/sys/dev/ic/aic6915var.h:1.5
--- src/sys/dev/ic/aic6915var.h:1.4	Sat Oct 27 17:18:19 2012
+++ src/sys/dev/ic/aic6915var.h	Wed May  4 07:32:50 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: aic6915var.h,v 1.4 2012/10/27 17:18:19 chs Exp $	*/
+/*	$NetBSD: aic6915var.h,v 1.5 2022/05/04 07:32:50 andvar Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@ struct sf_control_data {
 	struct sf_txdesc0 scd_txdescs[SF_NTXDESC];
 
 	/*
-	 * The transmit completion queue entires.
+	 * The transmit completion queue entries.
 	 */
 	struct sf_tcd scd_txcomp[SF_NTCD];
 

Index: src/usr.sbin/arp/arp.4
diff -u src/usr.sbin/arp/arp.4:1.14 src/usr.sbin/arp/arp.4:1.15
--- src/usr.sbin/arp/arp.4:1.14	Sun Oct 16 05:32:30 2016
+++ src/usr.sbin/arp/arp.4	Wed May  4 07:32:50 2022
@@ -1,4 +1,4 @@
-.\"	$NetBSD: arp.4,v 1.14 2016/10/16 05:32:30 wiz Exp $
+.\"	$NetBSD: arp.4,v 1.15 2022/05/04 07:32:50 andvar Exp $
 .\"
 .\" Copyright (c) 1985, 1986, 1988, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -65,7 +65,7 @@ for a non-responding router.
 .Pp
 Each ARP cache entry is stored in a network interface which a response
 of ARP comes in.
-ARP cache entires time out periodically (normally 20 minutes after validated;
+ARP cache entries time out periodically (normally 20 minutes after validated;
 entries are not validated when not in use).
 .Pp
 ARP entries may be added, deleted or changed with the

Index: src/usr.sbin/sysinst/bsddisklabel.c
diff -u src/usr.sbin/sysinst/bsddisklabel.c:1.60 src/usr.sbin/sysinst/bsddisklabel.c:1.61
--- src/usr.sbin/sysinst/bsddisklabel.c:1.60	Sat Apr 16 18:15:23 2022
+++ src/usr.sbin/sysinst/bsddisklabel.c	Wed May  4 07:32:50 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: bsddisklabel.c,v 1.60 2022/04/16 18:15:23 andvar Exp $	*/
+/*	$NetBSD: bsddisklabel.c,v 1.61 2022/05/04 07:32:50 andvar Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -1240,7 +1240,7 @@ sort_and_sync_parts(struct partition_usa
 	if (infos == NULL)
 		return;
 
-	/* pre-initialize the first entires as dummy entries */
+	/* pre-initialize the first entries as dummy entries */
 	for (i = 0; i < pset->parts->num_part; i++) {
 		infos[i].cur_part_id = NO_PART;
 		infos[i].cur_flags = PTI_PSCHEME_INTERNAL;
@@ -1284,7 +1284,7 @@ sort_and_sync_parts(struct partition_usa
 		infos[pno].fs_type = 

CVS commit: src

2022-05-04 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed May  4 07:32:50 UTC 2022

Modified Files:
src/sys/arch/mips/cavium/dev: octeon_gmx.c
src/sys/dev/ic: aic6915reg.h aic6915var.h
src/usr.sbin/arp: arp.4
src/usr.sbin/sysinst: bsddisklabel.c

Log Message:
s/entires/entries/


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/mips/cavium/dev/octeon_gmx.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/ic/aic6915reg.h
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/ic/aic6915var.h
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/arp/arp.4
cvs rdiff -u -r1.60 -r1.61 src/usr.sbin/sysinst/bsddisklabel.c

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



CVS commit: src/sys/dev/pci

2022-05-04 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Wed May  4 06:45:54 UTC 2022

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

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.1437 -r1.1438 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1436 -r1.1437 src/sys/dev/pci/pcidevs_data.h

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



CVS commit: src/sys/dev/pci

2022-05-04 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Wed May  4 06:42:43 UTC 2022

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

Log Message:
More Xeon Scalable / Skylake-E devices


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

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

Modified files:

Index: src/sys/dev/pci/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1454 src/sys/dev/pci/pcidevs:1.1455
--- src/sys/dev/pci/pcidevs:1.1454	Wed Apr 27 06:57:48 2022
+++ src/sys/dev/pci/pcidevs	Wed May  4 06:42:43 2022
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1454 2022/04/27 06:57:48 msaitoh Exp $
+$NetBSD: pcidevs,v 1.1455 2022/05/04 06:42:43 nia Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -4558,9 +4558,40 @@ product INTEL C2000_SGMII	0x1f41	C2000 E
 product INTEL C2000_DUMMYGBE	0x1f42	C2000 Ethernet(Dummy function)
 product INTEL C2000_25GBE	0x1f45	C2000 Ethernet(2.5Gbe)
 product INTEL XEONSC_UBOX_0	0x2014	Xeon Scalable Ubox
-product INTEL XEONSC_UBOX_1	0x2016	Xeon Scalable Ubox
+product INTEL XEONSC_UBOX_1	0x2015	Xeon Scalable Ubox
+product INTEL XEONSC_UBOX_2	0x2016	Xeon Scalable Ubox
+product INTEL XEONSC_M2PCIR	0x2018	Xeon Scalable M2PCI
+product INTEL XEONSC_CBDMAR	0x2021	Xeon Scalable CBDMA
+product INTEL XEONSC_MMVTD	0x2024	Xeon Scalable MM/Vt-d
+product INTEL XEONSC_RAS	0x2025	Xeon Scalable RAS
+product INTEL XEONSC_IOAPIC	0x2026	Xeon Scalable I/O APIC
+product INTEL XEONSC_VTD	0x2034	Xeon Scalable VT-d
+product INTEL XEONSC_RAS	0x2035	Xeon Scalable RAS
+product INTEL XEONSC_IOAPIC_C	0x2036	Xeon Scalable IOxAPIC
+product INTEL XEONSC_IMC_1	0x2041	Xeon Scalable IMC
+product INTEL XEONSC_IMC_2	0x2042	Xeon Scalable IMC
+product INTEL XEONSC_IMC_3	0x2043  Xeon Scalable IMC
+product INTEL XEONSC_IMC_4	0x2044  Xeon Scalable IMC
+product INTEL XEONSC_LMC_1	0x2045  Xeon Scalable LM
+product INTEL XEONSC_LMSC_1	0x2046  Xeon Scalable LMS
+product INTEL XEONSC_LMDPC_1	0x2047  Xeon Scalable LMDP
+product INTEL XEONSC_DECSC_1	0x2048  Xeon Scalable DECS
+product INTEL XEONSC_LMC_2	0x2049  Xeon Scalable LM
+product INTEL XEONSC_LMSC_2	0x204a	Xeon Scalable LMS
+product INTEL XEONSC_LMDPC_2	0x204b	Xeon Scalable LMDP
+product INTEL XEONSC_M3KTI_1	0x204c	Xeon Scalable M3KTI
+product INTEL XEONSC_M3KTI_2	0x204d	Xeon Scalable M3KTI
+product INTEL XEONSC_CHA_1	0x2054	Xeon Scalable CHA
+product INTEL XEONSC_CHA_2	0x2055	Xeon Scalable CHA
+product INTEL XEONSC_CHA_3	0x2056	Xeon Scalable CHA
+product INTEL XEONSC_CHA_4	0x2057	Xeon Scalable CHA
+product INTEL XEONSC_KTI	0x2058	Xeon Scalable KTI
+product INTEL XEONSC_UPIR	0x2059	Xeon Scalable UPI
 product INTEL XEONSC_PCU_0	0x2080	Xeon Scalable PCU
-product INTEL XEONSC_PCU_1	0x2082	Xeon Scalable PCU
+product	INTEL XEONSC_PCU_1	0x2081  Xeon Scalable PCU
+product INTEL XEONSC_PCU_2	0x2082	Xeon Scalable PCU
+product INTEL XEONSC_CHA_5	0x208d	Xeon Scalable CHA
+product INTEL XEONSC_CHA_6	0x208e	Xeon Scalable CHA
 product INTEL BSW_HB		0x2280	Braswell Soc Transaction Router
 product INTEL BSW_HDA		0x2284	Braswell HD Audio
 product INTEL BSW_SIO_DMA_2	0x2286	Braswell SIO DMA



CVS commit: src/sys/dev/pci

2022-05-04 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Wed May  4 06:42:43 UTC 2022

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

Log Message:
More Xeon Scalable / Skylake-E devices


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

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