CVS commit: src/sys/dev/usb

2019-01-04 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Jan  5 07:56:07 UTC 2019

Modified Files:
src/sys/dev/usb: if_mue.c if_muevar.h

Log Message:
Enable multiple outstanding transfers.

iperf3 now shows 250MBit/s for sending and 225MBit/s for receiving.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/usb/if_mue.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/usb/if_muevar.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/usb/if_mue.c
diff -u src/sys/dev/usb/if_mue.c:1.26 src/sys/dev/usb/if_mue.c:1.27
--- src/sys/dev/usb/if_mue.c:1.26	Fri Dec 28 22:55:20 2018
+++ src/sys/dev/usb/if_mue.c	Sat Jan  5 07:56:07 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_mue.c,v 1.26 2018/12/28 22:55:20 rin Exp $	*/
+/*	$NetBSD: if_mue.c,v 1.27 2019/01/05 07:56:07 mlelstv Exp $	*/
 /*	$OpenBSD: if_mue.c,v 1.3 2018/08/04 16:42:46 jsg Exp $	*/
 
 /*
@@ -20,7 +20,7 @@
 /* Driver for Microchip LAN7500/LAN7800 chipsets. */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_mue.c,v 1.26 2018/12/28 22:55:20 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mue.c,v 1.27 2019/01/05 07:56:07 mlelstv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -1155,6 +1155,9 @@ mue_tx_list_init(struct mue_softc *sc)
 		}
 	}
 
+	cd->mue_tx_prod = 0;
+	cd->mue_tx_cnt = 0;
+
 	return 0;
 }
 
@@ -1258,8 +1261,6 @@ mue_encap(struct mue_softc *sc, struct m
 		return EIO;
 	}
 
-	sc->mue_cdata.mue_tx_cnt++;
-
 	return 0;
 }
 
@@ -1566,6 +1567,7 @@ mue_txeof(struct usbd_xfer *xfer, void *
 {
 	struct mue_chain *c = priv;
 	struct mue_softc *sc = c->mue_sc;
+	struct mue_cdata *cd = >mue_cdata;
 	struct ifnet *ifp = GET_IFP(sc);
 	int s;
 
@@ -1573,7 +1575,8 @@ mue_txeof(struct usbd_xfer *xfer, void *
 		return;
 
 	s = splnet();
-
+	KASSERT(cd->mue_tx_cnt > 0);
+	cd->mue_tx_cnt--;
 	if (__predict_false(status != USBD_NORMAL_COMPLETION)) {
 		if (status == USBD_NOT_STARTED || status == USBD_CANCELLED) {
 			splx(s);
@@ -1757,6 +1760,8 @@ mue_start(struct ifnet *ifp)
 {
 	struct mue_softc *sc = ifp->if_softc;
 	struct mbuf *m;
+	struct mue_cdata *cd = >mue_cdata;
+	int idx;
 
 	if (__predict_false(!sc->mue_link)) {
 		DPRINTF(sc, "no link\n");
@@ -1769,20 +1774,29 @@ mue_start(struct ifnet *ifp)
 		return;
 	}
 
-	IFQ_POLL(>if_snd, m);
-	if (m == NULL)
-		return;
+	idx = cd->mue_tx_prod;
+	while (cd->mue_tx_cnt < MUE_TX_LIST_CNT) {
+		IFQ_POLL(>if_snd, m);
+		if (m == NULL)
+			break;
 
-	if (__predict_false(mue_encap(sc, m, 0))) {
-		ifp->if_oerrors++;
-		return;
-	}
-	IFQ_DEQUEUE(>if_snd, m);
+		if (__predict_false(mue_encap(sc, m, idx))) {
+			ifp->if_oerrors++;
+			break;
+		}
+		IFQ_DEQUEUE(>if_snd, m);
 
-	bpf_mtap(ifp, m, BPF_D_OUT);
-	m_freem(m);
+		bpf_mtap(ifp, m, BPF_D_OUT);
+		m_freem(m);
+
+		idx = (idx + 1) % MUE_TX_LIST_CNT;
+		cd->mue_tx_cnt++;
+
+	}
+	cd->mue_tx_prod = idx;
 
-	ifp->if_flags |= IFF_OACTIVE;
+	if (cd->mue_tx_cnt >= MUE_TX_LIST_CNT)
+		ifp->if_flags |= IFF_OACTIVE;
 
 	/* Set a timeout in case the chip goes out to lunch. */
 	ifp->if_timer = 5;

Index: src/sys/dev/usb/if_muevar.h
diff -u src/sys/dev/usb/if_muevar.h:1.3 src/sys/dev/usb/if_muevar.h:1.4
--- src/sys/dev/usb/if_muevar.h:1.3	Tue Dec 11 08:16:57 2018
+++ src/sys/dev/usb/if_muevar.h	Sat Jan  5 07:56:07 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_muevar.h,v 1.3 2018/12/11 08:16:57 rin Exp $	*/
+/*	$NetBSD: if_muevar.h,v 1.4 2019/01/05 07:56:07 mlelstv Exp $	*/
 /*	$OpenBSD: if_muereg.h,v 1.1 2018/08/03 01:50:15 kevlo Exp $	*/
 
 /*
@@ -31,9 +31,9 @@ struct mue_chain {
 };
 
 struct mue_cdata {
-#define MUE_TX_LIST_CNT	1
+#define MUE_TX_LIST_CNT	4
 	struct mue_chain	mue_tx_chain[MUE_TX_LIST_CNT];
-#define MUE_RX_LIST_CNT	1
+#define MUE_RX_LIST_CNT	4
 	struct mue_chain	mue_rx_chain[MUE_RX_LIST_CNT];
 	int			mue_tx_prod;
 	int			mue_tx_cons;



CVS commit: src/usr.bin/telnet

2019-01-04 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Sat Jan  5 06:59:46 UTC 2019

Modified Files:
src/usr.bin/telnet: Makefile

Log Message:
Bump WARNS to 5, and remove unnecessary -Wno (tested with pkgsrc clang 7)


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/usr.bin/telnet/Makefile

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/telnet/Makefile
diff -u src/usr.bin/telnet/Makefile:1.55 src/usr.bin/telnet/Makefile:1.56
--- src/usr.bin/telnet/Makefile:1.55	Sat Jan  5 06:56:03 2019
+++ src/usr.bin/telnet/Makefile	Sat Jan  5 06:59:46 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.55 2019/01/05 06:56:03 maya Exp $
+#	$NetBSD: Makefile,v 1.56 2019/01/05 06:59:46 maya Exp $
 #
 # Copyright (c) 1990 The Regents of the University of California.
 # All rights reserved.
@@ -30,8 +30,7 @@
 #	from: @(#)Makefile	8.1 (Berkeley) 6/6/93
 #
 
-WARNS?=	4	# XXX -Wshadow etc.  fix asap
-CWARNFLAGS.clang+=	-Wno-tautological-compare -Wno-format-security
+WARNS?=	5
 
 .include 
 



CVS commit: src/usr.bin/telnet

2019-01-04 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Sat Jan  5 06:56:03 UTC 2019

Modified Files:
src/usr.bin/telnet: Makefile

Log Message:
Remove advertising clause, permitted by the copyright author.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/usr.bin/telnet/Makefile

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/telnet/Makefile
diff -u src/usr.bin/telnet/Makefile:1.54 src/usr.bin/telnet/Makefile:1.55
--- src/usr.bin/telnet/Makefile:1.54	Thu Dec 13 04:49:19 2018
+++ src/usr.bin/telnet/Makefile	Sat Jan  5 06:56:03 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.54 2018/12/13 04:49:19 maya Exp $
+#	$NetBSD: Makefile,v 1.55 2019/01/05 06:56:03 maya Exp $
 #
 # Copyright (c) 1990 The Regents of the University of California.
 # All rights reserved.
@@ -11,11 +11,7 @@
 # 2. Redistributions in binary form must reproduce the above copyright
 #notice, this list of conditions and the following disclaimer in the
 #documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-#must display the following acknowledgement:
-#	This product includes software developed by the University of
-#	California, Berkeley and its contributors.
-# 4. Neither the name of the University nor the names of its contributors
+# 3. Neither the name of the University nor the names of its contributors
 #may be used to endorse or promote products derived from this software
 #without specific prior written permission.
 #



CVS commit: src/usr.bin/telnet

2019-01-04 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Sat Jan  5 06:47:24 UTC 2019

Modified Files:
src/usr.bin/telnet: commands.c telnet.c utilities.c

Log Message:
unifdef compatibility for old BSD servers. This has been
disabled, so no binary change. from openbsd.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/usr.bin/telnet/commands.c
cvs rdiff -u -r1.41 -r1.42 src/usr.bin/telnet/telnet.c
cvs rdiff -u -r1.28 -r1.29 src/usr.bin/telnet/utilities.c

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

Modified files:

Index: src/usr.bin/telnet/commands.c
diff -u src/usr.bin/telnet/commands.c:1.74 src/usr.bin/telnet/commands.c:1.75
--- src/usr.bin/telnet/commands.c:1.74	Sat Jan  5 06:30:05 2019
+++ src/usr.bin/telnet/commands.c	Sat Jan  5 06:47:24 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: commands.c,v 1.74 2019/01/05 06:30:05 maya Exp $	*/
+/*	$NetBSD: commands.c,v 1.75 2019/01/05 06:47:24 maya Exp $	*/
 
 /*
  * Copyright (C) 1997 and 1998 WIDE Project.
@@ -63,7 +63,7 @@
 #if 0
 static char sccsid[] = "@(#)commands.c	8.4 (Berkeley) 5/30/95";
 #else
-__RCSID("$NetBSD: commands.c,v 1.74 2019/01/05 06:30:05 maya Exp $");
+__RCSID("$NetBSD: commands.c,v 1.75 2019/01/05 06:47:24 maya Exp $");
 #endif
 #endif /* not lint */
 
@@ -1542,10 +1542,6 @@ struct envlist EnvList[] = {
 { "send",	"Send an environment variable", env_send,	1 },
 { "list",	"List the current environment variables",
 		env_list,	0 },
-#if defined(OLD_ENVIRON) && defined(ENV_HACK)
-{ "varval", "Reverse VAR and VALUE (auto, right, wrong, status)",
-		env_varval,1 },
-#endif
 { "help",	0,env_help,		0 },
 { "?",	"Print help information",	env_help,		0 },
 { .name = 0 },
@@ -1745,9 +1741,6 @@ env_send(const char *var, char *d)
 	struct env_lst *ep;
 
 	if (my_state_is_wont(TELOPT_NEW_ENVIRON)
-#ifdef	OLD_ENVIRON
-	&& my_state_is_wont(TELOPT_OLD_ENVIRON)
-#endif
 		) {
 		fprintf(stderr,
 		"Cannot send '%s': Telnet ENVIRON option not enabled\n",
@@ -1807,43 +1800,6 @@ env_getvalue(const char *var)
 	return NULL;
 }
 
-#if defined(OLD_ENVIRON) && defined(ENV_HACK)
-void
-env_varval(const unsigned char *what)
-{
-	extern int old_env_var, old_env_value, env_auto;
-	int len = strlen(what);
-
-	if (len == 0)
-		goto unknown;
-
-	if (strncasecmp(what, "status", len) == 0) {
-		if (env_auto)
-			printf("%s%s", "VAR and VALUE are/will be ",
-	"determined automatically\n");
-		if (old_env_var == OLD_ENV_VAR)
-			printf("VAR and VALUE set to correct definitions\n");
-		else
-			printf("VAR and VALUE definitions are reversed\n");
-	} else if (strncasecmp(what, "auto", len) == 0) {
-		env_auto = 1;
-		old_env_var = OLD_ENV_VALUE;
-		old_env_value = OLD_ENV_VAR;
-	} else if (strncasecmp(what, "right", len) == 0) {
-		env_auto = 0;
-		old_env_var = OLD_ENV_VAR;
-		old_env_value = OLD_ENV_VALUE;
-	} else if (strncasecmp(what, "wrong", len) == 0) {
-		env_auto = 0;
-		old_env_var = OLD_ENV_VALUE;
-		old_env_value = OLD_ENV_VAR;
-	} else {
-unknown:
-		printf("Unknown \"varval\" command. (\"auto\", \"right\", \"wrong\", \"status\")\n");
-	}
-}
-#endif
-
 #ifdef AUTHENTICATION
 /*
  * The AUTHENTICATE command.

Index: src/usr.bin/telnet/telnet.c
diff -u src/usr.bin/telnet/telnet.c:1.41 src/usr.bin/telnet/telnet.c:1.42
--- src/usr.bin/telnet/telnet.c:1.41	Fri Dec 14 23:40:17 2018
+++ src/usr.bin/telnet/telnet.c	Sat Jan  5 06:47:24 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: telnet.c,v 1.41 2018/12/14 23:40:17 christos Exp $	*/
+/*	$NetBSD: telnet.c,v 1.42 2019/01/05 06:47:24 maya Exp $	*/
 
 /*
  * Copyright (c) 1988, 1990, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)telnet.c	8.4 (Berkeley) 5/30/95";
 #else
-__RCSID("$NetBSD: telnet.c,v 1.41 2018/12/14 23:40:17 christos Exp $");
+__RCSID("$NetBSD: telnet.c,v 1.42 2019/01/05 06:47:24 maya Exp $");
 #endif
 #endif /* not lint */
 
@@ -133,11 +133,7 @@ cc_t echoc;
 #define	TS_SE		8		/* looking for sub-option end */
 
 static int	telrcv_state;
-#ifdef	OLD_ENVIRON
-unsigned char telopt_environ = TELOPT_NEW_ENVIRON;
-#else
 # define telopt_environ TELOPT_NEW_ENVIRON
-#endif
 
 jmp_buf	toplevel = { 0 };
 
@@ -461,16 +457,6 @@ dooption(int option)
 		break;
 
 	case TELOPT_NEW_ENVIRON:	/* New environment variable option */
-#ifdef	OLD_ENVIRON
-		if (my_state_is_will(TELOPT_OLD_ENVIRON))
-			send_wont(TELOPT_OLD_ENVIRON, 1); /* turn off the old */
-		goto env_common;
-	case TELOPT_OLD_ENVIRON:	/* Old environment variable option */
-		if (my_state_is_will(TELOPT_NEW_ENVIRON))
-			break;		/* Don't enable if new one is in use! */
-	env_common:
-		telopt_environ = option;
-#endif
 		new_state_ok = 1;
 		break;
 
@@ -546,16 +532,6 @@ dontoption(int option)
 	case TELOPT_LINEMODE:
 		linemode = 0;	/* put us back to the default state */
 		break;
-#ifdef	OLD_ENVIRON
-	case TELOPT_NEW_ENVIRON:
-		/*
-		 * The new environ option wasn't recognized, try
-		 * the old one.
-		 

CVS commit: src/usr.bin/telnet

2019-01-04 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Sat Jan  5 06:30:05 UTC 2019

Modified Files:
src/usr.bin/telnet: commands.c

Log Message:
Avoid unnecessary casts, from openbsd. No binary change.


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/usr.bin/telnet/commands.c

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

Modified files:

Index: src/usr.bin/telnet/commands.c
diff -u src/usr.bin/telnet/commands.c:1.73 src/usr.bin/telnet/commands.c:1.74
--- src/usr.bin/telnet/commands.c:1.73	Fri Dec 14 23:40:17 2018
+++ src/usr.bin/telnet/commands.c	Sat Jan  5 06:30:05 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: commands.c,v 1.73 2018/12/14 23:40:17 christos Exp $	*/
+/*	$NetBSD: commands.c,v 1.74 2019/01/05 06:30:05 maya Exp $	*/
 
 /*
  * Copyright (C) 1997 and 1998 WIDE Project.
@@ -63,7 +63,7 @@
 #if 0
 static char sccsid[] = "@(#)commands.c	8.4 (Berkeley) 5/30/95";
 #else
-__RCSID("$NetBSD: commands.c,v 1.73 2018/12/14 23:40:17 christos Exp $");
+__RCSID("$NetBSD: commands.c,v 1.74 2019/01/05 06:30:05 maya Exp $");
 #endif
 #endif /* not lint */
 
@@ -280,16 +280,16 @@ control(cc_t c)
 	}
 	if (uic >= 0x80) {
 		buf[0] = '\\';
-		buf[1] = (char)(((c >> 6) & 07) + '0');
-		buf[2] = (char)(((c >> 3) & 07) + '0');
-		buf[3] = (char)((c & 07) + '0');
+		buf[1] = ((c >> 6) & 07) + '0';
+		buf[2] = ((c >> 3) & 07) + '0';
+		buf[3] = (c & 07) + '0';
 		buf[4] = '\0';
 	} else if (uic >= 0x20) {
-		buf[0] = (char)c;
+		buf[0] = c;
 		buf[1] = '\0';
 	} else {
 		buf[0] = '^';
-		buf[1] = (char)('@' + c);
+		buf[1] = '@' + c;
 		buf[2] = '\0';
 	}
 	return (buf);



CVS commit: src/external/bsd/wpa/bin

2019-01-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  5 05:40:00 UTC 2019

Modified Files:
src/external/bsd/wpa/bin/hostapd_cli: Makefile
src/external/bsd/wpa/bin/wpa_cli: Makefile
src/external/bsd/wpa/bin/wpa_passphrase: Makefile

Log Message:
include common path in the rest of the Makefiles


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/wpa/bin/hostapd_cli/Makefile
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/wpa/bin/wpa_cli/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/wpa/bin/wpa_passphrase/Makefile

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

Modified files:

Index: src/external/bsd/wpa/bin/hostapd_cli/Makefile
diff -u src/external/bsd/wpa/bin/hostapd_cli/Makefile:1.3 src/external/bsd/wpa/bin/hostapd_cli/Makefile:1.4
--- src/external/bsd/wpa/bin/hostapd_cli/Makefile:1.3	Mon Nov 21 15:15:16 2016
+++ src/external/bsd/wpa/bin/hostapd_cli/Makefile	Sat Jan  5 00:40:00 2019
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.3 2016/11/21 20:15:16 christos Exp $
+# $NetBSD: Makefile,v 1.4 2019/01/05 05:40:00 christos Exp $
 
 .include "${.CURDIR}/../Makefile.inc"
 
-.PATH.c: ${HOSTAPD_DISTDIR}
+.PATH.c: ${HOSTAPD_DISTDIR} ${COMMON_PATH}
 
 PROG=	hostapd_cli
 SRCS=	hostapd_cli.c wpa_ctrl.c os_unix.c eloop.c edit.c wpa_debug.c

Index: src/external/bsd/wpa/bin/wpa_cli/Makefile
diff -u src/external/bsd/wpa/bin/wpa_cli/Makefile:1.5 src/external/bsd/wpa/bin/wpa_cli/Makefile:1.6
--- src/external/bsd/wpa/bin/wpa_cli/Makefile:1.5	Mon Nov 21 15:15:16 2016
+++ src/external/bsd/wpa/bin/wpa_cli/Makefile	Sat Jan  5 00:40:00 2019
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.5 2016/11/21 20:15:16 christos Exp $
+# $NetBSD: Makefile,v 1.6 2019/01/05 05:40:00 christos Exp $
 
 .include "${.CURDIR}/../Makefile.inc"
 
-.PATH.c: ${WPA_SUPPLICANT_DISTDIR}
+.PATH.c: ${WPA_SUPPLICANT_DISTDIR} ${COMMON_PATH}
 
 PROG=	wpa_cli
 SRCS=	wpa_cli.c wpa_ctrl.c os_unix.c eloop.c edit.c wpa_debug.c common.c

Index: src/external/bsd/wpa/bin/wpa_passphrase/Makefile
diff -u src/external/bsd/wpa/bin/wpa_passphrase/Makefile:1.4 src/external/bsd/wpa/bin/wpa_passphrase/Makefile:1.5
--- src/external/bsd/wpa/bin/wpa_passphrase/Makefile:1.4	Wed Jun 29 15:16:23 2016
+++ src/external/bsd/wpa/bin/wpa_passphrase/Makefile	Sat Jan  5 00:40:00 2019
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.4 2016/06/29 19:16:23 christos Exp $
+# $NetBSD: Makefile,v 1.5 2019/01/05 05:40:00 christos Exp $
 
 .include "${.CURDIR}/../Makefile.inc"
 
-.PATH.c: ${WPA_SUPPLICANT_DISTDIR} ${.CURDIR}/../wpa_supplicant
+.PATH.c: ${WPA_SUPPLICANT_DISTDIR} ${.CURDIR}/../wpa_supplicant ${COMMON_PATH}
 
 PROG=	wpa_passphrase
 SRCS= \



CVS commit: [pgoyette-compat] src/sys/compat/netbsd32

2019-01-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Jan  5 02:49:16 UTC 2019

Modified Files:
src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_conv.h

Log Message:
Fix typo in previous


To generate a diff of this commit:
cvs rdiff -u -r1.33.2.4 -r1.33.2.5 src/sys/compat/netbsd32/netbsd32_conv.h

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

Modified files:

Index: src/sys/compat/netbsd32/netbsd32_conv.h
diff -u src/sys/compat/netbsd32/netbsd32_conv.h:1.33.2.4 src/sys/compat/netbsd32/netbsd32_conv.h:1.33.2.5
--- src/sys/compat/netbsd32/netbsd32_conv.h:1.33.2.4	Thu Jan  3 10:57:32 2019
+++ src/sys/compat/netbsd32/netbsd32_conv.h	Sat Jan  5 02:49:15 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_conv.h,v 1.33.2.4 2019/01/03 10:57:32 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_conv.h,v 1.33.2.5 2019/01/05 02:49:15 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -555,7 +555,7 @@ netbsd32_from_msqid_ds50(const struct ms
 struct netbsd32_msqid_ds50 *ds32p)
 {
 
-	nemset(ds32p, 0, sizeof(*ds32p));
+	memset(ds32p, 0, sizeof(*ds32p));
 	netbsd32_from_ipc_perm(>msg_perm, >msg_perm);
 	ds32p->_msg_cbytes = (netbsd32_u_long)dsp->_msg_cbytes;
 	ds32p->msg_qnum = (netbsd32_u_long)dsp->msg_qnum;



CVS commit: src/external/gpl2/xcvs/dist/src

2019-01-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  5 00:27:58 UTC 2019

Modified Files:
src/external/gpl2/xcvs/dist/src: tag.c

Log Message:
When we we fail to remove tags, print an error message since we are going
to be exiting with an error anyway.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl2/xcvs/dist/src/tag.c

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

Modified files:

Index: src/external/gpl2/xcvs/dist/src/tag.c
diff -u src/external/gpl2/xcvs/dist/src/tag.c:1.4 src/external/gpl2/xcvs/dist/src/tag.c:1.5
--- src/external/gpl2/xcvs/dist/src/tag.c:1.4	Tue May 17 10:00:09 2016
+++ src/external/gpl2/xcvs/dist/src/tag.c	Fri Jan  4 19:27:58 2019
@@ -17,7 +17,7 @@
  * the modules database, if necessary.
  */
 #include 
-__RCSID("$NetBSD: tag.c,v 1.4 2016/05/17 14:00:09 christos Exp $");
+__RCSID("$NetBSD: tag.c,v 1.5 2019/01/05 00:27:58 christos Exp $");
 
 #include "cvs.h"
 #include 
@@ -1189,7 +1189,7 @@ rtag_delete (RCSNode *rcsfile)
 if ((isbranch && !disturb_branch_tags) ||
 	(!isbranch && disturb_branch_tags))
 {
-	if (!quiet)
+	if (!really_quiet)
 	error (0, 0,
"Not removing %s tag `%s' from `%s'%s.",
isbranch ? "branch" : "non-branch",
@@ -1200,7 +1200,7 @@ rtag_delete (RCSNode *rcsfile)
 
 if ((retcode = RCS_deltag(rcsfile, symtag)) != 0)
 {
-	if (!quiet)
+	if (!really_quiet)
 	error (0, retcode == -1 ? errno : 0,
 		   "failed to remove tag `%s' from `%s'", symtag,
 		   rcsfile->path);
@@ -1275,7 +1275,7 @@ tag_fileproc (void *callerdat, struct fi
 	if ((isbranch && !disturb_branch_tags) ||
 	(!isbranch && disturb_branch_tags))
 	{
-	if (!quiet)
+	if (!really_quiet)
 		error(0, 0,
 		   "Not removing %s tag `%s' from `%s'%s.",
 			isbranch ? "branch" : "non-branch",
@@ -1287,7 +1287,7 @@ tag_fileproc (void *callerdat, struct fi
 
 	if ((retcode = RCS_deltag (vers->srcfile, symtag)) != 0)
 	{
-	if (!quiet)
+	if (!really_quiet)
 		error (0, retcode == -1 ? errno : 0,
 		   "failed to remove tag %s from %s", symtag,
 		   vers->srcfile->path);



CVS commit: src/sys/external/bsd/drm2/linux

2019-01-04 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Fri Jan  4 23:03:02 UTC 2019

Modified Files:
src/sys/external/bsd/drm2/linux: linux_dma_buf.c

Log Message:
dma_buf_fd(): fd_putfile() does not belong here

PR kern/53834 ok riastradh@


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm2/linux/linux_dma_buf.c

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

Modified files:

Index: src/sys/external/bsd/drm2/linux/linux_dma_buf.c
diff -u src/sys/external/bsd/drm2/linux/linux_dma_buf.c:1.4 src/sys/external/bsd/drm2/linux/linux_dma_buf.c:1.5
--- src/sys/external/bsd/drm2/linux/linux_dma_buf.c:1.4	Mon Aug 27 15:25:13 2018
+++ src/sys/external/bsd/drm2/linux/linux_dma_buf.c	Fri Jan  4 23:03:02 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_dma_buf.c,v 1.4 2018/08/27 15:25:13 riastradh Exp $	*/
+/*	$NetBSD: linux_dma_buf.c,v 1.5 2019/01/04 23:03:02 tnn Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_dma_buf.c,v 1.4 2018/08/27 15:25:13 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_dma_buf.c,v 1.5 2019/01/04 23:03:02 tnn Exp $");
 
 #include 
 #include 
@@ -119,7 +119,6 @@ dma_buf_fd(struct dma_buf *dmabuf, int f
 	fd_set_exclose(curlwp, fd, (flags & O_CLOEXEC) != 0);
 	fd_affix(curproc, file, fd);
 
-	fd_putfile(fd);
 	ret = fd;
 out0:	return ret;
 }



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

2019-01-04 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Fri Jan  4 21:57:53 UTC 2019

Modified Files:
src/sys/arch/aarch64/include: pmap.h

Log Message:
re-apply rev. 1.18, now tested by Jonathan Kollasch and Ryo Shimizu - no
problems observed, and about 2x speedup for cached read

Implement PMAP_DIRECT / pmap_direct_process() in support of experimental
UBC optimization

PR kern/53124


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/aarch64/include/pmap.h

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

Modified files:

Index: src/sys/arch/aarch64/include/pmap.h
diff -u src/sys/arch/aarch64/include/pmap.h:1.19 src/sys/arch/aarch64/include/pmap.h:1.20
--- src/sys/arch/aarch64/include/pmap.h:1.19	Wed Nov 21 12:34:21 2018
+++ src/sys/arch/aarch64/include/pmap.h	Fri Jan  4 21:57:53 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.19 2018/11/21 12:34:21 jdolecek Exp $ */
+/* $NetBSD: pmap.h,v 1.20 2019/01/04 21:57:53 jdolecek Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -54,6 +54,16 @@
 #ifndef KASAN
 #define PMAP_MAP_POOLPAGE(pa)		AARCH64_PA_TO_KVA(pa)
 #define PMAP_UNMAP_POOLPAGE(va)		AARCH64_KVA_TO_PA(va)
+
+#define PMAP_DIRECT
+static __inline int
+pmap_direct_process(paddr_t pa, voff_t pgoff, size_t len,
+int (*process)(void *, size_t, void *), void *arg)
+{
+	vaddr_t va = AARCH64_PA_TO_KVA(pa);
+
+	return process((void *)(va + pgoff), len, arg);
+}
 #endif
 
 struct pmap {



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

2019-01-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Jan  4 21:39:38 UTC 2019

Modified Files:
src/sys/arch/aarch64/include: param.h

Log Message:
ALIGNBYTES32 should be (8 - 1), not (4 - 1) for EABI:
https://nxr.netbsd.org/xref/src/sys/arch/arm/include/cdefs.h#56

Now, sshd for earmv7hf works without problems.
Also fix other users of cmsg(3) API hopefully.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/aarch64/include/param.h

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

Modified files:

Index: src/sys/arch/aarch64/include/param.h
diff -u src/sys/arch/aarch64/include/param.h:1.8 src/sys/arch/aarch64/include/param.h:1.9
--- src/sys/arch/aarch64/include/param.h:1.8	Thu Dec  6 18:36:06 2018
+++ src/sys/arch/aarch64/include/param.h	Fri Jan  4 21:39:38 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: param.h,v 1.8 2018/12/06 18:36:06 skrll Exp $ */
+/* $NetBSD: param.h,v 1.9 2019/01/04 21:39:38 rin Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -85,7 +85,7 @@
 /* AARCH64-specific macro to align a stack pointer (downwards). */
 #define STACK_ALIGNBYTES	(16 - 1)
 
-#define ALIGNBYTES32		(4 - 1)
+#define ALIGNBYTES32		(8 - 1)
 #define ALIGN32(p)		\
 	(((uintptr_t)(p) + ALIGNBYTES32) & ~ALIGNBYTES32)
 



CVS commit: src/doc

2019-01-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan  4 21:27:04 UTC 2019

Modified Files:
src/doc: CHANGES

Log Message:
it is 2019


To generate a diff of this commit:
cvs rdiff -u -r1.2481 -r1.2482 src/doc/CHANGES

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
diff -u src/doc/CHANGES:1.2481 src/doc/CHANGES:1.2482
--- src/doc/CHANGES:1.2481	Fri Jan  4 16:23:30 2019
+++ src/doc/CHANGES	Fri Jan  4 16:27:04 2019
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2481 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2482 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -285,4 +285,4 @@ Changes from NetBSD 8.0 to NetBSD 9.0:
 	binutils: Updated to FSF binutils 2.31.1.  [christos 20181231]
 	services(5), protocols(5): Pull iana-generated services and protocols
 	[christos 20190103]
-	wpa: Import wpa_supplicant and hostapd 2.7. [christos 20180104]
+	wpa: Import wpa_supplicant and hostapd 2.7. [christos 20190104]



CVS commit: src/doc

2019-01-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan  4 21:23:30 UTC 2019

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
new wpa supplicant/hostapd


To generate a diff of this commit:
cvs rdiff -u -r1.1584 -r1.1585 src/doc/3RDPARTY
cvs rdiff -u -r1.2480 -r1.2481 src/doc/CHANGES

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.1584 src/doc/3RDPARTY:1.1585
--- src/doc/3RDPARTY:1.1584	Thu Jan  3 12:33:20 2019
+++ src/doc/3RDPARTY	Fri Jan  4 16:23:30 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1584 2019/01/03 17:33:20 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1585 2019/01/04 21:23:30 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1430,7 +1430,7 @@ is too much inertia to apply them. Check
 For the data files, do use external/public-domain/tz/tzdata2netbsd.
 
 Package:	wpa_supplicant/hostapd
-Version:	2.6
+Version:	2.7
 Current Vers:	2.7
 Maintainer:	Jouni Malinen 
 Archive Site:	http://w1.fi/releases/

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2480 src/doc/CHANGES:1.2481
--- src/doc/CHANGES:1.2480	Thu Jan  3 12:33:20 2019
+++ src/doc/CHANGES	Fri Jan  4 16:23:30 2019
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2480 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2481 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -285,3 +285,4 @@ Changes from NetBSD 8.0 to NetBSD 9.0:
 	binutils: Updated to FSF binutils 2.31.1.  [christos 20181231]
 	services(5), protocols(5): Pull iana-generated services and protocols
 	[christos 20190103]
+	wpa: Import wpa_supplicant and hostapd 2.7. [christos 20180104]



CVS commit: src/external/bsd/wpa

2019-01-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan  4 21:22:21 UTC 2019

Modified Files:
src/external/bsd/wpa/bin: Makefile.inc
src/external/bsd/wpa/bin/hostapd: Makefile
src/external/bsd/wpa/bin/wpa_supplicant: Makefile
src/external/bsd/wpa/dist/hostapd: hostapd_cli.c main.c
src/external/bsd/wpa/dist/src/ap: ap_drv_ops.c drv_callbacks.c
hostapd.c hostapd.h ieee802_11.c wmm.c wpa_auth.c wpa_auth.h
wpa_auth_ft.c wpa_auth_i.h
src/external/bsd/wpa/dist/src/common: wpa_common.h
src/external/bsd/wpa/dist/src/drivers: driver.h driver_wired.c
src/external/bsd/wpa/dist/src/eap_peer: eap_pwd.c
src/external/bsd/wpa/dist/src/eap_server: eap_server.c eap_server_pwd.c
eap_server_tls_common.c
src/external/bsd/wpa/dist/src/p2p: p2p.c
src/external/bsd/wpa/dist/src/radius: radius_das.c
src/external/bsd/wpa/dist/src/rsn_supp: tdls.c wpa.c wpa_ft.c wpa_i.h
src/external/bsd/wpa/dist/src/utils: common.c common.h eloop.h os.h
os_unix.c
src/external/bsd/wpa/dist/wpa_supplicant: Makefile README config.c
ctrl_iface.c defconfig driver_i.h events.c wnm_sta.c wpa_cli.c
wpa_priv.c wpa_supplicant.c wpa_supplicant_i.h
Removed Files:
src/external/bsd/wpa/dist/src/ap: peerkey_auth.c
src/external/bsd/wpa/dist/src/rsn_supp: peerkey.c peerkey.h

Log Message:
merge conflicts.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/wpa/bin/Makefile.inc
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/wpa/bin/hostapd/Makefile
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/wpa/bin/wpa_supplicant/Makefile
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/wpa/dist/hostapd/hostapd_cli.c
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/wpa/dist/hostapd/main.c
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/wpa/dist/src/ap/ap_drv_ops.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/wpa/dist/src/ap/drv_callbacks.c \
src/external/bsd/wpa/dist/src/ap/hostapd.c \
src/external/bsd/wpa/dist/src/ap/hostapd.h
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/wpa/dist/src/ap/ieee802_11.c \
src/external/bsd/wpa/dist/src/ap/wmm.c \
src/external/bsd/wpa/dist/src/ap/wpa_auth.h \
src/external/bsd/wpa/dist/src/ap/wpa_auth_ft.c \
src/external/bsd/wpa/dist/src/ap/wpa_auth_i.h
cvs rdiff -u -r1.1.1.5 -r0 src/external/bsd/wpa/dist/src/ap/peerkey_auth.c
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/wpa/dist/src/ap/wpa_auth.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/wpa/dist/src/common/wpa_common.h
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/wpa/dist/src/drivers/driver.h
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/wpa/dist/src/drivers/driver_wired.c
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/wpa/dist/src/eap_peer/eap_pwd.c
cvs rdiff -u -r1.3 -r1.4 \
src/external/bsd/wpa/dist/src/eap_server/eap_server.c
cvs rdiff -u -r1.4 -r1.5 \
src/external/bsd/wpa/dist/src/eap_server/eap_server_pwd.c
cvs rdiff -u -r1.7 -r1.8 \
src/external/bsd/wpa/dist/src/eap_server/eap_server_tls_common.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/wpa/dist/src/p2p/p2p.c
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/wpa/dist/src/radius/radius_das.c
cvs rdiff -u -r1.1.1.5 -r0 src/external/bsd/wpa/dist/src/rsn_supp/peerkey.c
cvs rdiff -u -r1.1.1.4 -r0 src/external/bsd/wpa/dist/src/rsn_supp/peerkey.h
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/wpa/dist/src/rsn_supp/tdls.c \
src/external/bsd/wpa/dist/src/rsn_supp/wpa_ft.c \
src/external/bsd/wpa/dist/src/rsn_supp/wpa_i.h
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/wpa/dist/src/rsn_supp/wpa.c
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/wpa/dist/src/utils/common.c \
src/external/bsd/wpa/dist/src/utils/os_unix.c
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/wpa/dist/src/utils/common.h
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/wpa/dist/src/utils/eloop.h
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/wpa/dist/src/utils/os.h
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/wpa/dist/wpa_supplicant/Makefile \
src/external/bsd/wpa/dist/wpa_supplicant/README \
src/external/bsd/wpa/dist/wpa_supplicant/defconfig \
src/external/bsd/wpa/dist/wpa_supplicant/wpa_priv.c \
src/external/bsd/wpa/dist/wpa_supplicant/wpa_supplicant_i.h
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/wpa/dist/wpa_supplicant/config.c \
src/external/bsd/wpa/dist/wpa_supplicant/events.c
cvs rdiff -u -r1.4 -r1.5 \
src/external/bsd/wpa/dist/wpa_supplicant/ctrl_iface.c \
src/external/bsd/wpa/dist/wpa_supplicant/wnm_sta.c
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/wpa/dist/wpa_supplicant/driver_i.h
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/wpa/dist/wpa_supplicant/wpa_cli.c \
src/external/bsd/wpa/dist/wpa_supplicant/wpa_supplicant.c

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

diffs are larger than 1MB and have been omitted


CVS import: src/external/bsd/wpa/dist

2019-01-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan  4 21:03:16 UTC 2019

Update of /cvsroot/src/external/bsd/wpa/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv27916

Log Message:
2018-12-02 - v2.7
* fixed WPA packet number reuse with replayed messages and key
  reinstallation
  [https://w1.fi/security/2017-1/] (CVE-2017-13077, CVE-2017-13078,
  CVE-2017-13079, CVE-2017-13080, CVE-2017-13081, CVE-2017-13082,
  CVE-2017-13086, CVE-2017-13087, CVE-2017-13088)
* fixed unauthenticated EAPOL-Key decryption in wpa_supplicant
  [https://w1.fi/security/2018-1/] (CVE-2018-14526)
* added support for FILS (IEEE 802.11ai) shared key authentication
* added support for OWE (Opportunistic Wireless Encryption, RFC 8110;
  and transition mode defined by WFA)
* added support for DPP (Wi-Fi Device Provisioning Protocol)
* added support for RSA 3k key case with Suite B 192-bit level
* fixed Suite B PMKSA caching not to update PMKID during each 4-way
  handshake
* fixed EAP-pwd pre-processing with PasswordHashHash
* added EAP-pwd client support for salted passwords
* fixed a regression in TDLS prohibited bit validation
* started to use estimated throughput to avoid undesired signal
  strength based roaming decision
* MACsec/MKA:
  - new macsec_linux driver interface support for the Linux
kernel macsec module
  - number of fixes and extensions
* added support for external persistent storage of PMKSA cache
  (PMKSA_GET/PMKSA_ADD control interface commands; and
   MESH_PMKSA_GET/MESH_PMKSA_SET for the mesh case)
* fixed mesh channel configuration pri/sec switch case
* added support for beacon report
* large number of other fixes, cleanup, and extensions
* added support for randomizing local address for GAS queries
  (gas_rand_mac_addr parameter)
* fixed EAP-SIM/AKA/AKA' ext auth cases within TLS tunnel
* added option for using random WPS UUID (auto_uuid=1)
* added SHA256-hash support for OCSP certificate matching
* fixed EAP-AKA' to add AT_KDF into Synchronization-Failure
* fixed a regression in RSN pre-authentication candidate selection
* added option to configure allowed group management cipher suites
  (group_mgmt network profile parameter)
* removed all PeerKey functionality
* fixed nl80211 AP and mesh mode configuration regression with
  Linux 4.15 and newer
* added ap_isolate configuration option for AP mode
* added support for nl80211 to offload 4-way handshake into the driver
* added support for using wolfSSL cryptographic library
* SAE
  - added support for configuring SAE password separately of the
WPA2 PSK/passphrase
  - fixed PTK and EAPOL-Key integrity and key-wrap algorithm selection
for SAE;
note: this is not backwards compatible, i.e., both the AP and
station side implementations will need to be update at the same
time to maintain interoperability
  - added support for Password Identifier
  - fixed FT-SAE PMKID matching
* Hotspot 2.0
  - added support for fetching of Operator Icon Metadata ANQP-element
  - added support for Roaming Consortium Selection element
  - added support for Terms and Conditions
  - added support for OSEN connection in a shared RSN BSS
  - added support for fetching Venue URL information
* added support for using OpenSSL 1.1.1
* FT
  - disabled PMKSA caching with FT since it is not fully functional
  - added support for SHA384 based AKM
  - added support for BIP ciphers BIP-CMAC-256, BIP-GMAC-128,
BIP-GMAC-256 in addition to previously supported BIP-CMAC-128
  - fixed additional IE inclusion in Reassociation Request frame when
using FT protocol

Status:

Vendor Tag: MALINEN
Release Tags:   v2_7

U src/external/bsd/wpa/dist/CONTRIBUTIONS
U src/external/bsd/wpa/dist/COPYING
U src/external/bsd/wpa/dist/README
U src/external/bsd/wpa/dist/wpa_supplicant/main_winsvc.c
U src/external/bsd/wpa/dist/wpa_supplicant/wpas_glue.c
U src/external/bsd/wpa/dist/wpa_supplicant/autoscan_periodic.c
U src/external/bsd/wpa/dist/wpa_supplicant/win_if_list.c
U src/external/bsd/wpa/dist/wpa_supplicant/bgscan_learn.c
U src/external/bsd/wpa/dist/wpa_supplicant/ibss_rsn.h
U src/external/bsd/wpa/dist/wpa_supplicant/README-HS20
U src/external/bsd/wpa/dist/wpa_supplicant/rrm.c
U src/external/bsd/wpa/dist/wpa_supplicant/wpas_glue.h
U src/external/bsd/wpa/dist/wpa_supplicant/bgscan_simple.c
U src/external/bsd/wpa/dist/wpa_supplicant/nmake.mak
U src/external/bsd/wpa/dist/wpa_supplicant/gas_query.c
U src/external/bsd/wpa/dist/wpa_supplicant/eapol_test.c
U src/external/bsd/wpa/dist/wpa_supplicant/main.c
U src/external/bsd/wpa/dist/wpa_supplicant/wifi_display.h
U src/external/bsd/wpa/dist/wpa_supplicant/mbo.c
U src/external/bsd/wpa/dist/wpa_supplicant/wpa_supplicant.conf
U src/external/bsd/wpa/dist/wpa_supplicant/wpa_supplicant.c
U src/external/bsd/wpa/dist/wpa_supplicant/wpa_supplicant_conf.mk
U src/external/bsd/wpa/dist/wpa_supplicant/p2p_supplicant.c
U src/external/bsd/wpa/dist/wpa_supplicant/wpa_passphrase.c
U 

CVS commit: src/sys/external/bsd/drm2/include/linux

2019-01-04 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Fri Jan  4 20:22:32 UTC 2019

Modified Files:
src/sys/external/bsd/drm2/include/linux: interval_tree.h

Log Message:
interval_tree_iter_next: check the node we return, not the prev one.
Also assert that the interval is intersecting the requested boundary.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/sys/external/bsd/drm2/include/linux/interval_tree.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/external/bsd/drm2/include/linux/interval_tree.h
diff -u src/sys/external/bsd/drm2/include/linux/interval_tree.h:1.7 src/sys/external/bsd/drm2/include/linux/interval_tree.h:1.8
--- src/sys/external/bsd/drm2/include/linux/interval_tree.h:1.7	Tue Aug 28 03:34:53 2018
+++ src/sys/external/bsd/drm2/include/linux/interval_tree.h	Fri Jan  4 20:22:32 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: interval_tree.h,v 1.7 2018/08/28 03:34:53 riastradh Exp $	*/
+/*	$NetBSD: interval_tree.h,v 1.8 2019/01/04 20:22:32 tnn Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -119,9 +119,9 @@ interval_tree_iter_first(struct rb_root 
 	node = rb_tree_find_node_geq(>rbr_tree, );
 	if (node == NULL)
 		return NULL;
-	KASSERT(node->start <= start);
 	if (last < node->start)
 		return NULL;
+	KASSERT(node->start <= last && node->last >= start);
 
 	return node;
 }
@@ -141,9 +141,9 @@ interval_tree_iter_next(struct rb_root *
 	next = rb_tree_iterate(>rbr_tree, node, RB_DIR_RIGHT);
 	if (next == NULL)
 		return NULL;
-	KASSERT(node->start <= start);
-	if (last < node->start)
+	if (last < next->start)
 		return NULL;
+	KASSERT(next->start <= last && next->last >= start);
 
 	return next;
 }



CVS commit: src/libexec/ld.elf_so

2019-01-04 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Jan  4 19:54:57 UTC 2019

Modified Files:
src/libexec/ld.elf_so: map_object.c

Log Message:
MAP_ALIGNED has existed for years, just assume it exists.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/libexec/ld.elf_so/map_object.c

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

Modified files:

Index: src/libexec/ld.elf_so/map_object.c
diff -u src/libexec/ld.elf_so/map_object.c:1.58 src/libexec/ld.elf_so/map_object.c:1.59
--- src/libexec/ld.elf_so/map_object.c:1.58	Mon Jun 19 11:57:01 2017
+++ src/libexec/ld.elf_so/map_object.c	Fri Jan  4 19:54:56 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: map_object.c,v 1.58 2017/06/19 11:57:01 joerg Exp $	 */
+/*	$NetBSD: map_object.c,v 1.59 2019/01/04 19:54:56 joerg Exp $	 */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -34,7 +34,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: map_object.c,v 1.58 2017/06/19 11:57:01 joerg Exp $");
+__RCSID("$NetBSD: map_object.c,v 1.59 2019/01/04 19:54:56 joerg Exp $");
 #endif /* not lint */
 
 #include 
@@ -77,9 +77,7 @@ _rtld_map_object(const char *path, int f
 	size_t		 mapsize = 0;
 	int		 mapflags;
 	Elf_Off		 base_offset;
-#ifdef MAP_ALIGNED
 	Elf_Addr	 base_alignment;
-#endif
 	Elf_Addr	 base_vaddr;
 	Elf_Addr	 base_vlimit;
 	Elf_Addr	 text_vlimit;
@@ -262,9 +260,7 @@ _rtld_map_object(const char *path, int f
 	 * and unmap the gaps left by padding to alignment.
 	 */
 
-#ifdef MAP_ALIGNED
 	base_alignment = segs[0]->p_align;
-#endif
 	base_offset = round_down(segs[0]->p_offset);
 	base_vaddr = round_down(segs[0]->p_vaddr);
 	base_vlimit = round_up(segs[1]->p_vaddr + segs[1]->p_memsz);
@@ -336,14 +332,12 @@ _rtld_map_object(const char *path, int f
 	 * Calculate log2 of the base section alignment.
 	 */
 	mapflags = 0;
-#ifdef MAP_ALIGNED
 	if (base_alignment > _rtld_pagesz) {
 		unsigned int log2 = 0;
 		for (; base_alignment > 1; base_alignment >>= 1)
 			log2++;
 		mapflags = MAP_ALIGNED(log2);
 	}
-#endif
 
 #ifdef RTLD_LOADER
 	base_addr = obj->isdynamic ? NULL : (caddr_t)base_vaddr;



CVS import: src/external/bsd/wpa/dist

2019-01-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan  4 19:31:39 UTC 2019

Update of /cvsroot/src/external/bsd/wpa/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv22454

Log Message:
2018-12-02 - v2.7
* fixed WPA packet number reuse with replayed messages and key
  reinstallation
  [https://w1.fi/security/2017-1/] (CVE-2017-13077, CVE-2017-13078,
  CVE-2017-13079, CVE-2017-13080, CVE-2017-13081, CVE-2017-13082,
  CVE-2017-13086, CVE-2017-13087, CVE-2017-13088)
* fixed unauthenticated EAPOL-Key decryption in wpa_supplicant
  [https://w1.fi/security/2018-1/] (CVE-2018-14526)
* added support for FILS (IEEE 802.11ai) shared key authentication
* added support for OWE (Opportunistic Wireless Encryption, RFC 8110;
  and transition mode defined by WFA)
* added support for DPP (Wi-Fi Device Provisioning Protocol)
* added support for RSA 3k key case with Suite B 192-bit level
* fixed Suite B PMKSA caching not to update PMKID during each 4-way
  handshake
* fixed EAP-pwd pre-processing with PasswordHashHash
* added EAP-pwd client support for salted passwords
* fixed a regression in TDLS prohibited bit validation
* started to use estimated throughput to avoid undesired signal
  strength based roaming decision
* MACsec/MKA:
  - new macsec_linux driver interface support for the Linux
kernel macsec module
  - number of fixes and extensions
* added support for external persistent storage of PMKSA cache
  (PMKSA_GET/PMKSA_ADD control interface commands; and
   MESH_PMKSA_GET/MESH_PMKSA_SET for the mesh case)
* fixed mesh channel configuration pri/sec switch case
* added support for beacon report
* large number of other fixes, cleanup, and extensions
* added support for randomizing local address for GAS queries
  (gas_rand_mac_addr parameter)
* fixed EAP-SIM/AKA/AKA' ext auth cases within TLS tunnel
* added option for using random WPS UUID (auto_uuid=1)
* added SHA256-hash support for OCSP certificate matching
* fixed EAP-AKA' to add AT_KDF into Synchronization-Failure
* fixed a regression in RSN pre-authentication candidate selection
* added option to configure allowed group management cipher suites
  (group_mgmt network profile parameter)
* removed all PeerKey functionality
* fixed nl80211 AP and mesh mode configuration regression with
  Linux 4.15 and newer
* added ap_isolate configuration option for AP mode
* added support for nl80211 to offload 4-way handshake into the driver
* added support for using wolfSSL cryptographic library
* SAE
  - added support for configuring SAE password separately of the
WPA2 PSK/passphrase
  - fixed PTK and EAPOL-Key integrity and key-wrap algorithm selection
for SAE;
note: this is not backwards compatible, i.e., both the AP and
station side implementations will need to be update at the same
time to maintain interoperability
  - added support for Password Identifier
  - fixed FT-SAE PMKID matching
* Hotspot 2.0
  - added support for fetching of Operator Icon Metadata ANQP-element
  - added support for Roaming Consortium Selection element
  - added support for Terms and Conditions
  - added support for OSEN connection in a shared RSN BSS
  - added support for fetching Venue URL information
* added support for using OpenSSL 1.1.1
* FT
  - disabled PMKSA caching with FT since it is not fully functional
  - added support for SHA384 based AKM
  - added support for BIP ciphers BIP-CMAC-256, BIP-GMAC-128,
BIP-GMAC-256 in addition to previously supported BIP-CMAC-128
  - fixed additional IE inclusion in Reassociation Request frame when
using FT protocol

Status:

Vendor Tag: MALINEN
Release Tags:   v2_7

U src/external/bsd/wpa/dist/CONTRIBUTIONS
U src/external/bsd/wpa/dist/COPYING
U src/external/bsd/wpa/dist/README
U src/external/bsd/wpa/dist/wpa_supplicant/main_winsvc.c
U src/external/bsd/wpa/dist/wpa_supplicant/wpas_glue.c
U src/external/bsd/wpa/dist/wpa_supplicant/autoscan_periodic.c
U src/external/bsd/wpa/dist/wpa_supplicant/win_if_list.c
U src/external/bsd/wpa/dist/wpa_supplicant/bgscan_learn.c
U src/external/bsd/wpa/dist/wpa_supplicant/ibss_rsn.h
U src/external/bsd/wpa/dist/wpa_supplicant/README-HS20
U src/external/bsd/wpa/dist/wpa_supplicant/rrm.c
U src/external/bsd/wpa/dist/wpa_supplicant/wpas_glue.h
U src/external/bsd/wpa/dist/wpa_supplicant/bgscan_simple.c
U src/external/bsd/wpa/dist/wpa_supplicant/nmake.mak
U src/external/bsd/wpa/dist/wpa_supplicant/gas_query.c
U src/external/bsd/wpa/dist/wpa_supplicant/eapol_test.c
U src/external/bsd/wpa/dist/wpa_supplicant/main.c
U src/external/bsd/wpa/dist/wpa_supplicant/wifi_display.h
U src/external/bsd/wpa/dist/wpa_supplicant/mbo.c
U src/external/bsd/wpa/dist/wpa_supplicant/wpa_supplicant.conf
U src/external/bsd/wpa/dist/wpa_supplicant/wpa_supplicant.c
U src/external/bsd/wpa/dist/wpa_supplicant/wpa_supplicant_conf.mk
U src/external/bsd/wpa/dist/wpa_supplicant/p2p_supplicant.c
U src/external/bsd/wpa/dist/wpa_supplicant/wpa_passphrase.c
U 

CVS import: src/external/bsd/wpa/dist

2019-01-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan  4 19:29:31 UTC 2019

Update of /cvsroot/src/external/bsd/wpa/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv18372

Log Message:
2018-12-02 - v2.7
* fixed WPA packet number reuse with replayed messages and key
  reinstallation
  [https://w1.fi/security/2017-1/] (CVE-2017-13077, CVE-2017-13078,
  CVE-2017-13079, CVE-2017-13080, CVE-2017-13081, CVE-2017-13082,
  CVE-2017-13086, CVE-2017-13087, CVE-2017-13088)
* fixed unauthenticated EAPOL-Key decryption in wpa_supplicant
  [https://w1.fi/security/2018-1/] (CVE-2018-14526)
* added support for FILS (IEEE 802.11ai) shared key authentication
* added support for OWE (Opportunistic Wireless Encryption, RFC 8110;
  and transition mode defined by WFA)
* added support for DPP (Wi-Fi Device Provisioning Protocol)
* added support for RSA 3k key case with Suite B 192-bit level
* fixed Suite B PMKSA caching not to update PMKID during each 4-way
  handshake
* fixed EAP-pwd pre-processing with PasswordHashHash
* added EAP-pwd client support for salted passwords
* fixed a regression in TDLS prohibited bit validation
* started to use estimated throughput to avoid undesired signal
  strength based roaming decision
* MACsec/MKA:
  - new macsec_linux driver interface support for the Linux
kernel macsec module
  - number of fixes and extensions
* added support for external persistent storage of PMKSA cache
  (PMKSA_GET/PMKSA_ADD control interface commands; and
   MESH_PMKSA_GET/MESH_PMKSA_SET for the mesh case)
* fixed mesh channel configuration pri/sec switch case
* added support for beacon report
* large number of other fixes, cleanup, and extensions
* added support for randomizing local address for GAS queries
  (gas_rand_mac_addr parameter)
* fixed EAP-SIM/AKA/AKA' ext auth cases within TLS tunnel
* added option for using random WPS UUID (auto_uuid=1)
* added SHA256-hash support for OCSP certificate matching
* fixed EAP-AKA' to add AT_KDF into Synchronization-Failure
* fixed a regression in RSN pre-authentication candidate selection
* added option to configure allowed group management cipher suites
  (group_mgmt network profile parameter)
* removed all PeerKey functionality
* fixed nl80211 AP and mesh mode configuration regression with
  Linux 4.15 and newer
* added ap_isolate configuration option for AP mode
* added support for nl80211 to offload 4-way handshake into the driver
* added support for using wolfSSL cryptographic library
* SAE
  - added support for configuring SAE password separately of the
WPA2 PSK/passphrase
  - fixed PTK and EAPOL-Key integrity and key-wrap algorithm selection
for SAE;
note: this is not backwards compatible, i.e., both the AP and
station side implementations will need to be update at the same
time to maintain interoperability
  - added support for Password Identifier
  - fixed FT-SAE PMKID matching
* Hotspot 2.0
  - added support for fetching of Operator Icon Metadata ANQP-element
  - added support for Roaming Consortium Selection element
  - added support for Terms and Conditions
  - added support for OSEN connection in a shared RSN BSS
  - added support for fetching Venue URL information
* added support for using OpenSSL 1.1.1
* FT
  - disabled PMKSA caching with FT since it is not fully functional
  - added support for SHA384 based AKM
  - added support for BIP ciphers BIP-CMAC-256, BIP-GMAC-128,
BIP-GMAC-256 in addition to previously supported BIP-CMAC-128
  - fixed additional IE inclusion in Reassociation Request frame when
using FT protocol

Status:

Vendor Tag: src/external/bsd/wpa/dist
Release Tags:   MALINEN
v2_7

U src/external/bsd/wpa/dist/CONTRIBUTIONS
U src/external/bsd/wpa/dist/COPYING
U src/external/bsd/wpa/dist/README
U src/external/bsd/wpa/dist/wpa_supplicant/main_winsvc.c
U src/external/bsd/wpa/dist/wpa_supplicant/wpas_glue.c
U src/external/bsd/wpa/dist/wpa_supplicant/autoscan_periodic.c
U src/external/bsd/wpa/dist/wpa_supplicant/win_if_list.c
U src/external/bsd/wpa/dist/wpa_supplicant/bgscan_learn.c
U src/external/bsd/wpa/dist/wpa_supplicant/ibss_rsn.h
U src/external/bsd/wpa/dist/wpa_supplicant/README-HS20
N src/external/bsd/wpa/dist/wpa_supplicant/rrm.c
U src/external/bsd/wpa/dist/wpa_supplicant/wpas_glue.h
U src/external/bsd/wpa/dist/wpa_supplicant/bgscan_simple.c
U src/external/bsd/wpa/dist/wpa_supplicant/nmake.mak
U src/external/bsd/wpa/dist/wpa_supplicant/gas_query.c
U src/external/bsd/wpa/dist/wpa_supplicant/eapol_test.c
U src/external/bsd/wpa/dist/wpa_supplicant/main.c
U src/external/bsd/wpa/dist/wpa_supplicant/wifi_display.h
U src/external/bsd/wpa/dist/wpa_supplicant/mbo.c
U src/external/bsd/wpa/dist/wpa_supplicant/wpa_supplicant.conf
C src/external/bsd/wpa/dist/wpa_supplicant/wpa_supplicant.c
U src/external/bsd/wpa/dist/wpa_supplicant/wpa_supplicant_conf.mk
U src/external/bsd/wpa/dist/wpa_supplicant/p2p_supplicant.c
U src/external/bsd/wpa/dist/wpa_supplicant/wpa_passphrase.c
U 

CVS commit: src/bin/ed

2019-01-04 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Fri Jan  4 19:13:58 UTC 2019

Modified Files:
src/bin/ed: README ed.h glbl.c undo.c

Log Message:
Unifdef compatibility for broken realloc.

No binary change


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/bin/ed/README src/bin/ed/glbl.c
cvs rdiff -u -r1.37 -r1.38 src/bin/ed/ed.h
cvs rdiff -u -r1.6 -r1.7 src/bin/ed/undo.c

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

Modified files:

Index: src/bin/ed/README
diff -u src/bin/ed/README:1.9 src/bin/ed/README:1.10
--- src/bin/ed/README:1.9	Tue Mar 21 09:04:33 1995
+++ src/bin/ed/README	Fri Jan  4 19:13:58 2019
@@ -1,4 +1,4 @@
-$NetBSD: README,v 1.9 1995/03/21 09:04:33 cgd Exp $
+$NetBSD: README,v 1.10 2019/01/04 19:13:58 maya Exp $
 
 ed is an 8-bit-clean, POSIX-compliant line editor.  It should work with
 any regular expression package that conforms to the POSIX interface
@@ -10,7 +10,6 @@ should be redefined to disable interrupt
 
 The following compiler directives are recognized:
 DES		- to add encryption support (requires crypt(3))
-NO_REALLOC_NULL	- if realloc(3) does not accept a NULL pointer
 BACKWARDS	- for backwards compatibility
 NEED_INSQUE	- if insque(3) is missing
 
Index: src/bin/ed/glbl.c
diff -u src/bin/ed/glbl.c:1.9 src/bin/ed/glbl.c:1.10
--- src/bin/ed/glbl.c:1.9	Fri Aug 28 11:29:48 2015
+++ src/bin/ed/glbl.c	Fri Jan  4 19:13:58 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: glbl.c,v 1.9 2015/08/28 11:29:48 joerg Exp $	*/
+/*	$NetBSD: glbl.c,v 1.10 2019/01/04 19:13:58 maya Exp $	*/
 
 /* glob.c: This file contains the global command routines for the ed line
editor */
@@ -33,7 +33,7 @@
 #if 0
 static char *rcsid = "@(#)glob.c,v 1.1 1994/02/01 00:34:40 alm Exp";
 #else
-__RCSID("$NetBSD: glbl.c,v 1.9 2015/08/28 11:29:48 joerg Exp $");
+__RCSID("$NetBSD: glbl.c,v 1.10 2019/01/04 19:13:58 maya Exp $");
 #endif
 #endif /* not lint */
 
@@ -158,27 +158,13 @@ set_active_node(line_t *lp)
 		int ti = active_size;
 		line_t **ts;
 		SPL1();
-#if defined(sun) || defined(NO_REALLOC_NULL)
-		if (active_list != NULL) {
-#endif
-			if ((ts = (line_t **) realloc(active_list, 
-			(ti += MINBUFSZ) * sizeof(line_t **))) == NULL) {
-fprintf(stderr, "%s\n", strerror(errno));
-seterrmsg("out of memory");
-SPL0();
-return ERR;
-			}
-#if defined(sun) || defined(NO_REALLOC_NULL)
-		} else {
-			if ((ts = (line_t **) malloc((ti += MINBUFSZ) * 
-			sizeof(line_t **))) == NULL) {
-fprintf(stderr, "%s\n", strerror(errno));
-seterrmsg("out of memory");
-SPL0();
-return ERR;
-			}
+		if ((ts = (line_t **) realloc(active_list, 
+		(ti += MINBUFSZ) * sizeof(line_t **))) == NULL) {
+			fprintf(stderr, "%s\n", strerror(errno));
+			seterrmsg("out of memory");
+			SPL0();
+			return ERR;
 		}
-#endif
 		active_size = ti;
 		active_list = ts;
 		SPL0();

Index: src/bin/ed/ed.h
diff -u src/bin/ed/ed.h:1.37 src/bin/ed/ed.h:1.38
--- src/bin/ed/ed.h:1.37	Tue Mar 25 17:23:37 2014
+++ src/bin/ed/ed.h	Fri Jan  4 19:13:58 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ed.h,v 1.37 2014/03/25 17:23:37 joerg Exp $	*/
+/*	$NetBSD: ed.h,v 1.38 2019/01/04 19:13:58 maya Exp $	*/
 
 /* ed.h: type and constant definitions for the ed editor. */
 /*
@@ -121,33 +121,6 @@ if (--mutex == 0) { \
 	} \
 }
 
-#if defined(sun) || defined(NO_REALLOC_NULL)
-/* REALLOC: assure at least a minimum size for buffer b */
-#define REALLOC(b,n,i,err) \
-if ((i) > (n)) { \
-	int ti = (n); \
-	char *ts; \
-	SPL1(); \
-	if ((b) != NULL) { \
-		if ((ts = (char *) realloc((b), ti += max((i), MINBUFSZ))) == NULL) { \
-			fprintf(stderr, "%s\n", strerror(errno)); \
-			seterrmsg("out of memory"); \
-			SPL0(); \
-			return err; \
-		} \
-	} else { \
-		if ((ts = (char *) malloc(ti += max((i), MINBUFSZ))) == NULL) { \
-			fprintf(stderr, "%s\n", strerror(errno)); \
-			seterrmsg("out of memory"); \
-			SPL0(); \
-			return err; \
-		} \
-	} \
-	(n) = ti; \
-	(b) = ts; \
-	SPL0(); \
-}
-#else /* NO_REALLOC_NULL */
 /* REALLOC: assure at least a minimum size for buffer b */
 #define REALLOC(b,n,i,err) \
 if ((i) > (n)) { \
@@ -164,7 +137,6 @@ if ((i) > (n)) { \
 	(b) = ts; \
 	SPL0(); \
 }
-#endif /* NO_REALLOC_NULL */
 
 /* REQUE: link pred before succ */
 #define REQUE(pred, succ) (pred)->q_forw = (succ), (succ)->q_back = (pred)

Index: src/bin/ed/undo.c
diff -u src/bin/ed/undo.c:1.6 src/bin/ed/undo.c:1.7
--- src/bin/ed/undo.c:1.6	Sun Mar 23 05:06:42 2014
+++ src/bin/ed/undo.c	Fri Jan  4 19:13:58 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: undo.c,v 1.6 2014/03/23 05:06:42 dholland Exp $	*/
+/*	$NetBSD: undo.c,v 1.7 2019/01/04 19:13:58 maya Exp $	*/
 
 /* undo.c: This file contains the undo routines for the ed line editor */
 /*-
@@ -32,7 +32,7 @@
 #if 0
 static char *rcsid = "@(#)undo.c,v 1.1 1994/02/01 00:34:44 alm Exp";
 #else
-__RCSID("$NetBSD: undo.c,v 1.6 2014/03/23 05:06:42 dholland Exp $");
+__RCSID("$NetBSD: undo.c,v 1.7 2019/01/04 19:13:58 maya Exp 

CVS commit: xsrc/external/mit/libXxf86dga/dist/src

2019-01-04 Thread Christos Zoulas
Module Name:xsrc
Committed By:   christos
Date:   Fri Jan  4 18:59:45 UTC 2019

Modified Files:
xsrc/external/mit/libXxf86dga/dist/src: XF86DGA.c

Log Message:
use a destructor instead of atexit(3) to prevent SEGV's after dlclose.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 xsrc/external/mit/libXxf86dga/dist/src/XF86DGA.c

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

Modified files:

Index: xsrc/external/mit/libXxf86dga/dist/src/XF86DGA.c
diff -u xsrc/external/mit/libXxf86dga/dist/src/XF86DGA.c:1.1.1.4 xsrc/external/mit/libXxf86dga/dist/src/XF86DGA.c:1.2
--- xsrc/external/mit/libXxf86dga/dist/src/XF86DGA.c:1.1.1.4	Fri May 31 05:19:59 2013
+++ xsrc/external/mit/libXxf86dga/dist/src/XF86DGA.c	Fri Jan  4 13:59:45 2019
@@ -647,6 +647,9 @@ XF86DGADirectVideo(
 
 
 static void
+#ifdef __NetBSD__
+__attribute__ ((__destructor__))
+#endif
 XF86cleanup(int sig)
 {
 ScrPtr sp;
@@ -703,7 +706,9 @@ XF86DGAGetVideo(
 
 if (!beenHere) {
 	beenHere = 1;
+#ifndef __NetBSD__
 	atexit((void(*)(void))XF86cleanup);
+#endif
 	/* one shot XF86cleanup attempts */
 	signal(SIGSEGV, XF86cleanup);
 #ifdef SIGBUS



CVS commit: xsrc/external/mit/libXau/dist

2019-01-04 Thread Christos Zoulas
Module Name:xsrc
Committed By:   christos
Date:   Fri Jan  4 18:53:36 UTC 2019

Modified Files:
xsrc/external/mit/libXau/dist: AuFileName.c

Log Message:
Don't use atexit(3) to free the buffer. Use a destructor instead so we don't
segv if someone dlopened and dlclosed the library. Should fix:
http://mail-index.netbsd.org/tech-userlevel/2018/12/27/msg011624.html


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 xsrc/external/mit/libXau/dist/AuFileName.c

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

Modified files:

Index: xsrc/external/mit/libXau/dist/AuFileName.c
diff -u xsrc/external/mit/libXau/dist/AuFileName.c:1.1.1.2 xsrc/external/mit/libXau/dist/AuFileName.c:1.2
--- xsrc/external/mit/libXau/dist/AuFileName.c:1.1.1.2	Thu May 30 20:34:34 2013
+++ xsrc/external/mit/libXau/dist/AuFileName.c	Fri Jan  4 13:53:36 2019
@@ -34,6 +34,9 @@ in this Software without prior written a
 static char *buf = NULL;
 
 static void
+#ifdef __NetBSD__
+__attribute__ ((__destructor__))
+#endif
 free_filename_buffer(void)
 {
 free(buf);
@@ -46,7 +49,9 @@ XauFileName (void)
 const char *slashDotXauthority = "/.Xauthority";
 char*name;
 static size_t	bsize;
+#ifndef __NetBSD__
 static int atexit_registered = 0;
+#endif
 #ifdef WIN32
 chardir[128];
 #endif
@@ -73,10 +78,12 @@ XauFileName (void)
 	if (!buf)
 	return NULL;
 
+#ifndef __NetBSD__
 if (!atexit_registered) {
 atexit(free_filename_buffer);
 atexit_registered = 1;
 }
+#endif
 
 	bsize = size;
 }



CVS commit: src/usr.bin/xlint/lint1

2019-01-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan  4 18:51:23 UTC 2019

Modified Files:
src/usr.bin/xlint/lint1: cgram.y scan.l

Log Message:
recognize destructor attribute.


To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/usr.bin/xlint/lint1/cgram.y
cvs rdiff -u -r1.85 -r1.86 src/usr.bin/xlint/lint1/scan.l

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/xlint/lint1/cgram.y
diff -u src/usr.bin/xlint/lint1/cgram.y:1.99 src/usr.bin/xlint/lint1/cgram.y:1.100
--- src/usr.bin/xlint/lint1/cgram.y:1.99	Sat Nov 24 08:10:20 2018
+++ src/usr.bin/xlint/lint1/cgram.y	Fri Jan  4 13:51:23 2019
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.99 2018/11/24 13:10:20 christos Exp $ */
+/* $NetBSD: cgram.y,v 1.100 2019/01/04 18:51:23 christos Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: cgram.y,v 1.99 2018/11/24 13:10:20 christos Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.100 2019/01/04 18:51:23 christos Exp $");
 #endif
 
 #include 
@@ -208,6 +208,7 @@ anonymize(sym_t *s)
 %token 		T_AT_COLD
 %token 		T_AT_CONSTRUCTOR
 %token 		T_AT_DEPRECATED
+%token 		T_AT_DESTRUCTOR
 %token 		T_AT_FORMAT
 %token 		T_AT_FORMAT_ARG
 %token 		T_AT_FORMAT_PRINTF
@@ -541,6 +542,7 @@ type_attribute_spec:
 	| T_AT_SECTION T_LPARN string T_RPARN
 	| T_AT_ALIGNED 
 	| T_AT_CONSTRUCTOR 
+	| T_AT_DESTRUCTOR 
 	| T_AT_MAY_ALIAS
 	| T_AT_NO_INSTRUMENT_FUNCTION
 	| T_AT_NOINLINE

Index: src/usr.bin/xlint/lint1/scan.l
diff -u src/usr.bin/xlint/lint1/scan.l:1.85 src/usr.bin/xlint/lint1/scan.l:1.86
--- src/usr.bin/xlint/lint1/scan.l:1.85	Sat Nov 24 08:10:20 2018
+++ src/usr.bin/xlint/lint1/scan.l	Fri Jan  4 13:51:23 2019
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: scan.l,v 1.85 2018/11/24 13:10:20 christos Exp $ */
+/* $NetBSD: scan.l,v 1.86 2019/01/04 18:51:23 christos Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: scan.l,v 1.85 2018/11/24 13:10:20 christos Exp $");
+__RCSID("$NetBSD: scan.l,v 1.86 2019/01/04 18:51:23 christos Exp $");
 #endif
 
 #include 
@@ -232,6 +232,7 @@ static	struct	kwtab {
 	{ "continue",	T_CONTINUE,	0,	0,	0,	  0,0,0,0,1 },
 	{ "default",	T_DEFAULT,	0,	0,	0,	  0,0,0,0,1 },
 	{ "deprecated",	T_AT_DEPRECATED,0,	0,	0,	  0,0,1,1,5 },
+	{ "destructor",	T_AT_DESTRUCTOR,0,	0,	0,	  0,0,1,1,5 },
 	{ "do",		T_DO,		0,	0,	0,	  0,0,0,0,1 },
 	{ "double",	T_TYPE,		0,	DOUBLE,	0,	  0,0,0,0,1 },
 	{ "else",	T_ELSE,		0,	0,	0,	  0,0,0,0,1 },



CVS commit: src/external/gpl3/gcc/dist/gcc/config

2019-01-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan  4 18:36:50 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc/config: netbsd.h

Log Message:
propagate profiling fix from gcc.old:
g++ needs the profiling libraries for stdc++ and math to work.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/external/gpl3/gcc/dist/gcc/config/netbsd.h

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

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/config/netbsd.h
diff -u src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.22 src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.23
--- src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.22	Sat Feb  3 14:27:15 2018
+++ src/external/gpl3/gcc/dist/gcc/config/netbsd.h	Fri Jan  4 13:36:50 2019
@@ -145,6 +145,9 @@ along with GCC; see the file COPYING3.  
 #undef LIB_SPEC
 #define LIB_SPEC NETBSD_LIB_SPEC
 
+#define LIBSTDCXX_PROFILE "stdc++_p"
+#define MATH_LIBRARY_PROFILE "m_p"
+
 #if 0 // XXXMRG
 #undef STATIC_LIBASAN_LIBS
 #define STATIC_LIBASAN_LIBS "-lstdc++ -lpthread"



CVS commit: src/external/gpl3/gcc.old/dist/gcc/config

2019-01-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan  4 18:35:46 UTC 2019

Modified Files:
src/external/gpl3/gcc.old/dist/gcc/config: netbsd.h

Log Message:
Specify that we need the profiled libraries when we are linking c++ with
profiling.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gcc.old/dist/gcc/config/netbsd.h

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

Modified files:

Index: src/external/gpl3/gcc.old/dist/gcc/config/netbsd.h
diff -u src/external/gpl3/gcc.old/dist/gcc/config/netbsd.h:1.7 src/external/gpl3/gcc.old/dist/gcc/config/netbsd.h:1.8
--- src/external/gpl3/gcc.old/dist/gcc/config/netbsd.h:1.7	Wed Aug  1 20:02:54 2018
+++ src/external/gpl3/gcc.old/dist/gcc/config/netbsd.h	Fri Jan  4 13:35:45 2019
@@ -145,6 +145,9 @@ along with GCC; see the file COPYING3.  
 #undef LIB_SPEC
 #define LIB_SPEC NETBSD_LIB_SPEC
 
+#define LIBSTDCXX_PROFILE "stdc++_p"
+#define MATH_LIBRARY_PROFILE "m_p"
+
 #if 0 // XXXMRG
 #undef STATIC_LIBASAN_LIBS
 #define STATIC_LIBASAN_LIBS "-lstdc++ -lpthread"



CVS commit: src/sys/dev/usb

2019-01-04 Thread Tom Ivar Helbekkmo
Module Name:src
Committed By:   tih
Date:   Fri Jan  4 17:09:26 UTC 2019

Modified Files:
src/sys/dev/usb: umodem_common.c

Log Message:
The availability of status change notification messages for a umodem
device is not an error.  Report its presence if booting in verbose
mode (-v).


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/usb/umodem_common.c

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

Modified files:

Index: src/sys/dev/usb/umodem_common.c
diff -u src/sys/dev/usb/umodem_common.c:1.25 src/sys/dev/usb/umodem_common.c:1.26
--- src/sys/dev/usb/umodem_common.c:1.25	Fri Nov 25 12:56:29 2016
+++ src/sys/dev/usb/umodem_common.c	Fri Jan  4 17:09:26 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: umodem_common.c,v 1.25 2016/11/25 12:56:29 skrll Exp $	*/
+/*	$NetBSD: umodem_common.c,v 1.26 2019/01/04 17:09:26 tih Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -44,7 +44,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: umodem_common.c,v 1.25 2016/11/25 12:56:29 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umodem_common.c,v 1.26 2019/01/04 17:09:26 tih Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -230,7 +230,7 @@ umodem_common_attach(device_t self, stru
 
 		if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN &&
 		(ed->bmAttributes & UE_XFERTYPE) == UE_INTERRUPT) {
-			aprint_error_dev(self,
+			aprint_verbose_dev(self,
 			"status change notification available\n");
 			sc->sc_ctl_notify = ed->bEndpointAddress;
 		}



CVS commit: src/sys/arch/sparc64/sparc64

2019-01-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jan  4 16:25:06 UTC 2019

Modified Files:
src/sys/arch/sparc64/sparc64: autoconf.c

Log Message:
PR port-sparc64/53830: adapt QEMU workarounds to newer OpenBIOS device
tree layout.


To generate a diff of this commit:
cvs rdiff -u -r1.213 -r1.214 src/sys/arch/sparc64/sparc64/autoconf.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/sparc64/sparc64/autoconf.c
diff -u src/sys/arch/sparc64/sparc64/autoconf.c:1.213 src/sys/arch/sparc64/sparc64/autoconf.c:1.214
--- src/sys/arch/sparc64/sparc64/autoconf.c:1.213	Fri Sep 15 13:27:53 2017
+++ src/sys/arch/sparc64/sparc64/autoconf.c	Fri Jan  4 16:25:06 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.213 2017/09/15 13:27:53 martin Exp $ */
+/*	$NetBSD: autoconf.c,v 1.214 2019/01/04 16:25:06 martin Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -48,7 +48,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.213 2017/09/15 13:27:53 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.214 2019/01/04 16:25:06 martin Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -877,13 +877,16 @@ has_child_node(int parent, int search)
 
 /*
  * The interposed pseudo-parent node in OpenBIOS has a
- * device_type = "ide" and no "vendor-id".
- * It is the secondary bus if the name is "ide1".
+ * device_type = "ide" and no "compatible" property.
+ * It is the secondary bus if the name is "ide1" or "ide"
+ * with newer OpenBIOS versions. In the latter case, read
+ * the first reg value to discriminate the two channels.
  */
 static bool
 openbios_secondary_ata_heuristic(int parent)
 {
 	char tmp[OFPATHLEN];
+	int regs[4];
 
 	if (OF_getprop(parent, "device_type", tmp, sizeof(tmp)) <= 0)
 		return false;
@@ -891,18 +894,29 @@ openbios_secondary_ata_heuristic(int par
 		return false;
 	DPRINTF(ACDB_BOOTDEV, ("parent device_type is ide\n"));
 
-	if (OF_getprop(parent, "vendor-id", tmp, sizeof(tmp)) > 0)
+	if (OF_getprop(parent, "compatible", tmp, sizeof(tmp)) > 0)
 		return false;
-	DPRINTF(ACDB_BOOTDEV, ("parent has no vendor-id\n"));
+	DPRINTF(ACDB_BOOTDEV, ("parent has no compatible property\n"));
 
 	if (OF_getprop(parent, "name", tmp, sizeof(tmp)) <= 0)
 		return false;
-	if (strcmp(tmp, "ide1") != 0)
-		return false;
-	DPRINTF(ACDB_BOOTDEV, ("parent seems to be an OpenBIOS"
-	   " secondary ATA bus, applying workaround target+2\n"));
+	if (strcmp(tmp, "ide1") == 0) {
+		DPRINTF(ACDB_BOOTDEV, ("parent seems to be an (old) OpenBIOS"
+		   " secondary ATA bus, applying workaround target+2\n"));
+		return true;
+	} else if (strcmp(tmp, "ide") == 0) {
+		regs[0] = 42;
+		if (OF_getprop(parent, "reg", , sizeof(regs))
+		>= sizeof(regs[0])) {
+			DPRINTF(ACDB_BOOTDEV, ("parent seems to be an OpenBIOS"
+			   " ATA bus #%u\n", regs[0]));
+
+			return regs[0] == 1;
+		}
 
-	return true;
+	}
+
+	return false;
 }
 
 /*



CVS commit: src/sys/arch/arm/samsung

2019-01-04 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Jan  4 15:57:04 UTC 2019

Modified Files:
src/sys/arch/arm/samsung: exynos_platform.c

Log Message:
Starting CPUs in cluster 1 of Exynos5422 causes strange things to happen
around ap_mpstart. Until we figure out why, only start CPUs in cluster 0.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/samsung/exynos_platform.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/arm/samsung/exynos_platform.c
diff -u src/sys/arch/arm/samsung/exynos_platform.c:1.21 src/sys/arch/arm/samsung/exynos_platform.c:1.22
--- src/sys/arch/arm/samsung/exynos_platform.c:1.21	Thu Jan  3 23:04:09 2019
+++ src/sys/arch/arm/samsung/exynos_platform.c	Fri Jan  4 15:57:03 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: exynos_platform.c,v 1.21 2019/01/03 23:04:09 jmcneill Exp $ */
+/* $NetBSD: exynos_platform.c,v 1.22 2019/01/04 15:57:03 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared D. McNeill 
@@ -35,7 +35,12 @@
 #include "ukbd.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: exynos_platform.c,v 1.21 2019/01/03 23:04:09 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exynos_platform.c,v 1.22 2019/01/04 15:57:03 jmcneill Exp $");
+
+/* XXXJDM
+ * Booting a CA7 core on Exynos5422 is currently broken, disable starting CA7 secondaries.
+ */
+#define	EXYNOS5422_DISABLE_CA7_CLUSTER
 
 #include 
 #include 
@@ -60,6 +65,8 @@ __KERNEL_RCSID(0, "$NetBSD: exynos_platf
 
 #include 
 
+#include 
+
 void exynos_platform_early_putchar(char);
 
 #define	EXYNOS5800_PMU_BASE		0x1004
@@ -140,6 +147,11 @@ exynos5800_mpstart(void)
 		const u_int aff0 = __SHIFTOUT(mpidr, MPIDR_AFF0);
 		const u_int cpu = cluster * 4 + aff0;
 
+#if defined(EXYNOS5422_DISABLE_CA7_CLUSTER)
+		if (cluster == 1)
+			continue;
+#endif
+
 		val = bus_space_read_4(bst, pmu_bsh, EXYNOS5800_PMU_CORE_STATUS(cpu));
 		bus_space_write_4(bst, pmu_bsh, EXYNOS5800_PMU_CORE_CONFIG(cpu),
 		EXYNOS5800_PMU_CORE_POWER_EN);
@@ -319,6 +331,27 @@ exynos5_platform_bootstrap(void)
 
 	exynos_bootstrap(5);
 
+#if defined(MULTIPROCESSOR) && defined(EXYNOS5422_DISABLE_CA7_CLUSTER)
+	const struct of_compat_data *cd = of_search_compatible(OF_finddevice("/"), mp_compat_data);
+	if (cd && cd->data == (uintptr_t)exynos5800_mpstart) {
+		void *fdt_data = __UNCONST(fdtbus_get_data());
+		int cpu_off, cpus_off, len;
+
+		cpus_off = fdt_path_offset(fdt_data, "/cpus");
+		if (cpus_off < 0)
+			return;
+
+		fdt_for_each_subnode(cpu_off, fdt_data, cpus_off) {
+			const void *prop = fdt_getprop(fdt_data, cpu_off, "reg", );
+			if (len != 4)
+continue;
+			const uint32_t mpidr = be32dec(prop);
+			if (mpidr != cpu_mpidr_aff_read() && __SHIFTOUT(mpidr, MPIDR_AFF1) == 1)
+fdt_setprop_string(fdt_data, cpu_off, "status", "fail");
+		}
+	}
+#endif
+
 	arm_fdt_cpu_bootstrap();
 }
 



CVS commit: src/usr.bin/menuc

2019-01-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jan  4 15:27:19 UTC 2019

Modified Files:
src/usr.bin/menuc: mdb.c menu_sys.def menuc.1

Log Message:
Add an option for single (disabled) menu lines to have no shortcut.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/usr.bin/menuc/mdb.c
cvs rdiff -u -r1.61 -r1.62 src/usr.bin/menuc/menu_sys.def
cvs rdiff -u -r1.33 -r1.34 src/usr.bin/menuc/menuc.1

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

Modified files:

Index: src/usr.bin/menuc/mdb.c
diff -u src/usr.bin/menuc/mdb.c:1.47 src/usr.bin/menuc/mdb.c:1.48
--- src/usr.bin/menuc/mdb.c:1.47	Wed Nov 21 20:04:48 2018
+++ src/usr.bin/menuc/mdb.c	Fri Jan  4 15:27:19 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: mdb.c,v 1.47 2018/11/21 20:04:48 martin Exp $	*/
+/*	$NetBSD: mdb.c,v 1.48 2019/01/04 15:27:19 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -41,7 +41,7 @@
 #include 
 
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: mdb.c,v 1.47 2018/11/21 20:04:48 martin Exp $");
+__RCSID("$NetBSD: mdb.c,v 1.48 2019/01/04 15:27:19 martin Exp $");
 #endif
 
 
@@ -184,6 +184,7 @@ write_menu_file(char *initcode)
 		"#define OPT_ENDWIN	2\n"
 		"#define OPT_EXIT	4\n"
 		"#define OPT_IGNORE	8\n"
+		"#define OPT_NOSHORT	16\n"
 		"#define OPT_NOMENU	-1\n\n"
 		"struct menudesc {\n"
 		"	const char	*title;\n"

Index: src/usr.bin/menuc/menu_sys.def
diff -u src/usr.bin/menuc/menu_sys.def:1.61 src/usr.bin/menuc/menu_sys.def:1.62
--- src/usr.bin/menuc/menu_sys.def:1.61	Wed Jan  2 16:32:59 2019
+++ src/usr.bin/menuc/menu_sys.def	Fri Jan  4 15:27:19 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: menu_sys.def,v 1.61 2019/01/02 16:32:59 martin Exp $	*/
+/*	$NetBSD: menu_sys.def,v 1.62 2019/01/04 15:27:19 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -301,14 +301,18 @@ static void
 draw_menu_line(menudesc *m, int opt, int cury, void *arg, const char *text)
 {
 	int hasbox = m->mopt & MC_NOBOX ? 0 : 1;
+	int noshort = (opt < m->numopts)
+	&& (m->opts[opt].opt_flags & OPT_NOSHORT);
 
 	if (m->cursel == opt) {
 		mvwaddstr(m->mw, cury, hasbox, ">");
 		wstandout(m->mw);
 	} else
 		mvwaddstr(m->mw, cury, hasbox, " ");
-	if (!(m->mopt & MC_NOSHORTCUT))
+	if (!(m->mopt & MC_NOSHORTCUT) && !noshort)
 		wprintw(m->mw, "%c: ", opt_ch(m, opt));
+	else if (!(m->mopt & MC_NOSHORTCUT))
+		wprintw(m->mw, "   ");
 
 	if (!text && m->draw_line)
 		m->draw_line(m, opt, arg);

Index: src/usr.bin/menuc/menuc.1
diff -u src/usr.bin/menuc/menuc.1:1.33 src/usr.bin/menuc/menuc.1:1.34
--- src/usr.bin/menuc/menuc.1:1.33	Wed Nov 21 22:42:26 2018
+++ src/usr.bin/menuc/menuc.1	Fri Jan  4 15:27:19 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: menuc.1,v 1.33 2018/11/21 22:42:26 uwe Exp $
+.\"	$NetBSD: menuc.1,v 1.34 2019/01/04 15:27:19 martin Exp $
 .\"
 .\" Copyright 1997 Piermont Information Systems Inc.
 .\" All rights reserved.
@@ -424,9 +424,11 @@ struct menu_ent {
 #define OPT_NOMENU -1
 
 /* For opt_flags */
-#define OPT_SUB1
-#define OPT_ENDWIN 2
-#define OPT_EXIT   4
+#define OPT_SUB 1
+#define OPT_ENDWIN  2
+#define OPT_EXIT4
+#define OPT_IGNORE  8
+#define OPT_NOSHORT 16
 
 typedef
 struct menudesc {



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

2019-01-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jan  4 14:55:40 UTC 2019

Modified Files:
src/sys/dev/usb [netbsd-8]: xhci.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1155):

sys/dev/usb/xhci.c: revision 1.100

use xhci_polling_p().  this might miss when bus2 is active.
XXX: pullup-7, pullup-8.


To generate a diff of this commit:
cvs rdiff -u -r1.72.2.9 -r1.72.2.10 src/sys/dev/usb/xhci.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/usb/xhci.c
diff -u src/sys/dev/usb/xhci.c:1.72.2.9 src/sys/dev/usb/xhci.c:1.72.2.10
--- src/sys/dev/usb/xhci.c:1.72.2.9	Fri Sep 28 08:33:43 2018
+++ src/sys/dev/usb/xhci.c	Fri Jan  4 14:55:40 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: xhci.c,v 1.72.2.9 2018/09/28 08:33:43 martin Exp $	*/
+/*	$NetBSD: xhci.c,v 1.72.2.10 2019/01/04 14:55:40 martin Exp $	*/
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.72.2.9 2018/09/28 08:33:43 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.72.2.10 2019/01/04 14:55:40 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -3711,7 +3711,7 @@ xhci_root_intr_start(struct usbd_xfer *x
 {
 	struct xhci_softc * const sc = XHCI_XFER2SC(xfer);
 	const size_t bn = XHCI_XFER2BUS(xfer) == >sc_bus ? 0 : 1;
-	const bool polling = sc->sc_bus.ub_usepolling;
+	const bool polling = xhci_polling_p(sc);
 
 	XHCIHIST_FUNC(); XHCIHIST_CALLED();
 
@@ -3803,7 +3803,7 @@ xhci_device_ctrl_start(struct usbd_xfer 
 	uint32_t status;
 	uint32_t control;
 	u_int i;
-	const bool polling = sc->sc_bus.ub_usepolling;
+	const bool polling = xhci_polling_p(sc);
 
 	XHCIHIST_FUNC(); XHCIHIST_CALLED();
 	DPRINTFN(12, "req: %04jx %04jx %04jx %04jx",
@@ -3937,7 +3937,7 @@ xhci_device_bulk_start(struct usbd_xfer 
 	uint32_t status;
 	uint32_t control;
 	u_int i = 0;
-	const bool polling = sc->sc_bus.ub_usepolling;
+	const bool polling = xhci_polling_p(sc);
 
 	XHCIHIST_FUNC(); XHCIHIST_CALLED();
 



CVS commit: src/lib/libnvmm

2019-01-04 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Fri Jan  4 10:25:40 UTC 2019

Modified Files:
src/lib/libnvmm: libnvmm_x86.c

Log Message:
In !64bit mode RIP-relative is null+disp32, handle that correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/lib/libnvmm/libnvmm_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/lib/libnvmm/libnvmm_x86.c
diff -u src/lib/libnvmm/libnvmm_x86.c:1.8 src/lib/libnvmm/libnvmm_x86.c:1.9
--- src/lib/libnvmm/libnvmm_x86.c:1.8	Wed Jan  2 12:18:08 2019
+++ src/lib/libnvmm/libnvmm_x86.c	Fri Jan  4 10:25:39 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: libnvmm_x86.c,v 1.8 2019/01/02 12:18:08 maxv Exp $	*/
+/*	$NetBSD: libnvmm_x86.c,v 1.9 2019/01/04 10:25:39 maxv Exp $	*/
 
 /*
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -1826,9 +1826,16 @@ has_sib(struct x86_instr *instr)
 }
 
 static inline bool
-is_rip_relative(struct x86_instr *instr)
+is_rip_relative(struct x86_decode_fsm *fsm, struct x86_instr *instr)
 {
-	return (instr->strm->disp.type == DISP_0 &&
+	return (fsm->is64bit && instr->strm->disp.type == DISP_0 &&
+	instr->regmodrm.rm == RM_RBP_DISP32);
+}
+
+static inline bool
+is_disp32_only(struct x86_decode_fsm *fsm, struct x86_instr *instr)
+{
+	return (!fsm->is64bit && instr->strm->disp.type == DISP_0 &&
 	instr->regmodrm.rm == RM_RBP_DISP32);
 }
 
@@ -1905,7 +1912,7 @@ node_regmodrm(struct x86_decode_fsm *fsm
 	/* The displacement applies to RM. */
 	strm->disp.type = get_disp_type(instr);
 
-	if (is_rip_relative(instr)) {
+	if (is_rip_relative(fsm, instr)) {
 		/* Overwrites RM */
 		strm->type = STORE_REG;
 		strm->u.reg = _map__rip;
@@ -1914,6 +1921,15 @@ node_regmodrm(struct x86_decode_fsm *fsm
 		return 0;
 	}
 
+	if (is_disp32_only(fsm, instr)) {
+		/* Overwrites RM */
+		strm->type = STORE_REG;
+		strm->u.reg = NULL;
+		strm->disp.type = DISP_4;
+		fsm_advance(fsm, 1, node_disp);
+		return 0;
+	}
+
 	reg = get_register_rm(instr, opcode);
 	if (reg == NULL) {
 		return -1;
@@ -2405,7 +2421,11 @@ store_to_gva(struct nvmm_x64_state *stat
 			gva += sib->scale * reg;
 		}
 	} else if (store->type == STORE_REG) {
-		gva = gpr_read_address(instr, state, store->u.reg->num);
+		if (store->u.reg == NULL) {
+			/* The base is null. Happens with disp32-only. */
+		} else {
+			gva = gpr_read_address(instr, state, store->u.reg->num);
+		}
 	} else {
 		gva = store->u.dmo;
 	}