CVS commit: src/usr.sbin/bta2dpd/bta2dpd

2023-06-21 Thread Nathanial Sloss
Module Name:src
Committed By:   nat
Date:   Thu Jun 22 01:35:12 UTC 2023

Modified Files:
src/usr.sbin/bta2dpd/bta2dpd: bta2dpd.8

Log Message:
Bump date for previous commit.

XXX pullup-10.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.8

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



CVS commit: src/usr.sbin/bta2dpd/bta2dpd

2023-06-21 Thread Nathanial Sloss
Module Name:src
Committed By:   nat
Date:   Thu Jun 22 01:35:12 UTC 2023

Modified Files:
src/usr.sbin/bta2dpd/bta2dpd: bta2dpd.8

Log Message:
Bump date for previous commit.

XXX pullup-10.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.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/bta2dpd/bta2dpd/bta2dpd.8
diff -u src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.8:1.7 src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.8:1.8
--- src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.8:1.7	Tue Jun 20 03:24:08 2023
+++ src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.8	Thu Jun 22 01:35:12 2023
@@ -1,4 +1,4 @@
-.\"	$NetBSD: bta2dpd.8,v 1.7 2023/06/20 03:24:08 nat Exp $
+.\"	$NetBSD: bta2dpd.8,v 1.8 2023/06/22 01:35:12 nat Exp $
 .\"
 .\" Copyright (c) 2015 - 2016  Nathanial Sloss 
 .\" All rights reserved.
@@ -29,7 +29,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd July 27, 2019
+.Dd June 20, 2023
 .Dt BTA2DPD 8
 .Os
 .Sh NAME



CVS commit: othersrc/external/bsd/agcre/dist

2023-06-21 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Wed Jun 21 23:48:08 UTC 2023

Modified Files:
othersrc/external/bsd/agcre/dist: agcre.c agcre.h
othersrc/external/bsd/agcre/dist/tests: 62.expected

Log Message:
agcre version 20230621
==

+ agcre - added internal magic numbers to agcre to attempt to catch
  if misbehaving programs overwrite sections of memory
+ agcre - check internal magic numbers before attempting to execute
  regex programs
+ agcre - bump agcre magic number in the external structure
+ agcre - bump version number in header file. Fix up tests to ensure
  correct operation


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/agcre/dist/agcre.c
cvs rdiff -u -r1.5 -r1.6 othersrc/external/bsd/agcre/dist/agcre.h
cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/agcre/dist/tests/62.expected

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

Modified files:

Index: othersrc/external/bsd/agcre/dist/agcre.c
diff -u othersrc/external/bsd/agcre/dist/agcre.c:1.3 othersrc/external/bsd/agcre/dist/agcre.c:1.4
--- othersrc/external/bsd/agcre/dist/agcre.c:1.3	Fri Feb 24 19:01:10 2023
+++ othersrc/external/bsd/agcre/dist/agcre.c	Wed Jun 21 23:48:08 2023
@@ -159,17 +159,26 @@ typedef struct threadlist_t {
 	re_thread_t	t[1];			/* the threads */
 } threadlist_t;
 
+#define MAGIC1		0xac1deaf0
+#define MAGIC2		0x41525345
+#define MAGIC3		0xd0d0d00d
+#define MAGIC4		0x666f7572
+
 /* regular expression internals */
 typedef struct re_t {
+	uint32_t	 magic1;	/* magic number #1 */
 	instr_t		*prog;		/* start of instructions */
 	uint32_t	 instrc;	/* # of instructions */
 	uint32_t	 gen;		/* generation number */
 	uint32_t	 setc;		/* # of sets */
 	uint32_t	 maxset;	/* allocated # of sets */
+	uint32_t	 magic2;	/* magic number #2 */
 	set_t		*sets;		/* sets */
 	uint32_t	 flags;		/* comp/exec flags */
 	context_t	*ctxlist;	/* list of contexts */
+	uint32_t	 magic3;	/* magic number #3 */
 	instr_t		*pc;		/* prog counter */
+	uint32_t	 magic4;	/* magic number #4 */
 	int		 msgc;		/* # of chars in msg buffer */
 	char		 msg[256];	/* message buffer */
 } re_t;
@@ -2669,6 +2678,22 @@ growspace(char **buf, size_t *size, size
 	return 1;
 }
 
+/* check it was compiled properly */
+static inline int
+good_struct(const agcre_regex_t *agcre)
+{
+	re_t	*re;
+
+	if (agcre == NULL || agcre->re_magic != AGCRE_MAGIC2) {
+		return 0;
+	}
+	if ((re = agcre->re_g) == NULL) {
+		return 0;
+	}
+	return re->magic1 = MAGIC1 && re->magic2 == MAGIC2 &&
+		re->magic3 == MAGIC3 && re->magic4 == MAGIC4;
+}
+
 /***/
 
 /* allocate a new structure and return it */
@@ -2697,7 +2722,13 @@ agcre_regcomp(agcre_regex_t *agcre, cons
 		(agcre_regoff_t)(agcre->re_endp - in.s) :
 		(agcre_regoff_t)strlen(in.s);
 	memset(agcre, 0x0, sizeof(*agcre));
-	agcre->re_g = re = in.re = calloc(1, sizeof(*re));
+	if ((agcre->re_g = re = in.re = calloc(1, sizeof(*re))) == NULL) {
+		return AGCRE_REG_FAILURE;
+	}
+	re->magic1 = MAGIC1;
+	re->magic2 = MAGIC2;
+	re->magic3 = MAGIC3;
+	re->magic4 = MAGIC4;
 	if (in.eo - in.so > AGCRE_MAX_EXPR_LENGTH) {
 		re->msgc = snprintf(re->msg, sizeof(re->msg),
 			"expression length %llu larger than %u",
@@ -2739,7 +2770,7 @@ agcre_regcomp(agcre_regex_t *agcre, cons
 	re->pc->op = OP_MATCH;
 	re->pc += 1;
 	re->instrc = re->pc - re->prog;
-	agcre->re_magic = AGCRE_MAGIC;
+	agcre->re_magic = AGCRE_MAGIC2;
 	if (flags & AGCRE_REG_DUMP) {
 		printprog(re);
 	}
@@ -2757,7 +2788,7 @@ agcre_regerror(int errcode, const agcre_
 	re_t	*re;
 
 	USE_ARG(errcode);
-	if (agcre == NULL || size == 0 || errbuf == NULL) {
+	if (!good_struct(agcre) || size == 0 || errbuf == NULL) {
 		return 0;
 	}
 	re = agcre->re_g;
@@ -2782,15 +2813,15 @@ agcre_regexec(agcre_regex_t *agcre, cons
 	re_t		*re;
 	int		 ret;
 	
-	if (agcre == NULL || vs == NULL || (matchc > 0 && m == NULL)) {
+	if (!good_struct(agcre) || vs == NULL || (matchc > 0 && m == NULL)) {
 		return AGCRE_REG_FAILURE;
 	}
 	if ((re = agcre->re_g) == NULL) {
 		return AGCRE_REG_FAILURE;
 	}
-	if (agcre->re_magic != AGCRE_MAGIC) {
+	if (agcre->re_magic != AGCRE_MAGIC2) {
 		re->msgc = snprintf(re->msg, sizeof(re->msg),
-			"bad magic number 0x%x, not 0x%x", agcre->re_magic, AGCRE_MAGIC);
+			"bad magic number 0x%x, not 0x%x", agcre->re_magic, AGCRE_MAGIC2);
 		return AGCRE_REG_FAILURE;
 	}
 	if (matchc > AGCRE_MAX_SUBEXPR) {
@@ -2942,6 +2973,9 @@ agcre_rev_regexec(agcre_regex_t *agcre, 
 	int		found;
 	int		lastmatch;
 
+	if (!good_struct(agcre) || vs == NULL || (matchc > 0 && m == NULL)) {
+		return AGCRE_REG_FAILURE;
+	}
 	if (flags & AGCRE_REG_STARTEND) {
 		from = m[0].rm_so;
 		to = m[0].r

CVS commit: othersrc/external/bsd/agcre/dist

2023-06-21 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Wed Jun 21 23:48:08 UTC 2023

Modified Files:
othersrc/external/bsd/agcre/dist: agcre.c agcre.h
othersrc/external/bsd/agcre/dist/tests: 62.expected

Log Message:
agcre version 20230621
==

+ agcre - added internal magic numbers to agcre to attempt to catch
  if misbehaving programs overwrite sections of memory
+ agcre - check internal magic numbers before attempting to execute
  regex programs
+ agcre - bump agcre magic number in the external structure
+ agcre - bump version number in header file. Fix up tests to ensure
  correct operation


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/agcre/dist/agcre.c
cvs rdiff -u -r1.5 -r1.6 othersrc/external/bsd/agcre/dist/agcre.h
cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/agcre/dist/tests/62.expected

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



CVS commit: othersrc/external/bsd/elex

2023-06-21 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Wed Jun 21 23:36:17 UTC 2023

Modified Files:
othersrc/external/bsd/elex: TODO
othersrc/external/bsd/elex/dist: Makefile agcre.c agcre.h elex.c elex.h
main.c
othersrc/external/bsd/elex/dist/tests: 28.expected
othersrc/external/bsd/elex/lib: Makefile
Added Files:
othersrc/external/bsd/elex/dist: gap.c gap.h
Removed Files:
othersrc/external/bsd/elex/dist: striter.c striter.h

Log Message:
Elex version 20230621
=

+ agcre - added internal magic numbers to agcre to attempt to catch
  misbehaving programs overwriting sections of memory (extremely coarse-
  grained checks here).
+ agcre - check internal magic numbers before attempting to execute
  regex programs
+ agcre - bump agcre magic number in the external structure
+ elex - remove striter (simple) and move to using buffer gap functions
+ elex - fix a bug whereby we check if a rule has a return value
  before attempting to parse that return value.
+ elex - fix up tests for all of these fixes
+ elex - error out when reading rules if a bad rule is encountered (as
  the resulting lexer would be erroneous if we continued)
+ elex - bump elex version to 20230621


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/elex/TODO
cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/elex/dist/Makefile \
othersrc/external/bsd/elex/dist/agcre.h
cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/elex/dist/agcre.c \
othersrc/external/bsd/elex/dist/elex.c \
othersrc/external/bsd/elex/dist/elex.h \
othersrc/external/bsd/elex/dist/main.c
cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/elex/dist/gap.c \
othersrc/external/bsd/elex/dist/gap.h
cvs rdiff -u -r1.3 -r0 othersrc/external/bsd/elex/dist/striter.c
cvs rdiff -u -r1.2 -r0 othersrc/external/bsd/elex/dist/striter.h
cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/elex/dist/tests/28.expected
cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/elex/lib/Makefile

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

Modified files:

Index: othersrc/external/bsd/elex/TODO
diff -u othersrc/external/bsd/elex/TODO:1.1 othersrc/external/bsd/elex/TODO:1.2
--- othersrc/external/bsd/elex/TODO:1.1	Thu Dec  9 04:15:25 2021
+++ othersrc/external/bsd/elex/TODO	Wed Jun 21 23:36:17 2023
@@ -44,3 +44,5 @@ get line number action
 bookmarks
 clone
 read-defs from read-grammar
+bug fix - test we have an m[6] match before using it as return value
+move from striter to gap functions

Index: othersrc/external/bsd/elex/dist/Makefile
diff -u othersrc/external/bsd/elex/dist/Makefile:1.2 othersrc/external/bsd/elex/dist/Makefile:1.3
--- othersrc/external/bsd/elex/dist/Makefile:1.2	Tue Apr 25 20:03:39 2023
+++ othersrc/external/bsd/elex/dist/Makefile	Wed Jun 21 23:36:17 2023
@@ -1,7 +1,7 @@
 PROG=	elex
 SRCS+=	agcre.c
 SRCS+=	elex.c
-SRCS+=	striter.c
+SRCS+=	gap.c
 SRCS+=	main.c
 MKMAN=	no
 WARNS=	5
Index: othersrc/external/bsd/elex/dist/agcre.h
diff -u othersrc/external/bsd/elex/dist/agcre.h:1.2 othersrc/external/bsd/elex/dist/agcre.h:1.3
--- othersrc/external/bsd/elex/dist/agcre.h:1.2	Wed Feb 22 01:01:39 2023
+++ othersrc/external/bsd/elex/dist/agcre.h	Wed Jun 21 23:36:17 2023
@@ -53,7 +53,7 @@
 #define REG_SUCCESS		AGCRE_REG_SUCCESS
 #define REG_FAILURE		AGCRE_REG_FAILURE
 #define REG_NOMATCH		AGCRE_REG_FAILURE
-#define REG_MAGIC		AGCRE_MAGIC
+#define REG_MAGIC		AGCRE_MAGIC2
 #define REG_MAX_SUBEXPR		AGCRE_MAX_SUBEXPR
 #define REG_MAX_EXPR_LENGTH	AGCRE_MAX_EXPR_LENGTH
 #define REG_ANCHOR		AGCRE_REG_ANCHOR
@@ -89,7 +89,7 @@
 #define AGCRE_REG_SUCCESS	0
 #define AGCRE_REG_FAILURE	1
 
-#define AGCRE_MAGIC		0x20170801
+#define AGCRE_MAGIC2		0x20230621
 
 /* limits we impose on expressions */
 #define AGCRE_MAX_SUBEXPR	100

Index: othersrc/external/bsd/elex/dist/agcre.c
diff -u othersrc/external/bsd/elex/dist/agcre.c:1.3 othersrc/external/bsd/elex/dist/agcre.c:1.4
--- othersrc/external/bsd/elex/dist/agcre.c:1.3	Thu Feb 23 19:36:07 2023
+++ othersrc/external/bsd/elex/dist/agcre.c	Wed Jun 21 23:36:17 2023
@@ -159,17 +159,26 @@ typedef struct threadlist_t {
 	re_thread_t	t[1];			/* the threads */
 } threadlist_t;
 
+#define MAGIC1		0xac1deaf0
+#define MAGIC2		0x41525345
+#define MAGIC3		0xd0d0d00d
+#define MAGIC4		0x666f7572
+
 /* regular expression internals */
 typedef struct re_t {
+	uint32_t	 magic1;	/* magic number #1 */
 	instr_t		*prog;		/* start of instructions */
 	uint32_t	 instrc;	/* # of instructions */
 	uint32_t	 gen;		/* generation number */
 	uint32_t	 setc;		/* # of sets */
 	uint32_t	 maxset;	/* allocated # of sets */
+	uint32_t	 magic2;	/* magic number #2 */
 	set_t		*sets;		/* sets */
 	uint32_t	 flags;		/* comp/exec flags */
 	context_t	*ctxlist;	/* list of contexts */
+	uint32_t	 magic3;	/* magic number #3 */
 	instr_t		*pc;		/* prog counter */
+	uint32_t	 magic4;	/* magic number #4 */
 	int		 msgc

CVS commit: othersrc/external/bsd/elex

2023-06-21 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Wed Jun 21 23:36:17 UTC 2023

Modified Files:
othersrc/external/bsd/elex: TODO
othersrc/external/bsd/elex/dist: Makefile agcre.c agcre.h elex.c elex.h
main.c
othersrc/external/bsd/elex/dist/tests: 28.expected
othersrc/external/bsd/elex/lib: Makefile
Added Files:
othersrc/external/bsd/elex/dist: gap.c gap.h
Removed Files:
othersrc/external/bsd/elex/dist: striter.c striter.h

Log Message:
Elex version 20230621
=

+ agcre - added internal magic numbers to agcre to attempt to catch
  misbehaving programs overwriting sections of memory (extremely coarse-
  grained checks here).
+ agcre - check internal magic numbers before attempting to execute
  regex programs
+ agcre - bump agcre magic number in the external structure
+ elex - remove striter (simple) and move to using buffer gap functions
+ elex - fix a bug whereby we check if a rule has a return value
  before attempting to parse that return value.
+ elex - fix up tests for all of these fixes
+ elex - error out when reading rules if a bad rule is encountered (as
  the resulting lexer would be erroneous if we continued)
+ elex - bump elex version to 20230621


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/elex/TODO
cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/elex/dist/Makefile \
othersrc/external/bsd/elex/dist/agcre.h
cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/elex/dist/agcre.c \
othersrc/external/bsd/elex/dist/elex.c \
othersrc/external/bsd/elex/dist/elex.h \
othersrc/external/bsd/elex/dist/main.c
cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/elex/dist/gap.c \
othersrc/external/bsd/elex/dist/gap.h
cvs rdiff -u -r1.3 -r0 othersrc/external/bsd/elex/dist/striter.c
cvs rdiff -u -r1.2 -r0 othersrc/external/bsd/elex/dist/striter.h
cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/elex/dist/tests/28.expected
cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/elex/lib/Makefile

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



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

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:36:46 UTC 2023

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

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #211):

sys/dev/mii/mii_physubr.c: revision 1.103

Fix a bug when a media is changed to IFM_AUTO.

 Fix a bug that ifconfig ifN media auto doesn't change the setting when
the previous media setting used autonego. When the mii_phy_setmedia()
function is called to change the media to IFM_AUTO, the BMCR_AUTOEN bit was
used to check if the previous setting was IFM_AUTO. It's not correct.

IFM_1000_T also uses autonego. So if a previous setting is IFM_1000_T and
the next setting is IFM_AUTO, mii_phy_auto() is not called if neither
MIIF_FORCEANEG nor MIIF_DOPAUSE are set. As a result, after changing
IFM_AUTO, neither 10Mbps nor 100Mbps are not advertised.

Note that almost all drivers uses MIIF_DOPAUSE flags.

TODO: cleanup ciphy.c and rgephy.c. Those have #ifdef foo.


To generate a diff of this commit:
cvs rdiff -u -r1.101.4.1 -r1.101.4.2 src/sys/dev/mii/mii_physubr.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/mii/mii_physubr.c
diff -u src/sys/dev/mii/mii_physubr.c:1.101.4.1 src/sys/dev/mii/mii_physubr.c:1.101.4.2
--- src/sys/dev/mii/mii_physubr.c:1.101.4.1	Wed Jun 21 22:11:29 2023
+++ src/sys/dev/mii/mii_physubr.c	Wed Jun 21 22:36:46 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: mii_physubr.c,v 1.101.4.1 2023/06/21 22:11:29 martin Exp $	*/
+/*	$NetBSD: mii_physubr.c,v 1.101.4.2 2023/06/21 22:36:46 martin Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.101.4.1 2023/06/21 22:11:29 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.101.4.2 2023/06/21 22:36:46 martin Exp $");
 
 #include 
 #include 
@@ -138,22 +138,14 @@ mii_phy_setmedia(struct mii_softc *sc)
 {
 	struct mii_data *mii = sc->mii_pdata;
 	struct ifmedia_entry *ife = mii->mii_media.ifm_cur;
+	u_int subtype;
 	uint16_t bmcr, anar, gtcr;
 
 	KASSERT(mii_locked(mii));
 
-	if (IFM_SUBTYPE(ife->ifm_media) == IFM_AUTO) {
-		/*
-		 * Force renegotiation if MIIF_DOPAUSE.
-		 *
-		 * XXX This is only necessary because many NICs don't
-		 * XXX advertise PAUSE capabilities at boot time.  Maybe
-		 * XXX we should force this only once?
-		 */
-		PHY_READ(sc, MII_BMCR, );
-		if ((bmcr & BMCR_AUTOEN) == 0 ||
-		(sc->mii_flags & (MIIF_FORCEANEG | MIIF_DOPAUSE)))
-			(void) mii_phy_auto(sc);
+	subtype = IFM_SUBTYPE(ife->ifm_media);
+	if ((subtype == IFM_AUTO) || (subtype == IFM_1000_T)) {
+		(void) mii_phy_auto(sc);
 		return;
 	}
 
@@ -169,7 +161,7 @@ mii_phy_setmedia(struct mii_softc *sc)
 	gtcr = mii_media_table[ife->ifm_data].mm_gtcr;
 
 	if (mii->mii_media.ifm_media & IFM_ETH_MASTER) {
-		switch (IFM_SUBTYPE(ife->ifm_media)) {
+		switch (subtype) {
 		case IFM_1000_T:
 			gtcr |= GTCR_MAN_MS | GTCR_ADV_MS;
 			break;
@@ -198,10 +190,7 @@ mii_phy_setmedia(struct mii_softc *sc)
 	PHY_WRITE(sc, MII_ANAR, anar);
 	if (sc->mii_flags & MIIF_HAVE_GTCR)
 		PHY_WRITE(sc, MII_100T2CR, gtcr);
-	if (IFM_SUBTYPE(ife->ifm_media) == IFM_1000_T)
-		mii_phy_auto(sc);
-	else
-		PHY_WRITE(sc, MII_BMCR, bmcr);
+	PHY_WRITE(sc, MII_BMCR, bmcr);
 }
 
 /* Setup autonegotiation and start it. */



CVS commit: [netbsd-10] src/doc

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:39:15 UTC 2023

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

Log Message:
Tickets #196 - #198, #200 - #211


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.70 -r1.1.2.71 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.70 src/doc/CHANGES-10.0:1.1.2.71
--- src/doc/CHANGES-10.0:1.1.2.70	Tue Jun 20 23:46:41 2023
+++ src/doc/CHANGES-10.0	Wed Jun 21 22:39:15 2023
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-10.0,v 1.1.2.70 2023/06/20 23:46:41 snj Exp $
+# $NetBSD: CHANGES-10.0,v 1.1.2.71 2023/06/21 22:39:15 martin Exp $
 
 A complete list of changes from the initial NetBSD 10.0 branch on 2022-12-16
 until the 10.0 release:
@@ -2113,3 +2113,132 @@ xsrc/external/mit/libX11/dist/src/xlibi1
 	update to libX11 1.8.6.  fixes CVE-2023-3138.
 	[mrg, ticket #199]
 
+etc/rc.d/sshd	1.33-1.36
+
+	- Add check cmd to run `sshd -t' and use it as reload precmd.
+	- Use default curve for ECDSA keygen.   
+	- Stop generating DSA host keys.
+	- Adjust grammar.
+	[kim, ticket #196]
+
+share/man/man9/vnodeops.9			1.101
+sys/dev/raidframe/rf_netbsdkintf.c		1.412
+sys/kern/vnode_if.src1.85
+sys/ufs/ffs/ffs_vfsops.c			1.381
+sys/kern/vnode_if.c(regen)
+sys/rump/include/rump/rumpvnode_if.h		(regen)
+sys/rump/librump/rumpvfs/rumpvnode_if.c		(regen)
+sys/sys/vnode_if.h(regen)
+
+	PR 57450: fix locking for VOP_IOCTL(.
+	[hannken, ticket #197]
+
+sys/arch/x86/pci/amdsmn.c			1.16
+sys/arch/x86/pci/amdzentemp.c			1.17,1.18
+
+	amdsmn(4),amdzentemp(4): Add Zen3+ Rembrandt(19h/4xh) &
+	Zen4 Genoa(19h/1xh).
+	[msaitoh, ticket #198]
+
+sys/arch/x86/include/specialreg.h		1.202,1.203
+usr.sbin/cpuctl/arch/i386.c			1.136
+
+	Add some CPUID bits for AMD.
+	[msaitoh, ticket #200]
+
+sys/arch/vax/include/trap.h			1.25
+sys/arch/vax/vax/pmap.c1.196
+
+	vax: handle 512MB RAM machines.
+	[abs, ticket #201]
+
+sys/dev/pci/ixgbe/ixgbe.c			1.325,1.326
+sys/dev/pci/ixgbe/ixgbe_common.c		1.44
+sys/dev/pci/ixgbe/ixgbe_type.h			1.56
+
+	- PCI device ID 0x15c8 also uses X557-AT PHY, so create the thermal
+	  sensor sysctl for it, too.
+	- Count the number of link down events in the MAC using with
+	  LINK_DN_CNT register.
+	[msaitoh, ticket #202]
+
+sys/arch/x86/x86/procfs_machdep.c		1.47
+
+	x86 procfs: add Intel lam and AMD vnmi.
+	[msaitoh, ticket #203]
+
+sys/compat/linux32/arch/amd64/linux32_machdep.c	1.48
+sys/compat/ossaudio/ossaudio.c			1.85
+sys/compat/sunos32/sunos32_misc.c		1.86
+
+	compat_sunos32, compat_ossaudio, linux32_rt_sendsig:
+	memset zero before copyout.
+	[riastradh, ticket #204]
+
+etc/pam.d/display_manager			1.6
+etc/pam.d/ftpd	1.8
+etc/pam.d/sshd	1.10
+etc/pam.d/su	1.9
+etc/pam.d/system1.9
+
+	pam: Disable pam_krb5, pam_ksu by default.
+	[riastradh, ticket #205]
+
+lib/libpam/modules/pam_krb5/pam_krb5.8		1.13
+lib/libpam/modules/pam_krb5/pam_krb5.c		1.31
+
+	pam_krb5: Refuse to operate without a key to verify tickets.
+	[riastradh, ticket #206]
+
+lib/libpam/modules/pam_ksu/pam_ksu.c		1.10
+
+	pam_ksu: No need for homedir access.
+	[riastradh, ticket #207]
+
+sys/dev/mii/atphy.c1.31
+sys/dev/mii/brgphy.c1.91
+sys/dev/mii/ciphy.c1.42
+sys/dev/mii/ipgphy.c1.11
+sys/dev/mii/jmphy.c1.5
+sys/dev/mii/mii_physubr.c			1.102
+sys/dev/mii/tlphy.c1.72
+sys/dev/mii/urlphy.c1.40
+
+	mii(4): retry autonegotiation every mii_anegticks seconds
+	instead of mii_anegticks+1.
+	[msaitoh, ticket #208]
+
+sys/dev/pci/pcidevs1.1478-1.1480
+sys/dev/pci/pcidevs.h(regen)
+sys/dev/pci/pcidevs_data.h			(regen)
+
+	Add Samsung SM990.
+	Add devices from PPR for AMD Family 19h Model 61h Revision B1
+	processors.
+	The SATA device ID for Apollo Lake is not 0x5ae0 but 0x5ae3.
+	[msaitoh, ticket #209]
+
+sys/dev/tprof/tprof.c1.23
+sys/dev/tprof/tprof_armv7.c			1.13
+sys/dev/tprof/tprof_armv8.c			1.20
+sys/dev/tprof/tprof_types.h			1.7
+sys/dev/tprof/tprof_x86_amd.c			1.8
+sys/dev/tprof/tprof_x86_intel.c			1.6-1.8
+usr.sbin/tprof/arch/tprof_x86.c			1.16,1.17
+usr.sbin/tprof/tprof.81.25-1.30
+usr.sbin/tprof/tprof.c1.21
+usr.sbin/tprof/tprof.h1.5
+usr.sbin/tprof/tprof_top.c			1.9
+
+	tprof(8):
+	- Add Cometlake support.
+	- Get the number of general counters from CPUID 0xa on Intel.
+	- Use the default counter if -e argument is not specified.
+	[msaitoh, ticket #210]
+
+sys/dev/mii/mii_physubr.c			1.103
+
+	Fix a bug that changing a media from IFM_1000_T to IFM_AUTO doesn't
+	work correctly on a interface which has no MIIF_DOPAUSE flag.
+	[msaitoh, ticket #211]
+



CVS commit: [netbsd-10] src/doc

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:39:15 UTC 2023

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

Log Message:
Tickets #196 - #198, #200 - #211


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.70 -r1.1.2.71 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/mii

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:36:46 UTC 2023

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

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #211):

sys/dev/mii/mii_physubr.c: revision 1.103

Fix a bug when a media is changed to IFM_AUTO.

 Fix a bug that ifconfig ifN media auto doesn't change the setting when
the previous media setting used autonego. When the mii_phy_setmedia()
function is called to change the media to IFM_AUTO, the BMCR_AUTOEN bit was
used to check if the previous setting was IFM_AUTO. It's not correct.

IFM_1000_T also uses autonego. So if a previous setting is IFM_1000_T and
the next setting is IFM_AUTO, mii_phy_auto() is not called if neither
MIIF_FORCEANEG nor MIIF_DOPAUSE are set. As a result, after changing
IFM_AUTO, neither 10Mbps nor 100Mbps are not advertised.

Note that almost all drivers uses MIIF_DOPAUSE flags.

TODO: cleanup ciphy.c and rgephy.c. Those have #ifdef foo.


To generate a diff of this commit:
cvs rdiff -u -r1.101.4.1 -r1.101.4.2 src/sys/dev/mii/mii_physubr.c

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



CVS commit: [netbsd-10] src

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:34:51 UTC 2023

Modified Files:
src/sys/dev/tprof [netbsd-10]: tprof.c tprof_armv7.c tprof_armv8.c
tprof_types.h tprof_x86_amd.c tprof_x86_intel.c
src/usr.sbin/tprof [netbsd-10]: tprof.8 tprof.c tprof.h tprof_top.c
src/usr.sbin/tprof/arch [netbsd-10]: tprof_x86.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #210):

usr.sbin/tprof/tprof.8: revision 1.30
sys/dev/tprof/tprof_x86_amd.c: revision 1.8
sys/dev/tprof/tprof_armv8.c: revision 1.20
sys/dev/tprof/tprof_types.h: revision 1.7
sys/dev/tprof/tprof_x86_intel.c: revision 1.6
sys/dev/tprof/tprof_x86_intel.c: revision 1.7
sys/dev/tprof/tprof_x86_intel.c: revision 1.8
sys/dev/tprof/tprof.c: revision 1.23
usr.sbin/tprof/tprof.8: revision 1.25
usr.sbin/tprof/tprof.8: revision 1.26
usr.sbin/tprof/arch/tprof_x86.c: revision 1.16
usr.sbin/tprof/tprof.8: revision 1.27
usr.sbin/tprof/arch/tprof_x86.c: revision 1.17
usr.sbin/tprof/tprof.8: revision 1.28
usr.sbin/tprof/tprof.h: revision 1.5
usr.sbin/tprof/tprof.8: revision 1.29
sys/dev/tprof/tprof_armv7.c: revision 1.13
usr.sbin/tprof/tprof_top.c: revision 1.9
usr.sbin/tprof/tprof.c: revision 1.21

Add Cometlake support.

Obtain the number of general counters from CPUID 0xa.

Test cpuid_level in tprof_intel_ncounters().
This function is called before tprof_intel_ident().

KNF. No functional change.

Add two note to the tprof(8)'s manual page.
 - "list" command prints the maximum number of counters that can be used
   simultaneously.
 - multiple -e arguments can be specified.

Use the default counter if -e argument is not specified.
 monitor command:
 The default counter is selected if -e argument is not specified.
 list command:
 Print the name of the default counter for monitor and top command.

tprof.8: new sentence, new line

tprof(8): fix markup nits

tprof.8: fix typo, s/speficied/specified/


To generate a diff of this commit:
cvs rdiff -u -r1.21.2.1 -r1.21.2.2 src/sys/dev/tprof/tprof.c
cvs rdiff -u -r1.11.2.1 -r1.11.2.2 src/sys/dev/tprof/tprof_armv7.c
cvs rdiff -u -r1.18.2.1 -r1.18.2.2 src/sys/dev/tprof/tprof_armv8.c
cvs rdiff -u -r1.6 -r1.6.2.1 src/sys/dev/tprof/tprof_types.h
cvs rdiff -u -r1.7 -r1.7.2.1 src/sys/dev/tprof/tprof_x86_amd.c
cvs rdiff -u -r1.5 -r1.5.2.1 src/sys/dev/tprof/tprof_x86_intel.c
cvs rdiff -u -r1.24 -r1.24.2.1 src/usr.sbin/tprof/tprof.8
cvs rdiff -u -r1.18.2.1 -r1.18.2.2 src/usr.sbin/tprof/tprof.c
cvs rdiff -u -r1.4 -r1.4.2.1 src/usr.sbin/tprof/tprof.h
cvs rdiff -u -r1.7.2.1 -r1.7.2.2 src/usr.sbin/tprof/tprof_top.c
cvs rdiff -u -r1.15 -r1.15.2.1 src/usr.sbin/tprof/arch/tprof_x86.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/tprof/tprof.c
diff -u src/sys/dev/tprof/tprof.c:1.21.2.1 src/sys/dev/tprof/tprof.c:1.21.2.2
--- src/sys/dev/tprof/tprof.c:1.21.2.1	Fri Dec 23 08:09:48 2022
+++ src/sys/dev/tprof/tprof.c	Wed Jun 21 22:34:51 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: tprof.c,v 1.21.2.1 2022/12/23 08:09:48 martin Exp $	*/
+/*	$NetBSD: tprof.c,v 1.21.2.2 2023/06/21 22:34:51 martin Exp $	*/
 
 /*-
  * Copyright (c)2008,2009,2010 YAMAMOTO Takashi,
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tprof.c,v 1.21.2.1 2022/12/23 08:09:48 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tprof.c,v 1.21.2.2 2023/06/21 22:34:51 martin Exp $");
 
 #include 
 #include 
@@ -213,7 +213,7 @@ tprof_worker(struct work *wk, void *dumm
 	KASSERT(dummy == NULL);
 
 	/*
-	 * get a per cpu buffer.
+	 * Get a per cpu buffer.
 	 */
 	buf = tprof_buf_refresh();
 
@@ -245,12 +245,11 @@ tprof_worker(struct work *wk, void *dumm
 		tprof_stat.ts_dropbuf++;
 	}
 	mutex_exit(_lock);
-	if (buf) {
+	if (buf)
 		tprof_buf_free(buf);
-	}
-	if (!shouldstop) {
+
+	if (!shouldstop)
 		callout_schedule(>c_callout, hz / 8);
-	}
 }
 
 static void
@@ -276,9 +275,9 @@ tprof_stop1(void)
 		tprof_buf_t *old;
 
 		old = tprof_buf_switch(c, NULL);
-		if (old != NULL) {
+		if (old != NULL)
 			tprof_buf_free(old);
-		}
+
 		callout_destroy(>c_callout);
 	}
 	workqueue_destroy(tprof_wq);
@@ -293,9 +292,8 @@ tprof_getinfo(struct tprof_info *info)
 
 	memset(info, 0, sizeof(*info));
 	info->ti_version = TPROF_VERSION;
-	if ((tb = tprof_backend) != NULL) {
+	if ((tb = tprof_backend) != NULL)
 		info->ti_ident = tb->tb_ops->tbo_ident();
-	}
 }
 
 static int
@@ -351,8 +349,8 @@ tprof_start(tprof_countermask_t runmask)
 	runmask &= tb->tb_softc.sc_ctr_configured_mask;
 	if (runmask == 0) {
 		/*
-		 * targets are already running.
-		 * unconfigured counters are ignored.
+		 * Targets are already running.
+		 * Unconfigured counters are ignored.
 		 */
 		error = 0;
 		goto done;
@@ -427,7 +425,7 @@ tprof_stop(tprof_countermask_t stopmask)
 	

CVS commit: [netbsd-10] src

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:34:51 UTC 2023

Modified Files:
src/sys/dev/tprof [netbsd-10]: tprof.c tprof_armv7.c tprof_armv8.c
tprof_types.h tprof_x86_amd.c tprof_x86_intel.c
src/usr.sbin/tprof [netbsd-10]: tprof.8 tprof.c tprof.h tprof_top.c
src/usr.sbin/tprof/arch [netbsd-10]: tprof_x86.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #210):

usr.sbin/tprof/tprof.8: revision 1.30
sys/dev/tprof/tprof_x86_amd.c: revision 1.8
sys/dev/tprof/tprof_armv8.c: revision 1.20
sys/dev/tprof/tprof_types.h: revision 1.7
sys/dev/tprof/tprof_x86_intel.c: revision 1.6
sys/dev/tprof/tprof_x86_intel.c: revision 1.7
sys/dev/tprof/tprof_x86_intel.c: revision 1.8
sys/dev/tprof/tprof.c: revision 1.23
usr.sbin/tprof/tprof.8: revision 1.25
usr.sbin/tprof/tprof.8: revision 1.26
usr.sbin/tprof/arch/tprof_x86.c: revision 1.16
usr.sbin/tprof/tprof.8: revision 1.27
usr.sbin/tprof/arch/tprof_x86.c: revision 1.17
usr.sbin/tprof/tprof.8: revision 1.28
usr.sbin/tprof/tprof.h: revision 1.5
usr.sbin/tprof/tprof.8: revision 1.29
sys/dev/tprof/tprof_armv7.c: revision 1.13
usr.sbin/tprof/tprof_top.c: revision 1.9
usr.sbin/tprof/tprof.c: revision 1.21

Add Cometlake support.

Obtain the number of general counters from CPUID 0xa.

Test cpuid_level in tprof_intel_ncounters().
This function is called before tprof_intel_ident().

KNF. No functional change.

Add two note to the tprof(8)'s manual page.
 - "list" command prints the maximum number of counters that can be used
   simultaneously.
 - multiple -e arguments can be specified.

Use the default counter if -e argument is not specified.
 monitor command:
 The default counter is selected if -e argument is not specified.
 list command:
 Print the name of the default counter for monitor and top command.

tprof.8: new sentence, new line

tprof(8): fix markup nits

tprof.8: fix typo, s/speficied/specified/


To generate a diff of this commit:
cvs rdiff -u -r1.21.2.1 -r1.21.2.2 src/sys/dev/tprof/tprof.c
cvs rdiff -u -r1.11.2.1 -r1.11.2.2 src/sys/dev/tprof/tprof_armv7.c
cvs rdiff -u -r1.18.2.1 -r1.18.2.2 src/sys/dev/tprof/tprof_armv8.c
cvs rdiff -u -r1.6 -r1.6.2.1 src/sys/dev/tprof/tprof_types.h
cvs rdiff -u -r1.7 -r1.7.2.1 src/sys/dev/tprof/tprof_x86_amd.c
cvs rdiff -u -r1.5 -r1.5.2.1 src/sys/dev/tprof/tprof_x86_intel.c
cvs rdiff -u -r1.24 -r1.24.2.1 src/usr.sbin/tprof/tprof.8
cvs rdiff -u -r1.18.2.1 -r1.18.2.2 src/usr.sbin/tprof/tprof.c
cvs rdiff -u -r1.4 -r1.4.2.1 src/usr.sbin/tprof/tprof.h
cvs rdiff -u -r1.7.2.1 -r1.7.2.2 src/usr.sbin/tprof/tprof_top.c
cvs rdiff -u -r1.15 -r1.15.2.1 src/usr.sbin/tprof/arch/tprof_x86.c

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



CVS commit: src/doc

2023-06-21 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Wed Jun 21 22:30:52 UTC 2023

Modified Files:
src/doc: 3RDPARTY

Log Message:
3RDPARTY: new versions of libuv, unbound, and nsd out


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

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1931 src/doc/3RDPARTY:1.1932
--- src/doc/3RDPARTY:1.1931	Mon Jun 19 21:44:37 2023
+++ src/doc/3RDPARTY	Wed Jun 21 22:30:52 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1931 2023/06/19 21:44:37 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1932 2023/06/21 22:30:52 gutteridge Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -152,11 +152,11 @@ Notes:
 
 Package:	libuv
 Version:	1.44.2
-Current Vers:	1.44.2
+Current Vers:	1.45.0
 Maintainer:	libuv
 Archive Site:	https://dist.libuv.org/dist/
 Home Page:	https://libuv.org
-Date:		2022-09-22
+Date:		2023-06-21
 Mailing List:	https://groups.google.com/forum/#!forum/libuv
 Responsible:	christos
 License:	mit
@@ -165,11 +165,11 @@ Notes:
 
 Package:	unbound
 Version:	1.16.3
-Current Vers:	1.16.3
+Current Vers:	1.17.1
 Maintainer:	Nlnetlabs
 Archive Site:	https://www.unbound.net/downloads/unbound-latest.tar.gz
 Home Page:	https://www.unbound.net/
-Date:		2022-09-24
+Date:		2023-06-21
 Mailing List:	https://unbound.nlnetlabs.nl/mailman/listinfo/unbound-users
 Responsible:	christos
 License:	BSD-like
@@ -180,11 +180,11 @@ run configure and update config files in
 
 Package:	nsd
 Version:	4.6.0
-Current Vers:	4.6.0
+Current Vers:	4.7.0
 Maintainer:	Nlnetlabs
 Archive Site:	https://www.nlnetlabs.nl/svn/nsd/
 Home Page:	https://www.nlnetlabs.nl/projects/nsd/
-Date:		2022-09-24
+Date:		2023-06-21
 Mailing List:	https://open.nlnetlabs.nl/mailman/listinfo/nsd-users/
 Responsible:	christos
 License:	BSD-like



CVS commit: src/doc

2023-06-21 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Wed Jun 21 22:30:52 UTC 2023

Modified Files:
src/doc: 3RDPARTY

Log Message:
3RDPARTY: new versions of libuv, unbound, and nsd out


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

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



CVS commit: [netbsd-8] src/doc

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:30:39 UTC 2023

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

Log Message:
Tickets #1825, #1827 - #1831, #1833, #1835 - #1846


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.177 -r1.1.2.178 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.177 src/doc/CHANGES-8.3:1.1.2.178
--- src/doc/CHANGES-8.3:1.1.2.177	Tue Jun 20 23:03:39 2023
+++ src/doc/CHANGES-8.3	Wed Jun 21 22:30:39 2023
@@ -1,4 +1,4 @@
- $NetBSD: CHANGES-8.3,v 1.1.2.177 2023/06/20 23:03:39 snj Exp $
+ $NetBSD: CHANGES-8.3,v 1.1.2.178 2023/06/21 22:30:39 martin Exp $
 
 A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3
 release:
@@ -3335,3 +3335,189 @@ xsrc/external/mit/libX11/dist/src/InitEx
 	Fixes CVE-2023-3138.
 	[mrg, ticket #1826]
 
+sys/arch/x86/pci/amdsmn.c			1.16
+sys/arch/x86/pci/amdzentemp.c			1.17,1.18
+
+	amdsmn(4),amdzentemp(4): Add Zen3+ Rembrandt(19h/4xh) &
+	Zen4 Genoa(19h/1xh).
+	[msaitoh, ticket #1825]
+
+sys/arch/x86/include/specialreg.h		1.202,1.203
+usr.sbin/cpuctl/arch/i386.c			1.136
+
+	Add some CPUID bits for AMD.
+	[msaitoh, ticket #1827]
+
+sys/arch/vax/include/trap.h			1.25
+sys/arch/vax/vax/pmap.c1.196
+
+	vax: handle 512MB RAM machines.
+	[abs, ticket #1829]
+
+sys/dev/pci/ixgbe/ixgbe.c			1.325,1.326
+sys/dev/pci/ixgbe/ixgbe_common.c		1.44
+sys/dev/pci/ixgbe/ixgbe_type.h			1.56
+
+	- PCI device ID 0x15c8 also uses X557-AT PHY, so create the thermal
+	  sensor sysctl for it, too.
+	- Count the number of link down events in the MAC using with
+	  LINK_DN_CNT register.
+	[msaitoh, ticket #1828]
+
+sys/arch/x86/x86/procfs_machdep.c		1.47
+
+	x86 procfs: add Intel lam and AMD vnmi.
+	[msaitoh, ticket #1830]
+
+sys/altq/altq_hfsc.c1.29
+sys/altq/altq_priq.c1.27
+
+	sys/altq: memset zero before copyout.
+	[riastradh, ticket #1831]
+
+sys/compat/netbsd32/netbsd32.h			1.137
+sys/compat/netbsd32/netbsd32_conv.h		1.45
+sys/compat/netbsd32/netbsd32_fs.c		1.92
+sys/compat/netbsd32/netbsd32_netbsd.c		1.232
+sys/compat/netbsd32/netbsd32_socket.c		1.56
+
+	compat_netbsd32: clamp buffer sizes to NETBSD32_SSIZE_MAX.
+	Fixes ATF lib/libc/sys/t_write:write_err.
+	[riastradh, ticket #1833]
+
+sys/dev/isa/mcd.c1.121 (patch)
+sys/dev/pci/if_iwi.c1.117 (patch)
+sys/dev/raidframe/rf_netbsdkintf.c		1.401 (patch)
+sys/dev/scsipi/ses.c1.52 (patch)
+
+	sys/dev: memset zero before copyout.
+	[riastradh, ticket #1835]
+
+sys/compat/common/kern_info_09.c		1.22
+sys/compat/common/kern_info_43.c		1.40
+sys/compat/common/kern_resource_43.c		1.23
+sys/compat/common/kern_sig_13.c			1.22
+sys/compat/common/kern_sig_43.c			1.37
+sys/compat/common/kern_time_50.c		1.37
+sys/compat/common/vfs_syscalls_12.c		1.38
+sys/compat/common/vfs_syscalls_30.c		1.43
+sys/compat/common/vfs_syscalls_43.c		1.68
+sys/compat/freebsd/freebsd_misc.c		1.34
+sys/compat/freebsd/freebsd_sched.c		1.23
+sys/compat/linux/arch/alpha/linux_machdep.c	1.52
+sys/compat/linux/arch/amd64/linux_machdep.c	1.60
+sys/compat/linux/arch/arm/linux_machdep.c	1.34
+sys/compat/linux/arch/arm/linux_ptrace.c	1.23
+sys/compat/linux/arch/i386/linux_machdep.c	1.168
+sys/compat/linux/arch/i386/linux_ptrace.c	1.35
+sys/compat/linux/arch/m68k/linux_machdep.c	1.43
+sys/compat/linux/arch/mips/linux_machdep.c	1.44
+sys/compat/linux/arch/powerpc/linux_exec_powerpc.c 1.25
+sys/compat/linux/arch/powerpc/linux_machdep.c	1.51
+sys/compat/linux/arch/powerpc/linux_ptrace.c	1.33
+sys/compat/linux/common/linux_cdrom.c		1.28
+sys/compat/linux/common/linux_fdio.c		1.14
+sys/compat/linux/common/linux_file.c		1.119
+sys/compat/linux/common/linux_hdio.c		1.19
+sys/compat/linux/common/linux_misc.c		1.252
+sys/compat/linux/common/linux_mtio.c		1.8
+sys/compat/linux/common/linux_oldolduname.c	1.67
+sys/compat/linux/common/linux_olduname.c	1.67
+sys/compat/linux/common/linux_sched.c		1.79
+sys/compat/linux/common/linux_signal.c		1.84
+sys/compat/linux/common/linux_socket.c		1.153
+sys/compat/linux/common/linux_time.c		1.40
+sys/compat/linux32/arch/amd64/linux32_machdep.c	1.46
+sys/compat/linux32/common/linux32_exec_elf32.c	1.20
+sys/compat/linux32/common/linux32_resource.c	1.12
+sys/compat/linux32/common/linux32_signal.c	1.21
+sys/compat/linux32/common/linux32_time.c	1.38
+sys/compat/netbsd32/netbsd32_compat_12.c	1.36
+sys/compat/netbsd32/netbsd32_compat_20.c	1.42
+sys/compat/netbsd32/netbsd32_compat_43.c	1.62
+sys/compat/netbsd32/netbsd32_compat_50.c	1.52
+sys/compat/netbsd32/netbsd32_conv.h		1.46
+sys/compat/netbsd32/netbsd32_nfssvc.c		1.8
+sys/compat/netbsd32/netbsd32_ptrace.c		1.9
+sys/compat/netbsd32/netbsd32_signal.c		1.52
+sys/compat/netbsd32/netbsd32_time.c		1.56
+sys/compat/netbsd32/netbsd32_wait.c		1.25
+sys/compat/ossaudio/ossaudio.c			1.84
+sys/compat/sunos/sunos_ioctl.c			1.71
+sys/compat/sunos/sunos_misc.c			1.177

CVS commit: [netbsd-8] src/doc

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:30:39 UTC 2023

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

Log Message:
Tickets #1825, #1827 - #1831, #1833, #1835 - #1846


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.177 -r1.1.2.178 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/dev/pci

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:27:55 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-8]: pcidevs.h pcidevs_data.h

Log Message:
Regen for ticket #1846


To generate a diff of this commit:
cvs rdiff -u -r1.1281.2.24 -r1.1281.2.25 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1280.2.24 -r1.1280.2.25 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: [netbsd-8] src/sys/dev/pci

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:25:33 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-8]: pcidevs

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1846):

sys/dev/pci/pcidevs: revision 1.1478
sys/dev/pci/pcidevs: revision 1.1479
sys/dev/pci/pcidevs: revision 1.1480

Add Samsung SM990.

Add devices from PPR for AMD Family 19h Model 61h Revision B1 processors.

The SATA device ID for Apollo Lake is not 0x5ae0 but 0x5ae3.


To generate a diff of this commit:
cvs rdiff -u -r1.1289.2.24 -r1.1289.2.25 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.1289.2.24 src/sys/dev/pci/pcidevs:1.1289.2.25
--- src/sys/dev/pci/pcidevs:1.1289.2.24	Wed Jan 18 19:31:43 2023
+++ src/sys/dev/pci/pcidevs	Wed Jun 21 22:25:32 2023
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1289.2.24 2023/01/18 19:31:43 martin Exp $
+$NetBSD: pcidevs,v 1.1289.2.25 2023/06/21 22:25:32 martin Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -1087,6 +1087,19 @@ product AMD F19_1X_PSP		0x14ca	19h/1xh P
 product AMD F19_1X_ACP		0x14cb	19h/1xh ACP
 product AMD F19_1X_HDA		0x14cc	19h/1xh HD Audio
 product AMD F19_6X_RC		0x14d8	19h/6xh Root Complex
+product AMD F19_6X_IOMMU	0x14d9	19h/6xh IOMMU
+product AMD F19_6X_PCIE_DUMMY_HB 0x14da	19h/6xh PCIe Dummy Host Bridge
+product AMD F19_6X_GPPB		0x14db	19h/6xh PCIe GPP Bridge
+product AMD F19_6X_INTNL_GPPB	0x14dd	19h/6xh Internal PCIe GPP Bridge
+product AMD F19_6X_PCIE_DUMMY	0x14de	19h/6xh PCIe Dummy Function
+product AMD F19_6X_DF_0		0x14e0	19h/6xh Data Fabric 0
+product AMD F19_6X_DF_1		0x14e1	19h/6xh Data Fabric 1
+product AMD F19_6X_DF_2		0x14e2	19h/6xh Data Fabric 2
+product AMD F19_6X_DF_3		0x14e3	19h/6xh Data Fabric 3
+product AMD F19_6X_DF_4		0x14e4	19h/6xh Data Fabric 4
+product AMD F19_6X_DF_5		0x14e5	19h/6xh Data Fabric 5
+product AMD F19_6X_DF_6		0x14e6	19h/6xh Data Fabric 6
+product AMD F19_6X_DF_7		0x14e7	19h/6xh Data Fabric 7
 product AMD F17_AX_XHCI_0	0x1503	17h/Axh USB 3.1 xHCI
 product AMD F17_AX_XHCI_1	0x1504	17h/Axh USB 3.1 xHCI
 product AMD F17_AX_USB_BIOM	0x1505	17h/Axh Secure USB BIOmetric
@@ -1135,6 +1148,9 @@ product AMD F15_7X_DRAM		0x15b2	15h/7xh 
 product AMD F15_7X_NB		0x15b3	15h/7xh North Bridge Configuration
 product AMD F15_7X_CSTATE	0x15b4	15h/7xh CPU C-state Configuration
 product AMD F15_7X_MISC		0x15b5	15h/7xh Miscellaneous Configuration
+product AMD F19_6X_XHCI_0	0x15b6	19h/6xh USB 3.1 xHCI
+product AMD F19_6X_XHCI_1	0x15b7	19h/6xh USB 3.1 xHCI
+product AMD F19_6X_USB_BIOM	0x15b8	19h/6xh Secure USB BIOmetric
 product AMD F17_1X_RC		0x15d0	Family17h/1xh Root Complex
 product AMD F17_1X_IOMMU	0x15d1	Family17h/1xh IOMMU
 product AMD F17_1X_PCIE_1	0x15d3	Family17h/1xh PCIe
@@ -1178,6 +1194,7 @@ product AMD F17_9X_HB		0x1645	17h/9xh Ho
 product AMD F17_9X_PCIE_1	0x1647	17h/9xh PCIE
 product AMD F17_9X_PCIE_2	0x1648	17h/9xh PCIE
 product AMD F17_9X_CCP		0x1649	17h/9xh Crypto
+product AMD F19_6X_GFX		0x164e	19h/6xh Internal GPU
 product AMD F17_9X_DF_0		0x1660	17h/9xh Data Fabric
 product AMD F17_9X_DF_1		0x1661	17h/9xh Data Fabric
 product AMD F17_9X_DF_2		0x1662	17h/9xh Data Fabric
@@ -6197,7 +6214,7 @@ product INTEL APL_PCIE_A0	0x5ad8	Apollo 
 product INTEL APL_PCIE_A1	0x5ad9	Apollo Lake PCIe A1
 product INTEL APL_PCIE_A2	0x5ada	Apollo Lake PCIe A2
 product INTEL APL_PCIE_A3	0x5adb	Apollo Lake PCIe A3
-product INTEL APL_SATA		0x5ae0	Apollo Lake SATA
+product INTEL APL_SATA		0x5ae3	Apollo Lake SATA
 product INTEL APL_LPC		0x5ae8	Apollo Lake LPC
 product INTEL APL_SSRAM		0x5aec	Apollo Lake Shared SRAM
 product INTEL APL_UART_3	0x5aee	Apollo Lake UART 3
@@ -9021,6 +9038,7 @@ product SAMSUNGELEC3	SM961		0xa804	SM961
 product SAMSUNGELEC3	SM981		0xa808	SM981 M.2 NVMe SSD
 product SAMSUNGELEC3	SM980		0xa809	SM980 M.2 NVMe SSD
 product SAMSUNGELEC3	PM9A1		0xa80a	PM9A1 M.2 NVMe SSD
+product SAMSUNGELEC3	SM990		0xa80c	SM990 M.2 NVMe SSD
 product SAMSUNGELEC3	171X		0xa820	NVMe SSD Controller 171X
 product SAMSUNGELEC3	172X		0xa821	NVMe SSD Controller 172X
 product SAMSUNGELEC3	172XAB		0xa822	NVMe SSD Controller 172Xa/172Xb



CVS commit: [netbsd-8] src/sys/dev/pci

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:25:33 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-8]: pcidevs

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1846):

sys/dev/pci/pcidevs: revision 1.1478
sys/dev/pci/pcidevs: revision 1.1479
sys/dev/pci/pcidevs: revision 1.1480

Add Samsung SM990.

Add devices from PPR for AMD Family 19h Model 61h Revision B1 processors.

The SATA device ID for Apollo Lake is not 0x5ae0 but 0x5ae3.


To generate a diff of this commit:
cvs rdiff -u -r1.1289.2.24 -r1.1289.2.25 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: [netbsd-9] src/doc

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:24:25 UTC 2023

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

Log Message:
Tickets #1643, #1644, #1646 - #1654


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

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

Modified files:

Index: src/doc/CHANGES-9.4
diff -u src/doc/CHANGES-9.4:1.1.2.69 src/doc/CHANGES-9.4:1.1.2.70
--- src/doc/CHANGES-9.4:1.1.2.69	Thu Jun  8 11:18:12 2023
+++ src/doc/CHANGES-9.4	Wed Jun 21 22:24:25 2023
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.69 2023/06/08 11:18:12 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.70 2023/06/21 22:24:25 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -1487,3 +1487,82 @@ sys/net/route.c	1.237
 	to avoid use-after-free of deleted routes.
 	[ozaki-r, ticket #1642]
 
+etc/rc.d/sshd	1.30,1.33-1.35
+
+	- Add check cmd to run `sshd -t' and use it as reload precmd.
+	- Use default curve for ECDSA keygen.
+	- Stop generating DSA host keys. 
+	[kim, ticket #1643]
+
+sys/arch/x86/pci/amdsmn.c			1.16
+sys/arch/x86/pci/amdzentemp.c			1.17,1.18
+
+	amdsmn(4),amdzentemp(4): Add Zen3+ Rembrandt(19h/4xh) &
+	Zen4 Genoa(19h/1xh).
+	[msaitoh, ticket #1644]
+
+sys/arch/x86/include/specialreg.h		1.202,1.203
+usr.sbin/cpuctl/arch/i386.c			1.136
+
+	Add some CPUID bits for AMD.
+	[msaitoh, ticket #1646]
+
+sys/arch/vax/include/trap.h			1.25
+sys/arch/vax/vax/pmap.c1.196
+
+	vax: handle 512MB RAM machines.
+	[abs, ticket #1648]
+
+sys/dev/pci/ixgbe/ixgbe.c			1.325,1.326
+sys/dev/pci/ixgbe/ixgbe_common.c		1.44
+sys/dev/pci/ixgbe/ixgbe_type.h			1.56
+
+	- PCI device ID 0x15c8 also uses X557-AT PHY, so create the thermal
+	  sensor sysctl for it, too.
+	- Count the number of link down events in the MAC using with
+	  LINK_DN_CNT register.
+	[msaitoh, ticket #1647]
+
+sys/arch/x86/x86/procfs_machdep.c		1.47
+
+	x86 procfs: add Intel lam and AMD vnmi.
+	[msaitoh, ticket #1649]
+
+sys/compat/linux32/arch/amd64/linux32_machdep.c	1.48
+sys/compat/ossaudio/ossaudio.c			1.85
+sys/compat/sunos32/sunos32_misc.c		1.86
+
+	compat_sunos32, compat_ossaudio, linux32_rt_sendsig:
+	memset zero before copyout.
+	[riastradh, ticket #1650]
+
+etc/pam.d/display_manager			1.6
+etc/pam.d/ftpd	1.8
+etc/pam.d/sshd	1.10
+etc/pam.d/su	1.9
+etc/pam.d/system1.9
+
+	pam: Disable pam_krb5, pam_ksu by default.
+	[riastradh, ticket #1651]
+
+lib/libpam/modules/pam_krb5/pam_krb5.8		1.13
+lib/libpam/modules/pam_krb5/pam_krb5.c		1.31
+
+	pam_krb5: Refuse to operate without a key to verify tickets.
+	[riastradh, ticket #1652]
+
+lib/libpam/modules/pam_ksu/pam_ksu.c		1.10
+
+	pam_ksu: No need for homedir access.
+	[riastradh, ticket #1653]
+
+sys/dev/pci/pcidevs1.1478-1.1480
+sys/dev/pci/pcidevs.h(regen)
+sys/dev/pci/pcidevs_data.h			(regen)
+
+	Add Samsung SM990.
+	Add devices from PPR for AMD Family 19h Model 61h Revision B1
+	processors.
+	The SATA device ID for Apollo Lake is not 0x5ae0 but 0x5ae3.
+	[msaitoh, ticket #1654]
+



CVS commit: [netbsd-9] src/doc

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:24:25 UTC 2023

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

Log Message:
Tickets #1643, #1644, #1646 - #1654


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

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



CVS commit: [netbsd-9] src/sys/dev/pci

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:21:57 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-9]: pcidevs.h pcidevs_data.h

Log Message:
Regen for ticket #1654


To generate a diff of this commit:
cvs rdiff -u -r1.1371.2.15 -r1.1371.2.16 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1370.2.15 -r1.1370.2.16 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: [netbsd-9] src/sys/dev/pci

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:20:31 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-9]: pcidevs

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1654):

sys/dev/pci/pcidevs: revision 1.1478
sys/dev/pci/pcidevs: revision 1.1479
sys/dev/pci/pcidevs: revision 1.1480

Add Samsung SM990.

Add devices from PPR for AMD Family 19h Model 61h Revision B1 processors.

The SATA device ID for Apollo Lake is not 0x5ae0 but 0x5ae3.


To generate a diff of this commit:
cvs rdiff -u -r1.1383.2.15 -r1.1383.2.16 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.1383.2.15 src/sys/dev/pci/pcidevs:1.1383.2.16
--- src/sys/dev/pci/pcidevs:1.1383.2.15	Mon Jan 30 11:32:22 2023
+++ src/sys/dev/pci/pcidevs	Wed Jun 21 22:20:31 2023
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1383.2.15 2023/01/30 11:32:22 martin Exp $
+$NetBSD: pcidevs,v 1.1383.2.16 2023/06/21 22:20:31 martin Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -1087,6 +1087,19 @@ product AMD F19_1X_PSP		0x14ca	19h/1xh P
 product AMD F19_1X_ACP		0x14cb	19h/1xh ACP
 product AMD F19_1X_HDA		0x14cc	19h/1xh HD Audio
 product AMD F19_6X_RC		0x14d8	19h/6xh Root Complex
+product AMD F19_6X_IOMMU	0x14d9	19h/6xh IOMMU
+product AMD F19_6X_PCIE_DUMMY_HB 0x14da	19h/6xh PCIe Dummy Host Bridge
+product AMD F19_6X_GPPB		0x14db	19h/6xh PCIe GPP Bridge
+product AMD F19_6X_INTNL_GPPB	0x14dd	19h/6xh Internal PCIe GPP Bridge
+product AMD F19_6X_PCIE_DUMMY	0x14de	19h/6xh PCIe Dummy Function
+product AMD F19_6X_DF_0		0x14e0	19h/6xh Data Fabric 0
+product AMD F19_6X_DF_1		0x14e1	19h/6xh Data Fabric 1
+product AMD F19_6X_DF_2		0x14e2	19h/6xh Data Fabric 2
+product AMD F19_6X_DF_3		0x14e3	19h/6xh Data Fabric 3
+product AMD F19_6X_DF_4		0x14e4	19h/6xh Data Fabric 4
+product AMD F19_6X_DF_5		0x14e5	19h/6xh Data Fabric 5
+product AMD F19_6X_DF_6		0x14e6	19h/6xh Data Fabric 6
+product AMD F19_6X_DF_7		0x14e7	19h/6xh Data Fabric 7
 product AMD F17_AX_XHCI_0	0x1503	17h/Axh USB 3.1 xHCI
 product AMD F17_AX_XHCI_1	0x1504	17h/Axh USB 3.1 xHCI
 product AMD F17_AX_USB_BIOM	0x1505	17h/Axh Secure USB BIOmetric
@@ -1135,6 +1148,9 @@ product AMD F15_7X_DRAM		0x15b2	15h/7xh 
 product AMD F15_7X_NB		0x15b3	15h/7xh North Bridge Configuration
 product AMD F15_7X_CSTATE	0x15b4	15h/7xh CPU C-state Configuration
 product AMD F15_7X_MISC		0x15b5	15h/7xh Miscellaneous Configuration
+product AMD F19_6X_XHCI_0	0x15b6	19h/6xh USB 3.1 xHCI
+product AMD F19_6X_XHCI_1	0x15b7	19h/6xh USB 3.1 xHCI
+product AMD F19_6X_USB_BIOM	0x15b8	19h/6xh Secure USB BIOmetric
 product AMD F17_1X_RC		0x15d0	Family17h/1xh Root Complex
 product AMD F17_1X_IOMMU	0x15d1	Family17h/1xh IOMMU
 product AMD F17_1X_PCIE_1	0x15d3	Family17h/1xh PCIe
@@ -1178,6 +1194,7 @@ product AMD F17_9X_HB		0x1645	17h/9xh Ho
 product AMD F17_9X_PCIE_1	0x1647	17h/9xh PCIE
 product AMD F17_9X_PCIE_2	0x1648	17h/9xh PCIE
 product AMD F17_9X_CCP		0x1649	17h/9xh Crypto
+product AMD F19_6X_GFX		0x164e	19h/6xh Internal GPU
 product AMD F17_9X_DF_0		0x1660	17h/9xh Data Fabric
 product AMD F17_9X_DF_1		0x1661	17h/9xh Data Fabric
 product AMD F17_9X_DF_2		0x1662	17h/9xh Data Fabric
@@ -6199,7 +6216,7 @@ product INTEL APL_PCIE_A0	0x5ad8	Apollo 
 product INTEL APL_PCIE_A1	0x5ad9	Apollo Lake PCIe A1
 product INTEL APL_PCIE_A2	0x5ada	Apollo Lake PCIe A2
 product INTEL APL_PCIE_A3	0x5adb	Apollo Lake PCIe A3
-product INTEL APL_SATA		0x5ae0	Apollo Lake SATA
+product INTEL APL_SATA		0x5ae3	Apollo Lake SATA
 product INTEL APL_LPC		0x5ae8	Apollo Lake LPC
 product INTEL APL_SSRAM		0x5aec	Apollo Lake Shared SRAM
 product INTEL APL_UART_3	0x5aee	Apollo Lake UART 3
@@ -9023,6 +9040,7 @@ product SAMSUNGELEC3	SM961		0xa804	SM961
 product SAMSUNGELEC3	SM981		0xa808	SM981 M.2 NVMe SSD
 product SAMSUNGELEC3	SM980		0xa809	SM980 M.2 NVMe SSD
 product SAMSUNGELEC3	PM9A1		0xa80a	PM9A1 M.2 NVMe SSD
+product SAMSUNGELEC3	SM990		0xa80c	SM990 M.2 NVMe SSD
 product SAMSUNGELEC3	171X		0xa820	NVMe SSD Controller 171X
 product SAMSUNGELEC3	172X		0xa821	NVMe SSD Controller 172X
 product SAMSUNGELEC3	172XAB		0xa822	NVMe SSD Controller 172Xa/172Xb



CVS commit: [netbsd-9] src/sys/dev/pci

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:20:31 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-9]: pcidevs

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1654):

sys/dev/pci/pcidevs: revision 1.1478
sys/dev/pci/pcidevs: revision 1.1479
sys/dev/pci/pcidevs: revision 1.1480

Add Samsung SM990.

Add devices from PPR for AMD Family 19h Model 61h Revision B1 processors.

The SATA device ID for Apollo Lake is not 0x5ae0 but 0x5ae3.


To generate a diff of this commit:
cvs rdiff -u -r1.1383.2.15 -r1.1383.2.16 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: [netbsd-10] src/sys/dev/pci

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:18:16 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-10]: pcidevs.h pcidevs_data.h

Log Message:
Regen for ticket #209


To generate a diff of this commit:
cvs rdiff -u -r1.1452.2.3 -r1.1452.2.4 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1451.2.3 -r1.1451.2.4 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.1452.2.3 src/sys/dev/pci/pcidevs.h:1.1452.2.4
--- src/sys/dev/pci/pcidevs.h:1.1452.2.3	Wed Jun 21 22:16:51 2023
+++ src/sys/dev/pci/pcidevs.h	Wed Jun 21 22:18:11 2023
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs.h,v 1.1452.2.3 2023/06/21 22:16:51 martin Exp $	*/
+/*	$NetBSD: pcidevs.h,v 1.1452.2.4 2023/06/21 22:18:11 martin Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.1471.2.2 2023/01/30 11:43:35 martin Exp
+ *	NetBSD: pcidevs,v 1.1471.2.3 2023/06/21 22:17:38 martin Exp
  */
 
 /*

Index: src/sys/dev/pci/pcidevs_data.h
diff -u src/sys/dev/pci/pcidevs_data.h:1.1451.2.3 src/sys/dev/pci/pcidevs_data.h:1.1451.2.4
--- src/sys/dev/pci/pcidevs_data.h:1.1451.2.3	Wed Jun 21 22:16:51 2023
+++ src/sys/dev/pci/pcidevs_data.h	Wed Jun 21 22:18:11 2023
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs_data.h,v 1.1451.2.3 2023/06/21 22:16:51 martin Exp $	*/
+/*	$NetBSD: pcidevs_data.h,v 1.1451.2.4 2023/06/21 22:18:11 martin Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.1471.2.2 2023/01/30 11:43:35 martin Exp
+ *	NetBSD: pcidevs,v 1.1471.2.3 2023/06/21 22:17:38 martin Exp
  */
 
 /*



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

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:18:16 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-10]: pcidevs.h pcidevs_data.h

Log Message:
Regen for ticket #209


To generate a diff of this commit:
cvs rdiff -u -r1.1452.2.3 -r1.1452.2.4 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1451.2.3 -r1.1451.2.4 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: [netbsd-10] src/sys/dev/pci

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:17:38 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-10]: pcidevs

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #209):

sys/dev/pci/pcidevs: revision 1.1478
sys/dev/pci/pcidevs: revision 1.1479
sys/dev/pci/pcidevs: revision 1.1480

Add Samsung SM990.

Add devices from PPR for AMD Family 19h Model 61h Revision B1 processors.

The SATA device ID for Apollo Lake is not 0x5ae0 but 0x5ae3.


To generate a diff of this commit:
cvs rdiff -u -r1.1471.2.2 -r1.1471.2.3 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.1471.2.2 src/sys/dev/pci/pcidevs:1.1471.2.3
--- src/sys/dev/pci/pcidevs:1.1471.2.2	Mon Jan 30 11:43:35 2023
+++ src/sys/dev/pci/pcidevs	Wed Jun 21 22:17:38 2023
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1471.2.2 2023/01/30 11:43:35 martin Exp $
+$NetBSD: pcidevs,v 1.1471.2.3 2023/06/21 22:17:38 martin Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -1087,6 +1087,19 @@ product AMD F19_1X_PSP		0x14ca	19h/1xh P
 product AMD F19_1X_ACP		0x14cb	19h/1xh ACP
 product AMD F19_1X_HDA		0x14cc	19h/1xh HD Audio
 product AMD F19_6X_RC		0x14d8	19h/6xh Root Complex
+product AMD F19_6X_IOMMU	0x14d9	19h/6xh IOMMU
+product AMD F19_6X_PCIE_DUMMY_HB 0x14da	19h/6xh PCIe Dummy Host Bridge
+product AMD F19_6X_GPPB		0x14db	19h/6xh PCIe GPP Bridge
+product AMD F19_6X_INTNL_GPPB	0x14dd	19h/6xh Internal PCIe GPP Bridge
+product AMD F19_6X_PCIE_DUMMY	0x14de	19h/6xh PCIe Dummy Function
+product AMD F19_6X_DF_0		0x14e0	19h/6xh Data Fabric 0
+product AMD F19_6X_DF_1		0x14e1	19h/6xh Data Fabric 1
+product AMD F19_6X_DF_2		0x14e2	19h/6xh Data Fabric 2
+product AMD F19_6X_DF_3		0x14e3	19h/6xh Data Fabric 3
+product AMD F19_6X_DF_4		0x14e4	19h/6xh Data Fabric 4
+product AMD F19_6X_DF_5		0x14e5	19h/6xh Data Fabric 5
+product AMD F19_6X_DF_6		0x14e6	19h/6xh Data Fabric 6
+product AMD F19_6X_DF_7		0x14e7	19h/6xh Data Fabric 7
 product AMD F17_AX_XHCI_0	0x1503	17h/Axh USB 3.1 xHCI
 product AMD F17_AX_XHCI_1	0x1504	17h/Axh USB 3.1 xHCI
 product AMD F17_AX_USB_BIOM	0x1505	17h/Axh Secure USB BIOmetric
@@ -1135,6 +1148,9 @@ product AMD F15_7X_DRAM		0x15b2	15h/7xh 
 product AMD F15_7X_NB		0x15b3	15h/7xh North Bridge Configuration
 product AMD F15_7X_CSTATE	0x15b4	15h/7xh CPU C-state Configuration
 product AMD F15_7X_MISC		0x15b5	15h/7xh Miscellaneous Configuration
+product AMD F19_6X_XHCI_0	0x15b6	19h/6xh USB 3.1 xHCI
+product AMD F19_6X_XHCI_1	0x15b7	19h/6xh USB 3.1 xHCI
+product AMD F19_6X_USB_BIOM	0x15b8	19h/6xh Secure USB BIOmetric
 product AMD F17_1X_RC		0x15d0	Family17h/1xh Root Complex
 product AMD F17_1X_IOMMU	0x15d1	Family17h/1xh IOMMU
 product AMD F17_1X_PCIE_1	0x15d3	Family17h/1xh PCIe
@@ -1178,6 +1194,7 @@ product AMD F17_9X_HB		0x1645	17h/9xh Ho
 product AMD F17_9X_PCIE_1	0x1647	17h/9xh PCIE
 product AMD F17_9X_PCIE_2	0x1648	17h/9xh PCIE
 product AMD F17_9X_CCP		0x1649	17h/9xh Crypto
+product AMD F19_6X_GFX		0x164e	19h/6xh Internal GPU
 product AMD F17_9X_DF_0		0x1660	17h/9xh Data Fabric
 product AMD F17_9X_DF_1		0x1661	17h/9xh Data Fabric
 product AMD F17_9X_DF_2		0x1662	17h/9xh Data Fabric
@@ -6199,7 +6216,7 @@ product INTEL APL_PCIE_A0	0x5ad8	Apollo 
 product INTEL APL_PCIE_A1	0x5ad9	Apollo Lake PCIe A1
 product INTEL APL_PCIE_A2	0x5ada	Apollo Lake PCIe A2
 product INTEL APL_PCIE_A3	0x5adb	Apollo Lake PCIe A3
-product INTEL APL_SATA		0x5ae0	Apollo Lake SATA
+product INTEL APL_SATA		0x5ae3	Apollo Lake SATA
 product INTEL APL_LPC		0x5ae8	Apollo Lake LPC
 product INTEL APL_SSRAM		0x5aec	Apollo Lake Shared SRAM
 product INTEL APL_UART_3	0x5aee	Apollo Lake UART 3
@@ -9023,6 +9040,7 @@ product SAMSUNGELEC3	SM961		0xa804	SM961
 product SAMSUNGELEC3	SM981		0xa808	SM981 M.2 NVMe SSD
 product SAMSUNGELEC3	SM980		0xa809	SM980 M.2 NVMe SSD
 product SAMSUNGELEC3	PM9A1		0xa80a	PM9A1 M.2 NVMe SSD
+product SAMSUNGELEC3	SM990		0xa80c	SM990 M.2 NVMe SSD
 product SAMSUNGELEC3	171X		0xa820	NVMe SSD Controller 171X
 product SAMSUNGELEC3	172X		0xa821	NVMe SSD Controller 172X
 product SAMSUNGELEC3	172XAB		0xa822	NVMe SSD Controller 172Xa/172Xb



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

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:17:38 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-10]: pcidevs

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #209):

sys/dev/pci/pcidevs: revision 1.1478
sys/dev/pci/pcidevs: revision 1.1479
sys/dev/pci/pcidevs: revision 1.1480

Add Samsung SM990.

Add devices from PPR for AMD Family 19h Model 61h Revision B1 processors.

The SATA device ID for Apollo Lake is not 0x5ae0 but 0x5ae3.


To generate a diff of this commit:
cvs rdiff -u -r1.1471.2.2 -r1.1471.2.3 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: [netbsd-10] src/sys/dev/pci

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:16:57 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-10]: pcidevs.h pcidevs_data.h

Log Message:
Regen for ticket #209


To generate a diff of this commit:
cvs rdiff -u -r1.1452.2.2 -r1.1452.2.3 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1451.2.2 -r1.1451.2.3 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: [netbsd-10] src/sys/dev/mii

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:11:29 UTC 2023

Modified Files:
src/sys/dev/mii [netbsd-10]: atphy.c brgphy.c ciphy.c ipgphy.c jmphy.c
mii_physubr.c tlphy.c urlphy.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #208):

sys/dev/mii/ciphy.c: revision 1.42
sys/dev/mii/brgphy.c: revision 1.91
sys/dev/mii/mii_physubr.c: revision 1.102
sys/dev/mii/ipgphy.c: revision 1.11
sys/dev/mii/tlphy.c: revision 1.72
sys/dev/mii/jmphy.c: revision 1.5
sys/dev/mii/urlphy.c: revision 1.40
sys/dev/mii/atphy.c: revision 1.31

Retry autonegotiation every mii_anegticks seconds instead of mii_anegticks+1.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.30.22.1 src/sys/dev/mii/atphy.c
cvs rdiff -u -r1.90 -r1.90.20.1 src/sys/dev/mii/brgphy.c
cvs rdiff -u -r1.41 -r1.41.20.1 src/sys/dev/mii/ciphy.c
cvs rdiff -u -r1.10 -r1.10.24.1 src/sys/dev/mii/ipgphy.c
cvs rdiff -u -r1.4 -r1.4.24.1 src/sys/dev/mii/jmphy.c
cvs rdiff -u -r1.101 -r1.101.4.1 src/sys/dev/mii/mii_physubr.c
cvs rdiff -u -r1.71 -r1.71.20.1 src/sys/dev/mii/tlphy.c
cvs rdiff -u -r1.39 -r1.39.4.1 src/sys/dev/mii/urlphy.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/mii/atphy.c
diff -u src/sys/dev/mii/atphy.c:1.30 src/sys/dev/mii/atphy.c:1.30.22.1
--- src/sys/dev/mii/atphy.c:1.30	Sun Mar 15 23:04:50 2020
+++ src/sys/dev/mii/atphy.c	Wed Jun 21 22:11:29 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: atphy.c,v 1.30 2020/03/15 23:04:50 thorpej Exp $ */
+/*	$NetBSD: atphy.c,v 1.30.22.1 2023/06/21 22:11:29 martin Exp $ */
 /*	$OpenBSD: atphy.c,v 1.1 2008/09/25 20:47:16 brad Exp $	*/
 
 /*-
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: atphy.c,v 1.30 2020/03/15 23:04:50 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atphy.c,v 1.30.22.1 2023/06/21 22:11:29 martin Exp $");
 
 #include 
 #include 
@@ -323,7 +323,7 @@ done:
 			break;
 
 		/* Only retry autonegotiation every mii_anegticks seconds. */
-		if (sc->mii_ticks <= sc->mii_anegticks)
+		if (sc->mii_ticks < sc->mii_anegticks)
 			break;
 
 		atphy_mii_phy_auto(sc);

Index: src/sys/dev/mii/brgphy.c
diff -u src/sys/dev/mii/brgphy.c:1.90 src/sys/dev/mii/brgphy.c:1.90.20.1
--- src/sys/dev/mii/brgphy.c:1.90	Mon May 25 19:48:38 2020
+++ src/sys/dev/mii/brgphy.c	Wed Jun 21 22:11:29 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: brgphy.c,v 1.90 2020/05/25 19:48:38 jmcneill Exp $	*/
+/*	$NetBSD: brgphy.c,v 1.90.20.1 2023/06/21 22:11:29 martin Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.90 2020/05/25 19:48:38 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.90.20.1 2023/06/21 22:11:29 martin Exp $");
 
 #include 
 #include 
@@ -424,7 +424,7 @@ setit:
 
 		/* Only retry autonegotiation every mii_anegticks seconds. */
 		KASSERT(sc->mii_anegticks != 0);
-		if (sc->mii_ticks <= sc->mii_anegticks)
+		if (sc->mii_ticks < sc->mii_anegticks)
 			break;
 
 		brgphy_mii_phy_auto(sc);

Index: src/sys/dev/mii/ciphy.c
diff -u src/sys/dev/mii/ciphy.c:1.41 src/sys/dev/mii/ciphy.c:1.41.20.1
--- src/sys/dev/mii/ciphy.c:1.41	Mon Aug 24 04:23:41 2020
+++ src/sys/dev/mii/ciphy.c	Wed Jun 21 22:11:29 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ciphy.c,v 1.41 2020/08/24 04:23:41 msaitoh Exp $ */
+/* $NetBSD: ciphy.c,v 1.41.20.1 2023/06/21 22:11:29 martin Exp $ */
 
 /*-
  * Copyright (c) 2004
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.41 2020/08/24 04:23:41 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.41.20.1 2023/06/21 22:11:29 martin Exp $");
 
 /*
  * Driver for the Cicada CS8201 10/100/1000 copper PHY.
@@ -270,7 +270,7 @@ setit:
 			break;
 
 		/* Only retry autonegotiation every N seconds. */
-		if (sc->mii_ticks <= sc->mii_anegticks)
+		if (sc->mii_ticks < sc->mii_anegticks)
 			break;
 
 		mii_phy_auto_restart(sc);

Index: src/sys/dev/mii/ipgphy.c
diff -u src/sys/dev/mii/ipgphy.c:1.10 src/sys/dev/mii/ipgphy.c:1.10.24.1
--- src/sys/dev/mii/ipgphy.c:1.10	Sun Mar 15 23:04:50 2020
+++ src/sys/dev/mii/ipgphy.c	Wed Jun 21 22:11:29 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipgphy.c,v 1.10 2020/03/15 23:04:50 thorpej Exp $ */
+/*	$NetBSD: ipgphy.c,v 1.10.24.1 2023/06/21 22:11:29 martin Exp $ */
 /*	$OpenBSD: ipgphy.c,v 1.19 2015/07/19 06:28:12 yuo Exp $	*/
 
 /*-
@@ -33,7 +33,7 @@
  * Driver for the IC Plus IP1000A/IP1001 10/100/1000 PHY.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ipgphy.c,v 1.10 2020/03/15 23:04:50 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipgphy.c,v 1.10.24.1 2023/06/21 22:11:29 martin Exp $");
 
 #include 
 #include 
@@ -237,7 +237,7 @@ done:
 			break;
 
 		/* Only retry autonegotiation every mii_anegticks seconds. */
-		if (sc->mii_ticks <= sc->mii_anegticks)
+		if (sc->mii_ticks < sc->mii_anegticks)
 			break;
 
 		

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

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:11:29 UTC 2023

Modified Files:
src/sys/dev/mii [netbsd-10]: atphy.c brgphy.c ciphy.c ipgphy.c jmphy.c
mii_physubr.c tlphy.c urlphy.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #208):

sys/dev/mii/ciphy.c: revision 1.42
sys/dev/mii/brgphy.c: revision 1.91
sys/dev/mii/mii_physubr.c: revision 1.102
sys/dev/mii/ipgphy.c: revision 1.11
sys/dev/mii/tlphy.c: revision 1.72
sys/dev/mii/jmphy.c: revision 1.5
sys/dev/mii/urlphy.c: revision 1.40
sys/dev/mii/atphy.c: revision 1.31

Retry autonegotiation every mii_anegticks seconds instead of mii_anegticks+1.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.30.22.1 src/sys/dev/mii/atphy.c
cvs rdiff -u -r1.90 -r1.90.20.1 src/sys/dev/mii/brgphy.c
cvs rdiff -u -r1.41 -r1.41.20.1 src/sys/dev/mii/ciphy.c
cvs rdiff -u -r1.10 -r1.10.24.1 src/sys/dev/mii/ipgphy.c
cvs rdiff -u -r1.4 -r1.4.24.1 src/sys/dev/mii/jmphy.c
cvs rdiff -u -r1.101 -r1.101.4.1 src/sys/dev/mii/mii_physubr.c
cvs rdiff -u -r1.71 -r1.71.20.1 src/sys/dev/mii/tlphy.c
cvs rdiff -u -r1.39 -r1.39.4.1 src/sys/dev/mii/urlphy.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/lib/libpam/modules/pam_ksu

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:08:16 UTC 2023

Modified Files:
src/lib/libpam/modules/pam_ksu [netbsd-8]: pam_ksu.c

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

lib/libpam/modules/pam_ksu/pam_ksu.c: revision 1.10

pam_ksu: No need for homedir access.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.9.18.1 src/lib/libpam/modules/pam_ksu/pam_ksu.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/libpam/modules/pam_ksu/pam_ksu.c
diff -u src/lib/libpam/modules/pam_ksu/pam_ksu.c:1.9 src/lib/libpam/modules/pam_ksu/pam_ksu.c:1.9.18.1
--- src/lib/libpam/modules/pam_ksu/pam_ksu.c:1.9	Thu Feb 27 18:09:38 2014
+++ src/lib/libpam/modules/pam_ksu/pam_ksu.c	Wed Jun 21 22:08:16 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pam_ksu.c,v 1.9 2014/02/27 18:09:38 joerg Exp $	*/
+/*	$NetBSD: pam_ksu.c,v 1.9.18.1 2023/06/21 22:08:16 martin Exp $	*/
 
 /*-
  * Copyright (c) 2002 Jacques A. Vidrine 
@@ -29,7 +29,7 @@
 #ifdef __FreeBSD__
 __FBSDID("$FreeBSD: src/lib/libpam/modules/pam_ksu/pam_ksu.c,v 1.5 2004/02/10 10:13:21 des Exp $");
 #else
-__RCSID("$NetBSD: pam_ksu.c,v 1.9 2014/02/27 18:09:38 joerg Exp $");
+__RCSID("$NetBSD: pam_ksu.c,v 1.9.18.1 2023/06/21 22:08:16 martin Exp $");
 #endif
 
 #include 
@@ -62,6 +62,7 @@ PAM_EXTERN int
 pam_sm_authenticate(pam_handle_t *pamh, int flags __unused,
 int argc __unused, const char *argv[] __unused)
 {
+	krb5_boolean	 allow_homedir;
 	krb5_context	 context;
 	krb5_principal	 su_principal;
 	const char	*user;
@@ -78,20 +79,25 @@ pam_sm_authenticate(pam_handle_t *pamh, 
 	if (pamret != PAM_SUCCESS)
 		return (pamret);
 	PAM_LOG("Got ruser: %s", (const char *)ruser);
+	allow_homedir = krb5_set_home_dir_access(NULL, FALSE);
 	rv = krb5_init_context();
 	if (rv != 0) {
 		log_krb5(context, rv, "krb5_init_context failed");
-		return (PAM_SERVICE_ERR);
+		pamret = PAM_SERVICE_ERR;
+		goto out;
 	}
 	rv = get_su_principal(context, user, ruser, _principal_name, _principal);
-	if (rv != 0)
-		return (PAM_AUTH_ERR);
+	if (rv != 0) {
+		pamret = PAM_AUTH_ERR;
+		goto out;
+	}
 	PAM_LOG("kuserok: %s -> %s", su_principal_name, user);
 	rv = krb5_kuserok(context, su_principal, user);
 	pamret = rv ? auth_krb5(pamh, context, su_principal_name, su_principal) : PAM_AUTH_ERR;
 	free(su_principal_name);
 	krb5_free_principal(context, su_principal);
 	krb5_free_context(context);
+out:	(void)krb5_set_home_dir_access(NULL, allow_homedir);
 	return (pamret);
 }
 



CVS commit: [netbsd-8] src/lib/libpam/modules/pam_ksu

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:08:16 UTC 2023

Modified Files:
src/lib/libpam/modules/pam_ksu [netbsd-8]: pam_ksu.c

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

lib/libpam/modules/pam_ksu/pam_ksu.c: revision 1.10

pam_ksu: No need for homedir access.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.9.18.1 src/lib/libpam/modules/pam_ksu/pam_ksu.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/lib/libpam/modules/pam_ksu

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:07:07 UTC 2023

Modified Files:
src/lib/libpam/modules/pam_ksu [netbsd-9]: pam_ksu.c

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

lib/libpam/modules/pam_ksu/pam_ksu.c: revision 1.10

pam_ksu: No need for homedir access.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.9.28.1 src/lib/libpam/modules/pam_ksu/pam_ksu.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/libpam/modules/pam_ksu/pam_ksu.c
diff -u src/lib/libpam/modules/pam_ksu/pam_ksu.c:1.9 src/lib/libpam/modules/pam_ksu/pam_ksu.c:1.9.28.1
--- src/lib/libpam/modules/pam_ksu/pam_ksu.c:1.9	Thu Feb 27 18:09:38 2014
+++ src/lib/libpam/modules/pam_ksu/pam_ksu.c	Wed Jun 21 22:07:06 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pam_ksu.c,v 1.9 2014/02/27 18:09:38 joerg Exp $	*/
+/*	$NetBSD: pam_ksu.c,v 1.9.28.1 2023/06/21 22:07:06 martin Exp $	*/
 
 /*-
  * Copyright (c) 2002 Jacques A. Vidrine 
@@ -29,7 +29,7 @@
 #ifdef __FreeBSD__
 __FBSDID("$FreeBSD: src/lib/libpam/modules/pam_ksu/pam_ksu.c,v 1.5 2004/02/10 10:13:21 des Exp $");
 #else
-__RCSID("$NetBSD: pam_ksu.c,v 1.9 2014/02/27 18:09:38 joerg Exp $");
+__RCSID("$NetBSD: pam_ksu.c,v 1.9.28.1 2023/06/21 22:07:06 martin Exp $");
 #endif
 
 #include 
@@ -62,6 +62,7 @@ PAM_EXTERN int
 pam_sm_authenticate(pam_handle_t *pamh, int flags __unused,
 int argc __unused, const char *argv[] __unused)
 {
+	krb5_boolean	 allow_homedir;
 	krb5_context	 context;
 	krb5_principal	 su_principal;
 	const char	*user;
@@ -78,20 +79,25 @@ pam_sm_authenticate(pam_handle_t *pamh, 
 	if (pamret != PAM_SUCCESS)
 		return (pamret);
 	PAM_LOG("Got ruser: %s", (const char *)ruser);
+	allow_homedir = krb5_set_home_dir_access(NULL, FALSE);
 	rv = krb5_init_context();
 	if (rv != 0) {
 		log_krb5(context, rv, "krb5_init_context failed");
-		return (PAM_SERVICE_ERR);
+		pamret = PAM_SERVICE_ERR;
+		goto out;
 	}
 	rv = get_su_principal(context, user, ruser, _principal_name, _principal);
-	if (rv != 0)
-		return (PAM_AUTH_ERR);
+	if (rv != 0) {
+		pamret = PAM_AUTH_ERR;
+		goto out;
+	}
 	PAM_LOG("kuserok: %s -> %s", su_principal_name, user);
 	rv = krb5_kuserok(context, su_principal, user);
 	pamret = rv ? auth_krb5(pamh, context, su_principal_name, su_principal) : PAM_AUTH_ERR;
 	free(su_principal_name);
 	krb5_free_principal(context, su_principal);
 	krb5_free_context(context);
+out:	(void)krb5_set_home_dir_access(NULL, allow_homedir);
 	return (pamret);
 }
 



CVS commit: [netbsd-9] src/lib/libpam/modules/pam_ksu

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:07:07 UTC 2023

Modified Files:
src/lib/libpam/modules/pam_ksu [netbsd-9]: pam_ksu.c

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

lib/libpam/modules/pam_ksu/pam_ksu.c: revision 1.10

pam_ksu: No need for homedir access.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.9.28.1 src/lib/libpam/modules/pam_ksu/pam_ksu.c

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



CVS commit: [netbsd-10] src/lib/libpam/modules/pam_ksu

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:05:31 UTC 2023

Modified Files:
src/lib/libpam/modules/pam_ksu [netbsd-10]: pam_ksu.c

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

lib/libpam/modules/pam_ksu/pam_ksu.c: revision 1.10

pam_ksu: No need for homedir access.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.9.36.1 src/lib/libpam/modules/pam_ksu/pam_ksu.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/libpam/modules/pam_ksu/pam_ksu.c
diff -u src/lib/libpam/modules/pam_ksu/pam_ksu.c:1.9 src/lib/libpam/modules/pam_ksu/pam_ksu.c:1.9.36.1
--- src/lib/libpam/modules/pam_ksu/pam_ksu.c:1.9	Thu Feb 27 18:09:38 2014
+++ src/lib/libpam/modules/pam_ksu/pam_ksu.c	Wed Jun 21 22:05:30 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pam_ksu.c,v 1.9 2014/02/27 18:09:38 joerg Exp $	*/
+/*	$NetBSD: pam_ksu.c,v 1.9.36.1 2023/06/21 22:05:30 martin Exp $	*/
 
 /*-
  * Copyright (c) 2002 Jacques A. Vidrine 
@@ -29,7 +29,7 @@
 #ifdef __FreeBSD__
 __FBSDID("$FreeBSD: src/lib/libpam/modules/pam_ksu/pam_ksu.c,v 1.5 2004/02/10 10:13:21 des Exp $");
 #else
-__RCSID("$NetBSD: pam_ksu.c,v 1.9 2014/02/27 18:09:38 joerg Exp $");
+__RCSID("$NetBSD: pam_ksu.c,v 1.9.36.1 2023/06/21 22:05:30 martin Exp $");
 #endif
 
 #include 
@@ -62,6 +62,7 @@ PAM_EXTERN int
 pam_sm_authenticate(pam_handle_t *pamh, int flags __unused,
 int argc __unused, const char *argv[] __unused)
 {
+	krb5_boolean	 allow_homedir;
 	krb5_context	 context;
 	krb5_principal	 su_principal;
 	const char	*user;
@@ -78,20 +79,25 @@ pam_sm_authenticate(pam_handle_t *pamh, 
 	if (pamret != PAM_SUCCESS)
 		return (pamret);
 	PAM_LOG("Got ruser: %s", (const char *)ruser);
+	allow_homedir = krb5_set_home_dir_access(NULL, FALSE);
 	rv = krb5_init_context();
 	if (rv != 0) {
 		log_krb5(context, rv, "krb5_init_context failed");
-		return (PAM_SERVICE_ERR);
+		pamret = PAM_SERVICE_ERR;
+		goto out;
 	}
 	rv = get_su_principal(context, user, ruser, _principal_name, _principal);
-	if (rv != 0)
-		return (PAM_AUTH_ERR);
+	if (rv != 0) {
+		pamret = PAM_AUTH_ERR;
+		goto out;
+	}
 	PAM_LOG("kuserok: %s -> %s", su_principal_name, user);
 	rv = krb5_kuserok(context, su_principal, user);
 	pamret = rv ? auth_krb5(pamh, context, su_principal_name, su_principal) : PAM_AUTH_ERR;
 	free(su_principal_name);
 	krb5_free_principal(context, su_principal);
 	krb5_free_context(context);
+out:	(void)krb5_set_home_dir_access(NULL, allow_homedir);
 	return (pamret);
 }
 



CVS commit: [netbsd-10] src/lib/libpam/modules/pam_ksu

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:05:31 UTC 2023

Modified Files:
src/lib/libpam/modules/pam_ksu [netbsd-10]: pam_ksu.c

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

lib/libpam/modules/pam_ksu/pam_ksu.c: revision 1.10

pam_ksu: No need for homedir access.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.9.36.1 src/lib/libpam/modules/pam_ksu/pam_ksu.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/lib/libpam/modules/pam_krb5

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:04:13 UTC 2023

Modified Files:
src/lib/libpam/modules/pam_krb5 [netbsd-8]: pam_krb5.8 pam_krb5.c

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

lib/libpam/modules/pam_krb5/pam_krb5.c: revision 1.31
lib/libpam/modules/pam_krb5/pam_krb5.8: revision 1.13

pam_krb5: Refuse to operate without a key to verify tickets.

New allow_kdc_spoof overrides this to restore previous behaviour
which was vulnerable to KDC spoofing, because without a host or
service key, pam_krb5 can't distinguish the legitimate KDC from a
spoofed one.

This way, having pam_krb5 enabled isn't dangerous even if you create
an empty /etc/krb5.conf to use client SSO without any host services.

Perhaps this should use krb5_verify_init_creds(3) instead, and
thereby respect the rather obscurely named krb5.conf option
verify_ap_req_nofail like the Linux pam_krb5 does, but:
- verify_ap_req_nofail is default-off (i.e., vulnerable by default),
- changing verify_ap_req_nofail to default-on would probably affect
  more things and therefore be riskier,
- allow_kdc_spoof is a much clearer way to spell the idea,
- this patch is a smaller semantic change and thus less risky, and
- a security change with compatibility issues shouldn't have a
  workaround that might introduce potentially worse security issues
  or more compatibility issues.

Perhaps this should use krb5_verify_user(3) with secure=1 instead,
for simplicity, but it's not clear how to do that without first
prompting for the password -- which we shouldn't do at all if we
later decide we won't be able to use it anyway -- and without
repeating a bunch of the logic here anyway to pick the service name.

References about verify_ap_req_nofail:
- mit-krb5 discussion about verify_ap_req_nofail:
  https://mailman.mit.edu/pipermail/krbdev/2011-January/009778.html
- Oracle has the default-secure setting in their krb5 system:
  https://docs.oracle.com/cd/E26505_01/html/E27224/setup-148.html
  
https://docs.oracle.com/cd/E26505_01/html/816-5174/krb5.conf-4.html#REFMAN4krb5.conf-4
  https://docs.oracle.com/cd/E19253-01/816-4557/gihyu/
- Heimdal issue on verify_ap_req_nofail default:
  https://github.com/heimdal/heimdal/issues/1129


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.40.1 src/lib/libpam/modules/pam_krb5/pam_krb5.8
cvs rdiff -u -r1.26 -r1.26.18.1 src/lib/libpam/modules/pam_krb5/pam_krb5.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/lib/libpam/modules/pam_krb5

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:04:13 UTC 2023

Modified Files:
src/lib/libpam/modules/pam_krb5 [netbsd-8]: pam_krb5.8 pam_krb5.c

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

lib/libpam/modules/pam_krb5/pam_krb5.c: revision 1.31
lib/libpam/modules/pam_krb5/pam_krb5.8: revision 1.13

pam_krb5: Refuse to operate without a key to verify tickets.

New allow_kdc_spoof overrides this to restore previous behaviour
which was vulnerable to KDC spoofing, because without a host or
service key, pam_krb5 can't distinguish the legitimate KDC from a
spoofed one.

This way, having pam_krb5 enabled isn't dangerous even if you create
an empty /etc/krb5.conf to use client SSO without any host services.

Perhaps this should use krb5_verify_init_creds(3) instead, and
thereby respect the rather obscurely named krb5.conf option
verify_ap_req_nofail like the Linux pam_krb5 does, but:
- verify_ap_req_nofail is default-off (i.e., vulnerable by default),
- changing verify_ap_req_nofail to default-on would probably affect
  more things and therefore be riskier,
- allow_kdc_spoof is a much clearer way to spell the idea,
- this patch is a smaller semantic change and thus less risky, and
- a security change with compatibility issues shouldn't have a
  workaround that might introduce potentially worse security issues
  or more compatibility issues.

Perhaps this should use krb5_verify_user(3) with secure=1 instead,
for simplicity, but it's not clear how to do that without first
prompting for the password -- which we shouldn't do at all if we
later decide we won't be able to use it anyway -- and without
repeating a bunch of the logic here anyway to pick the service name.

References about verify_ap_req_nofail:
- mit-krb5 discussion about verify_ap_req_nofail:
  https://mailman.mit.edu/pipermail/krbdev/2011-January/009778.html
- Oracle has the default-secure setting in their krb5 system:
  https://docs.oracle.com/cd/E26505_01/html/E27224/setup-148.html
  
https://docs.oracle.com/cd/E26505_01/html/816-5174/krb5.conf-4.html#REFMAN4krb5.conf-4
  https://docs.oracle.com/cd/E19253-01/816-4557/gihyu/
- Heimdal issue on verify_ap_req_nofail default:
  https://github.com/heimdal/heimdal/issues/1129


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.40.1 src/lib/libpam/modules/pam_krb5/pam_krb5.8
cvs rdiff -u -r1.26 -r1.26.18.1 src/lib/libpam/modules/pam_krb5/pam_krb5.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/libpam/modules/pam_krb5/pam_krb5.8
diff -u src/lib/libpam/modules/pam_krb5/pam_krb5.8:1.11 src/lib/libpam/modules/pam_krb5/pam_krb5.8:1.11.40.1
--- src/lib/libpam/modules/pam_krb5/pam_krb5.8:1.11	Tue Dec  2 22:52:06 2008
+++ src/lib/libpam/modules/pam_krb5/pam_krb5.8	Wed Jun 21 22:04:13 2023
@@ -1,4 +1,4 @@
-.\" $NetBSD: pam_krb5.8,v 1.11 2008/12/02 22:52:06 reed Exp $
+.\" $NetBSD: pam_krb5.8,v 1.11.40.1 2023/06/21 22:04:13 martin Exp $
 .\" $FreeBSD: src/lib/libpam/modules/pam_krb5/pam_krb5.8,v 1.6 2001/11/24 23:41:32 dd Exp $
 .\"
 .\" Copyright (c) Frank Cusack, 1999-2001. All rights reserved.
@@ -142,6 +142,21 @@ and
 .Ql %p ,
 to designate the current process ID; can be used in
 .Ar name .
+.It Cm allow_kdc_spoof
+Allow
+.Nm
+to succeed even if there is no host or service key available in a
+keytab to authenticate the Kerberos KDC's ticket.
+If there is no such key, for example on a host with no keytabs,
+.Nm
+will fail immediately without prompting the user.
+.Pp
+.Sy Warning :
+If the host has not been configured with a keytab from the KDC, setting
+this option makes it vulnerable to malicious KDCs, e.g. via DNS
+flooding, because
+.Nm
+has no way to distinguish the legitimate KDC from a spoofed KDC.
 .El
 .Ss Kerberos 5 Account Management Module
 The Kerberos 5 account management component

Index: src/lib/libpam/modules/pam_krb5/pam_krb5.c
diff -u src/lib/libpam/modules/pam_krb5/pam_krb5.c:1.26 src/lib/libpam/modules/pam_krb5/pam_krb5.c:1.26.18.1
--- src/lib/libpam/modules/pam_krb5/pam_krb5.c:1.26	Sat Dec 28 18:04:03 2013
+++ src/lib/libpam/modules/pam_krb5/pam_krb5.c	Wed Jun 21 22:04:13 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pam_krb5.c,v 1.26 2013/12/28 18:04:03 christos Exp $	*/
+/*	$NetBSD: pam_krb5.c,v 1.26.18.1 2023/06/21 22:04:13 martin Exp $	*/
 
 /*-
  * This pam_krb5 module contains code that is:
@@ -53,7 +53,7 @@
 #ifdef __FreeBSD__
 __FBSDID("$FreeBSD: src/lib/libpam/modules/pam_krb5/pam_krb5.c,v 1.22 2005/01/24 16:49:50 rwatson Exp $");
 #else
-__RCSID("$NetBSD: pam_krb5.c,v 1.26 2013/12/28 18:04:03 christos Exp $");
+__RCSID("$NetBSD: pam_krb5.c,v 1.26.18.1 2023/06/21 22:04:13 martin Exp $");
 #endif
 
 #include 
@@ -85,7 +85,12 @@ __RCSID("$NetBSD: pam_krb5.c,v 1.26 2013
 
 static void	log_krb5(krb5_context, krb5_error_code, struct syslog_data *,
 const char *, ...) __printflike(4, 5);
-static int	

CVS commit: [netbsd-9] src/lib/libpam/modules/pam_krb5

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:00:57 UTC 2023

Modified Files:
src/lib/libpam/modules/pam_krb5 [netbsd-9]: pam_krb5.8 pam_krb5.c

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

lib/libpam/modules/pam_krb5/pam_krb5.c: revision 1.31
lib/libpam/modules/pam_krb5/pam_krb5.8: revision 1.13

pam_krb5: Refuse to operate without a key to verify tickets.

New allow_kdc_spoof overrides this to restore previous behaviour
which was vulnerable to KDC spoofing, because without a host or
service key, pam_krb5 can't distinguish the legitimate KDC from a
spoofed one.

This way, having pam_krb5 enabled isn't dangerous even if you create
an empty /etc/krb5.conf to use client SSO without any host services.

Perhaps this should use krb5_verify_init_creds(3) instead, and
thereby respect the rather obscurely named krb5.conf option
verify_ap_req_nofail like the Linux pam_krb5 does, but:
- verify_ap_req_nofail is default-off (i.e., vulnerable by default),
- changing verify_ap_req_nofail to default-on would probably affect
  more things and therefore be riskier,
- allow_kdc_spoof is a much clearer way to spell the idea,
- this patch is a smaller semantic change and thus less risky, and
- a security change with compatibility issues shouldn't have a
  workaround that might introduce potentially worse security issues
  or more compatibility issues.

Perhaps this should use krb5_verify_user(3) with secure=1 instead,
for simplicity, but it's not clear how to do that without first
prompting for the password -- which we shouldn't do at all if we
later decide we won't be able to use it anyway -- and without
repeating a bunch of the logic here anyway to pick the service name.

References about verify_ap_req_nofail:
- mit-krb5 discussion about verify_ap_req_nofail:
  https://mailman.mit.edu/pipermail/krbdev/2011-January/009778.html
- Oracle has the default-secure setting in their krb5 system:
  https://docs.oracle.com/cd/E26505_01/html/E27224/setup-148.html
  
https://docs.oracle.com/cd/E26505_01/html/816-5174/krb5.conf-4.html#REFMAN4krb5.conf-4
  https://docs.oracle.com/cd/E19253-01/816-4557/gihyu/
- Heimdal issue on verify_ap_req_nofail default:
  https://github.com/heimdal/heimdal/issues/1129


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.12.8.1 src/lib/libpam/modules/pam_krb5/pam_krb5.8
cvs rdiff -u -r1.26 -r1.26.28.1 src/lib/libpam/modules/pam_krb5/pam_krb5.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/libpam/modules/pam_krb5/pam_krb5.8
diff -u src/lib/libpam/modules/pam_krb5/pam_krb5.8:1.12 src/lib/libpam/modules/pam_krb5/pam_krb5.8:1.12.8.1
--- src/lib/libpam/modules/pam_krb5/pam_krb5.8:1.12	Mon Jul  3 21:32:51 2017
+++ src/lib/libpam/modules/pam_krb5/pam_krb5.8	Wed Jun 21 22:00:57 2023
@@ -1,4 +1,4 @@
-.\" $NetBSD: pam_krb5.8,v 1.12 2017/07/03 21:32:51 wiz Exp $
+.\" $NetBSD: pam_krb5.8,v 1.12.8.1 2023/06/21 22:00:57 martin Exp $
 .\" $FreeBSD: src/lib/libpam/modules/pam_krb5/pam_krb5.8,v 1.6 2001/11/24 23:41:32 dd Exp $
 .\"
 .\" Copyright (c) Frank Cusack, 1999-2001. All rights reserved.
@@ -142,6 +142,21 @@ and
 .Ql %p ,
 to designate the current process ID; can be used in
 .Ar name .
+.It Cm allow_kdc_spoof
+Allow
+.Nm
+to succeed even if there is no host or service key available in a
+keytab to authenticate the Kerberos KDC's ticket.
+If there is no such key, for example on a host with no keytabs,
+.Nm
+will fail immediately without prompting the user.
+.Pp
+.Sy Warning :
+If the host has not been configured with a keytab from the KDC, setting
+this option makes it vulnerable to malicious KDCs, e.g. via DNS
+flooding, because
+.Nm
+has no way to distinguish the legitimate KDC from a spoofed KDC.
 .El
 .Ss Kerberos 5 Account Management Module
 The Kerberos 5 account management component

Index: src/lib/libpam/modules/pam_krb5/pam_krb5.c
diff -u src/lib/libpam/modules/pam_krb5/pam_krb5.c:1.26 src/lib/libpam/modules/pam_krb5/pam_krb5.c:1.26.28.1
--- src/lib/libpam/modules/pam_krb5/pam_krb5.c:1.26	Sat Dec 28 18:04:03 2013
+++ src/lib/libpam/modules/pam_krb5/pam_krb5.c	Wed Jun 21 22:00:57 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pam_krb5.c,v 1.26 2013/12/28 18:04:03 christos Exp $	*/
+/*	$NetBSD: pam_krb5.c,v 1.26.28.1 2023/06/21 22:00:57 martin Exp $	*/
 
 /*-
  * This pam_krb5 module contains code that is:
@@ -53,7 +53,7 @@
 #ifdef __FreeBSD__
 __FBSDID("$FreeBSD: src/lib/libpam/modules/pam_krb5/pam_krb5.c,v 1.22 2005/01/24 16:49:50 rwatson Exp $");
 #else
-__RCSID("$NetBSD: pam_krb5.c,v 1.26 2013/12/28 18:04:03 christos Exp $");
+__RCSID("$NetBSD: pam_krb5.c,v 1.26.28.1 2023/06/21 22:00:57 martin Exp $");
 #endif
 
 #include 
@@ -85,7 +85,12 @@ __RCSID("$NetBSD: pam_krb5.c,v 1.26 2013
 
 static void	log_krb5(krb5_context, krb5_error_code, struct syslog_data *,
 const char *, ...) __printflike(4, 5);
-static int	

CVS commit: [netbsd-9] src/lib/libpam/modules/pam_krb5

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:00:57 UTC 2023

Modified Files:
src/lib/libpam/modules/pam_krb5 [netbsd-9]: pam_krb5.8 pam_krb5.c

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

lib/libpam/modules/pam_krb5/pam_krb5.c: revision 1.31
lib/libpam/modules/pam_krb5/pam_krb5.8: revision 1.13

pam_krb5: Refuse to operate without a key to verify tickets.

New allow_kdc_spoof overrides this to restore previous behaviour
which was vulnerable to KDC spoofing, because without a host or
service key, pam_krb5 can't distinguish the legitimate KDC from a
spoofed one.

This way, having pam_krb5 enabled isn't dangerous even if you create
an empty /etc/krb5.conf to use client SSO without any host services.

Perhaps this should use krb5_verify_init_creds(3) instead, and
thereby respect the rather obscurely named krb5.conf option
verify_ap_req_nofail like the Linux pam_krb5 does, but:
- verify_ap_req_nofail is default-off (i.e., vulnerable by default),
- changing verify_ap_req_nofail to default-on would probably affect
  more things and therefore be riskier,
- allow_kdc_spoof is a much clearer way to spell the idea,
- this patch is a smaller semantic change and thus less risky, and
- a security change with compatibility issues shouldn't have a
  workaround that might introduce potentially worse security issues
  or more compatibility issues.

Perhaps this should use krb5_verify_user(3) with secure=1 instead,
for simplicity, but it's not clear how to do that without first
prompting for the password -- which we shouldn't do at all if we
later decide we won't be able to use it anyway -- and without
repeating a bunch of the logic here anyway to pick the service name.

References about verify_ap_req_nofail:
- mit-krb5 discussion about verify_ap_req_nofail:
  https://mailman.mit.edu/pipermail/krbdev/2011-January/009778.html
- Oracle has the default-secure setting in their krb5 system:
  https://docs.oracle.com/cd/E26505_01/html/E27224/setup-148.html
  
https://docs.oracle.com/cd/E26505_01/html/816-5174/krb5.conf-4.html#REFMAN4krb5.conf-4
  https://docs.oracle.com/cd/E19253-01/816-4557/gihyu/
- Heimdal issue on verify_ap_req_nofail default:
  https://github.com/heimdal/heimdal/issues/1129


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.12.8.1 src/lib/libpam/modules/pam_krb5/pam_krb5.8
cvs rdiff -u -r1.26 -r1.26.28.1 src/lib/libpam/modules/pam_krb5/pam_krb5.c

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



CVS commit: [netbsd-10] src/lib/libpam/modules/pam_krb5

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 21:54:12 UTC 2023

Modified Files:
src/lib/libpam/modules/pam_krb5 [netbsd-10]: pam_krb5.8 pam_krb5.c

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

lib/libpam/modules/pam_krb5/pam_krb5.c: revision 1.31
lib/libpam/modules/pam_krb5/pam_krb5.8: revision 1.13

pam_krb5: Refuse to operate without a key to verify tickets.

New allow_kdc_spoof overrides this to restore previous behaviour
which was vulnerable to KDC spoofing, because without a host or
service key, pam_krb5 can't distinguish the legitimate KDC from a
spoofed one.

This way, having pam_krb5 enabled isn't dangerous even if you create
an empty /etc/krb5.conf to use client SSO without any host services.

Perhaps this should use krb5_verify_init_creds(3) instead, and
thereby respect the rather obscurely named krb5.conf option
verify_ap_req_nofail like the Linux pam_krb5 does, but:
- verify_ap_req_nofail is default-off (i.e., vulnerable by default),
- changing verify_ap_req_nofail to default-on would probably affect
  more things and therefore be riskier,
- allow_kdc_spoof is a much clearer way to spell the idea,
- this patch is a smaller semantic change and thus less risky, and
- a security change with compatibility issues shouldn't have a
  workaround that might introduce potentially worse security issues
  or more compatibility issues.

Perhaps this should use krb5_verify_user(3) with secure=1 instead,
for simplicity, but it's not clear how to do that without first
prompting for the password -- which we shouldn't do at all if we
later decide we won't be able to use it anyway -- and without
repeating a bunch of the logic here anyway to pick the service name.

References about verify_ap_req_nofail:
- mit-krb5 discussion about verify_ap_req_nofail:
  https://mailman.mit.edu/pipermail/krbdev/2011-January/009778.html
- Oracle has the default-secure setting in their krb5 system:
  https://docs.oracle.com/cd/E26505_01/html/E27224/setup-148.html
  
https://docs.oracle.com/cd/E26505_01/html/816-5174/krb5.conf-4.html#REFMAN4krb5.conf-4
  https://docs.oracle.com/cd/E19253-01/816-4557/gihyu/
- Heimdal issue on verify_ap_req_nofail default:
  https://github.com/heimdal/heimdal/issues/1129


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.12.16.1 src/lib/libpam/modules/pam_krb5/pam_krb5.8
cvs rdiff -u -r1.30 -r1.30.2.1 src/lib/libpam/modules/pam_krb5/pam_krb5.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/libpam/modules/pam_krb5/pam_krb5.8
diff -u src/lib/libpam/modules/pam_krb5/pam_krb5.8:1.12 src/lib/libpam/modules/pam_krb5/pam_krb5.8:1.12.16.1
--- src/lib/libpam/modules/pam_krb5/pam_krb5.8:1.12	Mon Jul  3 21:32:51 2017
+++ src/lib/libpam/modules/pam_krb5/pam_krb5.8	Wed Jun 21 21:54:12 2023
@@ -1,4 +1,4 @@
-.\" $NetBSD: pam_krb5.8,v 1.12 2017/07/03 21:32:51 wiz Exp $
+.\" $NetBSD: pam_krb5.8,v 1.12.16.1 2023/06/21 21:54:12 martin Exp $
 .\" $FreeBSD: src/lib/libpam/modules/pam_krb5/pam_krb5.8,v 1.6 2001/11/24 23:41:32 dd Exp $
 .\"
 .\" Copyright (c) Frank Cusack, 1999-2001. All rights reserved.
@@ -142,6 +142,21 @@ and
 .Ql %p ,
 to designate the current process ID; can be used in
 .Ar name .
+.It Cm allow_kdc_spoof
+Allow
+.Nm
+to succeed even if there is no host or service key available in a
+keytab to authenticate the Kerberos KDC's ticket.
+If there is no such key, for example on a host with no keytabs,
+.Nm
+will fail immediately without prompting the user.
+.Pp
+.Sy Warning :
+If the host has not been configured with a keytab from the KDC, setting
+this option makes it vulnerable to malicious KDCs, e.g. via DNS
+flooding, because
+.Nm
+has no way to distinguish the legitimate KDC from a spoofed KDC.
 .El
 .Ss Kerberos 5 Account Management Module
 The Kerberos 5 account management component

Index: src/lib/libpam/modules/pam_krb5/pam_krb5.c
diff -u src/lib/libpam/modules/pam_krb5/pam_krb5.c:1.30 src/lib/libpam/modules/pam_krb5/pam_krb5.c:1.30.2.1
--- src/lib/libpam/modules/pam_krb5/pam_krb5.c:1.30	Sun Jan 16 10:52:18 2022
+++ src/lib/libpam/modules/pam_krb5/pam_krb5.c	Wed Jun 21 21:54:12 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pam_krb5.c,v 1.30 2022/01/16 10:52:18 rillig Exp $	*/
+/*	$NetBSD: pam_krb5.c,v 1.30.2.1 2023/06/21 21:54:12 martin Exp $	*/
 
 /*-
  * This pam_krb5 module contains code that is:
@@ -53,7 +53,7 @@
 #ifdef __FreeBSD__
 __FBSDID("$FreeBSD: src/lib/libpam/modules/pam_krb5/pam_krb5.c,v 1.22 2005/01/24 16:49:50 rwatson Exp $");
 #else
-__RCSID("$NetBSD: pam_krb5.c,v 1.30 2022/01/16 10:52:18 rillig Exp $");
+__RCSID("$NetBSD: pam_krb5.c,v 1.30.2.1 2023/06/21 21:54:12 martin Exp $");
 #endif
 
 #include 
@@ -85,7 +85,12 @@ __RCSID("$NetBSD: pam_krb5.c,v 1.30 2022
 
 static void	log_krb5(krb5_context, krb5_error_code, struct syslog_data *,
 const char *, ...) __printflike(4, 5);
-static int	

CVS commit: [netbsd-10] src/lib/libpam/modules/pam_krb5

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 21:54:12 UTC 2023

Modified Files:
src/lib/libpam/modules/pam_krb5 [netbsd-10]: pam_krb5.8 pam_krb5.c

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

lib/libpam/modules/pam_krb5/pam_krb5.c: revision 1.31
lib/libpam/modules/pam_krb5/pam_krb5.8: revision 1.13

pam_krb5: Refuse to operate without a key to verify tickets.

New allow_kdc_spoof overrides this to restore previous behaviour
which was vulnerable to KDC spoofing, because without a host or
service key, pam_krb5 can't distinguish the legitimate KDC from a
spoofed one.

This way, having pam_krb5 enabled isn't dangerous even if you create
an empty /etc/krb5.conf to use client SSO without any host services.

Perhaps this should use krb5_verify_init_creds(3) instead, and
thereby respect the rather obscurely named krb5.conf option
verify_ap_req_nofail like the Linux pam_krb5 does, but:
- verify_ap_req_nofail is default-off (i.e., vulnerable by default),
- changing verify_ap_req_nofail to default-on would probably affect
  more things and therefore be riskier,
- allow_kdc_spoof is a much clearer way to spell the idea,
- this patch is a smaller semantic change and thus less risky, and
- a security change with compatibility issues shouldn't have a
  workaround that might introduce potentially worse security issues
  or more compatibility issues.

Perhaps this should use krb5_verify_user(3) with secure=1 instead,
for simplicity, but it's not clear how to do that without first
prompting for the password -- which we shouldn't do at all if we
later decide we won't be able to use it anyway -- and without
repeating a bunch of the logic here anyway to pick the service name.

References about verify_ap_req_nofail:
- mit-krb5 discussion about verify_ap_req_nofail:
  https://mailman.mit.edu/pipermail/krbdev/2011-January/009778.html
- Oracle has the default-secure setting in their krb5 system:
  https://docs.oracle.com/cd/E26505_01/html/E27224/setup-148.html
  
https://docs.oracle.com/cd/E26505_01/html/816-5174/krb5.conf-4.html#REFMAN4krb5.conf-4
  https://docs.oracle.com/cd/E19253-01/816-4557/gihyu/
- Heimdal issue on verify_ap_req_nofail default:
  https://github.com/heimdal/heimdal/issues/1129


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.12.16.1 src/lib/libpam/modules/pam_krb5/pam_krb5.8
cvs rdiff -u -r1.30 -r1.30.2.1 src/lib/libpam/modules/pam_krb5/pam_krb5.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/etc/pam.d

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 21:50:34 UTC 2023

Modified Files:
src/etc/pam.d [netbsd-8]: display_manager ftpd sshd su system

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

etc/pam.d/ftpd: revision 1.8
etc/pam.d/su: revision 1.9
etc/pam.d/system: revision 1.9
etc/pam.d/display_manager: revision 1.6
etc/pam.d/sshd: revision 1.10

pam: Disable pam_krb5, pam_ksu by default.

These are not useful unless you also set up /etc/krb5.conf and a
keytab for the host from the Kerberos KDC.  But having them enabled
by default means that creating /etc/krb5.conf just to enable use of
Kerberos for _client-side_ single sign-on creates usability issues.

As proposed on tech-security:
https://mail-index.netbsd.org/tech-security/2023/06/16/msg001160.html


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.40.1 src/etc/pam.d/display_manager
cvs rdiff -u -r1.7 -r1.7.58.1 src/etc/pam.d/ftpd src/etc/pam.d/su
cvs rdiff -u -r1.9 -r1.9.58.1 src/etc/pam.d/sshd
cvs rdiff -u -r1.8 -r1.8.58.1 src/etc/pam.d/system

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



CVS commit: [netbsd-8] src/etc/pam.d

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 21:50:34 UTC 2023

Modified Files:
src/etc/pam.d [netbsd-8]: display_manager ftpd sshd su system

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

etc/pam.d/ftpd: revision 1.8
etc/pam.d/su: revision 1.9
etc/pam.d/system: revision 1.9
etc/pam.d/display_manager: revision 1.6
etc/pam.d/sshd: revision 1.10

pam: Disable pam_krb5, pam_ksu by default.

These are not useful unless you also set up /etc/krb5.conf and a
keytab for the host from the Kerberos KDC.  But having them enabled
by default means that creating /etc/krb5.conf just to enable use of
Kerberos for _client-side_ single sign-on creates usability issues.

As proposed on tech-security:
https://mail-index.netbsd.org/tech-security/2023/06/16/msg001160.html


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.40.1 src/etc/pam.d/display_manager
cvs rdiff -u -r1.7 -r1.7.58.1 src/etc/pam.d/ftpd src/etc/pam.d/su
cvs rdiff -u -r1.9 -r1.9.58.1 src/etc/pam.d/sshd
cvs rdiff -u -r1.8 -r1.8.58.1 src/etc/pam.d/system

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

Modified files:

Index: src/etc/pam.d/display_manager
diff -u src/etc/pam.d/display_manager:1.5 src/etc/pam.d/display_manager:1.5.40.1
--- src/etc/pam.d/display_manager:1.5	Sat Nov 13 19:19:40 2010
+++ src/etc/pam.d/display_manager	Wed Jun 21 21:50:34 2023
@@ -1,4 +1,4 @@
-# $NetBSD: display_manager,v 1.5 2010/11/13 19:19:40 christos Exp $
+# $NetBSD: display_manager,v 1.5.40.1 2023/06/21 21:50:34 martin Exp $
 #
 # PAM configuration for the display manager services.  Specific display
 # manager service configurations can include this one.
@@ -7,14 +7,14 @@
 # auth
 auth		required	pam_nologin.so		no_warn
 auth		sufficient	pam_skey.so		no_warn try_first_pass
-auth		sufficient	pam_krb5.so		no_warn try_first_pass
+#auth		sufficient	pam_krb5.so		no_warn try_first_pass
 auth		optional	pam_afslog.so		no_warn try_first_pass
 # pam_ssh has potential security risks.  See pam_ssh(8).
 #auth		sufficient	pam_ssh.so		no_warn try_first_pass
 auth		required	pam_unix.so		no_warn try_first_pass
 
 # account
-account 	required	pam_krb5.so
+#account 	required	pam_krb5.so
 account		required	pam_unix.so
 
 # session

Index: src/etc/pam.d/ftpd
diff -u src/etc/pam.d/ftpd:1.7 src/etc/pam.d/ftpd:1.7.58.1
--- src/etc/pam.d/ftpd:1.7	Wed Mar 26 11:31:17 2008
+++ src/etc/pam.d/ftpd	Wed Jun 21 21:50:34 2023
@@ -1,4 +1,4 @@
-# $NetBSD: ftpd,v 1.7 2008/03/26 11:31:17 lukem Exp $
+# $NetBSD: ftpd,v 1.7.58.1 2023/06/21 21:50:34 martin Exp $
 #
 # PAM configuration for the "ftpd" service
 #
@@ -8,14 +8,14 @@
 # pam_unix.
 auth		required	pam_nologin.so		no_warn
 auth		sufficient	pam_skey.so		no_warn try_first_pass
-auth		sufficient	pam_krb5.so		no_warn try_first_pass
+#auth		sufficient	pam_krb5.so		no_warn try_first_pass
 auth		optional	pam_afslog.so		no_warn try_first_pass
 auth		required	pam_unix.so		no_warn try_first_pass
 
 # account
 # Even though this is identical to "system", we open code it here because
 # we open code the auth stack.
-account		required	pam_krb5.so
+#account	required	pam_krb5.so
 account		required	pam_unix.so
 
 # session
Index: src/etc/pam.d/su
diff -u src/etc/pam.d/su:1.7 src/etc/pam.d/su:1.7.58.1
--- src/etc/pam.d/su:1.7	Wed Mar 26 11:31:17 2008
+++ src/etc/pam.d/su	Wed Jun 21 21:50:34 2023
@@ -1,4 +1,4 @@
-# $NetBSD: su,v 1.7 2008/03/26 11:31:17 lukem Exp $
+# $NetBSD: su,v 1.7.58.1 2023/06/21 21:50:34 martin Exp $
 #
 # PAM configuration for the "su" service
 #
@@ -7,7 +7,7 @@
 auth		sufficient	pam_rootok.so		no_warn
 auth		sufficient	pam_self.so		no_warn
 auth		sufficient	pam_skey.so		no_warn try_first_pass
-auth		sufficient	pam_ksu.so		no_warn try_first_pass
+#auth		sufficient	pam_ksu.so		no_warn try_first_pass
 #auth		sufficient	pam_group.so		no_warn group=rootauth root_only authenticate
 auth		requisite	pam_group.so		no_warn group=wheel root_only fail_safe
 auth		required	pam_unix.so		no_warn try_first_pass nullok

Index: src/etc/pam.d/sshd
diff -u src/etc/pam.d/sshd:1.9 src/etc/pam.d/sshd:1.9.58.1
--- src/etc/pam.d/sshd:1.9	Wed Mar 26 11:31:17 2008
+++ src/etc/pam.d/sshd	Wed Jun 21 21:50:34 2023
@@ -1,4 +1,4 @@
-# $NetBSD: sshd,v 1.9 2008/03/26 11:31:17 lukem Exp $
+# $NetBSD: sshd,v 1.9.58.1 2023/06/21 21:50:34 martin Exp $
 #
 # PAM configuration for the "sshd" service
 #
@@ -6,14 +6,14 @@
 # auth
 auth		required	pam_nologin.so	no_warn
 auth		sufficient	pam_skey.so	no_warn try_first_pass
-auth		sufficient	pam_krb5.so	no_warn try_first_pass
+#auth		sufficient	pam_krb5.so	no_warn try_first_pass
 auth		optional	pam_afslog.so	no_warn try_first_pass
 # pam_ssh has potential security risks.  See pam_ssh(8).
 #auth		sufficient	pam_ssh.so	no_warn try_first_pass
 auth		required	pam_unix.so	no_warn try_first_pass
 
 # account
-account		required	pam_krb5.so
+#account	required	pam_krb5.so
 

CVS commit: [netbsd-9] src/etc/pam.d

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 21:47:51 UTC 2023

Modified Files:
src/etc/pam.d [netbsd-9]: display_manager ftpd sshd su system

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

etc/pam.d/ftpd: revision 1.8
etc/pam.d/su: revision 1.9
etc/pam.d/system: revision 1.9
etc/pam.d/display_manager: revision 1.6
etc/pam.d/sshd: revision 1.10

pam: Disable pam_krb5, pam_ksu by default.

These are not useful unless you also set up /etc/krb5.conf and a
keytab for the host from the Kerberos KDC.  But having them enabled
by default means that creating /etc/krb5.conf just to enable use of
Kerberos for _client-side_ single sign-on creates usability issues.

As proposed on tech-security:
https://mail-index.netbsd.org/tech-security/2023/06/16/msg001160.html


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.50.1 src/etc/pam.d/display_manager
cvs rdiff -u -r1.7 -r1.7.68.1 src/etc/pam.d/ftpd src/etc/pam.d/su
cvs rdiff -u -r1.9 -r1.9.68.1 src/etc/pam.d/sshd
cvs rdiff -u -r1.8 -r1.8.68.1 src/etc/pam.d/system

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

Modified files:

Index: src/etc/pam.d/display_manager
diff -u src/etc/pam.d/display_manager:1.5 src/etc/pam.d/display_manager:1.5.50.1
--- src/etc/pam.d/display_manager:1.5	Sat Nov 13 19:19:40 2010
+++ src/etc/pam.d/display_manager	Wed Jun 21 21:47:51 2023
@@ -1,4 +1,4 @@
-# $NetBSD: display_manager,v 1.5 2010/11/13 19:19:40 christos Exp $
+# $NetBSD: display_manager,v 1.5.50.1 2023/06/21 21:47:51 martin Exp $
 #
 # PAM configuration for the display manager services.  Specific display
 # manager service configurations can include this one.
@@ -7,14 +7,14 @@
 # auth
 auth		required	pam_nologin.so		no_warn
 auth		sufficient	pam_skey.so		no_warn try_first_pass
-auth		sufficient	pam_krb5.so		no_warn try_first_pass
+#auth		sufficient	pam_krb5.so		no_warn try_first_pass
 auth		optional	pam_afslog.so		no_warn try_first_pass
 # pam_ssh has potential security risks.  See pam_ssh(8).
 #auth		sufficient	pam_ssh.so		no_warn try_first_pass
 auth		required	pam_unix.so		no_warn try_first_pass
 
 # account
-account 	required	pam_krb5.so
+#account 	required	pam_krb5.so
 account		required	pam_unix.so
 
 # session

Index: src/etc/pam.d/ftpd
diff -u src/etc/pam.d/ftpd:1.7 src/etc/pam.d/ftpd:1.7.68.1
--- src/etc/pam.d/ftpd:1.7	Wed Mar 26 11:31:17 2008
+++ src/etc/pam.d/ftpd	Wed Jun 21 21:47:51 2023
@@ -1,4 +1,4 @@
-# $NetBSD: ftpd,v 1.7 2008/03/26 11:31:17 lukem Exp $
+# $NetBSD: ftpd,v 1.7.68.1 2023/06/21 21:47:51 martin Exp $
 #
 # PAM configuration for the "ftpd" service
 #
@@ -8,14 +8,14 @@
 # pam_unix.
 auth		required	pam_nologin.so		no_warn
 auth		sufficient	pam_skey.so		no_warn try_first_pass
-auth		sufficient	pam_krb5.so		no_warn try_first_pass
+#auth		sufficient	pam_krb5.so		no_warn try_first_pass
 auth		optional	pam_afslog.so		no_warn try_first_pass
 auth		required	pam_unix.so		no_warn try_first_pass
 
 # account
 # Even though this is identical to "system", we open code it here because
 # we open code the auth stack.
-account		required	pam_krb5.so
+#account	required	pam_krb5.so
 account		required	pam_unix.so
 
 # session
Index: src/etc/pam.d/su
diff -u src/etc/pam.d/su:1.7 src/etc/pam.d/su:1.7.68.1
--- src/etc/pam.d/su:1.7	Wed Mar 26 11:31:17 2008
+++ src/etc/pam.d/su	Wed Jun 21 21:47:51 2023
@@ -1,4 +1,4 @@
-# $NetBSD: su,v 1.7 2008/03/26 11:31:17 lukem Exp $
+# $NetBSD: su,v 1.7.68.1 2023/06/21 21:47:51 martin Exp $
 #
 # PAM configuration for the "su" service
 #
@@ -7,7 +7,7 @@
 auth		sufficient	pam_rootok.so		no_warn
 auth		sufficient	pam_self.so		no_warn
 auth		sufficient	pam_skey.so		no_warn try_first_pass
-auth		sufficient	pam_ksu.so		no_warn try_first_pass
+#auth		sufficient	pam_ksu.so		no_warn try_first_pass
 #auth		sufficient	pam_group.so		no_warn group=rootauth root_only authenticate
 auth		requisite	pam_group.so		no_warn group=wheel root_only fail_safe
 auth		required	pam_unix.so		no_warn try_first_pass nullok

Index: src/etc/pam.d/sshd
diff -u src/etc/pam.d/sshd:1.9 src/etc/pam.d/sshd:1.9.68.1
--- src/etc/pam.d/sshd:1.9	Wed Mar 26 11:31:17 2008
+++ src/etc/pam.d/sshd	Wed Jun 21 21:47:51 2023
@@ -1,4 +1,4 @@
-# $NetBSD: sshd,v 1.9 2008/03/26 11:31:17 lukem Exp $
+# $NetBSD: sshd,v 1.9.68.1 2023/06/21 21:47:51 martin Exp $
 #
 # PAM configuration for the "sshd" service
 #
@@ -6,14 +6,14 @@
 # auth
 auth		required	pam_nologin.so	no_warn
 auth		sufficient	pam_skey.so	no_warn try_first_pass
-auth		sufficient	pam_krb5.so	no_warn try_first_pass
+#auth		sufficient	pam_krb5.so	no_warn try_first_pass
 auth		optional	pam_afslog.so	no_warn try_first_pass
 # pam_ssh has potential security risks.  See pam_ssh(8).
 #auth		sufficient	pam_ssh.so	no_warn try_first_pass
 auth		required	pam_unix.so	no_warn try_first_pass
 
 # account
-account		required	pam_krb5.so
+#account	required	pam_krb5.so
 

CVS commit: [netbsd-9] src/etc/pam.d

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 21:47:51 UTC 2023

Modified Files:
src/etc/pam.d [netbsd-9]: display_manager ftpd sshd su system

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

etc/pam.d/ftpd: revision 1.8
etc/pam.d/su: revision 1.9
etc/pam.d/system: revision 1.9
etc/pam.d/display_manager: revision 1.6
etc/pam.d/sshd: revision 1.10

pam: Disable pam_krb5, pam_ksu by default.

These are not useful unless you also set up /etc/krb5.conf and a
keytab for the host from the Kerberos KDC.  But having them enabled
by default means that creating /etc/krb5.conf just to enable use of
Kerberos for _client-side_ single sign-on creates usability issues.

As proposed on tech-security:
https://mail-index.netbsd.org/tech-security/2023/06/16/msg001160.html


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.50.1 src/etc/pam.d/display_manager
cvs rdiff -u -r1.7 -r1.7.68.1 src/etc/pam.d/ftpd src/etc/pam.d/su
cvs rdiff -u -r1.9 -r1.9.68.1 src/etc/pam.d/sshd
cvs rdiff -u -r1.8 -r1.8.68.1 src/etc/pam.d/system

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



CVS commit: src/lib/libedit

2023-06-21 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Jun 21 21:44:31 UTC 2023

Modified Files:
src/lib/libedit: libedit.pc

Log Message:
libedit: fix pkg-config to really provide readline directory as intended


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libedit/libedit.pc

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/libedit.pc
diff -u src/lib/libedit/libedit.pc:1.1 src/lib/libedit/libedit.pc:1.2
--- src/lib/libedit/libedit.pc:1.1	Tue Jun 20 23:09:14 2023
+++ src/lib/libedit/libedit.pc	Wed Jun 21 21:44:31 2023
@@ -9,4 +9,4 @@ Version: 3.1
 Requires:
 Libs: -Wl,-R${libdir} -L${libdir} -ledit
 Libs.private: -ltermcap 
-Cflags: -I${includedir} -I${includedir}/editline
+Cflags: -I${includedir} -I${includedir}/readline



CVS commit: src/lib/libedit

2023-06-21 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Jun 21 21:44:31 UTC 2023

Modified Files:
src/lib/libedit: libedit.pc

Log Message:
libedit: fix pkg-config to really provide readline directory as intended


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libedit/libedit.pc

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



CVS commit: [netbsd-10] src/etc/pam.d

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 21:33:02 UTC 2023

Modified Files:
src/etc/pam.d [netbsd-10]: display_manager ftpd sshd su system

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

etc/pam.d/ftpd: revision 1.8
etc/pam.d/su: revision 1.9
etc/pam.d/system: revision 1.9
etc/pam.d/display_manager: revision 1.6
etc/pam.d/sshd: revision 1.10

pam: Disable pam_krb5, pam_ksu by default.

These are not useful unless you also set up /etc/krb5.conf and a
keytab for the host from the Kerberos KDC.  But having them enabled
by default means that creating /etc/krb5.conf just to enable use of
Kerberos for _client-side_ single sign-on creates usability issues.

As proposed on tech-security:
https://mail-index.netbsd.org/tech-security/2023/06/16/msg001160.html


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.58.1 src/etc/pam.d/display_manager
cvs rdiff -u -r1.7 -r1.7.76.1 src/etc/pam.d/ftpd
cvs rdiff -u -r1.9 -r1.9.76.1 src/etc/pam.d/sshd
cvs rdiff -u -r1.8 -r1.8.6.1 src/etc/pam.d/su
cvs rdiff -u -r1.8 -r1.8.76.1 src/etc/pam.d/system

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

Modified files:

Index: src/etc/pam.d/display_manager
diff -u src/etc/pam.d/display_manager:1.5 src/etc/pam.d/display_manager:1.5.58.1
--- src/etc/pam.d/display_manager:1.5	Sat Nov 13 19:19:40 2010
+++ src/etc/pam.d/display_manager	Wed Jun 21 21:33:02 2023
@@ -1,4 +1,4 @@
-# $NetBSD: display_manager,v 1.5 2010/11/13 19:19:40 christos Exp $
+# $NetBSD: display_manager,v 1.5.58.1 2023/06/21 21:33:02 martin Exp $
 #
 # PAM configuration for the display manager services.  Specific display
 # manager service configurations can include this one.
@@ -7,14 +7,14 @@
 # auth
 auth		required	pam_nologin.so		no_warn
 auth		sufficient	pam_skey.so		no_warn try_first_pass
-auth		sufficient	pam_krb5.so		no_warn try_first_pass
+#auth		sufficient	pam_krb5.so		no_warn try_first_pass
 auth		optional	pam_afslog.so		no_warn try_first_pass
 # pam_ssh has potential security risks.  See pam_ssh(8).
 #auth		sufficient	pam_ssh.so		no_warn try_first_pass
 auth		required	pam_unix.so		no_warn try_first_pass
 
 # account
-account 	required	pam_krb5.so
+#account 	required	pam_krb5.so
 account		required	pam_unix.so
 
 # session

Index: src/etc/pam.d/ftpd
diff -u src/etc/pam.d/ftpd:1.7 src/etc/pam.d/ftpd:1.7.76.1
--- src/etc/pam.d/ftpd:1.7	Wed Mar 26 11:31:17 2008
+++ src/etc/pam.d/ftpd	Wed Jun 21 21:33:02 2023
@@ -1,4 +1,4 @@
-# $NetBSD: ftpd,v 1.7 2008/03/26 11:31:17 lukem Exp $
+# $NetBSD: ftpd,v 1.7.76.1 2023/06/21 21:33:02 martin Exp $
 #
 # PAM configuration for the "ftpd" service
 #
@@ -8,14 +8,14 @@
 # pam_unix.
 auth		required	pam_nologin.so		no_warn
 auth		sufficient	pam_skey.so		no_warn try_first_pass
-auth		sufficient	pam_krb5.so		no_warn try_first_pass
+#auth		sufficient	pam_krb5.so		no_warn try_first_pass
 auth		optional	pam_afslog.so		no_warn try_first_pass
 auth		required	pam_unix.so		no_warn try_first_pass
 
 # account
 # Even though this is identical to "system", we open code it here because
 # we open code the auth stack.
-account		required	pam_krb5.so
+#account	required	pam_krb5.so
 account		required	pam_unix.so
 
 # session

Index: src/etc/pam.d/sshd
diff -u src/etc/pam.d/sshd:1.9 src/etc/pam.d/sshd:1.9.76.1
--- src/etc/pam.d/sshd:1.9	Wed Mar 26 11:31:17 2008
+++ src/etc/pam.d/sshd	Wed Jun 21 21:33:02 2023
@@ -1,4 +1,4 @@
-# $NetBSD: sshd,v 1.9 2008/03/26 11:31:17 lukem Exp $
+# $NetBSD: sshd,v 1.9.76.1 2023/06/21 21:33:02 martin Exp $
 #
 # PAM configuration for the "sshd" service
 #
@@ -6,14 +6,14 @@
 # auth
 auth		required	pam_nologin.so	no_warn
 auth		sufficient	pam_skey.so	no_warn try_first_pass
-auth		sufficient	pam_krb5.so	no_warn try_first_pass
+#auth		sufficient	pam_krb5.so	no_warn try_first_pass
 auth		optional	pam_afslog.so	no_warn try_first_pass
 # pam_ssh has potential security risks.  See pam_ssh(8).
 #auth		sufficient	pam_ssh.so	no_warn try_first_pass
 auth		required	pam_unix.so	no_warn try_first_pass
 
 # account
-account		required	pam_krb5.so
+#account	required	pam_krb5.so
 account		required	pam_login_access.so
 account		required	pam_unix.so
 
@@ -23,5 +23,5 @@ account		required	pam_unix.so
 session		required	pam_permit.so
 
 # password
-password	sufficient	pam_krb5.so	no_warn try_first_pass
+#password	sufficient	pam_krb5.so	no_warn try_first_pass
 password	required	pam_unix.so	no_warn try_first_pass

Index: src/etc/pam.d/su
diff -u src/etc/pam.d/su:1.8 src/etc/pam.d/su:1.8.6.1
--- src/etc/pam.d/su:1.8	Tue Mar  3 00:47:33 2020
+++ src/etc/pam.d/su	Wed Jun 21 21:33:02 2023
@@ -1,4 +1,4 @@
-# $NetBSD: su,v 1.8 2020/03/03 00:47:33 christos Exp $
+# $NetBSD: su,v 1.8.6.1 2023/06/21 21:33:02 martin Exp $
 #
 # PAM configuration for the "su" service
 #
@@ -8,7 +8,7 @@ auth		sufficient	pam_rootok.so		no_warn
 auth		sufficient	pam_self.so		no_warn
 auth		

CVS commit: [netbsd-10] src/etc/pam.d

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 21:33:02 UTC 2023

Modified Files:
src/etc/pam.d [netbsd-10]: display_manager ftpd sshd su system

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

etc/pam.d/ftpd: revision 1.8
etc/pam.d/su: revision 1.9
etc/pam.d/system: revision 1.9
etc/pam.d/display_manager: revision 1.6
etc/pam.d/sshd: revision 1.10

pam: Disable pam_krb5, pam_ksu by default.

These are not useful unless you also set up /etc/krb5.conf and a
keytab for the host from the Kerberos KDC.  But having them enabled
by default means that creating /etc/krb5.conf just to enable use of
Kerberos for _client-side_ single sign-on creates usability issues.

As proposed on tech-security:
https://mail-index.netbsd.org/tech-security/2023/06/16/msg001160.html


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.58.1 src/etc/pam.d/display_manager
cvs rdiff -u -r1.7 -r1.7.76.1 src/etc/pam.d/ftpd
cvs rdiff -u -r1.9 -r1.9.76.1 src/etc/pam.d/sshd
cvs rdiff -u -r1.8 -r1.8.6.1 src/etc/pam.d/su
cvs rdiff -u -r1.8 -r1.8.76.1 src/etc/pam.d/system

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/dev/pci

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 21:29:58 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-8]: if_wm.c

Log Message:
Apply patch, requested by riastradh in ticket #1842:

sys/dev/pci/if_wm.c (apply patch)

Fix a bug introduced in ticket #1795.


To generate a diff of this commit:
cvs rdiff -u -r1.508.4.48 -r1.508.4.49 src/sys/dev/pci/if_wm.c

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

Modified files:

Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.508.4.48 src/sys/dev/pci/if_wm.c:1.508.4.49
--- src/sys/dev/pci/if_wm.c:1.508.4.48	Mon Jan 23 14:01:25 2023
+++ src/sys/dev/pci/if_wm.c	Wed Jun 21 21:29:57 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.508.4.48 2023/01/23 14:01:25 martin Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.508.4.49 2023/06/21 21:29:57 martin Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.508.4.48 2023/01/23 14:01:25 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.508.4.49 2023/06/21 21:29:57 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -9809,7 +9809,7 @@ wm_linkintr_gmii(struct wm_softc *sc, ui
 		if (wm_phy_need_linkdown_discard(sc)) {
 			DPRINTF(sc, WM_DEBUG_LINK,
 			("%s: linkintr: Clear linkdown discard flag\n",
-device_xname(dev)));
+device_xname(sc->sc_dev)));
 			wm_clear_linkdown_discard(sc);
 		}
 	} else {
@@ -9818,7 +9818,7 @@ wm_linkintr_gmii(struct wm_softc *sc, ui
 		if (wm_phy_need_linkdown_discard(sc)) {
 			DPRINTF(sc, WM_DEBUG_LINK,
 			("%s: linkintr: Set linkdown discard flag\n",
-device_xname(dev)));
+device_xname(sc->sc_dev)));
 			wm_set_linkdown_discard(sc);
 		}
 	}



CVS commit: [netbsd-8] src/sys/dev/pci

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 21:29:58 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-8]: if_wm.c

Log Message:
Apply patch, requested by riastradh in ticket #1842:

sys/dev/pci/if_wm.c (apply patch)

Fix a bug introduced in ticket #1795.


To generate a diff of this commit:
cvs rdiff -u -r1.508.4.48 -r1.508.4.49 src/sys/dev/pci/if_wm.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/sys/compat

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 21:26:16 UTC 2023

Modified Files:
src/sys/compat/linux32/arch/amd64 [netbsd-8]: linux32_machdep.c
src/sys/compat/ossaudio [netbsd-8]: ossaudio.c
src/sys/compat/sunos32 [netbsd-8]: sunos32_misc.c

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

sys/compat/sunos32/sunos32_misc.c: revision 1.86
sys/compat/ossaudio/ossaudio.c: revision 1.85
sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.48

compat_sunos32: Memset zero before copyout.

Unclear if this can leak anything but let's be on the safe side.

compat_ossaudio: Zero-initialize idat before copyout.
Unclear if there are any paths to the copyout without initialization,
but let's play it safe to keep the auditing effort low.

linux32_rt_sendsig: Memset zero before copyout.
Not sure if there's any padding here, but it's a pretty big
structure, fairly likely, so let's be rather safe than sorry.


To generate a diff of this commit:
cvs rdiff -u -r1.38.6.3 -r1.38.6.4 \
src/sys/compat/linux32/arch/amd64/linux32_machdep.c
cvs rdiff -u -r1.70.6.4 -r1.70.6.5 src/sys/compat/ossaudio/ossaudio.c
cvs rdiff -u -r1.77.10.2 -r1.77.10.3 src/sys/compat/sunos32/sunos32_misc.c

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

Modified files:

Index: src/sys/compat/linux32/arch/amd64/linux32_machdep.c
diff -u src/sys/compat/linux32/arch/amd64/linux32_machdep.c:1.38.6.3 src/sys/compat/linux32/arch/amd64/linux32_machdep.c:1.38.6.4
--- src/sys/compat/linux32/arch/amd64/linux32_machdep.c:1.38.6.3	Wed Jun 21 21:04:03 2023
+++ src/sys/compat/linux32/arch/amd64/linux32_machdep.c	Wed Jun 21 21:26:16 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux32_machdep.c,v 1.38.6.3 2023/06/21 21:04:03 martin Exp $ */
+/*	$NetBSD: linux32_machdep.c,v 1.38.6.4 2023/06/21 21:26:16 martin Exp $ */
 
 /*-
  * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -31,7 +31,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux32_machdep.c,v 1.38.6.3 2023/06/21 21:04:03 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_machdep.c,v 1.38.6.4 2023/06/21 21:26:16 martin Exp $");
 
 #include 
 #include 
@@ -191,6 +191,7 @@ linux32_rt_sendsig(const ksiginfo_t *ksi
 	fp--;
 
 	/* Build stack frame for signal trampoline. */
+	memset(, 0, sizeof(frame));
 	NETBSD32PTR32(frame.sf_handler, catcher);
 	frame.sf_sig = native_to_linux32_signo[sig];
 	NETBSD32PTR32(frame.sf_sip, >sf_si);

Index: src/sys/compat/ossaudio/ossaudio.c
diff -u src/sys/compat/ossaudio/ossaudio.c:1.70.6.4 src/sys/compat/ossaudio/ossaudio.c:1.70.6.5
--- src/sys/compat/ossaudio/ossaudio.c:1.70.6.4	Wed Jun 21 21:04:02 2023
+++ src/sys/compat/ossaudio/ossaudio.c	Wed Jun 21 21:26:16 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ossaudio.c,v 1.70.6.4 2023/06/21 21:04:02 martin Exp $	*/
+/*	$NetBSD: ossaudio.c,v 1.70.6.5 2023/06/21 21:26:16 martin Exp $	*/
 
 /*-
  * Copyright (c) 1997, 2008 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.70.6.4 2023/06/21 21:04:02 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.70.6.5 2023/06/21 21:26:16 martin Exp $");
 
 #include 
 #include 
@@ -1041,7 +1041,7 @@ oss_ioctl_mixer(struct lwp *lwp, const s
 	mixer_ctrl_t mc;
 	struct oss_mixer_info omi;
 	struct audio_device adev;
-	int idat;
+	int idat = 0;
 	int i;
 	int error;
 	int l, r, n, e;

Index: src/sys/compat/sunos32/sunos32_misc.c
diff -u src/sys/compat/sunos32/sunos32_misc.c:1.77.10.2 src/sys/compat/sunos32/sunos32_misc.c:1.77.10.3
--- src/sys/compat/sunos32/sunos32_misc.c:1.77.10.2	Wed Jun 21 21:04:03 2023
+++ src/sys/compat/sunos32/sunos32_misc.c	Wed Jun 21 21:26:16 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: sunos32_misc.c,v 1.77.10.2 2023/06/21 21:04:03 martin Exp $	*/
+/*	$NetBSD: sunos32_misc.c,v 1.77.10.3 2023/06/21 21:26:16 martin Exp $	*/
 /* from :NetBSD: sunos_misc.c,v 1.107 2000/12/01 19:25:10 jdolecek Exp	*/
 
 /*
@@ -77,7 +77,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunos32_misc.c,v 1.77.10.2 2023/06/21 21:04:03 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunos32_misc.c,v 1.77.10.3 2023/06/21 21:26:16 martin Exp $");
 
 #define COMPAT_SUNOS 1
 
@@ -242,6 +242,7 @@ static inline void sunos32_from___stat13
 static inline void
 sunos32_from___stat13(struct stat *sbp, struct netbsd32_stat43 *sb32p)
 {
+	memset(sb32p, 0, sizeof(*sb32p));
 	sb32p->st_dev = sbp->st_dev;
 	sb32p->st_ino = sbp->st_ino;
 	sb32p->st_mode = sbp->st_mode;



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

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 21:26:16 UTC 2023

Modified Files:
src/sys/compat/linux32/arch/amd64 [netbsd-8]: linux32_machdep.c
src/sys/compat/ossaudio [netbsd-8]: ossaudio.c
src/sys/compat/sunos32 [netbsd-8]: sunos32_misc.c

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

sys/compat/sunos32/sunos32_misc.c: revision 1.86
sys/compat/ossaudio/ossaudio.c: revision 1.85
sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.48

compat_sunos32: Memset zero before copyout.

Unclear if this can leak anything but let's be on the safe side.

compat_ossaudio: Zero-initialize idat before copyout.
Unclear if there are any paths to the copyout without initialization,
but let's play it safe to keep the auditing effort low.

linux32_rt_sendsig: Memset zero before copyout.
Not sure if there's any padding here, but it's a pretty big
structure, fairly likely, so let's be rather safe than sorry.


To generate a diff of this commit:
cvs rdiff -u -r1.38.6.3 -r1.38.6.4 \
src/sys/compat/linux32/arch/amd64/linux32_machdep.c
cvs rdiff -u -r1.70.6.4 -r1.70.6.5 src/sys/compat/ossaudio/ossaudio.c
cvs rdiff -u -r1.77.10.2 -r1.77.10.3 src/sys/compat/sunos32/sunos32_misc.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/compat

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 21:24:38 UTC 2023

Modified Files:
src/sys/compat/linux32/arch/amd64 [netbsd-9]: linux32_machdep.c
src/sys/compat/ossaudio [netbsd-9]: ossaudio.c
src/sys/compat/sunos32 [netbsd-9]: sunos32_misc.c

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

sys/compat/sunos32/sunos32_misc.c: revision 1.86
sys/compat/ossaudio/ossaudio.c: revision 1.85
sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.48

compat_sunos32: Memset zero before copyout.

Unclear if this can leak anything but let's be on the safe side.

compat_ossaudio: Zero-initialize idat before copyout.
Unclear if there are any paths to the copyout without initialization,
but let's play it safe to keep the auditing effort low.

linux32_rt_sendsig: Memset zero before copyout.
Not sure if there's any padding here, but it's a pretty big
structure, fairly likely, so let's be rather safe than sorry.


To generate a diff of this commit:
cvs rdiff -u -r1.45.2.1 -r1.45.2.2 \
src/sys/compat/linux32/arch/amd64/linux32_machdep.c
cvs rdiff -u -r1.74.4.5 -r1.74.4.6 src/sys/compat/ossaudio/ossaudio.c
cvs rdiff -u -r1.79.4.1 -r1.79.4.2 src/sys/compat/sunos32/sunos32_misc.c

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

Modified files:

Index: src/sys/compat/linux32/arch/amd64/linux32_machdep.c
diff -u src/sys/compat/linux32/arch/amd64/linux32_machdep.c:1.45.2.1 src/sys/compat/linux32/arch/amd64/linux32_machdep.c:1.45.2.2
--- src/sys/compat/linux32/arch/amd64/linux32_machdep.c:1.45.2.1	Wed Aug  3 11:11:33 2022
+++ src/sys/compat/linux32/arch/amd64/linux32_machdep.c	Wed Jun 21 21:24:38 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux32_machdep.c,v 1.45.2.1 2022/08/03 11:11:33 martin Exp $ */
+/*	$NetBSD: linux32_machdep.c,v 1.45.2.2 2023/06/21 21:24:38 martin Exp $ */
 
 /*-
  * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -31,7 +31,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux32_machdep.c,v 1.45.2.1 2022/08/03 11:11:33 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_machdep.c,v 1.45.2.2 2023/06/21 21:24:38 martin Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_user_ldt.h"
@@ -195,6 +195,7 @@ linux32_rt_sendsig(const ksiginfo_t *ksi
 	fp--;
 
 	/* Build stack frame for signal trampoline. */
+	memset(, 0, sizeof(frame));
 	NETBSD32PTR32(frame.sf_handler, catcher);
 	frame.sf_sig = native_to_linux32_signo[sig];
 	NETBSD32PTR32(frame.sf_sip, >sf_si);

Index: src/sys/compat/ossaudio/ossaudio.c
diff -u src/sys/compat/ossaudio/ossaudio.c:1.74.4.5 src/sys/compat/ossaudio/ossaudio.c:1.74.4.6
--- src/sys/compat/ossaudio/ossaudio.c:1.74.4.5	Wed Aug  3 11:11:32 2022
+++ src/sys/compat/ossaudio/ossaudio.c	Wed Jun 21 21:24:37 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ossaudio.c,v 1.74.4.5 2022/08/03 11:11:32 martin Exp $	*/
+/*	$NetBSD: ossaudio.c,v 1.74.4.6 2023/06/21 21:24:37 martin Exp $	*/
 
 /*-
  * Copyright (c) 1997, 2008 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.74.4.5 2022/08/03 11:11:32 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.74.4.6 2023/06/21 21:24:37 martin Exp $");
 
 #include 
 #include 
@@ -1069,7 +1069,7 @@ oss_ioctl_mixer(struct lwp *lwp, const s
 	mixer_ctrl_t mc;
 	struct oss_mixer_info omi;
 	struct audio_device adev;
-	int idat;
+	int idat = 0;
 	int i;
 	int error;
 	int l, r, n, e;

Index: src/sys/compat/sunos32/sunos32_misc.c
diff -u src/sys/compat/sunos32/sunos32_misc.c:1.79.4.1 src/sys/compat/sunos32/sunos32_misc.c:1.79.4.2
--- src/sys/compat/sunos32/sunos32_misc.c:1.79.4.1	Wed Aug  3 11:11:33 2022
+++ src/sys/compat/sunos32/sunos32_misc.c	Wed Jun 21 21:24:37 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: sunos32_misc.c,v 1.79.4.1 2022/08/03 11:11:33 martin Exp $	*/
+/*	$NetBSD: sunos32_misc.c,v 1.79.4.2 2023/06/21 21:24:37 martin Exp $	*/
 /* from :NetBSD: sunos_misc.c,v 1.107 2000/12/01 19:25:10 jdolecek Exp	*/
 
 /*
@@ -77,7 +77,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunos32_misc.c,v 1.79.4.1 2022/08/03 11:11:33 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunos32_misc.c,v 1.79.4.2 2023/06/21 21:24:37 martin Exp $");
 
 #define COMPAT_SUNOS 1
 
@@ -242,6 +242,7 @@ static inline void sunos32_from___stat13
 static inline void
 sunos32_from___stat13(struct stat *sbp, struct netbsd32_stat43 *sb32p)
 {
+	memset(sb32p, 0, sizeof(*sb32p));
 	sb32p->st_dev = sbp->st_dev;
 	sb32p->st_ino = sbp->st_ino;
 	sb32p->st_mode = sbp->st_mode;



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

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 21:24:38 UTC 2023

Modified Files:
src/sys/compat/linux32/arch/amd64 [netbsd-9]: linux32_machdep.c
src/sys/compat/ossaudio [netbsd-9]: ossaudio.c
src/sys/compat/sunos32 [netbsd-9]: sunos32_misc.c

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

sys/compat/sunos32/sunos32_misc.c: revision 1.86
sys/compat/ossaudio/ossaudio.c: revision 1.85
sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.48

compat_sunos32: Memset zero before copyout.

Unclear if this can leak anything but let's be on the safe side.

compat_ossaudio: Zero-initialize idat before copyout.
Unclear if there are any paths to the copyout without initialization,
but let's play it safe to keep the auditing effort low.

linux32_rt_sendsig: Memset zero before copyout.
Not sure if there's any padding here, but it's a pretty big
structure, fairly likely, so let's be rather safe than sorry.


To generate a diff of this commit:
cvs rdiff -u -r1.45.2.1 -r1.45.2.2 \
src/sys/compat/linux32/arch/amd64/linux32_machdep.c
cvs rdiff -u -r1.74.4.5 -r1.74.4.6 src/sys/compat/ossaudio/ossaudio.c
cvs rdiff -u -r1.79.4.1 -r1.79.4.2 src/sys/compat/sunos32/sunos32_misc.c

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



CVS commit: [netbsd-10] src/sys/compat

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 21:22:53 UTC 2023

Modified Files:
src/sys/compat/linux32/arch/amd64 [netbsd-10]: linux32_machdep.c
src/sys/compat/ossaudio [netbsd-10]: ossaudio.c
src/sys/compat/sunos32 [netbsd-10]: sunos32_misc.c

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

sys/compat/sunos32/sunos32_misc.c: revision 1.86
sys/compat/ossaudio/ossaudio.c: revision 1.85
sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.48

compat_sunos32: Memset zero before copyout.

Unclear if this can leak anything but let's be on the safe side.

compat_ossaudio: Zero-initialize idat before copyout.
Unclear if there are any paths to the copyout without initialization,
but let's play it safe to keep the auditing effort low.

linux32_rt_sendsig: Memset zero before copyout.
Not sure if there's any padding here, but it's a pretty big
structure, fairly likely, so let's be rather safe than sorry.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.47.4.1 \
src/sys/compat/linux32/arch/amd64/linux32_machdep.c
cvs rdiff -u -r1.84 -r1.84.4.1 src/sys/compat/ossaudio/ossaudio.c
cvs rdiff -u -r1.85 -r1.85.4.1 src/sys/compat/sunos32/sunos32_misc.c

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

Modified files:

Index: src/sys/compat/linux32/arch/amd64/linux32_machdep.c
diff -u src/sys/compat/linux32/arch/amd64/linux32_machdep.c:1.47 src/sys/compat/linux32/arch/amd64/linux32_machdep.c:1.47.4.1
--- src/sys/compat/linux32/arch/amd64/linux32_machdep.c:1.47	Mon Nov  1 05:07:16 2021
+++ src/sys/compat/linux32/arch/amd64/linux32_machdep.c	Wed Jun 21 21:22:53 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux32_machdep.c,v 1.47 2021/11/01 05:07:16 thorpej Exp $ */
+/*	$NetBSD: linux32_machdep.c,v 1.47.4.1 2023/06/21 21:22:53 martin Exp $ */
 
 /*-
  * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -31,7 +31,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux32_machdep.c,v 1.47 2021/11/01 05:07:16 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_machdep.c,v 1.47.4.1 2023/06/21 21:22:53 martin Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_user_ldt.h"
@@ -195,6 +195,7 @@ linux32_rt_sendsig(const ksiginfo_t *ksi
 	fp--;
 
 	/* Build stack frame for signal trampoline. */
+	memset(, 0, sizeof(frame));
 	NETBSD32PTR32(frame.sf_handler, catcher);
 	frame.sf_sig = native_to_linux32_signo[sig];
 	NETBSD32PTR32(frame.sf_sip, >sf_si);

Index: src/sys/compat/ossaudio/ossaudio.c
diff -u src/sys/compat/ossaudio/ossaudio.c:1.84 src/sys/compat/ossaudio/ossaudio.c:1.84.4.1
--- src/sys/compat/ossaudio/ossaudio.c:1.84	Tue Sep  7 11:43:05 2021
+++ src/sys/compat/ossaudio/ossaudio.c	Wed Jun 21 21:22:53 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ossaudio.c,v 1.84 2021/09/07 11:43:05 riastradh Exp $	*/
+/*	$NetBSD: ossaudio.c,v 1.84.4.1 2023/06/21 21:22:53 martin Exp $	*/
 
 /*-
  * Copyright (c) 1997, 2008 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.84 2021/09/07 11:43:05 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.84.4.1 2023/06/21 21:22:53 martin Exp $");
 
 #include 
 #include 
@@ -1069,7 +1069,7 @@ oss_ioctl_mixer(struct lwp *lwp, const s
 	mixer_ctrl_t mc;
 	struct oss_mixer_info omi;
 	struct audio_device adev;
-	int idat;
+	int idat = 0;
 	int i;
 	int error;
 	int l, r, n, e;

Index: src/sys/compat/sunos32/sunos32_misc.c
diff -u src/sys/compat/sunos32/sunos32_misc.c:1.85 src/sys/compat/sunos32/sunos32_misc.c:1.85.4.1
--- src/sys/compat/sunos32/sunos32_misc.c:1.85	Tue Sep  7 11:43:05 2021
+++ src/sys/compat/sunos32/sunos32_misc.c	Wed Jun 21 21:22:53 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: sunos32_misc.c,v 1.85 2021/09/07 11:43:05 riastradh Exp $	*/
+/*	$NetBSD: sunos32_misc.c,v 1.85.4.1 2023/06/21 21:22:53 martin Exp $	*/
 /* from :NetBSD: sunos_misc.c,v 1.107 2000/12/01 19:25:10 jdolecek Exp	*/
 
 /*
@@ -77,7 +77,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunos32_misc.c,v 1.85 2021/09/07 11:43:05 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunos32_misc.c,v 1.85.4.1 2023/06/21 21:22:53 martin Exp $");
 
 #define COMPAT_SUNOS 1
 
@@ -242,6 +242,7 @@ static inline void sunos32_from___stat13
 static inline void
 sunos32_from___stat13(struct stat *sbp, struct netbsd32_stat43 *sb32p)
 {
+	memset(sb32p, 0, sizeof(*sb32p));
 	sb32p->st_dev = sbp->st_dev;
 	sb32p->st_ino = sbp->st_ino;
 	sb32p->st_mode = sbp->st_mode;



CVS commit: [netbsd-10] src/sys/compat

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 21:22:53 UTC 2023

Modified Files:
src/sys/compat/linux32/arch/amd64 [netbsd-10]: linux32_machdep.c
src/sys/compat/ossaudio [netbsd-10]: ossaudio.c
src/sys/compat/sunos32 [netbsd-10]: sunos32_misc.c

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

sys/compat/sunos32/sunos32_misc.c: revision 1.86
sys/compat/ossaudio/ossaudio.c: revision 1.85
sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.48

compat_sunos32: Memset zero before copyout.

Unclear if this can leak anything but let's be on the safe side.

compat_ossaudio: Zero-initialize idat before copyout.
Unclear if there are any paths to the copyout without initialization,
but let's play it safe to keep the auditing effort low.

linux32_rt_sendsig: Memset zero before copyout.
Not sure if there's any padding here, but it's a pretty big
structure, fairly likely, so let's be rather safe than sorry.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.47.4.1 \
src/sys/compat/linux32/arch/amd64/linux32_machdep.c
cvs rdiff -u -r1.84 -r1.84.4.1 src/sys/compat/ossaudio/ossaudio.c
cvs rdiff -u -r1.85 -r1.85.4.1 src/sys/compat/sunos32/sunos32_misc.c

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



CVS commit: src/usr.bin/make/unit-tests

2023-06-21 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Wed Jun 21 21:21:52 UTC 2023

Modified Files:
src/usr.bin/make/unit-tests: directive-include-guard.exp
directive-include-guard.mk

Log Message:
Cleanup guard tests

The .PARSEFILE:tA tests add no value, the correct form
is ${.PARSEDIR:tA}/${.PARSEFILE} but even there :tA rarely matters.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/usr.bin/make/unit-tests/directive-include-guard.exp
cvs rdiff -u -r1.10 -r1.11 \
src/usr.bin/make/unit-tests/directive-include-guard.mk

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

Modified files:

Index: src/usr.bin/make/unit-tests/directive-include-guard.exp
diff -u src/usr.bin/make/unit-tests/directive-include-guard.exp:1.9 src/usr.bin/make/unit-tests/directive-include-guard.exp:1.10
--- src/usr.bin/make/unit-tests/directive-include-guard.exp:1.9	Wed Jun 21 14:33:36 2023
+++ src/usr.bin/make/unit-tests/directive-include-guard.exp	Wed Jun 21 21:21:52 2023
@@ -73,12 +73,6 @@ Parse_PushInput: file target-indirect-PA
 Skipping 'target-indirect-PARSEFILE2.tmp' because '__target-indirect-PARSEFILE2.tmp__' is defined
 Parse_PushInput: file subdir/target-indirect-PARSEFILE.tmp, line 1
 Skipping 'subdir/target-indirect-PARSEFILE.tmp' because '__target-indirect-PARSEFILE.tmp__' is defined
-Parse_PushInput: file target-indirect-PARSEFILE-tA.tmp, line 1
-Skipping 'target-indirect-PARSEFILE-tA.tmp' because '__target-indirect-PARSEFILE-tA.tmp__' is defined
-Parse_PushInput: file subdir/target-indirect-PARSEFILE-tA.tmp, line 1
-Skipping 'subdir/target-indirect-PARSEFILE-tA.tmp' because '__target-indirect-PARSEFILE-tA.tmp__' is defined
-Parse_PushInput: file subdir2/target-indirect-PARSEFILE-tA.tmp, line 1
-Skipping 'subdir2/target-indirect-PARSEFILE-tA.tmp' because '__target-indirect-PARSEFILE-tA.tmp__' is defined
 Parse_PushInput: file target-indirect-PARSEDIR-PARSEFILE.tmp, line 1
 Skipping 'target-indirect-PARSEDIR-PARSEFILE.tmp' because '__target-indirect-PARSEDIR-PARSEFILE.tmp__' is defined
 Parse_PushInput: file subdir/target-indirect-PARSEDIR-PARSEFILE.tmp, line 1

Index: src/usr.bin/make/unit-tests/directive-include-guard.mk
diff -u src/usr.bin/make/unit-tests/directive-include-guard.mk:1.10 src/usr.bin/make/unit-tests/directive-include-guard.mk:1.11
--- src/usr.bin/make/unit-tests/directive-include-guard.mk:1.10	Wed Jun 21 14:33:36 2023
+++ src/usr.bin/make/unit-tests/directive-include-guard.mk	Wed Jun 21 21:21:52 2023
@@ -1,4 +1,4 @@
-# $NetBSD: directive-include-guard.mk,v 1.10 2023/06/21 14:33:36 rillig Exp $
+# $NetBSD: directive-include-guard.mk,v 1.11 2023/06/21 21:21:52 sjg Exp $
 #
 # Tests for multiple-inclusion guards in makefiles.
 #
@@ -460,49 +460,8 @@ LINES.subdir/target-indirect-PARSEFILE= 
 # expect: Parse_PushInput: file subdir/target-indirect-PARSEFILE.tmp, line 1
 # expect: Skipping 'subdir/target-indirect-PARSEFILE.tmp' because '__target-indirect-PARSEFILE.tmp__' is defined
 
-# Another common form of guard target is __${.PARSEFILE:tA}__.  This form only
-# works for files that are in the current working directory, it does not work
-# for files from other directories, as the modifier ':tA' resolves a file
-# relative to the current working directory ('.OBJDIR').  To get a robust
-# pattern, use __${.PARSEDIR}/.${.PARSEFILE}__ instead.
-INCS+=	target-indirect-PARSEFILE-tA
-LINES.target-indirect-PARSEFILE-tA= \
-	'.if !target(__$${.PARSEFILE:tA}__)' \
-	'__$${.PARSEFILE:tA}__: .NOTMAIN' \
-	'.endif'
-# expect: Parse_PushInput: file target-indirect-PARSEFILE-tA.tmp, line 1
-# expect: Skipping 'target-indirect-PARSEFILE-tA.tmp' because '__target-indirect-PARSEFILE-tA.tmp__' is defined
-# The actual target starts with '__${.OBJDIR}/', see the .rawout file, but the
-# string '${.OBJDIR}/' gets stripped in post processing.
-
-# Using the ':tA' modifier to construct guard target names is generally wrong,
-# as the ':tA' modifier only works for files in the current working directory.
-# For files from subdirectories that are not also found in the current working
-# directory, applying the modifier ':tA' has no effect.
-INCS+=	subdir/target-indirect-PARSEFILE-tA
-LINES.subdir/target-indirect-PARSEFILE-tA= \
-	'.if !target(__$${.PARSEFILE:tA}__)' \
-	'__$${.PARSEFILE:tA}__: .NOTMAIN' \
-	'.endif'
-# expect: Parse_PushInput: file subdir/target-indirect-PARSEFILE-tA.tmp, line 1
-# expect: Skipping 'subdir/target-indirect-PARSEFILE-tA.tmp' because '__target-indirect-PARSEFILE-tA.tmp__' is defined
-# The guard target name does not include any directory since the ':tA'
-# modifier file cannot resolve the file in the current working directory.
-
-# If there are two subdirectories that both have a file with the same basename
-# that uses '${.PARSEFILE:tA}' as its guard target, the second file reuses the
-# guard name from the first file.  To get a robust scheme of guard target
-# names, use 

CVS commit: src/usr.bin/make/unit-tests

2023-06-21 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Wed Jun 21 21:21:52 UTC 2023

Modified Files:
src/usr.bin/make/unit-tests: directive-include-guard.exp
directive-include-guard.mk

Log Message:
Cleanup guard tests

The .PARSEFILE:tA tests add no value, the correct form
is ${.PARSEDIR:tA}/${.PARSEFILE} but even there :tA rarely matters.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/usr.bin/make/unit-tests/directive-include-guard.exp
cvs rdiff -u -r1.10 -r1.11 \
src/usr.bin/make/unit-tests/directive-include-guard.mk

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/compat/netbsd32

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 21:19:38 UTC 2023

Modified Files:
src/sys/compat/netbsd32 [netbsd-8]: netbsd32_nfssvc.c

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

sys/compat/netbsd32/netbsd32_nfssvc.c: revision 1.7

compat_netbsd32: Copy out 32-bit version in nfssvc32_nsd_out.


To generate a diff of this commit:
cvs rdiff -u -r1.5.8.1 -r1.5.8.2 src/sys/compat/netbsd32/netbsd32_nfssvc.c

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

Modified files:

Index: src/sys/compat/netbsd32/netbsd32_nfssvc.c
diff -u src/sys/compat/netbsd32/netbsd32_nfssvc.c:1.5.8.1 src/sys/compat/netbsd32/netbsd32_nfssvc.c:1.5.8.2
--- src/sys/compat/netbsd32/netbsd32_nfssvc.c:1.5.8.1	Wed Jun 21 21:04:01 2023
+++ src/sys/compat/netbsd32/netbsd32_nfssvc.c	Wed Jun 21 21:19:38 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_nfssvc.c,v 1.5.8.1 2023/06/21 21:04:01 martin Exp $	*/
+/*	$NetBSD: netbsd32_nfssvc.c,v 1.5.8.2 2023/06/21 21:19:38 martin Exp $	*/
 
 /*
  * Copyright (c) 2015 Matthew R. Green
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_nfssvc.c,v 1.5.8.1 2023/06/21 21:04:01 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_nfssvc.c,v 1.5.8.2 2023/06/21 21:19:38 martin Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_nfs.h"
@@ -137,7 +137,7 @@ nfssvc32_nsd_out(void *argp, const struc
 	args32.nsd_key[0] = nsd->nsd_key[0];
 	args32.nsd_key[1] = nsd->nsd_key[1];
 
-	return copyout(nsd, argp, sizeof *nsd);
+	return copyout(, argp, sizeof args32);
 }
 
 static int



CVS commit: [netbsd-8] src/sys/compat/netbsd32

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 21:19:38 UTC 2023

Modified Files:
src/sys/compat/netbsd32 [netbsd-8]: netbsd32_nfssvc.c

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

sys/compat/netbsd32/netbsd32_nfssvc.c: revision 1.7

compat_netbsd32: Copy out 32-bit version in nfssvc32_nsd_out.


To generate a diff of this commit:
cvs rdiff -u -r1.5.8.1 -r1.5.8.2 src/sys/compat/netbsd32/netbsd32_nfssvc.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/sys/compat

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 21:16:09 UTC 2023

Modified Files:
src/sys/compat/common [netbsd-8]: kern_time_30.c
src/sys/compat/netbsd32 [netbsd-8]: netbsd32_time.c

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

sys/compat/common/kern_time_30.c: revision 1.6
sys/compat/netbsd32/netbsd32_time.c: revision 1.50

Paranoia: zero COMPAT_30 ntptimeval and 32-bit ntptimeval too.

These structs don't have padding but safer to keep the code
structured the same way between the various ntp_gettimes in case
anyone makes more copypasta of it for future updates.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.8.1 src/sys/compat/common/kern_time_30.c
cvs rdiff -u -r1.49.6.1 -r1.49.6.2 src/sys/compat/netbsd32/netbsd32_time.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/sys/compat

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 21:16:09 UTC 2023

Modified Files:
src/sys/compat/common [netbsd-8]: kern_time_30.c
src/sys/compat/netbsd32 [netbsd-8]: netbsd32_time.c

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

sys/compat/common/kern_time_30.c: revision 1.6
sys/compat/netbsd32/netbsd32_time.c: revision 1.50

Paranoia: zero COMPAT_30 ntptimeval and 32-bit ntptimeval too.

These structs don't have padding but safer to keep the code
structured the same way between the various ntp_gettimes in case
anyone makes more copypasta of it for future updates.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.8.1 src/sys/compat/common/kern_time_30.c
cvs rdiff -u -r1.49.6.1 -r1.49.6.2 src/sys/compat/netbsd32/netbsd32_time.c

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

Modified files:

Index: src/sys/compat/common/kern_time_30.c
diff -u src/sys/compat/common/kern_time_30.c:1.5 src/sys/compat/common/kern_time_30.c:1.5.8.1
--- src/sys/compat/common/kern_time_30.c:1.5	Thu Nov  3 03:37:06 2016
+++ src/sys/compat/common/kern_time_30.c	Wed Jun 21 21:16:09 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_time_30.c,v 1.5 2016/11/03 03:37:06 riastradh Exp $	*/
+/*	$NetBSD: kern_time_30.c,v 1.5.8.1 2023/06/21 21:16:09 martin Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_time_30.c,v 1.5 2016/11/03 03:37:06 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_time_30.c,v 1.5.8.1 2023/06/21 21:16:09 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ntp.h"
@@ -68,6 +68,7 @@ compat_30_sys_ntp_gettime(struct lwp *l,
 
 	if (SCARG(uap, ntvp)) {
 		ntp_gettime();
+		memset(, 0, sizeof(ntv30));
 		TIMESPEC_TO_TIMEVAL(, );
 		timeval_to_timeval50(, );
 		ntv30.maxerror = ntv.maxerror;

Index: src/sys/compat/netbsd32/netbsd32_time.c
diff -u src/sys/compat/netbsd32/netbsd32_time.c:1.49.6.1 src/sys/compat/netbsd32/netbsd32_time.c:1.49.6.2
--- src/sys/compat/netbsd32/netbsd32_time.c:1.49.6.1	Wed Jun 21 21:04:01 2023
+++ src/sys/compat/netbsd32/netbsd32_time.c	Wed Jun 21 21:16:09 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_time.c,v 1.49.6.1 2023/06/21 21:04:01 martin Exp $	*/
+/*	$NetBSD: netbsd32_time.c,v 1.49.6.2 2023/06/21 21:16:09 martin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_time.c,v 1.49.6.1 2023/06/21 21:04:01 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_time.c,v 1.49.6.2 2023/06/21 21:16:09 martin Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ntp.h"
@@ -66,6 +66,7 @@ netbsd32___ntp_gettime50(struct lwp *l,
 	if (SCARG_P32(uap, ntvp)) {
 		ntp_gettime();
 
+		memset(, 0, sizeof(ntv32));
 		ntv32.time.tv_sec = ntv.time.tv_sec;
 		ntv32.time.tv_nsec = ntv.time.tv_nsec;
 		ntv32.maxerror = (netbsd32_long)ntv.maxerror;
@@ -96,6 +97,7 @@ compat_50_netbsd32_ntp_gettime(struct lw
 	if (SCARG_P32(uap, ntvp)) {
 		ntp_gettime();
 
+		memset(, 0, sizeof(ntv32));
 		ntv32.time.tv_sec = (int32_t)ntv.time.tv_sec;
 		ntv32.time.tv_nsec = ntv.time.tv_nsec;
 		ntv32.maxerror = (netbsd32_long)ntv.maxerror;
@@ -126,6 +128,7 @@ compat_30_netbsd32_ntp_gettime(struct lw
 	if (SCARG_P32(uap, ntvp)) {
 		ntp_gettime();
 
+		memset(, 0, sizeof(ntv32));
 		ntv32.time.tv_sec = ntv.time.tv_sec;
 		ntv32.time.tv_usec = ntv.time.tv_nsec / 1000;
 		ntv32.maxerror = (netbsd32_long)ntv.maxerror;



CVS commit: [netbsd-8] src/sys/compat/common

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 21:13:27 UTC 2023

Modified Files:
src/sys/compat/common [netbsd-8]: kern_time_50.c

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

sys/compat/common/kern_time_50.c: revision 1.32

Zero ntptimeval50 too to prevent 4-byte kernel stack disclosure.

>From Thomas Barabosch of Fraunhofer FKIE.


To generate a diff of this commit:
cvs rdiff -u -r1.31.10.1 -r1.31.10.2 src/sys/compat/common/kern_time_50.c

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

Modified files:

Index: src/sys/compat/common/kern_time_50.c
diff -u src/sys/compat/common/kern_time_50.c:1.31.10.1 src/sys/compat/common/kern_time_50.c:1.31.10.2
--- src/sys/compat/common/kern_time_50.c:1.31.10.1	Wed Jun 21 21:04:01 2023
+++ src/sys/compat/common/kern_time_50.c	Wed Jun 21 21:13:27 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_time_50.c,v 1.31.10.1 2023/06/21 21:04:01 martin Exp $	*/
+/*	$NetBSD: kern_time_50.c,v 1.31.10.2 2023/06/21 21:13:27 martin Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_time_50.c,v 1.31.10.1 2023/06/21 21:04:01 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_time_50.c,v 1.31.10.2 2023/06/21 21:13:27 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_aio.h"
@@ -528,6 +528,7 @@ compat_50_sys___ntp_gettime30(struct lwp
 
 	if (SCARG(uap, ntvp)) {
 		ntp_gettime();
+		memset(, 0, sizeof(ntv50));
 		timespec_to_timespec50(, );
 		ntv50.maxerror = ntv.maxerror;
 		ntv50.esterror = ntv.esterror;



CVS commit: [netbsd-8] src/sys/compat/common

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 21:13:27 UTC 2023

Modified Files:
src/sys/compat/common [netbsd-8]: kern_time_50.c

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

sys/compat/common/kern_time_50.c: revision 1.32

Zero ntptimeval50 too to prevent 4-byte kernel stack disclosure.

>From Thomas Barabosch of Fraunhofer FKIE.


To generate a diff of this commit:
cvs rdiff -u -r1.31.10.1 -r1.31.10.2 src/sys/compat/common/kern_time_50.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/sys/compat/osf1

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 21:09:28 UTC 2023

Modified Files:
src/sys/compat/osf1 [netbsd-8]: osf1_cvt.c osf1_file.c osf1_misc.c

Log Message:
Apply patch, requested by riastradh in ticket #1837:

sys/compat/osf1/osf1_cvt.c
sys/compat/osf1/osf1_file.c
sys/compat/osf1/osf1_misc.c

Memset structures to zero before passing them to copyout to expose them
to userland.
No equivalent change in newer branches, commpat/osf1 has been deleted.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.28.22.1 src/sys/compat/osf1/osf1_cvt.c
cvs rdiff -u -r1.43.12.1 -r1.43.12.2 src/sys/compat/osf1/osf1_file.c
cvs rdiff -u -r1.87 -r1.87.8.1 src/sys/compat/osf1/osf1_misc.c

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

Modified files:

Index: src/sys/compat/osf1/osf1_cvt.c
diff -u src/sys/compat/osf1/osf1_cvt.c:1.28 src/sys/compat/osf1/osf1_cvt.c:1.28.22.1
--- src/sys/compat/osf1/osf1_cvt.c:1.28	Mon Nov  4 16:52:08 2013
+++ src/sys/compat/osf1/osf1_cvt.c	Wed Jun 21 21:09:28 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: osf1_cvt.c,v 1.28 2013/11/04 16:52:08 christos Exp $ */
+/* $NetBSD: osf1_cvt.c,v 1.28.22.1 2023/06/21 21:09:28 martin Exp $ */
 
 /*
  * Copyright (c) 1999 Christopher G. Demetriou.  All rights reserved.
@@ -58,7 +58,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: osf1_cvt.c,v 1.28 2013/11/04 16:52:08 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: osf1_cvt.c,v 1.28.22.1 2023/06/21 21:09:28 martin Exp $");
 
 #include 
 #include 
@@ -463,6 +463,8 @@ void
 osf1_cvt_rusage_from_native(const struct rusage *ru, struct osf1_rusage *oru)
 {
 
+	memset(oru, 0, sizeof(*oru));
+
 	oru->ru_utime.tv_sec = ru->ru_utime.tv_sec;
 	oru->ru_utime.tv_usec = ru->ru_utime.tv_usec;
 
@@ -492,6 +494,8 @@ void
 osf1_cvt_sigaction_from_native(const struct sigaction *bsa, struct osf1_sigaction *osa)
 {
 
+	memset(osa, 0, sizeof(*osa));
+
 	osa->osf1_sa_handler = bsa->sa_handler;
 	osf1_cvt_sigset_from_native(>sa_mask, >osf1_sa_mask);
 
@@ -553,6 +557,7 @@ void
 osf1_cvt_stat_from_native(const struct stat *st, struct osf1_stat *ost)
 {
 
+	memset(ost, 0, sizeof(*ost));
 	ost->st_dev = osf1_cvt_dev_from_native(st->st_dev);
 	ost->st_ino = st->st_ino;
 	ost->st_mode = st->st_mode;
@@ -602,7 +607,7 @@ void
 osf1_cvt_statfs_from_native(const struct statvfs *bsfs, struct osf1_statfs *osfs)
 {
 
-	memset(osfs, 0, sizeof (struct osf1_statfs));
+	memset(osfs, 0, sizeof(*osfs));
 	if (!strncmp(MOUNT_FFS, bsfs->f_fstypename, sizeof(bsfs->f_fstypename)))
 		osfs->f_type = OSF1_MOUNT_UFS;
 	else if (!strncmp(MOUNT_NFS, bsfs->f_fstypename, sizeof(bsfs->f_fstypename)))

Index: src/sys/compat/osf1/osf1_file.c
diff -u src/sys/compat/osf1/osf1_file.c:1.43.12.1 src/sys/compat/osf1/osf1_file.c:1.43.12.2
--- src/sys/compat/osf1/osf1_file.c:1.43.12.1	Wed Aug  9 05:12:18 2017
+++ src/sys/compat/osf1/osf1_file.c	Wed Jun 21 21:09:28 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: osf1_file.c,v 1.43.12.1 2017/08/09 05:12:18 snj Exp $ */
+/* $NetBSD: osf1_file.c,v 1.43.12.2 2023/06/21 21:09:28 martin Exp $ */
 
 /*
  * Copyright (c) 1999 Christopher G. Demetriou.  All rights reserved.
@@ -58,7 +58,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: osf1_file.c,v 1.43.12.1 2017/08/09 05:12:18 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: osf1_file.c,v 1.43.12.2 2023/06/21 21:09:28 martin Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_syscall_debug.h"
@@ -218,6 +218,7 @@ again:
 			inp += reclen;  /* it is a hole; squish it out */
 			continue;
 		}
+		memset(, 0, sizeof(idb));
 		osf1_reclen = OSF1_RECLEN(, bdp->d_namlen);
 		if (reclen > len || resid < osf1_reclen) {
 			/* entry too big for buffer, so just stop */

Index: src/sys/compat/osf1/osf1_misc.c
diff -u src/sys/compat/osf1/osf1_misc.c:1.87 src/sys/compat/osf1/osf1_misc.c:1.87.8.1
--- src/sys/compat/osf1/osf1_misc.c:1.87	Thu Nov 10 17:00:51 2016
+++ src/sys/compat/osf1/osf1_misc.c	Wed Jun 21 21:09:28 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: osf1_misc.c,v 1.87 2016/11/10 17:00:51 christos Exp $ */
+/* $NetBSD: osf1_misc.c,v 1.87.8.1 2023/06/21 21:09:28 martin Exp $ */
 
 /*
  * Copyright (c) 1999 Christopher G. Demetriou.  All rights reserved.
@@ -58,7 +58,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: osf1_misc.c,v 1.87 2016/11/10 17:00:51 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: osf1_misc.c,v 1.87.8.1 2023/06/21 21:09:28 martin Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_syscall_debug.h"
@@ -338,6 +338,7 @@ osf1_sys_uname(struct lwp *l, const stru
 const char *cp;
 char *dp, *ep;
 
+	memset(, 0, sizeof(u));
 strncpy(u.sysname, ostype, sizeof(u.sysname));
 strncpy(u.nodename, hostname, sizeof(u.nodename));
 strncpy(u.release, osrelease, sizeof(u.release));
@@ -383,6 +384,7 @@ osf1_sys_usleep_thread(struct lwp *l, co
 		if (endtv.tv_sec < 0 || endtv.tv_usec < 0)
 			endtv.tv_sec = endtv.tv_usec = 0;
 
+		memset(, 0, 

CVS commit: [netbsd-8] src/sys/compat/osf1

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 21:09:28 UTC 2023

Modified Files:
src/sys/compat/osf1 [netbsd-8]: osf1_cvt.c osf1_file.c osf1_misc.c

Log Message:
Apply patch, requested by riastradh in ticket #1837:

sys/compat/osf1/osf1_cvt.c
sys/compat/osf1/osf1_file.c
sys/compat/osf1/osf1_misc.c

Memset structures to zero before passing them to copyout to expose them
to userland.
No equivalent change in newer branches, commpat/osf1 has been deleted.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.28.22.1 src/sys/compat/osf1/osf1_cvt.c
cvs rdiff -u -r1.43.12.1 -r1.43.12.2 src/sys/compat/osf1/osf1_file.c
cvs rdiff -u -r1.87 -r1.87.8.1 src/sys/compat/osf1/osf1_misc.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/sys/compat

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 21:04:03 UTC 2023

Modified Files:
src/sys/compat/common [netbsd-8]: kern_info_09.c kern_info_43.c
kern_resource_43.c kern_sig_13.c kern_sig_43.c kern_time_50.c
vfs_syscalls_12.c vfs_syscalls_30.c vfs_syscalls_43.c
src/sys/compat/freebsd [netbsd-8]: freebsd_misc.c freebsd_sched.c
src/sys/compat/linux/arch/alpha [netbsd-8]: linux_machdep.c
src/sys/compat/linux/arch/amd64 [netbsd-8]: linux_machdep.c
src/sys/compat/linux/arch/arm [netbsd-8]: linux_machdep.c
linux_ptrace.c
src/sys/compat/linux/arch/i386 [netbsd-8]: linux_machdep.c
linux_ptrace.c
src/sys/compat/linux/arch/m68k [netbsd-8]: linux_machdep.c
src/sys/compat/linux/arch/mips [netbsd-8]: linux_machdep.c
src/sys/compat/linux/arch/powerpc [netbsd-8]: linux_exec_powerpc.c
linux_machdep.c linux_ptrace.c
src/sys/compat/linux/common [netbsd-8]: linux_cdrom.c linux_fdio.c
linux_file.c linux_hdio.c linux_misc.c linux_mtio.c
linux_oldolduname.c linux_olduname.c linux_sched.c linux_signal.c
linux_socket.c linux_time.c
src/sys/compat/linux32/arch/amd64 [netbsd-8]: linux32_machdep.c
src/sys/compat/linux32/common [netbsd-8]: linux32_exec_elf32.c
linux32_resource.c linux32_signal.c linux32_time.c
src/sys/compat/netbsd32 [netbsd-8]: netbsd32_compat_12.c
netbsd32_compat_20.c netbsd32_compat_43.c netbsd32_compat_50.c
netbsd32_conv.h netbsd32_nfssvc.c netbsd32_ptrace.c
netbsd32_signal.c netbsd32_time.c netbsd32_wait.c
src/sys/compat/ossaudio [netbsd-8]: ossaudio.c
src/sys/compat/sunos [netbsd-8]: sunos_ioctl.c sunos_misc.c
src/sys/compat/sunos32 [netbsd-8]: sunos32_ioctl.c sunos32_misc.c
src/sys/compat/sys [netbsd-8]: time_types.h
src/sys/compat/ultrix [netbsd-8]: ultrix_ioctl.c ultrix_misc.c

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

sys/compat/linux/arch/i386/linux_machdep.c: revision 1.168
sys/compat/sunos/sunos_misc.c: revision 1.177
sys/compat/netbsd32/netbsd32_compat_50.c: revision 1.52
sys/compat/common/kern_resource_43.c: revision 1.23
sys/compat/netbsd32/netbsd32_conv.h: revision 1.46
sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.35
sys/compat/common/vfs_syscalls_12.c: revision 1.38
sys/compat/ultrix/ultrix_misc.c: revision 1.126
sys/compat/common/kern_sig_43.c: revision 1.37
sys/compat/linux/common/linux_mtio.c: revision 1.8
sys/compat/freebsd/freebsd_misc.c: revision 1.34
sys/compat/linux/common/linux_olduname.c: revision 1.67
sys/compat/linux/arch/mips/linux_machdep.c: revision 1.44
sys/compat/freebsd/freebsd_sched.c: revision 1.23
sys/compat/ossaudio/ossaudio.c: revision 1.84
sys/compat/sys/time_types.h: revision 1.6
sys/compat/linux/arch/powerpc/linux_machdep.c: revision 1.51
sys/compat/linux/common/linux_file.c: revision 1.119
sys/compat/linux/arch/arm/linux_machdep.c: revision 1.34
sys/compat/netbsd32/netbsd32_wait.c: revision 1.25
sys/compat/linux32/common/linux32_time.c: revision 1.38
sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.33
sys/compat/linux/arch/alpha/linux_machdep.c: revision 1.52
sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.46
sys/compat/netbsd32/netbsd32_compat_12.c: revision 1.36
sys/compat/ultrix/ultrix_ioctl.c: revision 1.39
sys/compat/linux/common/linux_misc.c: revision 1.252
sys/compat/linux/common/linux_hdio.c: revision 1.19
sys/compat/sunos/sunos_ioctl.c: revision 1.71
sys/compat/linux/common/linux_sched.c: revision 1.79
sys/compat/common/kern_info_43.c: revision 1.40
sys/compat/linux32/common/linux32_exec_elf32.c: revision 1.20
sys/compat/linux/common/linux_socket.c: revision 1.153
sys/compat/linux/arch/amd64/linux_machdep.c: revision 1.60
sys/compat/common/vfs_syscalls_43.c: revision 1.68
sys/compat/linux/arch/powerpc/linux_exec_powerpc.c: revision 1.25
sys/compat/netbsd32/netbsd32_ptrace.c: revision 1.9
sys/compat/common/kern_time_50.c: revision 1.37
sys/compat/netbsd32/netbsd32_compat_20.c: revision 1.42
sys/compat/linux/common/linux_cdrom.c: revision 1.28
sys/compat/linux/arch/m68k/linux_machdep.c: revision 1.43
sys/compat/common/kern_info_09.c: revision 1.22
sys/compat/linux32/common/linux32_resource.c: revision 1.12
sys/compat/linux/common/linux_oldolduname.c: revision 1.67
sys/compat/netbsd32/netbsd32_nfssvc.c: revision 1.8
sys/compat/linux32/common/linux32_signal.c: revision 1.21
sys/compat/common/kern_sig_13.c: revision 1.22
  

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

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 21:04:03 UTC 2023

Modified Files:
src/sys/compat/common [netbsd-8]: kern_info_09.c kern_info_43.c
kern_resource_43.c kern_sig_13.c kern_sig_43.c kern_time_50.c
vfs_syscalls_12.c vfs_syscalls_30.c vfs_syscalls_43.c
src/sys/compat/freebsd [netbsd-8]: freebsd_misc.c freebsd_sched.c
src/sys/compat/linux/arch/alpha [netbsd-8]: linux_machdep.c
src/sys/compat/linux/arch/amd64 [netbsd-8]: linux_machdep.c
src/sys/compat/linux/arch/arm [netbsd-8]: linux_machdep.c
linux_ptrace.c
src/sys/compat/linux/arch/i386 [netbsd-8]: linux_machdep.c
linux_ptrace.c
src/sys/compat/linux/arch/m68k [netbsd-8]: linux_machdep.c
src/sys/compat/linux/arch/mips [netbsd-8]: linux_machdep.c
src/sys/compat/linux/arch/powerpc [netbsd-8]: linux_exec_powerpc.c
linux_machdep.c linux_ptrace.c
src/sys/compat/linux/common [netbsd-8]: linux_cdrom.c linux_fdio.c
linux_file.c linux_hdio.c linux_misc.c linux_mtio.c
linux_oldolduname.c linux_olduname.c linux_sched.c linux_signal.c
linux_socket.c linux_time.c
src/sys/compat/linux32/arch/amd64 [netbsd-8]: linux32_machdep.c
src/sys/compat/linux32/common [netbsd-8]: linux32_exec_elf32.c
linux32_resource.c linux32_signal.c linux32_time.c
src/sys/compat/netbsd32 [netbsd-8]: netbsd32_compat_12.c
netbsd32_compat_20.c netbsd32_compat_43.c netbsd32_compat_50.c
netbsd32_conv.h netbsd32_nfssvc.c netbsd32_ptrace.c
netbsd32_signal.c netbsd32_time.c netbsd32_wait.c
src/sys/compat/ossaudio [netbsd-8]: ossaudio.c
src/sys/compat/sunos [netbsd-8]: sunos_ioctl.c sunos_misc.c
src/sys/compat/sunos32 [netbsd-8]: sunos32_ioctl.c sunos32_misc.c
src/sys/compat/sys [netbsd-8]: time_types.h
src/sys/compat/ultrix [netbsd-8]: ultrix_ioctl.c ultrix_misc.c

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

sys/compat/linux/arch/i386/linux_machdep.c: revision 1.168
sys/compat/sunos/sunos_misc.c: revision 1.177
sys/compat/netbsd32/netbsd32_compat_50.c: revision 1.52
sys/compat/common/kern_resource_43.c: revision 1.23
sys/compat/netbsd32/netbsd32_conv.h: revision 1.46
sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.35
sys/compat/common/vfs_syscalls_12.c: revision 1.38
sys/compat/ultrix/ultrix_misc.c: revision 1.126
sys/compat/common/kern_sig_43.c: revision 1.37
sys/compat/linux/common/linux_mtio.c: revision 1.8
sys/compat/freebsd/freebsd_misc.c: revision 1.34
sys/compat/linux/common/linux_olduname.c: revision 1.67
sys/compat/linux/arch/mips/linux_machdep.c: revision 1.44
sys/compat/freebsd/freebsd_sched.c: revision 1.23
sys/compat/ossaudio/ossaudio.c: revision 1.84
sys/compat/sys/time_types.h: revision 1.6
sys/compat/linux/arch/powerpc/linux_machdep.c: revision 1.51
sys/compat/linux/common/linux_file.c: revision 1.119
sys/compat/linux/arch/arm/linux_machdep.c: revision 1.34
sys/compat/netbsd32/netbsd32_wait.c: revision 1.25
sys/compat/linux32/common/linux32_time.c: revision 1.38
sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.33
sys/compat/linux/arch/alpha/linux_machdep.c: revision 1.52
sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.46
sys/compat/netbsd32/netbsd32_compat_12.c: revision 1.36
sys/compat/ultrix/ultrix_ioctl.c: revision 1.39
sys/compat/linux/common/linux_misc.c: revision 1.252
sys/compat/linux/common/linux_hdio.c: revision 1.19
sys/compat/sunos/sunos_ioctl.c: revision 1.71
sys/compat/linux/common/linux_sched.c: revision 1.79
sys/compat/common/kern_info_43.c: revision 1.40
sys/compat/linux32/common/linux32_exec_elf32.c: revision 1.20
sys/compat/linux/common/linux_socket.c: revision 1.153
sys/compat/linux/arch/amd64/linux_machdep.c: revision 1.60
sys/compat/common/vfs_syscalls_43.c: revision 1.68
sys/compat/linux/arch/powerpc/linux_exec_powerpc.c: revision 1.25
sys/compat/netbsd32/netbsd32_ptrace.c: revision 1.9
sys/compat/common/kern_time_50.c: revision 1.37
sys/compat/netbsd32/netbsd32_compat_20.c: revision 1.42
sys/compat/linux/common/linux_cdrom.c: revision 1.28
sys/compat/linux/arch/m68k/linux_machdep.c: revision 1.43
sys/compat/common/kern_info_09.c: revision 1.22
sys/compat/linux32/common/linux32_resource.c: revision 1.12
sys/compat/linux/common/linux_oldolduname.c: revision 1.67
sys/compat/netbsd32/netbsd32_nfssvc.c: revision 1.8
sys/compat/linux32/common/linux32_signal.c: revision 1.21
sys/compat/common/kern_sig_13.c: revision 1.22
  

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

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 20:48:07 UTC 2023

Modified Files:
src/sys/dev/isa [netbsd-8]: mcd.c
src/sys/dev/pci [netbsd-8]: if_iwi.c
src/sys/dev/raidframe [netbsd-8]: rf_netbsdkintf.c
src/sys/dev/scsipi [netbsd-8]: ses.c

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

sys/dev/pci/if_iwi.c: revision 1.117
sys/dev/raidframe/rf_netbsdkintf.c: revision 1.401
sys/dev/scsipi/ses.c: revision 1.52
sys/dev/isa/mcd.c: revision 1.121
(all via patch)

sys/dev: Memset zero before copyout.

Just in case of uninitialized padding which would lead to kernel
stack disclosure.  If the compiler can prove the memset redundant
then it can optimize it away; otherwise better safe than sorry.

I think the iwi(4), mcd(4), and ses(4) changes actually plug leaks;
the raidframe(4) change probably doesn't (but doesn't hurt).


To generate a diff of this commit:
cvs rdiff -u -r1.116.10.1 -r1.116.10.2 src/sys/dev/isa/mcd.c
cvs rdiff -u -r1.103.2.1 -r1.103.2.2 src/sys/dev/pci/if_iwi.c
cvs rdiff -u -r1.350 -r1.350.2.1 src/sys/dev/raidframe/rf_netbsdkintf.c
cvs rdiff -u -r1.50 -r1.50.8.1 src/sys/dev/scsipi/ses.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/isa/mcd.c
diff -u src/sys/dev/isa/mcd.c:1.116.10.1 src/sys/dev/isa/mcd.c:1.116.10.2
--- src/sys/dev/isa/mcd.c:1.116.10.1	Thu Nov 14 16:04:31 2019
+++ src/sys/dev/isa/mcd.c	Wed Jun 21 20:48:07 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: mcd.c,v 1.116.10.1 2019/11/14 16:04:31 martin Exp $	*/
+/*	$NetBSD: mcd.c,v 1.116.10.2 2023/06/21 20:48:07 martin Exp $	*/
 
 /*
  * Copyright (c) 1993, 1994, 1995 Charles M. Hannum.  All rights reserved.
@@ -56,7 +56,7 @@
 /*static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";*/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mcd.c,v 1.116.10.1 2019/11/14 16:04:31 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mcd.c,v 1.116.10.2 2023/06/21 20:48:07 martin Exp $");
 
 #include 
 #include 
@@ -1599,6 +1599,7 @@ mcd_read_subchannel(struct mcd_softc *sc
 	if ((error = mcd_getqchan(sc, , ch->data_format)) != 0)
 		return error;
 
+	memset(info, 0, sizeof(*info));
 	info->header.audio_status = sc->audio_status;
 	info->what.media_catalog.data_format = ch->data_format;
 

Index: src/sys/dev/pci/if_iwi.c
diff -u src/sys/dev/pci/if_iwi.c:1.103.2.1 src/sys/dev/pci/if_iwi.c:1.103.2.2
--- src/sys/dev/pci/if_iwi.c:1.103.2.1	Sun Dec 10 10:10:24 2017
+++ src/sys/dev/pci/if_iwi.c	Wed Jun 21 20:48:06 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_iwi.c,v 1.103.2.1 2017/12/10 10:10:24 snj Exp $  */
+/*	$NetBSD: if_iwi.c,v 1.103.2.2 2023/06/21 20:48:06 martin Exp $  */
 /*	$OpenBSD: if_iwi.c,v 1.111 2010/11/15 19:11:57 damien Exp $	*/
 
 /*-
@@ -19,7 +19,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_iwi.c,v 1.103.2.1 2017/12/10 10:10:24 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwi.c,v 1.103.2.2 2023/06/21 20:48:06 martin Exp $");
 
 /*-
  * Intel(R) PRO/Wireless 2200BG/2225BG/2915ABG driver
@@ -1885,8 +1885,9 @@ iwi_get_table0(struct iwi_softc *sc, uin
 {
 	uint32_t size, buf[128];
 
+	memset(buf, 0, sizeof buf);
+
 	if (!(sc->flags & IWI_FLAG_FW_INITED)) {
-		memset(buf, 0, sizeof buf);
 		return copyout(buf, tbl, sizeof buf);
 	}
 

Index: src/sys/dev/raidframe/rf_netbsdkintf.c
diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.350 src/sys/dev/raidframe/rf_netbsdkintf.c:1.350.2.1
--- src/sys/dev/raidframe/rf_netbsdkintf.c:1.350	Thu Jun  1 02:45:11 2017
+++ src/sys/dev/raidframe/rf_netbsdkintf.c	Wed Jun 21 20:48:06 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_netbsdkintf.c,v 1.350 2017/06/01 02:45:11 chs Exp $	*/
+/*	$NetBSD: rf_netbsdkintf.c,v 1.350.2.1 2023/06/21 20:48:06 martin Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
  ***/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.350 2017/06/01 02:45:11 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.350.2.1 2023/06/21 20:48:06 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -1622,6 +1622,7 @@ raidioctl(dev_t dev, u_long cmd, void *d
 		return (0);
 	case RAIDFRAME_CHECK_RECON_STATUS_EXT:
 		progressInfoPtr = (RF_ProgressInfo_t **) data;
+		memset(, 0, sizeof(progressInfo));
 		if (raidPtr->status != rf_rs_reconstructing) {
 			progressInfo.remaining = 0;
 			progressInfo.completed = 100;
@@ -1656,6 +1657,7 @@ raidioctl(dev_t dev, u_long cmd, void *d
 
 	case RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT:
 		progressInfoPtr = (RF_ProgressInfo_t **) data;
+		memset(, 0, sizeof(progressInfo));
 		if (raidPtr->parity_rewrite_in_progress == 1) {
 			progressInfo.total = raidPtr->Layout.numStripe;
 			progressInfo.completed =
@@ -1687,6 +1689,7 @@ raidioctl(dev_t dev, u_long cmd, void *d
 
 	case 

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

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 20:48:07 UTC 2023

Modified Files:
src/sys/dev/isa [netbsd-8]: mcd.c
src/sys/dev/pci [netbsd-8]: if_iwi.c
src/sys/dev/raidframe [netbsd-8]: rf_netbsdkintf.c
src/sys/dev/scsipi [netbsd-8]: ses.c

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

sys/dev/pci/if_iwi.c: revision 1.117
sys/dev/raidframe/rf_netbsdkintf.c: revision 1.401
sys/dev/scsipi/ses.c: revision 1.52
sys/dev/isa/mcd.c: revision 1.121
(all via patch)

sys/dev: Memset zero before copyout.

Just in case of uninitialized padding which would lead to kernel
stack disclosure.  If the compiler can prove the memset redundant
then it can optimize it away; otherwise better safe than sorry.

I think the iwi(4), mcd(4), and ses(4) changes actually plug leaks;
the raidframe(4) change probably doesn't (but doesn't hurt).


To generate a diff of this commit:
cvs rdiff -u -r1.116.10.1 -r1.116.10.2 src/sys/dev/isa/mcd.c
cvs rdiff -u -r1.103.2.1 -r1.103.2.2 src/sys/dev/pci/if_iwi.c
cvs rdiff -u -r1.350 -r1.350.2.1 src/sys/dev/raidframe/rf_netbsdkintf.c
cvs rdiff -u -r1.50 -r1.50.8.1 src/sys/dev/scsipi/ses.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/sys/compat/netbsd32

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 20:38:35 UTC 2023

Modified Files:
src/sys/compat/netbsd32 [netbsd-8]: netbsd32.h netbsd32_conv.h
netbsd32_fs.c netbsd32_netbsd.c netbsd32_socket.c

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

sys/compat/netbsd32/netbsd32_netbsd.c: revision 1.232
sys/compat/netbsd32/netbsd32_socket.c: revision 1.56
sys/compat/netbsd32/netbsd32_conv.h: revision 1.45
sys/compat/netbsd32/netbsd32_fs.c: revision 1.92
sys/compat/netbsd32/netbsd32.h: revision 1.137

The read/write/send/recv system calls return ssize_t because -1 is
returned on error.  Therefore we must restrict the lengths of any
buffers to NETBSD32_SSIZE_MAX with compat32 to avoid garbage return
values.

Fixes ATF lib/libc/sys/t_write:write_err.


To generate a diff of this commit:
cvs rdiff -u -r1.114.8.3 -r1.114.8.4 src/sys/compat/netbsd32/netbsd32.h
cvs rdiff -u -r1.31.8.3 -r1.31.8.4 src/sys/compat/netbsd32/netbsd32_conv.h
cvs rdiff -u -r1.80.2.1 -r1.80.2.2 src/sys/compat/netbsd32/netbsd32_fs.c
cvs rdiff -u -r1.206.2.2 -r1.206.2.3 \
src/sys/compat/netbsd32/netbsd32_netbsd.c
cvs rdiff -u -r1.44.8.1 -r1.44.8.2 src/sys/compat/netbsd32/netbsd32_socket.c

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

Modified files:

Index: src/sys/compat/netbsd32/netbsd32.h
diff -u src/sys/compat/netbsd32/netbsd32.h:1.114.8.3 src/sys/compat/netbsd32/netbsd32.h:1.114.8.4
--- src/sys/compat/netbsd32/netbsd32.h:1.114.8.3	Sat Aug 25 11:13:05 2018
+++ src/sys/compat/netbsd32/netbsd32.h	Wed Jun 21 20:38:35 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32.h,v 1.114.8.3 2018/08/25 11:13:05 martin Exp $	*/
+/*	$NetBSD: netbsd32.h,v 1.114.8.4 2023/06/21 20:38:35 martin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008, 2015 Matthew R. Green
@@ -54,7 +54,7 @@
 #include 
 
 /*
- * first, define the basic types we need.
+ * first define the basic types we need, and any applicable limits.
  */
 
 typedef int32_t netbsd32_long;
@@ -69,6 +69,9 @@ typedef int32_t netbsd32_key_t;
 typedef int32_t netbsd32_intptr_t;
 typedef uint32_t netbsd32_uintptr_t;
 
+/* Note: 32-bit sparc defines ssize_t as long but still has same size as int. */
+#define	NETBSD32_SSIZE_MAX	INT32_MAX
+
 /* netbsd32_[u]int64 are machine dependent and defined below */
 
 /*

Index: src/sys/compat/netbsd32/netbsd32_conv.h
diff -u src/sys/compat/netbsd32/netbsd32_conv.h:1.31.8.3 src/sys/compat/netbsd32/netbsd32_conv.h:1.31.8.4
--- src/sys/compat/netbsd32/netbsd32_conv.h:1.31.8.3	Sat Feb 23 06:58:14 2019
+++ src/sys/compat/netbsd32/netbsd32_conv.h	Wed Jun 21 20:38:35 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_conv.h,v 1.31.8.3 2019/02/23 06:58:14 martin Exp $	*/
+/*	$NetBSD: netbsd32_conv.h,v 1.31.8.4 2023/06/21 20:38:35 martin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -251,13 +251,15 @@ netbsd32_to_iovecin(const struct netbsd3
 {
 	int i, error=0;
 	u_int32_t iov_base;
-	u_int32_t iov_len;
+	u_int32_t iov_len, total_iov_len;
+
 	/*
 	 * We could allocate an iov32p, do a copyin, and translate
 	 * each field and then free it all up, or we could copyin
 	 * each field separately.  I'm doing the latter to reduce
 	 * the number of MALLOC()s.
 	 */
+	total_iov_len = 0;
 	for (i = 0; i < len; i++, iovp++, iov32p++) {
 		if ((error = copyin(>iov_base, _base, sizeof(iov_base
 		return (error);
@@ -265,6 +267,19 @@ netbsd32_to_iovecin(const struct netbsd3
 		return (error);
 		iovp->iov_base = (void *)(u_long)iov_base;
 		iovp->iov_len = (size_t)iov_len;
+
+		/*
+		 * System calls return ssize_t because -1 is returned
+		 * on error.  Therefore we must restrict the length to
+		 * SSIZE_MAX (NETBSD32_SSIZE_MAX with compat32) to
+		 * avoid garbage return values.
+		 */
+		total_iov_len += iov_len;
+		if (iov_len > NETBSD32_SSIZE_MAX ||
+		total_iov_len > NETBSD32_SSIZE_MAX) {
+			return EINVAL;
+			break;
+		}
 	}
 	return error;
 }

Index: src/sys/compat/netbsd32/netbsd32_fs.c
diff -u src/sys/compat/netbsd32/netbsd32_fs.c:1.80.2.1 src/sys/compat/netbsd32/netbsd32_fs.c:1.80.2.2
--- src/sys/compat/netbsd32/netbsd32_fs.c:1.80.2.1	Sat Aug 25 11:13:05 2018
+++ src/sys/compat/netbsd32/netbsd32_fs.c	Wed Jun 21 20:38:35 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_fs.c,v 1.80.2.1 2018/08/25 11:13:05 martin Exp $	*/
+/*	$NetBSD: netbsd32_fs.c,v 1.80.2.2 2023/06/21 20:38:35 martin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.80.2.1 2018/08/25 11:13:05 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.80.2.2 2023/06/21 20:38:35 martin Exp $");
 
 #include 
 #include 
@@ -175,7 +175,8 @@ dofilereadv32(int fd, struct file *fp, s
 		 * Therefore we must restrict the length to SSIZE_MAX to
 		 * avoid garbage return values.
 		 */
-		if (iov->iov_len > SSIZE_MAX || 

CVS commit: [netbsd-8] src/sys/compat/netbsd32

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 20:38:35 UTC 2023

Modified Files:
src/sys/compat/netbsd32 [netbsd-8]: netbsd32.h netbsd32_conv.h
netbsd32_fs.c netbsd32_netbsd.c netbsd32_socket.c

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

sys/compat/netbsd32/netbsd32_netbsd.c: revision 1.232
sys/compat/netbsd32/netbsd32_socket.c: revision 1.56
sys/compat/netbsd32/netbsd32_conv.h: revision 1.45
sys/compat/netbsd32/netbsd32_fs.c: revision 1.92
sys/compat/netbsd32/netbsd32.h: revision 1.137

The read/write/send/recv system calls return ssize_t because -1 is
returned on error.  Therefore we must restrict the lengths of any
buffers to NETBSD32_SSIZE_MAX with compat32 to avoid garbage return
values.

Fixes ATF lib/libc/sys/t_write:write_err.


To generate a diff of this commit:
cvs rdiff -u -r1.114.8.3 -r1.114.8.4 src/sys/compat/netbsd32/netbsd32.h
cvs rdiff -u -r1.31.8.3 -r1.31.8.4 src/sys/compat/netbsd32/netbsd32_conv.h
cvs rdiff -u -r1.80.2.1 -r1.80.2.2 src/sys/compat/netbsd32/netbsd32_fs.c
cvs rdiff -u -r1.206.2.2 -r1.206.2.3 \
src/sys/compat/netbsd32/netbsd32_netbsd.c
cvs rdiff -u -r1.44.8.1 -r1.44.8.2 src/sys/compat/netbsd32/netbsd32_socket.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/usr.sbin/route6d

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 20:35:46 UTC 2023

Modified Files:
src/usr.sbin/route6d [netbsd-8]: route6d.c

Log Message:
Fix merge mishap in ticket #1820


To generate a diff of this commit:
cvs rdiff -u -r1.68.8.1 -r1.68.8.2 src/usr.sbin/route6d/route6d.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/route6d/route6d.c
diff -u src/usr.sbin/route6d/route6d.c:1.68.8.1 src/usr.sbin/route6d/route6d.c:1.68.8.2
--- src/usr.sbin/route6d/route6d.c:1.68.8.1	Sat Apr  1 16:46:33 2023
+++ src/usr.sbin/route6d/route6d.c	Wed Jun 21 20:35:46 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: route6d.c,v 1.68.8.1 2023/04/01 16:46:33 martin Exp $	*/
+/*	$NetBSD: route6d.c,v 1.68.8.2 2023/06/21 20:35:46 martin Exp $	*/
 /*	$KAME: route6d.c,v 1.94 2002/10/26 20:08:55 itojun Exp $	*/
 
 /*
@@ -32,7 +32,7 @@
 
 #include 
 #ifndef	lint
-__RCSID("$NetBSD: route6d.c,v 1.68.8.1 2023/04/01 16:46:33 martin Exp $");
+__RCSID("$NetBSD: route6d.c,v 1.68.8.2 2023/06/21 20:35:46 martin Exp $");
 #endif
 
 #include 
@@ -625,6 +625,7 @@ init(void)
 	}
 #endif 
 
+	freeaddrinfo(res);
 	memset(, 0, sizeof(hints));
 	hints.ai_family = PF_INET6;
 	hints.ai_socktype = SOCK_DGRAM;



CVS commit: [netbsd-8] src/usr.sbin/route6d

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 20:35:46 UTC 2023

Modified Files:
src/usr.sbin/route6d [netbsd-8]: route6d.c

Log Message:
Fix merge mishap in ticket #1820


To generate a diff of this commit:
cvs rdiff -u -r1.68.8.1 -r1.68.8.2 src/usr.sbin/route6d/route6d.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/sys/altq

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 20:15:53 UTC 2023

Modified Files:
src/sys/altq [netbsd-8]: altq_hfsc.c altq_priq.c

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

sys/altq/altq_hfsc.c: revision 1.29
sys/altq/altq_priq.c: revision 1.27

sys/altq: Memset zero before copyout.

Just in case of uninitialized padding which would lead to kernel
stack disclosure.  If the compiler can prove the memset redundant
then it can optimize it away; otherwise better safe than sorry.


To generate a diff of this commit:
cvs rdiff -u -r1.26.10.1 -r1.26.10.2 src/sys/altq/altq_hfsc.c
cvs rdiff -u -r1.23.10.1 -r1.23.10.2 src/sys/altq/altq_priq.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/altq/altq_hfsc.c
diff -u src/sys/altq/altq_hfsc.c:1.26.10.1 src/sys/altq/altq_hfsc.c:1.26.10.2
--- src/sys/altq/altq_hfsc.c:1.26.10.1	Wed Aug  9 05:31:02 2017
+++ src/sys/altq/altq_hfsc.c	Wed Jun 21 20:15:53 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: altq_hfsc.c,v 1.26.10.1 2017/08/09 05:31:02 snj Exp $	*/
+/*	$NetBSD: altq_hfsc.c,v 1.26.10.2 2023/06/21 20:15:53 martin Exp $	*/
 /*	$KAME: altq_hfsc.c,v 1.26 2005/04/13 03:44:24 suz Exp $	*/
 
 /*
@@ -43,7 +43,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: altq_hfsc.c,v 1.26.10.1 2017/08/09 05:31:02 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altq_hfsc.c,v 1.26.10.2 2023/06/21 20:15:53 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_altq.h"
@@ -2182,6 +2182,7 @@ hfsccmd_class_stats(struct hfsc_class_st
 	usp = ap->stats;
 	for (n = 0; cl != NULL && n < nclasses; cl = hfsc_nextclass(cl), n++) {
 
+		memset(, 0, sizeof(stats));
 		get_class_stats(, cl);
 
 		if ((error = copyout((void *), (void *)usp++,

Index: src/sys/altq/altq_priq.c
diff -u src/sys/altq/altq_priq.c:1.23.10.1 src/sys/altq/altq_priq.c:1.23.10.2
--- src/sys/altq/altq_priq.c:1.23.10.1	Wed Aug  9 05:31:02 2017
+++ src/sys/altq/altq_priq.c	Wed Jun 21 20:15:53 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: altq_priq.c,v 1.23.10.1 2017/08/09 05:31:02 snj Exp $	*/
+/*	$NetBSD: altq_priq.c,v 1.23.10.2 2023/06/21 20:15:53 martin Exp $	*/
 /*	$KAME: altq_priq.c,v 1.13 2005/04/13 03:44:25 suz Exp $	*/
 /*
  * Copyright (C) 2000-2003
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: altq_priq.c,v 1.23.10.1 2017/08/09 05:31:02 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altq_priq.c,v 1.23.10.2 2023/06/21 20:15:53 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_altq.h"
@@ -972,10 +972,9 @@ priqcmd_class_stats(struct priq_class_st
 	usp = ap->stats;
 	for (pri = 0; pri <= pif->pif_maxpri; pri++) {
 		cl = pif->pif_classes[pri];
+		memset(, 0, sizeof(stats));
 		if (cl != NULL)
 			get_class_stats(, cl);
-		else
-			memset(, 0, sizeof(stats));
 		if ((error = copyout((void *), (void *)usp++,
  sizeof(stats))) != 0)
 			return (error);



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

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 20:15:53 UTC 2023

Modified Files:
src/sys/altq [netbsd-8]: altq_hfsc.c altq_priq.c

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

sys/altq/altq_hfsc.c: revision 1.29
sys/altq/altq_priq.c: revision 1.27

sys/altq: Memset zero before copyout.

Just in case of uninitialized padding which would lead to kernel
stack disclosure.  If the compiler can prove the memset redundant
then it can optimize it away; otherwise better safe than sorry.


To generate a diff of this commit:
cvs rdiff -u -r1.26.10.1 -r1.26.10.2 src/sys/altq/altq_hfsc.c
cvs rdiff -u -r1.23.10.1 -r1.23.10.2 src/sys/altq/altq_priq.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/sys/arch/x86/x86

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 19:54:02 UTC 2023

Modified Files:
src/sys/arch/x86/x86 [netbsd-8]: procfs_machdep.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1830):

sys/arch/x86/x86/procfs_machdep.c: revision 1.47

Add Intel lam and AMD vnmi.


To generate a diff of this commit:
cvs rdiff -u -r1.15.2.15 -r1.15.2.16 src/sys/arch/x86/x86/procfs_machdep.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/x86/x86/procfs_machdep.c
diff -u src/sys/arch/x86/x86/procfs_machdep.c:1.15.2.15 src/sys/arch/x86/x86/procfs_machdep.c:1.15.2.16
--- src/sys/arch/x86/x86/procfs_machdep.c:1.15.2.15	Mon Jan 23 12:25:06 2023
+++ src/sys/arch/x86/x86/procfs_machdep.c	Wed Jun 21 19:54:02 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: procfs_machdep.c,v 1.15.2.15 2023/01/23 12:25:06 martin Exp $ */
+/*	$NetBSD: procfs_machdep.c,v 1.15.2.16 2023/06/21 19:54:02 martin Exp $ */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.15.2.15 2023/01/23 12:25:06 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.15.2.16 2023/06/21 19:54:02 martin Exp $");
 
 #include 
 #include 
@@ -151,7 +151,7 @@ static const char * const x86_features[]
 	"avx_vnni", "avx512_bf16", NULL, NULL,
 	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL},
+	NULL, NULL, "lam", NULL, NULL, NULL, NULL, NULL},
 
 	{ /* (13) AMD 0x8008 ebx */
 	"clzero", "irperf", "xsaveerptr", NULL, "rdpru", NULL, NULL, NULL,
@@ -172,7 +172,7 @@ static const char * const x86_features[]
 	NULL, NULL, "pausefilter", NULL, "pfthreshold", "avic", NULL,
 	"v_vmsave_vmload",
 	"vgif", NULL, "x2avic", NULL, "v_spec_ctrl", NULL, NULL, NULL,
-	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL},
+	NULL, "vnmi", NULL, NULL, NULL, NULL, NULL, NULL},
 
 	{ /* (16) 0x0007:0 ecx */
 	NULL, "avx512vbmi", "umip", "pku",



CVS commit: [netbsd-8] src/sys/arch/x86/x86

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 19:54:02 UTC 2023

Modified Files:
src/sys/arch/x86/x86 [netbsd-8]: procfs_machdep.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1830):

sys/arch/x86/x86/procfs_machdep.c: revision 1.47

Add Intel lam and AMD vnmi.


To generate a diff of this commit:
cvs rdiff -u -r1.15.2.15 -r1.15.2.16 src/sys/arch/x86/x86/procfs_machdep.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/arch/x86/x86

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 19:52:39 UTC 2023

Modified Files:
src/sys/arch/x86/x86 [netbsd-9]: procfs_machdep.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1649):

sys/arch/x86/x86/procfs_machdep.c: revision 1.47

Add Intel lam and AMD vnmi.


To generate a diff of this commit:
cvs rdiff -u -r1.33.2.7 -r1.33.2.8 src/sys/arch/x86/x86/procfs_machdep.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/x86/x86/procfs_machdep.c
diff -u src/sys/arch/x86/x86/procfs_machdep.c:1.33.2.7 src/sys/arch/x86/x86/procfs_machdep.c:1.33.2.8
--- src/sys/arch/x86/x86/procfs_machdep.c:1.33.2.7	Mon Jan 23 12:23:53 2023
+++ src/sys/arch/x86/x86/procfs_machdep.c	Wed Jun 21 19:52:39 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: procfs_machdep.c,v 1.33.2.7 2023/01/23 12:23:53 martin Exp $ */
+/*	$NetBSD: procfs_machdep.c,v 1.33.2.8 2023/06/21 19:52:39 martin Exp $ */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.33.2.7 2023/01/23 12:23:53 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.33.2.8 2023/06/21 19:52:39 martin Exp $");
 
 #include 
 #include 
@@ -151,7 +151,7 @@ static const char * const x86_features[]
 	"avx_vnni", "avx512_bf16", NULL, NULL,
 	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL},
+	NULL, NULL, "lam", NULL, NULL, NULL, NULL, NULL},
 
 	{ /* (13) AMD 0x8008 ebx */
 	"clzero", "irperf", "xsaveerptr", NULL, "rdpru", NULL, NULL, NULL,
@@ -172,7 +172,7 @@ static const char * const x86_features[]
 	NULL, NULL, "pausefilter", NULL, "pfthreshold", "avic", NULL,
 	"v_vmsave_vmload",
 	"vgif", NULL, "x2avic", NULL, "v_spec_ctrl", NULL, NULL, NULL,
-	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL},
+	NULL, "vnmi", NULL, NULL, NULL, NULL, NULL, NULL},
 
 	{ /* (16) 0x0007:0 ecx */
 	NULL, "avx512vbmi", "umip", "pku",



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

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 19:52:39 UTC 2023

Modified Files:
src/sys/arch/x86/x86 [netbsd-9]: procfs_machdep.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1649):

sys/arch/x86/x86/procfs_machdep.c: revision 1.47

Add Intel lam and AMD vnmi.


To generate a diff of this commit:
cvs rdiff -u -r1.33.2.7 -r1.33.2.8 src/sys/arch/x86/x86/procfs_machdep.c

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



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

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 19:51:01 UTC 2023

Modified Files:
src/sys/arch/x86/x86 [netbsd-10]: procfs_machdep.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #203):

sys/arch/x86/x86/procfs_machdep.c: revision 1.47

Add Intel lam and AMD vnmi.


To generate a diff of this commit:
cvs rdiff -u -r1.45.4.1 -r1.45.4.2 src/sys/arch/x86/x86/procfs_machdep.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/x86/x86/procfs_machdep.c
diff -u src/sys/arch/x86/x86/procfs_machdep.c:1.45.4.1 src/sys/arch/x86/x86/procfs_machdep.c:1.45.4.2
--- src/sys/arch/x86/x86/procfs_machdep.c:1.45.4.1	Mon Jan 23 12:21:48 2023
+++ src/sys/arch/x86/x86/procfs_machdep.c	Wed Jun 21 19:51:01 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: procfs_machdep.c,v 1.45.4.1 2023/01/23 12:21:48 martin Exp $ */
+/*	$NetBSD: procfs_machdep.c,v 1.45.4.2 2023/06/21 19:51:01 martin Exp $ */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.45.4.1 2023/01/23 12:21:48 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.45.4.2 2023/06/21 19:51:01 martin Exp $");
 
 #include 
 #include 
@@ -151,7 +151,7 @@ static const char * const x86_features[]
 	"avx_vnni", "avx512_bf16", NULL, NULL,
 	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL},
+	NULL, NULL, "lam", NULL, NULL, NULL, NULL, NULL},
 
 	{ /* (13) AMD 0x8008 ebx */
 	"clzero", "irperf", "xsaveerptr", NULL, "rdpru", NULL, NULL, NULL,
@@ -172,7 +172,7 @@ static const char * const x86_features[]
 	NULL, NULL, "pausefilter", NULL, "pfthreshold", "avic", NULL,
 	"v_vmsave_vmload",
 	"vgif", NULL, "x2avic", NULL, "v_spec_ctrl", NULL, NULL, NULL,
-	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL},
+	NULL, "vnmi", NULL, NULL, NULL, NULL, NULL, NULL},
 
 	{ /* (16) 0x0007:0 ecx */
 	NULL, "avx512vbmi", "umip", "pku",



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

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 19:51:01 UTC 2023

Modified Files:
src/sys/arch/x86/x86 [netbsd-10]: procfs_machdep.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #203):

sys/arch/x86/x86/procfs_machdep.c: revision 1.47

Add Intel lam and AMD vnmi.


To generate a diff of this commit:
cvs rdiff -u -r1.45.4.1 -r1.45.4.2 src/sys/arch/x86/x86/procfs_machdep.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/sys/dev/pci/ixgbe

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 19:28:12 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe [netbsd-8]: ixgbe.c ixgbe_common.c ixgbe_type.h

Log Message:
Pullup the following revisions, requested by msaitoh in ticket #1828:

sys/dev/pci/ixgbe/ixgbe.c   1.325-1.326 via patch
sys/dev/pci/ixgbe/ixgbe_common.c1.44
sys/dev/pci/ixgbe/ixgbe_type.h  1.56

- PCI device ID 0x15c8 also uses X557-AT PHY, so create the thermal
  sensor sysctl for it, too.
- Count the number of link down events in the MAC using with
  LINK_DN_CNT register.


To generate a diff of this commit:
cvs rdiff -u -r1.88.2.54 -r1.88.2.55 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.13.2.13 -r1.13.2.14 src/sys/dev/pci/ixgbe/ixgbe_common.c
cvs rdiff -u -r1.22.2.17 -r1.22.2.18 src/sys/dev/pci/ixgbe/ixgbe_type.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/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.54 src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.55
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.54	Mon Jan 23 14:07:24 2023
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Wed Jun 21 19:28:12 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.88.2.54 2023/01/23 14:07:24 martin Exp $ */
+/* $NetBSD: ixgbe.c,v 1.88.2.55 2023/06/21 19:28:12 martin Exp $ */
 
 /**
 
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.88.2.54 2023/01/23 14:07:24 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.88.2.55 2023/06/21 19:28:12 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1643,6 +1643,8 @@ ixgbe_update_stats_counters(struct adapt
 		IXGBE_EVC_REGADD(hw, stats, IXGBE_MLFC, mlfc);
 		IXGBE_EVC_REGADD(hw, stats, IXGBE_MRFC, mrfc);
 	}
+	if (hw->mac.type == ixgbe_mac_X550EM_a)
+		IXGBE_EVC_REGADD(hw, stats, IXGBE_LINK_DN_CNT, link_dn_cnt);
 	IXGBE_EVC_REGADD2(hw, stats, IXGBE_RLEC, rlec);
 
 	/* Hardware workaround, gprc counts missed packets */
@@ -1993,6 +1995,9 @@ ixgbe_add_hw_stats(struct adapter *adapt
 	stats->namebuf, "MAC Local Faults");
 	evcnt_attach_dynamic(>mrfc, EVCNT_TYPE_MISC, NULL,
 	stats->namebuf, "MAC Remote Faults");
+	if (hw->mac.type == ixgbe_mac_X550EM_a)
+		evcnt_attach_dynamic(>link_dn_cnt, EVCNT_TYPE_MISC,
+		NULL, stats->namebuf, "Link down event in the MAC");
 	evcnt_attach_dynamic(>rlec, EVCNT_TYPE_MISC, NULL,
 	stats->namebuf, "Receive Length Errors");
 	evcnt_attach_dynamic(>lxontxc, EVCNT_TYPE_MISC, NULL,
@@ -2161,6 +2166,8 @@ ixgbe_clear_evcnt(struct adapter *adapte
 	IXGBE_EVC_STORE(>mpctotal, 0);
 	IXGBE_EVC_STORE(>mlfc, 0);
 	IXGBE_EVC_STORE(>mrfc, 0);
+	if (hw->mac.type == ixgbe_mac_X550EM_a)
+		IXGBE_EVC_STORE(>link_dn_cnt, 0);
 	IXGBE_EVC_STORE(>rlec, 0);
 	IXGBE_EVC_STORE(>lxontxc, 0);
 	IXGBE_EVC_STORE(>lxonrxc, 0);
@@ -3433,7 +3440,8 @@ ixgbe_add_device_sysctls(struct adapter 
 	}
 
 	/* for X552/X557-AT devices */
-	if (hw->device_id == IXGBE_DEV_ID_X550EM_X_10G_T) {
+	if ((hw->device_id == IXGBE_DEV_ID_X550EM_X_10G_T) ||
+	(hw->device_id == IXGBE_DEV_ID_X550EM_A_10G_T)) {
 		const struct sysctlnode *phy_node;
 
 		if (sysctl_createv(log, 0, , _node, 0, CTLTYPE_NODE,
@@ -3729,6 +3737,8 @@ ixgbe_detach(device_t dev, int flags)
 	evcnt_detach(>mpctotal);
 	evcnt_detach(>mlfc);
 	evcnt_detach(>mrfc);
+	if (hw->mac.type == ixgbe_mac_X550EM_a)
+		evcnt_detach(>link_dn_cnt);
 	evcnt_detach(>rlec);
 	evcnt_detach(>lxontxc);
 	evcnt_detach(>lxonrxc);
@@ -5772,7 +5782,8 @@ ixgbe_sysctl_phy_temp(SYSCTLFN_ARGS)
 	if (ixgbe_fw_recovery_mode_swflag(adapter))
 		return (EPERM);
 
-	if (hw->device_id != IXGBE_DEV_ID_X550EM_X_10G_T) {
+	if ((hw->device_id != IXGBE_DEV_ID_X550EM_X_10G_T) &&
+	(hw->device_id != IXGBE_DEV_ID_X550EM_A_10G_T)) {
 		device_printf(adapter->dev,
 		"Device has no supported external thermal sensor.\n");
 		return (ENODEV);
@@ -5815,7 +5826,8 @@ ixgbe_sysctl_phy_overtemp_occurred(SYSCT
 	if (ixgbe_fw_recovery_mode_swflag(adapter))
 		return (EPERM);
 
-	if (hw->device_id != IXGBE_DEV_ID_X550EM_X_10G_T) {
+	if ((hw->device_id != IXGBE_DEV_ID_X550EM_X_10G_T) &&
+	(hw->device_id != IXGBE_DEV_ID_X550EM_A_10G_T)) {
 		device_printf(adapter->dev,
 		"Device has no supported external thermal sensor.\n");
 		return (ENODEV);

Index: src/sys/dev/pci/ixgbe/ixgbe_common.c
diff -u src/sys/dev/pci/ixgbe/ixgbe_common.c:1.13.2.13 src/sys/dev/pci/ixgbe/ixgbe_common.c:1.13.2.14
--- src/sys/dev/pci/ixgbe/ixgbe_common.c:1.13.2.13	Mon Jan 23 14:07:24 2023
+++ src/sys/dev/pci/ixgbe/ixgbe_common.c	Wed Jun 21 19:28:12 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_common.c,v 1.13.2.13 2023/01/23 14:07:24 martin Exp $ */
+/* $NetBSD: ixgbe_common.c,v 1.13.2.14 2023/06/21 19:28:12 martin Exp $ */
 
 /**
   

CVS commit: [netbsd-8] src/sys/dev/pci/ixgbe

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 19:28:12 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe [netbsd-8]: ixgbe.c ixgbe_common.c ixgbe_type.h

Log Message:
Pullup the following revisions, requested by msaitoh in ticket #1828:

sys/dev/pci/ixgbe/ixgbe.c   1.325-1.326 via patch
sys/dev/pci/ixgbe/ixgbe_common.c1.44
sys/dev/pci/ixgbe/ixgbe_type.h  1.56

- PCI device ID 0x15c8 also uses X557-AT PHY, so create the thermal
  sensor sysctl for it, too.
- Count the number of link down events in the MAC using with
  LINK_DN_CNT register.


To generate a diff of this commit:
cvs rdiff -u -r1.88.2.54 -r1.88.2.55 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.13.2.13 -r1.13.2.14 src/sys/dev/pci/ixgbe/ixgbe_common.c
cvs rdiff -u -r1.22.2.17 -r1.22.2.18 src/sys/dev/pci/ixgbe/ixgbe_type.h

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/dev/pci/ixgbe

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 19:20:51 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe [netbsd-9]: ixgbe.c ixgbe_common.c ixgbe_type.h

Log Message:
Pull up the following revisions, requested by msaitoh in ticket #1647:

sys/dev/pci/ixgbe/ixgbe.c   1.325-1.326 via patch
sys/dev/pci/ixgbe/ixgbe_common.c1.44
sys/dev/pci/ixgbe/ixgbe_type.h  1.56

- PCI device ID 0x15c8 also uses X557-AT PHY, so create the thermal
  sensor sysctl for it, too.
- Count the number of link down events in the MAC using with
  LINK_DN_CNT register.


To generate a diff of this commit:
cvs rdiff -u -r1.199.2.25 -r1.199.2.26 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.25.2.6 -r1.25.2.7 src/sys/dev/pci/ixgbe/ixgbe_common.c
cvs rdiff -u -r1.41.2.7 -r1.41.2.8 src/sys/dev/pci/ixgbe/ixgbe_type.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/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.199.2.25 src/sys/dev/pci/ixgbe/ixgbe.c:1.199.2.26
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.199.2.25	Mon Jan 23 14:04:42 2023
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Wed Jun 21 19:20:50 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.199.2.25 2023/01/23 14:04:42 martin Exp $ */
+/* $NetBSD: ixgbe.c,v 1.199.2.26 2023/06/21 19:20:50 martin Exp $ */
 
 /**
 
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.199.2.25 2023/01/23 14:04:42 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.199.2.26 2023/06/21 19:20:50 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1635,6 +1635,8 @@ ixgbe_update_stats_counters(struct adapt
 		IXGBE_EVC_REGADD(hw, stats, IXGBE_MLFC, mlfc);
 		IXGBE_EVC_REGADD(hw, stats, IXGBE_MRFC, mrfc);
 	}
+	if (hw->mac.type == ixgbe_mac_X550EM_a)
+		IXGBE_EVC_REGADD(hw, stats, IXGBE_LINK_DN_CNT, link_dn_cnt);
 	IXGBE_EVC_REGADD2(hw, stats, IXGBE_RLEC, rlec);
 
 	/* Hardware workaround, gprc counts missed packets */
@@ -1985,6 +1987,9 @@ ixgbe_add_hw_stats(struct adapter *adapt
 	stats->namebuf, "MAC Local Faults");
 	evcnt_attach_dynamic(>mrfc, EVCNT_TYPE_MISC, NULL,
 	stats->namebuf, "MAC Remote Faults");
+	if (hw->mac.type == ixgbe_mac_X550EM_a)
+		evcnt_attach_dynamic(>link_dn_cnt, EVCNT_TYPE_MISC,
+		NULL, stats->namebuf, "Link down event in the MAC");
 	evcnt_attach_dynamic(>rlec, EVCNT_TYPE_MISC, NULL,
 	stats->namebuf, "Receive Length Errors");
 	evcnt_attach_dynamic(>lxontxc, EVCNT_TYPE_MISC, NULL,
@@ -2153,6 +2158,8 @@ ixgbe_clear_evcnt(struct adapter *adapte
 	IXGBE_EVC_STORE(>mpctotal, 0);
 	IXGBE_EVC_STORE(>mlfc, 0);
 	IXGBE_EVC_STORE(>mrfc, 0);
+	if (hw->mac.type == ixgbe_mac_X550EM_a)
+		IXGBE_EVC_STORE(>link_dn_cnt, 0);
 	IXGBE_EVC_STORE(>rlec, 0);
 	IXGBE_EVC_STORE(>lxontxc, 0);
 	IXGBE_EVC_STORE(>lxonrxc, 0);
@@ -3471,7 +3478,8 @@ ixgbe_add_device_sysctls(struct adapter 
 	}
 
 	/* for X552/X557-AT devices */
-	if (hw->device_id == IXGBE_DEV_ID_X550EM_X_10G_T) {
+	if ((hw->device_id == IXGBE_DEV_ID_X550EM_X_10G_T) ||
+	(hw->device_id == IXGBE_DEV_ID_X550EM_A_10G_T)) {
 		const struct sysctlnode *phy_node;
 
 		if (sysctl_createv(log, 0, , _node, 0, CTLTYPE_NODE,
@@ -3767,6 +3775,8 @@ ixgbe_detach(device_t dev, int flags)
 	evcnt_detach(>mpctotal);
 	evcnt_detach(>mlfc);
 	evcnt_detach(>mrfc);
+	if (hw->mac.type == ixgbe_mac_X550EM_a)
+		evcnt_detach(>link_dn_cnt);
 	evcnt_detach(>rlec);
 	evcnt_detach(>lxontxc);
 	evcnt_detach(>lxonrxc);
@@ -5813,7 +5823,8 @@ ixgbe_sysctl_phy_temp(SYSCTLFN_ARGS)
 	if (ixgbe_fw_recovery_mode_swflag(adapter))
 		return (EPERM);
 
-	if (hw->device_id != IXGBE_DEV_ID_X550EM_X_10G_T) {
+	if ((hw->device_id != IXGBE_DEV_ID_X550EM_X_10G_T) &&
+	(hw->device_id != IXGBE_DEV_ID_X550EM_A_10G_T)) {
 		device_printf(adapter->dev,
 		"Device has no supported external thermal sensor.\n");
 		return (ENODEV);
@@ -5856,7 +5867,8 @@ ixgbe_sysctl_phy_overtemp_occurred(SYSCT
 	if (ixgbe_fw_recovery_mode_swflag(adapter))
 		return (EPERM);
 
-	if (hw->device_id != IXGBE_DEV_ID_X550EM_X_10G_T) {
+	if ((hw->device_id != IXGBE_DEV_ID_X550EM_X_10G_T) &&
+	(hw->device_id != IXGBE_DEV_ID_X550EM_A_10G_T)) {
 		device_printf(adapter->dev,
 		"Device has no supported external thermal sensor.\n");
 		return (ENODEV);

Index: src/sys/dev/pci/ixgbe/ixgbe_common.c
diff -u src/sys/dev/pci/ixgbe/ixgbe_common.c:1.25.2.6 src/sys/dev/pci/ixgbe/ixgbe_common.c:1.25.2.7
--- src/sys/dev/pci/ixgbe/ixgbe_common.c:1.25.2.6	Mon Jan 23 14:04:42 2023
+++ src/sys/dev/pci/ixgbe/ixgbe_common.c	Wed Jun 21 19:20:51 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_common.c,v 1.25.2.6 2023/01/23 14:04:42 martin Exp $ */
+/* $NetBSD: ixgbe_common.c,v 1.25.2.7 2023/06/21 19:20:51 martin Exp $ */
 
 /**
   

CVS commit: [netbsd-9] src/sys/dev/pci/ixgbe

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 19:20:51 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe [netbsd-9]: ixgbe.c ixgbe_common.c ixgbe_type.h

Log Message:
Pull up the following revisions, requested by msaitoh in ticket #1647:

sys/dev/pci/ixgbe/ixgbe.c   1.325-1.326 via patch
sys/dev/pci/ixgbe/ixgbe_common.c1.44
sys/dev/pci/ixgbe/ixgbe_type.h  1.56

- PCI device ID 0x15c8 also uses X557-AT PHY, so create the thermal
  sensor sysctl for it, too.
- Count the number of link down events in the MAC using with
  LINK_DN_CNT register.


To generate a diff of this commit:
cvs rdiff -u -r1.199.2.25 -r1.199.2.26 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.25.2.6 -r1.25.2.7 src/sys/dev/pci/ixgbe/ixgbe_common.c
cvs rdiff -u -r1.41.2.7 -r1.41.2.8 src/sys/dev/pci/ixgbe/ixgbe_type.h

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/pci/ixgbe

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 19:16:12 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe [netbsd-10]: ixgbe.c ixgbe_common.c ixgbe_type.h

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #202):

sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.56
sys/dev/pci/ixgbe/ixgbe.c: revision 1.325
sys/dev/pci/ixgbe/ixgbe.c: revision 1.326
sys/dev/pci/ixgbe/ixgbe_common.c: revision 1.44

Use thermal sensor code for IXGBE_DEV_ID_X550EM_A_10G_T, too.
 PCI device ID 0x15c8 also use X557-AT PHY, so create the thermal sensor
sysctl for it, too.

Count the number of link down events in the MAC using with LINK_DN_CNT.
 - Add new event counter "link_dn_cnt" to count the number of link down
   events in the MAC.
 - The LINK_DN_CNT register (at 0x0403c) is described only in the
   Denverton's datasheet, so use it only on ixgbe_mac_X550EM_a.


To generate a diff of this commit:
cvs rdiff -u -r1.324 -r1.324.2.1 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.43 -r1.43.4.1 src/sys/dev/pci/ixgbe/ixgbe_common.c
cvs rdiff -u -r1.55 -r1.55.4.1 src/sys/dev/pci/ixgbe/ixgbe_type.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/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.324 src/sys/dev/pci/ixgbe/ixgbe.c:1.324.2.1
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.324	Fri Oct 28 01:10:41 2022
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Wed Jun 21 19:16:12 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.324 2022/10/28 01:10:41 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.324.2.1 2023/06/21 19:16:12 martin Exp $ */
 
 /**
 
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.324 2022/10/28 01:10:41 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.324.2.1 2023/06/21 19:16:12 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1680,6 +1680,8 @@ ixgbe_update_stats_counters(struct adapt
 		IXGBE_EVC_REGADD(hw, stats, IXGBE_MLFC, mlfc);
 		IXGBE_EVC_REGADD(hw, stats, IXGBE_MRFC, mrfc);
 	}
+	if (hw->mac.type == ixgbe_mac_X550EM_a)
+		IXGBE_EVC_REGADD(hw, stats, IXGBE_LINK_DN_CNT, link_dn_cnt);
 	IXGBE_EVC_REGADD2(hw, stats, IXGBE_RLEC, rlec);
 
 	/* Hardware workaround, gprc counts missed packets */
@@ -2029,6 +2031,9 @@ ixgbe_add_hw_stats(struct adapter *adapt
 	stats->namebuf, "MAC Local Faults");
 	evcnt_attach_dynamic(>mrfc, EVCNT_TYPE_MISC, NULL,
 	stats->namebuf, "MAC Remote Faults");
+	if (hw->mac.type == ixgbe_mac_X550EM_a)
+		evcnt_attach_dynamic(>link_dn_cnt, EVCNT_TYPE_MISC,
+		NULL, stats->namebuf, "Link down event in the MAC");
 	evcnt_attach_dynamic(>rlec, EVCNT_TYPE_MISC, NULL,
 	stats->namebuf, "Receive Length Errors");
 	evcnt_attach_dynamic(>lxontxc, EVCNT_TYPE_MISC, NULL,
@@ -2197,6 +2202,8 @@ ixgbe_clear_evcnt(struct adapter *adapte
 	IXGBE_EVC_STORE(>mpctotal, 0);
 	IXGBE_EVC_STORE(>mlfc, 0);
 	IXGBE_EVC_STORE(>mrfc, 0);
+	if (hw->mac.type == ixgbe_mac_X550EM_a)
+		IXGBE_EVC_STORE(>link_dn_cnt, 0);
 	IXGBE_EVC_STORE(>rlec, 0);
 	IXGBE_EVC_STORE(>lxontxc, 0);
 	IXGBE_EVC_STORE(>lxonrxc, 0);
@@ -3515,7 +3522,8 @@ ixgbe_add_device_sysctls(struct adapter 
 	}
 
 	/* for X552/X557-AT devices */
-	if (hw->device_id == IXGBE_DEV_ID_X550EM_X_10G_T) {
+	if ((hw->device_id == IXGBE_DEV_ID_X550EM_X_10G_T) ||
+	(hw->device_id == IXGBE_DEV_ID_X550EM_A_10G_T)) {
 		const struct sysctlnode *phy_node;
 
 		if (sysctl_createv(log, 0, , _node, 0, CTLTYPE_NODE,
@@ -3801,6 +3809,8 @@ ixgbe_detach(device_t dev, int flags)
 	evcnt_detach(>mpctotal);
 	evcnt_detach(>mlfc);
 	evcnt_detach(>mrfc);
+	if (hw->mac.type == ixgbe_mac_X550EM_a)
+		evcnt_detach(>link_dn_cnt);
 	evcnt_detach(>rlec);
 	evcnt_detach(>lxontxc);
 	evcnt_detach(>lxonrxc);
@@ -5954,7 +5964,8 @@ ixgbe_sysctl_phy_temp(SYSCTLFN_ARGS)
 	if (ixgbe_fw_recovery_mode_swflag(adapter))
 		return (EPERM);
 
-	if (hw->device_id != IXGBE_DEV_ID_X550EM_X_10G_T) {
+	if ((hw->device_id != IXGBE_DEV_ID_X550EM_X_10G_T) &&
+	(hw->device_id != IXGBE_DEV_ID_X550EM_A_10G_T)) {
 		device_printf(adapter->dev,
 		"Device has no supported external thermal sensor.\n");
 		return (ENODEV);
@@ -5997,7 +6008,8 @@ ixgbe_sysctl_phy_overtemp_occurred(SYSCT
 	if (ixgbe_fw_recovery_mode_swflag(adapter))
 		return (EPERM);
 
-	if (hw->device_id != IXGBE_DEV_ID_X550EM_X_10G_T) {
+	if ((hw->device_id != IXGBE_DEV_ID_X550EM_X_10G_T) &&
+	(hw->device_id != IXGBE_DEV_ID_X550EM_A_10G_T)){
 		device_printf(adapter->dev,
 		"Device has no supported external thermal sensor.\n");
 		return (ENODEV);

Index: src/sys/dev/pci/ixgbe/ixgbe_common.c
diff -u src/sys/dev/pci/ixgbe/ixgbe_common.c:1.43 src/sys/dev/pci/ixgbe/ixgbe_common.c:1.43.4.1
--- src/sys/dev/pci/ixgbe/ixgbe_common.c:1.43	Mon Jun  6 02:16:37 2022
+++ src/sys/dev/pci/ixgbe/ixgbe_common.c	Wed Jun 21 19:16:12 2023
@@ -1,4 +1,4 

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

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 19:16:12 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe [netbsd-10]: ixgbe.c ixgbe_common.c ixgbe_type.h

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #202):

sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.56
sys/dev/pci/ixgbe/ixgbe.c: revision 1.325
sys/dev/pci/ixgbe/ixgbe.c: revision 1.326
sys/dev/pci/ixgbe/ixgbe_common.c: revision 1.44

Use thermal sensor code for IXGBE_DEV_ID_X550EM_A_10G_T, too.
 PCI device ID 0x15c8 also use X557-AT PHY, so create the thermal sensor
sysctl for it, too.

Count the number of link down events in the MAC using with LINK_DN_CNT.
 - Add new event counter "link_dn_cnt" to count the number of link down
   events in the MAC.
 - The LINK_DN_CNT register (at 0x0403c) is described only in the
   Denverton's datasheet, so use it only on ixgbe_mac_X550EM_a.


To generate a diff of this commit:
cvs rdiff -u -r1.324 -r1.324.2.1 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.43 -r1.43.4.1 src/sys/dev/pci/ixgbe/ixgbe_common.c
cvs rdiff -u -r1.55 -r1.55.4.1 src/sys/dev/pci/ixgbe/ixgbe_type.h

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



CVS commit: [netbsd-8] src/sys/arch/vax

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 19:12:09 UTC 2023

Modified Files:
src/sys/arch/vax/include [netbsd-8]: trap.h
src/sys/arch/vax/vax [netbsd-8]: pmap.c

Log Message:
Pull up following revision(s) (requested by abs in ticket #1829):

sys/arch/vax/vax/pmap.c: revision 1.196
sys/arch/vax/include/trap.h: revision 1.25

Change CASMAGIC to 0xFEDABABE so that it cannot accidentally end up in
valid kernel memory.  Due to the VARM accesses above S0 should always
give a ptelen trap.

Bug found by Kalvis Duckmanton.

Ensure that the kernel do not try to allocate a S0 segment larger than 1G,
since the hardware prohibits that.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.24.46.1 src/sys/arch/vax/include/trap.h
cvs rdiff -u -r1.185 -r1.185.2.1 src/sys/arch/vax/vax/pmap.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/vax/include/trap.h
diff -u src/sys/arch/vax/include/trap.h:1.24 src/sys/arch/vax/include/trap.h:1.24.46.1
--- src/sys/arch/vax/include/trap.h:1.24	Sun Jul  3 02:18:20 2011
+++ src/sys/arch/vax/include/trap.h	Wed Jun 21 19:12:09 2023
@@ -1,4 +1,4 @@
-/*  $NetBSD: trap.h,v 1.24 2011/07/03 02:18:20 matt Exp $ */
+/*  $NetBSD: trap.h,v 1.24.46.1 2023/06/21 19:12:09 martin Exp $ */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -74,7 +74,7 @@
 #define	AFLT_FLTUND	0xa	/* floating underflow */
 
 /* Used by RAS to detect an interrupted CAS */
-#define	CASMAGIC	0xBEDABABE /* high end of S0 space */
+#define	CASMAGIC	0xFEDABABE /* always invalid space */
 
 /* Trap's coming from user mode */
 #define	T_USER	0x100

Index: src/sys/arch/vax/vax/pmap.c
diff -u src/sys/arch/vax/vax/pmap.c:1.185 src/sys/arch/vax/vax/pmap.c:1.185.2.1
--- src/sys/arch/vax/vax/pmap.c:1.185	Mon May 22 16:53:05 2017
+++ src/sys/arch/vax/vax/pmap.c	Wed Jun 21 19:12:09 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.185 2017/05/22 16:53:05 ragge Exp $	   */
+/*	$NetBSD: pmap.c,v 1.185.2.1 2023/06/21 19:12:09 martin Exp $	   */
 /*
  * Copyright (c) 1994, 1998, 1999, 2003 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.185 2017/05/22 16:53:05 ragge Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.185.2.1 2023/06/21 19:12:09 martin Exp $");
 
 #include "opt_ddb.h"
 #include "opt_cputype.h"
@@ -307,6 +307,15 @@ pmap_bootstrap(void)
 		usrptsize = (avail_end/(20 * PPTESZ)) * VAX_NBPG;
 		
 	kvmsize = calc_kvmsize(usrptsize);
+	/*
+	 * Ensure that not more than 1G is allocated, since that is 
+	 * max size of S0 space.
+	 * Also note that for full S0 space the SLR should be 0x20,
+	 * since the comparison in the vax microcode is >= SLR.
+	 */
+#define	S0SPACE	(1*1024*1024*1024)
+	if (kvmsize > S0SPACE)
+		kvmsize = S0SPACE;
 	sysptsize = kvmsize >> VAX_PGSHIFT;
 	/*
 	 * Virtual_* and avail_* is used for mapping of system page table.



CVS commit: [netbsd-8] src/sys/arch/vax

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 19:12:09 UTC 2023

Modified Files:
src/sys/arch/vax/include [netbsd-8]: trap.h
src/sys/arch/vax/vax [netbsd-8]: pmap.c

Log Message:
Pull up following revision(s) (requested by abs in ticket #1829):

sys/arch/vax/vax/pmap.c: revision 1.196
sys/arch/vax/include/trap.h: revision 1.25

Change CASMAGIC to 0xFEDABABE so that it cannot accidentally end up in
valid kernel memory.  Due to the VARM accesses above S0 should always
give a ptelen trap.

Bug found by Kalvis Duckmanton.

Ensure that the kernel do not try to allocate a S0 segment larger than 1G,
since the hardware prohibits that.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.24.46.1 src/sys/arch/vax/include/trap.h
cvs rdiff -u -r1.185 -r1.185.2.1 src/sys/arch/vax/vax/pmap.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/arch/vax

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 19:10:28 UTC 2023

Modified Files:
src/sys/arch/vax/include [netbsd-9]: trap.h
src/sys/arch/vax/vax [netbsd-9]: pmap.c

Log Message:
Pull up following revision(s) (requested by abs in ticket #1648):

sys/arch/vax/vax/pmap.c: revision 1.196
sys/arch/vax/include/trap.h: revision 1.25

Change CASMAGIC to 0xFEDABABE so that it cannot accidentally end up in
valid kernel memory.  Due to the VARM accesses above S0 should always
give a ptelen trap.

Bug found by Kalvis Duckmanton.

Ensure that the kernel do not try to allocate a S0 segment larger than 1G,
since the hardware prohibits that.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.24.58.1 src/sys/arch/vax/include/trap.h
cvs rdiff -u -r1.186 -r1.186.6.1 src/sys/arch/vax/vax/pmap.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/vax/include/trap.h
diff -u src/sys/arch/vax/include/trap.h:1.24 src/sys/arch/vax/include/trap.h:1.24.58.1
--- src/sys/arch/vax/include/trap.h:1.24	Sun Jul  3 02:18:20 2011
+++ src/sys/arch/vax/include/trap.h	Wed Jun 21 19:10:28 2023
@@ -1,4 +1,4 @@
-/*  $NetBSD: trap.h,v 1.24 2011/07/03 02:18:20 matt Exp $ */
+/*  $NetBSD: trap.h,v 1.24.58.1 2023/06/21 19:10:28 martin Exp $ */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -74,7 +74,7 @@
 #define	AFLT_FLTUND	0xa	/* floating underflow */
 
 /* Used by RAS to detect an interrupted CAS */
-#define	CASMAGIC	0xBEDABABE /* high end of S0 space */
+#define	CASMAGIC	0xFEDABABE /* always invalid space */
 
 /* Trap's coming from user mode */
 #define	T_USER	0x100

Index: src/sys/arch/vax/vax/pmap.c
diff -u src/sys/arch/vax/vax/pmap.c:1.186 src/sys/arch/vax/vax/pmap.c:1.186.6.1
--- src/sys/arch/vax/vax/pmap.c:1.186	Fri Mar 30 08:34:35 2018
+++ src/sys/arch/vax/vax/pmap.c	Wed Jun 21 19:10:28 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.186 2018/03/30 08:34:35 ragge Exp $	   */
+/*	$NetBSD: pmap.c,v 1.186.6.1 2023/06/21 19:10:28 martin Exp $	   */
 /*
  * Copyright (c) 1994, 1998, 1999, 2003 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.186 2018/03/30 08:34:35 ragge Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.186.6.1 2023/06/21 19:10:28 martin Exp $");
 
 #include "opt_ddb.h"
 #include "opt_cputype.h"
@@ -307,6 +307,15 @@ pmap_bootstrap(void)
 		usrptsize = (avail_end/(20 * PPTESZ)) * VAX_NBPG;
 		
 	kvmsize = calc_kvmsize(usrptsize);
+	/*
+	 * Ensure that not more than 1G is allocated, since that is 
+	 * max size of S0 space.
+	 * Also note that for full S0 space the SLR should be 0x20,
+	 * since the comparison in the vax microcode is >= SLR.
+	 */
+#define	S0SPACE	(1*1024*1024*1024)
+	if (kvmsize > S0SPACE)
+		kvmsize = S0SPACE;
 	sysptsize = kvmsize >> VAX_PGSHIFT;
 	/*
 	 * Virtual_* and avail_* is used for mapping of system page table.



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

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 19:10:28 UTC 2023

Modified Files:
src/sys/arch/vax/include [netbsd-9]: trap.h
src/sys/arch/vax/vax [netbsd-9]: pmap.c

Log Message:
Pull up following revision(s) (requested by abs in ticket #1648):

sys/arch/vax/vax/pmap.c: revision 1.196
sys/arch/vax/include/trap.h: revision 1.25

Change CASMAGIC to 0xFEDABABE so that it cannot accidentally end up in
valid kernel memory.  Due to the VARM accesses above S0 should always
give a ptelen trap.

Bug found by Kalvis Duckmanton.

Ensure that the kernel do not try to allocate a S0 segment larger than 1G,
since the hardware prohibits that.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.24.58.1 src/sys/arch/vax/include/trap.h
cvs rdiff -u -r1.186 -r1.186.6.1 src/sys/arch/vax/vax/pmap.c

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



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

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 19:09:07 UTC 2023

Modified Files:
src/sys/arch/vax/include [netbsd-10]: trap.h
src/sys/arch/vax/vax [netbsd-10]: pmap.c

Log Message:
Pull up following revision(s) (requested by abs in ticket #201):

sys/arch/vax/vax/pmap.c: revision 1.196
sys/arch/vax/include/trap.h: revision 1.25

Change CASMAGIC to 0xFEDABABE so that it cannot accidentally end up in
valid kernel memory.  Due to the VARM accesses above S0 should always
give a ptelen trap.

Bug found by Kalvis Duckmanton.

Ensure that the kernel do not try to allocate a S0 segment larger than 1G,
since the hardware prohibits that.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.24.84.1 src/sys/arch/vax/include/trap.h
cvs rdiff -u -r1.195 -r1.195.2.1 src/sys/arch/vax/vax/pmap.c

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



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

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 19:09:07 UTC 2023

Modified Files:
src/sys/arch/vax/include [netbsd-10]: trap.h
src/sys/arch/vax/vax [netbsd-10]: pmap.c

Log Message:
Pull up following revision(s) (requested by abs in ticket #201):

sys/arch/vax/vax/pmap.c: revision 1.196
sys/arch/vax/include/trap.h: revision 1.25

Change CASMAGIC to 0xFEDABABE so that it cannot accidentally end up in
valid kernel memory.  Due to the VARM accesses above S0 should always
give a ptelen trap.

Bug found by Kalvis Duckmanton.

Ensure that the kernel do not try to allocate a S0 segment larger than 1G,
since the hardware prohibits that.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.24.84.1 src/sys/arch/vax/include/trap.h
cvs rdiff -u -r1.195 -r1.195.2.1 src/sys/arch/vax/vax/pmap.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/vax/include/trap.h
diff -u src/sys/arch/vax/include/trap.h:1.24 src/sys/arch/vax/include/trap.h:1.24.84.1
--- src/sys/arch/vax/include/trap.h:1.24	Sun Jul  3 02:18:20 2011
+++ src/sys/arch/vax/include/trap.h	Wed Jun 21 19:09:07 2023
@@ -1,4 +1,4 @@
-/*  $NetBSD: trap.h,v 1.24 2011/07/03 02:18:20 matt Exp $ */
+/*  $NetBSD: trap.h,v 1.24.84.1 2023/06/21 19:09:07 martin Exp $ */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -74,7 +74,7 @@
 #define	AFLT_FLTUND	0xa	/* floating underflow */
 
 /* Used by RAS to detect an interrupted CAS */
-#define	CASMAGIC	0xBEDABABE /* high end of S0 space */
+#define	CASMAGIC	0xFEDABABE /* always invalid space */
 
 /* Trap's coming from user mode */
 #define	T_USER	0x100

Index: src/sys/arch/vax/vax/pmap.c
diff -u src/sys/arch/vax/vax/pmap.c:1.195 src/sys/arch/vax/vax/pmap.c:1.195.2.1
--- src/sys/arch/vax/vax/pmap.c:1.195	Sun Dec 11 18:02:40 2022
+++ src/sys/arch/vax/vax/pmap.c	Wed Jun 21 19:09:07 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.195 2022/12/11 18:02:40 oster Exp $	   */
+/*	$NetBSD: pmap.c,v 1.195.2.1 2023/06/21 19:09:07 martin Exp $	   */
 /*
  * Copyright (c) 1994, 1998, 1999, 2003 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.195 2022/12/11 18:02:40 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.195.2.1 2023/06/21 19:09:07 martin Exp $");
 
 #include "opt_ddb.h"
 #include "opt_cputype.h"
@@ -276,6 +276,15 @@ pmap_bootstrap(void)
 		usrptsize = (avail_end/(20 * PPTESZ)) * VAX_NBPG;
 		
 	kvmsize = calc_kvmsize(usrptsize);
+	/*
+	 * Ensure that not more than 1G is allocated, since that is 
+	 * max size of S0 space.
+	 * Also note that for full S0 space the SLR should be 0x20,
+	 * since the comparison in the vax microcode is >= SLR.
+	 */
+#define	S0SPACE	(1*1024*1024*1024)
+	if (kvmsize > S0SPACE)
+		kvmsize = S0SPACE;
 	sysptsize = kvmsize >> VAX_PGSHIFT;
 	/*
 	 * Virtual_* and avail_* is used for mapping of system page table.



CVS commit: [netbsd-8] src

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 19:06:15 UTC 2023

Modified Files:
src/sys/arch/x86/include [netbsd-8]: specialreg.h
src/usr.sbin/cpuctl/arch [netbsd-8]: i386.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1827):

sys/arch/x86/include/specialreg.h: revision 1.202
sys/arch/x86/include/specialreg.h: revision 1.203
usr.sbin/cpuctl/arch/i386.c: revision 1.136

Add some CPUID bits from PPR for AMD Family 19h Model 61h Revision B1.

Add AMD CPUID Fn_0008 %ebx bit 3 INVLPGB.


To generate a diff of this commit:
cvs rdiff -u -r1.98.2.25 -r1.98.2.26 src/sys/arch/x86/include/specialreg.h
cvs rdiff -u -r1.74.6.16 -r1.74.6.17 src/usr.sbin/cpuctl/arch/i386.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/x86/include/specialreg.h
diff -u src/sys/arch/x86/include/specialreg.h:1.98.2.25 src/sys/arch/x86/include/specialreg.h:1.98.2.26
--- src/sys/arch/x86/include/specialreg.h:1.98.2.25	Mon Jan 23 13:09:54 2023
+++ src/sys/arch/x86/include/specialreg.h	Wed Jun 21 19:06:15 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: specialreg.h,v 1.98.2.25 2023/01/23 13:09:54 martin Exp $	*/
+/*	$NetBSD: specialreg.h,v 1.98.2.26 2023/06/21 19:06:15 martin Exp $	*/
 
 /*
  * Copyright (c) 2014-2019 The NetBSD Foundation, Inc.
@@ -844,6 +844,7 @@
 #define CPUID_CAPEX_CLZERO	   __BIT(0)  /* CLZERO instruction */
 #define CPUID_CAPEX_IRPERF	   __BIT(1)  /* InstRetCntMsr */
 #define CPUID_CAPEX_XSAVEERPTR	   __BIT(2)  /* RstrFpErrPtrs by XRSTOR */
+#define CPUID_CAPEX_INVLPGB	   __BIT(3)  /* INVLPGB instruction */
 #define CPUID_CAPEX_RDPRU	   __BIT(4)  /* RDPRU instruction */
 #define CPUID_CAPEX_MBE		   __BIT(6)  /* Memory Bandwidth Enforcement */
 #define CPUID_CAPEX_MCOMMIT	   __BIT(8)  /* MCOMMIT instruction */
@@ -866,7 +867,7 @@
 #define CPUID_CAPEX_BTC_NO	   __BIT(29) /* Branch Type Confusion NO */
 
 #define CPUID_CAPEX_FLAGS	"\20"	   \
-	"\1CLZERO"	"\2IRPERF"	"\3XSAVEERPTR"			   \
+	"\1CLZERO"	"\2IRPERF"	"\3XSAVEERPTR"	"\4INVLPGB"	   \
 	"\5RDPRU"			"\7MBE"   \
 	"\11MCOMMIT"	"\12WBNOINVD"	"\13B10"			   \
 	"\15IBPB"	"\16INT_WBINVD"	"\17IBRS"	"\20STIBP"	   \
@@ -912,6 +913,9 @@
 #define CPUID_AMD_SVM_TLBICTL	  __BIT(24) /* TLB Intercept Control */
 #define CPUID_AMD_SVM_VNMI	  __BIT(25) /* NMI Virtualization */
 #define CPUID_AMD_SVM_IBSVIRT	  __BIT(26) /* IBS Virtualization */
+#define CPUID_AMD_SVM_XLVTOFFFLTCHG   __BIT(27) /* Ext LVToffset FLT changed */
+#define CPUID_AMD_SVM_VMCBADRCHKCHG   __BIT(28) /* VMCB addr check changed */
+
 
 #define CPUID_AMD_SVM_FLAGS	 "\20"	\
 	"\1" "NP"	"\2" "LbrVirt"	"\3" "SVML"	"\4" "NRIPS"	\
@@ -922,8 +926,8 @@
 		"\20" "V_VMSAVE_VMLOAD"	\
 	"\21" "VGIF"	"\22" "GMET"	"\23x2AVIC"	"\24SSSCHECK"	\
 	"\25" "SPEC_CTRL" "\26" "ROGPT"		"\30HOST_MCE_OVERRIDE"	\
-	"\31" "TLBICTL"	"\32VNMI"	"\33IBSVIRT"	"\34B27"	\
-	"\35B28"
+	"\31" "TLBICTL"	"\32VNMI" "\33IBSVIRT" "\34ExtLvtOffsetFaultChg" \
+	"\35VmcbAddrChkChg"
 
 /*
  * AMD Instruction-Based Sampling Capabilities.
@@ -1026,21 +1030,26 @@
 
 /* %eax */
 #define CPUID_AMDEXT2_NONESTEDDBP __BIT(0) /* No nested data breakpoints */
+#define CPUID_AMDEXT2_FGKBNOSERIAL __BIT(1) /* {FS,GS,K}BASE WRMSR !serializ */
 #define CPUID_AMDEXT2_LFENCESERIAL __BIT(2) /* LFENCE always serializing */
 #define CPUID_AMDEXT2_SMMPGCFGLCK __BIT(3) /* SMM Paging configuration lock */
 #define CPUID_AMDEXT2_NULLSELCLRB __BIT(6) /* Null segment selector clr base */
 #define CPUID_AMDEXT2_UPADDRIGN	  __BIT(7) /* Upper Address Ignore */
 #define CPUID_AMDEXT2_AUTOIBRS	  __BIT(8) /* Automatic IBRS */
 #define CPUID_AMDEXT2_NOSMMCTL	  __BIT(9) /* SMM_CTL MSR is not supported */
+#define CPUID_AMDEXT2_FSRS	  __BIT(10) /* Fast Short Rep Stosb */
+#define CPUID_AMDEXT2_FSRC	  __BIT(11) /* Fast Short Rep Cmpsb */
 #define CPUID_AMDEXT2_PREFETCHCTL __BIT(13) /* Prefetch control MSR */
 #define CPUID_AMDEXT2_CPUIDUSRDIS __BIT(17) /* CPUID dis. for non-priv. soft */
+#define CPUID_AMDEXT2_EPSF	  __BIT(18) /* Enhanced Predective Store Fwd */
 
 #define CPUID_AMDEXT2_FLAGS	 "\20"	  \
-	"\1NoNestedDataBp"	"\3LfenceAlwaysSerialize" "\4SmmPgCfgLock"\
+	"\1NoNestedDataBp" "\2FsGsKernelGsBaseNonSerializing"		  \
+"\3LfenceAlwaysSerialize" "\4SmmPgCfgLock"\
 			 "\7NullSelectClearsBase" "\10UpperAddressIgnore" \
-	"\11AutomaticIBRS" "\12NoSmmCtlMSR"  \
+	"\11AutomaticIBRS" "\12NoSmmCtlMSR"	"\13FSRS"	"\14FSRC" \
 			"\16PrefetchCtlMSR"  \
-			"\22CpuidUserDis"
+			"\22CpuidUserDis"	"\23EPSF"
 
 /*
  * AMD Extended Performance Monitoring and Debug
@@ -1058,7 +1067,8 @@
 /* %ebx */
 #define CPUID_AXPERF_NCPC  __BITS(3, 0)	/* Num of Core PMC counters */
 #define CPUID_AXPERF_NLBRSTACK __BITS(9, 4)	/* Num of LBR Stack entries */
-#define CPUID_AXPERF_NNBPC __BITS(15, 10)	/* Num of Northbridge PMC */
+#define 

CVS commit: [netbsd-8] src

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 19:06:15 UTC 2023

Modified Files:
src/sys/arch/x86/include [netbsd-8]: specialreg.h
src/usr.sbin/cpuctl/arch [netbsd-8]: i386.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1827):

sys/arch/x86/include/specialreg.h: revision 1.202
sys/arch/x86/include/specialreg.h: revision 1.203
usr.sbin/cpuctl/arch/i386.c: revision 1.136

Add some CPUID bits from PPR for AMD Family 19h Model 61h Revision B1.

Add AMD CPUID Fn_0008 %ebx bit 3 INVLPGB.


To generate a diff of this commit:
cvs rdiff -u -r1.98.2.25 -r1.98.2.26 src/sys/arch/x86/include/specialreg.h
cvs rdiff -u -r1.74.6.16 -r1.74.6.17 src/usr.sbin/cpuctl/arch/i386.c

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



CVS commit: [netbsd-9] src

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 19:04:19 UTC 2023

Modified Files:
src/sys/arch/x86/include [netbsd-9]: specialreg.h
src/usr.sbin/cpuctl/arch [netbsd-9]: i386.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1646):

sys/arch/x86/include/specialreg.h: revision 1.202
sys/arch/x86/include/specialreg.h: revision 1.203
usr.sbin/cpuctl/arch/i386.c: revision 1.136

Add some CPUID bits from PPR for AMD Family 19h Model 61h Revision B1.

Add AMD CPUID Fn_0008 %ebx bit 3 INVLPGB.


To generate a diff of this commit:
cvs rdiff -u -r1.150.2.12 -r1.150.2.13 src/sys/arch/x86/include/specialreg.h
cvs rdiff -u -r1.104.2.12 -r1.104.2.13 src/usr.sbin/cpuctl/arch/i386.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/x86/include/specialreg.h
diff -u src/sys/arch/x86/include/specialreg.h:1.150.2.12 src/sys/arch/x86/include/specialreg.h:1.150.2.13
--- src/sys/arch/x86/include/specialreg.h:1.150.2.12	Mon Jan 23 13:00:53 2023
+++ src/sys/arch/x86/include/specialreg.h	Wed Jun 21 19:04:19 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: specialreg.h,v 1.150.2.12 2023/01/23 13:00:53 martin Exp $	*/
+/*	$NetBSD: specialreg.h,v 1.150.2.13 2023/06/21 19:04:19 martin Exp $	*/
 
 /*
  * Copyright (c) 2014-2020 The NetBSD Foundation, Inc.
@@ -868,6 +868,7 @@
 #define CPUID_CAPEX_CLZERO	   __BIT(0)  /* CLZERO instruction */
 #define CPUID_CAPEX_IRPERF	   __BIT(1)  /* InstRetCntMsr */
 #define CPUID_CAPEX_XSAVEERPTR	   __BIT(2)  /* RstrFpErrPtrs by XRSTOR */
+#define CPUID_CAPEX_INVLPGB	   __BIT(3)  /* INVLPGB instruction */
 #define CPUID_CAPEX_RDPRU	   __BIT(4)  /* RDPRU instruction */
 #define CPUID_CAPEX_MBE		   __BIT(6)  /* Memory Bandwidth Enforcement */
 #define CPUID_CAPEX_MCOMMIT	   __BIT(8)  /* MCOMMIT instruction */
@@ -890,7 +891,7 @@
 #define CPUID_CAPEX_BTC_NO	   __BIT(29) /* Branch Type Confusion NO */
 
 #define CPUID_CAPEX_FLAGS	"\20"	   \
-	"\1CLZERO"	"\2IRPERF"	"\3XSAVEERPTR"			   \
+	"\1CLZERO"	"\2IRPERF"	"\3XSAVEERPTR"	"\4INVLPGB"	   \
 	"\5RDPRU"			"\7MBE"   \
 	"\11MCOMMIT"	"\12WBNOINVD"	"\13B10"			   \
 	"\15IBPB"	"\16INT_WBINVD"	"\17IBRS"	"\20STIBP"	   \
@@ -936,6 +937,9 @@
 #define CPUID_AMD_SVM_TLBICTL	  __BIT(24) /* TLB Intercept Control */
 #define CPUID_AMD_SVM_VNMI	  __BIT(25) /* NMI Virtualization */
 #define CPUID_AMD_SVM_IBSVIRT	  __BIT(26) /* IBS Virtualization */
+#define CPUID_AMD_SVM_XLVTOFFFLTCHG   __BIT(27) /* Ext LVToffset FLT changed */
+#define CPUID_AMD_SVM_VMCBADRCHKCHG   __BIT(28) /* VMCB addr check changed */
+
 
 #define CPUID_AMD_SVM_FLAGS	 "\20"	\
 	"\1" "NP"	"\2" "LbrVirt"	"\3" "SVML"	"\4" "NRIPS"	\
@@ -946,8 +950,8 @@
 		"\20" "V_VMSAVE_VMLOAD"	\
 	"\21" "VGIF"	"\22" "GMET"	"\23x2AVIC"	"\24SSSCHECK"	\
 	"\25" "SPEC_CTRL" "\26" "ROGPT"		"\30HOST_MCE_OVERRIDE"	\
-	"\31" "TLBICTL"	"\32VNMI"	"\33IBSVIRT"	"\34B27"	\
-	"\35B28"
+	"\31" "TLBICTL"	"\32VNMI" "\33IBSVIRT" "\34ExtLvtOffsetFaultChg" \
+	"\35VmcbAddrChkChg"
 
 /*
  * AMD Instruction-Based Sampling Capabilities.
@@ -1050,21 +1054,26 @@
 
 /* %eax */
 #define CPUID_AMDEXT2_NONESTEDDBP __BIT(0) /* No nested data breakpoints */
+#define CPUID_AMDEXT2_FGKBNOSERIAL __BIT(1) /* {FS,GS,K}BASE WRMSR !serializ */
 #define CPUID_AMDEXT2_LFENCESERIAL __BIT(2) /* LFENCE always serializing */
 #define CPUID_AMDEXT2_SMMPGCFGLCK __BIT(3) /* SMM Paging configuration lock */
 #define CPUID_AMDEXT2_NULLSELCLRB __BIT(6) /* Null segment selector clr base */
 #define CPUID_AMDEXT2_UPADDRIGN	  __BIT(7) /* Upper Address Ignore */
 #define CPUID_AMDEXT2_AUTOIBRS	  __BIT(8) /* Automatic IBRS */
 #define CPUID_AMDEXT2_NOSMMCTL	  __BIT(9) /* SMM_CTL MSR is not supported */
+#define CPUID_AMDEXT2_FSRS	  __BIT(10) /* Fast Short Rep Stosb */
+#define CPUID_AMDEXT2_FSRC	  __BIT(11) /* Fast Short Rep Cmpsb */
 #define CPUID_AMDEXT2_PREFETCHCTL __BIT(13) /* Prefetch control MSR */
 #define CPUID_AMDEXT2_CPUIDUSRDIS __BIT(17) /* CPUID dis. for non-priv. soft */
+#define CPUID_AMDEXT2_EPSF	  __BIT(18) /* Enhanced Predective Store Fwd */
 
 #define CPUID_AMDEXT2_FLAGS	 "\20"	  \
-	"\1NoNestedDataBp"	"\3LfenceAlwaysSerialize" "\4SmmPgCfgLock"\
+	"\1NoNestedDataBp" "\2FsGsKernelGsBaseNonSerializing"		  \
+"\3LfenceAlwaysSerialize" "\4SmmPgCfgLock"\
 			 "\7NullSelectClearsBase" "\10UpperAddressIgnore" \
-	"\11AutomaticIBRS" "\12NoSmmCtlMSR"  \
+	"\11AutomaticIBRS" "\12NoSmmCtlMSR"	"\13FSRS"	"\14FSRC" \
 			"\16PrefetchCtlMSR"  \
-			"\22CpuidUserDis"
+			"\22CpuidUserDis"	"\23EPSF"
 
 /*
  * AMD Extended Performance Monitoring and Debug
@@ -1082,7 +1091,8 @@
 /* %ebx */
 #define CPUID_AXPERF_NCPC  __BITS(3, 0)	/* Num of Core PMC counters */
 #define CPUID_AXPERF_NLBRSTACK __BITS(9, 4)	/* Num of LBR Stack entries */
-#define CPUID_AXPERF_NNBPC __BITS(15, 10)	/* Num of Northbridge PMC */
+#define 

  1   2   >