CVS commit: src/sys/kern

2019-10-11 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri Oct 11 08:05:19 UTC 2019

Modified Files:
src/sys/kern: vnode_if.c

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/kern/vnode_if.c

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



CVS commit: src/sys/kern

2019-10-11 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri Oct 11 08:05:19 UTC 2019

Modified Files:
src/sys/kern: vnode_if.c

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/kern/vnode_if.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/kern/vnode_if.c
diff -u src/sys/kern/vnode_if.c:1.107 src/sys/kern/vnode_if.c:1.108
--- src/sys/kern/vnode_if.c:1.107	Wed Jul 12 09:31:59 2017
+++ src/sys/kern/vnode_if.c	Fri Oct 11 08:05:19 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnode_if.c,v 1.107 2017/07/12 09:31:59 hannken Exp $	*/
+/*	$NetBSD: vnode_if.c,v 1.108 2019/10/11 08:05:19 hannken Exp $	*/
 
 /*
  * Warning: DO NOT EDIT! This file is automatically generated!
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v 1.107 2017/07/12 09:31:59 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v 1.108 2019/10/11 08:05:19 hannken Exp $");
 
 #include 
 #include 
@@ -49,7 +49,7 @@ __KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v
 #include 
 #include 
 
-enum fst_op { FST_NO, FST_YES, FST_TRY };
+enum fst_op { FST_NO, FST_YES, FST_LAZY, FST_TRY };
 
 static inline int
 vop_pre(vnode_t *vp, struct mount **mp, bool *mpsafe, enum fst_op op)
@@ -62,7 +62,7 @@ vop_pre(vnode_t *vp, struct mount **mp, 
 		KERNEL_LOCK(1, curlwp);
 	}
 
-	if (op == FST_YES || op == FST_TRY) {
+	if (op == FST_YES || op == FST_LAZY || op == FST_TRY) {
 		for (;;) {
 			*mp = vp->v_mount;
 			if (op == FST_TRY) {
@@ -73,6 +73,8 @@ vop_pre(vnode_t *vp, struct mount **mp, 
 	}
 	return error;
 }
+			} else if (op == FST_LAZY) {
+fstrans_start_lazy(*mp);
 			} else {
 fstrans_start(*mp);
 			}
@@ -91,7 +93,7 @@ static inline void
 vop_post(vnode_t *vp, struct mount *mp, bool mpsafe, enum fst_op op)
 {
 
-	if (op == FST_YES) {
+	if (op == FST_YES || op == FST_LAZY) {
 		fstrans_done(mp);
 	}
 
@@ -1378,11 +1380,11 @@ VOP_STRATEGY(struct vnode *vp,
 	a.a_desc = VDESC(vop_strategy);
 	a.a_vp = vp;
 	a.a_bp = bp;
-	error = vop_pre(vp, , , FST_YES);
+	error = vop_pre(vp, , , FST_LAZY);
 	if (error)
 		return error;
 	error = (VCALL(vp, VOFFSET(vop_strategy), ));
-	vop_post(vp, mp, mpsafe, FST_YES);
+	vop_post(vp, mp, mpsafe, FST_LAZY);
 	return error;
 }
 



CVS commit: src/sys/kern

2019-10-11 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri Oct 11 08:04:52 UTC 2019

Modified Files:
src/sys/kern: vnode_if.sh vnode_if.src

Log Message:
As VOP_STRATEGY() usually calls itself on the file system holding "/dev"
it may deadlock on suspension of this file system.

Add fstrans type LAZY and use it for VOP_STRATEGY().

Adress PR kern/53624 (dom0 freeze on domU exit) is still there


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/kern/vnode_if.sh
cvs rdiff -u -r1.77 -r1.78 src/sys/kern/vnode_if.src

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

Modified files:

Index: src/sys/kern/vnode_if.sh
diff -u src/sys/kern/vnode_if.sh:1.66 src/sys/kern/vnode_if.sh:1.67
--- src/sys/kern/vnode_if.sh:1.66	Sun Jun  4 08:03:26 2017
+++ src/sys/kern/vnode_if.sh	Fri Oct 11 08:04:52 2019
@@ -29,7 +29,7 @@ copyright="\
  * SUCH DAMAGE.
  */
 "
-SCRIPT_ID='$NetBSD: vnode_if.sh,v 1.66 2017/06/04 08:03:26 hannken Exp $'
+SCRIPT_ID='$NetBSD: vnode_if.sh,v 1.67 2019/10/11 08:04:52 hannken Exp $'
 
 # Script to produce VFS front-end sugar.
 #
@@ -318,7 +318,7 @@ echo '
 
 if [ -z "${rump}" ] ; then
 	echo "
-enum fst_op { FST_NO, FST_YES, FST_TRY };
+enum fst_op { FST_NO, FST_YES, FST_LAZY, FST_TRY };
 
 static inline int
 vop_pre(vnode_t *vp, struct mount **mp, bool *mpsafe, enum fst_op op)
@@ -331,7 +331,7 @@ vop_pre(vnode_t *vp, struct mount **mp, 
 		KERNEL_LOCK(1, curlwp);
 	}
 
-	if (op == FST_YES || op == FST_TRY) {
+	if (op == FST_YES || op == FST_LAZY || op == FST_TRY) {
 		for (;;) {
 			*mp = vp->v_mount;
 			if (op == FST_TRY) {
@@ -342,6 +342,8 @@ vop_pre(vnode_t *vp, struct mount **mp, 
 	}
 	return error;
 }
+			} else if (op == FST_LAZY) {
+fstrans_start_lazy(*mp);
 			} else {
 fstrans_start(*mp);
 			}
@@ -360,7 +362,7 @@ static inline void
 vop_post(vnode_t *vp, struct mount *mp, bool mpsafe, enum fst_op op)
 {
 
-	if (op == FST_YES) {
+	if (op == FST_YES || op == FST_LAZY) {
 		fstrans_done(mp);
 	}
 

Index: src/sys/kern/vnode_if.src
diff -u src/sys/kern/vnode_if.src:1.77 src/sys/kern/vnode_if.src:1.78
--- src/sys/kern/vnode_if.src:1.77	Wed Jul 12 09:31:07 2017
+++ src/sys/kern/vnode_if.src	Fri Oct 11 08:04:52 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: vnode_if.src,v 1.77 2017/07/12 09:31:07 hannken Exp $
+#	$NetBSD: vnode_if.src,v 1.78 2019/10/11 08:04:52 hannken Exp $
 #
 # Copyright (c) 1992, 1993
 #	The Regents of the University of California.  All rights reserved.
@@ -436,6 +436,7 @@ vop_bmap {
 #% strategy   vp  = = =
 #
 vop_strategy {
+	FSTRANS=LAZY
 	IN struct vnode *vp;
 	IN struct buf *bp;
 };



CVS commit: src/sys/kern

2019-10-11 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri Oct 11 08:04:52 UTC 2019

Modified Files:
src/sys/kern: vnode_if.sh vnode_if.src

Log Message:
As VOP_STRATEGY() usually calls itself on the file system holding "/dev"
it may deadlock on suspension of this file system.

Add fstrans type LAZY and use it for VOP_STRATEGY().

Adress PR kern/53624 (dom0 freeze on domU exit) is still there


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/kern/vnode_if.sh
cvs rdiff -u -r1.77 -r1.78 src/sys/kern/vnode_if.src

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



CVS commit: src/sys/dev/mii

2019-10-11 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct 11 09:29:04 UTC 2019

Modified Files:
src/sys/dev/mii: ciphy.c rgephy.c

Log Message:
- Indicat master mode if the negotiated result say so.
- KNF


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/mii/ciphy.c
cvs rdiff -u -r1.56 -r1.57 src/sys/dev/mii/rgephy.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/ciphy.c
diff -u src/sys/dev/mii/ciphy.c:1.34 src/sys/dev/mii/ciphy.c:1.35
--- src/sys/dev/mii/ciphy.c:1.34	Thu Apr 11 09:14:07 2019
+++ src/sys/dev/mii/ciphy.c	Fri Oct 11 09:29:04 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ciphy.c,v 1.34 2019/04/11 09:14:07 msaitoh Exp $ */
+/* $NetBSD: ciphy.c,v 1.35 2019/10/11 09:29:04 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 2004
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.34 2019/04/11 09:14:07 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.35 2019/10/11 09:29:04 msaitoh Exp $");
 
 /*
  * Driver for the Cicada CS8201 10/100/1000 copper PHY.
@@ -297,7 +297,7 @@ static void
 ciphy_status(struct mii_softc *sc)
 {
 	struct mii_data *mii = sc->mii_pdata;
-	uint16_t bmsr, bmcr;
+	uint16_t bmsr, bmcr, gtsr;
 
 	mii->mii_media_status = IFM_AVALID;
 	mii->mii_media_active = IFM_ETHER;
@@ -343,16 +343,19 @@ ciphy_status(struct mii_softc *sc)
 	else
 		mii->mii_media_active |= IFM_HDX;
 
-	return;
+	if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T) {
+		PHY_READ(sc, MII_GTSR, );
+		if ((gtsr & GTSR_MS_RES) != 0)
+			mii->mii_media_active |= IFM_ETH_MASTER;
+	}
 }
 
 static void
 ciphy_reset(struct mii_softc *sc)
 {
+
 	mii_phy_reset(sc);
 	DELAY(1000);
-
-	return;
 }
 
 static inline int
@@ -437,6 +440,4 @@ ciphy_fixup(struct mii_softc *sc)
 		model);
 		break;
 	}
-
-	return;
 }

Index: src/sys/dev/mii/rgephy.c
diff -u src/sys/dev/mii/rgephy.c:1.56 src/sys/dev/mii/rgephy.c:1.57
--- src/sys/dev/mii/rgephy.c:1.56	Fri Oct 11 03:40:01 2019
+++ src/sys/dev/mii/rgephy.c	Fri Oct 11 09:29:04 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rgephy.c,v 1.56 2019/10/11 03:40:01 msaitoh Exp $	*/
+/*	$NetBSD: rgephy.c,v 1.57 2019/10/11 09:29:04 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2003
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1.56 2019/10/11 03:40:01 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1.57 2019/10/11 09:29:04 msaitoh Exp $");
 
 
 /*
@@ -356,7 +356,7 @@ static void
 rgephy_status(struct mii_softc *sc)
 {
 	struct mii_data *mii = sc->mii_pdata;
-	uint16_t gstat, bmsr, bmcr, physr, ssr;
+	uint16_t gstat, bmsr, bmcr, gtsr, physr, ssr;
 
 	mii->mii_media_status = IFM_AVALID;
 	mii->mii_media_active = IFM_ETHER;
@@ -442,6 +442,12 @@ rgephy_status(struct mii_softc *sc)
 		else
 			mii->mii_media_active |= IFM_HDX;
 	}
+
+	if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T) {
+		PHY_READ(sc, MII_GTSR, );
+		if ((gtsr & GTSR_MS_RES) != 0)
+			mii->mii_media_active |= IFM_ETH_MASTER;
+	}
 }
 
 static int



CVS commit: src/sys/dev/mii

2019-10-11 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct 11 09:29:04 UTC 2019

Modified Files:
src/sys/dev/mii: ciphy.c rgephy.c

Log Message:
- Indicat master mode if the negotiated result say so.
- KNF


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/mii/ciphy.c
cvs rdiff -u -r1.56 -r1.57 src/sys/dev/mii/rgephy.c

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



CVS commit: src/sys/dev/mii

2019-10-11 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct 11 09:31:52 UTC 2019

Modified Files:
src/sys/dev/mii: ciphy.c

Log Message:
 Call mii_phy_flowstatus() to show the flow setting.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/mii/ciphy.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/ciphy.c
diff -u src/sys/dev/mii/ciphy.c:1.35 src/sys/dev/mii/ciphy.c:1.36
--- src/sys/dev/mii/ciphy.c:1.35	Fri Oct 11 09:29:04 2019
+++ src/sys/dev/mii/ciphy.c	Fri Oct 11 09:31:52 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ciphy.c,v 1.35 2019/10/11 09:29:04 msaitoh Exp $ */
+/* $NetBSD: ciphy.c,v 1.36 2019/10/11 09:31:52 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 2004
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.35 2019/10/11 09:29:04 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.36 2019/10/11 09:31:52 msaitoh Exp $");
 
 /*
  * Driver for the Cicada CS8201 10/100/1000 copper PHY.
@@ -339,7 +339,7 @@ ciphy_status(struct mii_softc *sc)
 	}
 
 	if (bmsr & CIPHY_AUXCSR_FDX)
-		mii->mii_media_active |= IFM_FDX;
+		mii->mii_media_active |= IFM_FDX | mii_phy_flowstatus(sc);
 	else
 		mii->mii_media_active |= IFM_HDX;
 



CVS commit: src/sys/dev/mii

2019-10-11 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct 11 09:31:52 UTC 2019

Modified Files:
src/sys/dev/mii: ciphy.c

Log Message:
 Call mii_phy_flowstatus() to show the flow setting.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/mii/ciphy.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/external/bsd/ipf/dist/man

2019-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 11 18:15:39 UTC 2019

Modified Files:
src/external/bsd/ipf/dist/man [netbsd-8]: ipf.5

Log Message:
Pull up following revision(s) (requested by uwe in ticket #1404):

external/bsd/ipf/dist/man/ipf.5: revision 1.6

Typo.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.8.1 src/external/bsd/ipf/dist/man/ipf.5

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



CVS commit: [netbsd-8] src/external/bsd/ipf/dist/man

2019-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 11 18:15:39 UTC 2019

Modified Files:
src/external/bsd/ipf/dist/man [netbsd-8]: ipf.5

Log Message:
Pull up following revision(s) (requested by uwe in ticket #1404):

external/bsd/ipf/dist/man/ipf.5: revision 1.6

Typo.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.8.1 src/external/bsd/ipf/dist/man/ipf.5

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/ipf/dist/man/ipf.5
diff -u src/external/bsd/ipf/dist/man/ipf.5:1.5 src/external/bsd/ipf/dist/man/ipf.5:1.5.8.1
--- src/external/bsd/ipf/dist/man/ipf.5:1.5	Mon Dec 28 19:32:22 2015
+++ src/external/bsd/ipf/dist/man/ipf.5	Fri Oct 11 18:15:39 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ipf.5,v 1.5 2015/12/28 19:32:22 khorben Exp $
+.\"	$NetBSD: ipf.5,v 1.5.8.1 2019/10/11 18:15:39 martin Exp $
 .\"
 .TH IPF 5
 .SH NAME
@@ -880,7 +880,7 @@ through without needing to explicitly al
 An example of how this is done is as follows:
 .PP
 .nf
-pass in proto udp from any prot = 2049 to any with frags keep fags
+pass in proto udp from any prot = 2049 to any with frags keep frags
 .fi
 .SH Building a tree of rules
 .PP



CVS commit: src/external/bsd/libpcap/dist

2019-10-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Oct 11 18:20:20 UTC 2019

Modified Files:
src/external/bsd/libpcap/dist: pcap-bpf.c

Log Message:
Fix the rest of the places where strncpy was called instead of pcap_strlcpy
to copy the interface name. The kernel requires the interface to be NUL
terminated anyway and will fail with ENAMETOOLONG otherwise. Pointed out
by Robert Swindells.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/libpcap/dist/pcap-bpf.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/bsd/libpcap/dist/pcap-bpf.c
diff -u src/external/bsd/libpcap/dist/pcap-bpf.c:1.9 src/external/bsd/libpcap/dist/pcap-bpf.c:1.10
--- src/external/bsd/libpcap/dist/pcap-bpf.c:1.9	Tue Oct  1 12:02:11 2019
+++ src/external/bsd/libpcap/dist/pcap-bpf.c	Fri Oct 11 14:20:20 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcap-bpf.c,v 1.9 2019/10/01 16:02:11 christos Exp $	*/
+/*	$NetBSD: pcap-bpf.c,v 1.10 2019/10/11 18:20:20 christos Exp $	*/
 
 /*
  * Copyright (c) 1993, 1994, 1995, 1996, 1998
@@ -22,7 +22,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: pcap-bpf.c,v 1.9 2019/10/01 16:02:11 christos Exp $");
+__RCSID("$NetBSD: pcap-bpf.c,v 1.10 2019/10/11 18:20:20 christos Exp $");
 
 #ifdef HAVE_CONFIG_H
 #include 
@@ -628,7 +628,7 @@ bpf_open_and_bind(const char *name, char
 	/*
 	 * Now bind to the device.
 	 */
-	(void)strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
+	pcap_strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
 	if (ioctl(fd, BIOCSETIF, (caddr_t)) < 0) {
 		switch (errno) {
 
@@ -835,7 +835,7 @@ pcap_can_set_rfmon_bpf(pcap_t *p)
 	/*
 	 * Now bind to the device.
 	 */
-	(void)strncpy(ifr.ifr_name, p->opt.device, sizeof(ifr.ifr_name));
+	pcap_strlcpy(ifr.ifr_name, p->opt.device, sizeof(ifr.ifr_name));
 	if (ioctl(fd, BIOCSETIF, (caddr_t)) < 0) {
 		switch (errno) {
 
@@ -1445,7 +1445,7 @@ pcap_cleanup_bpf(pcap_t *p)
 strerror(errno));
 			} else {
 memset(, 0, sizeof(req));
-strncpy(req.ifm_name, pb->device,
+pcap_strlcpy(req.ifm_name, pb->device,
 sizeof(req.ifm_name));
 if (ioctl(sock, SIOCGIFMEDIA, ) < 0) {
 	fprintf(stderr,
@@ -1459,7 +1459,7 @@ pcap_cleanup_bpf(pcap_t *p)
 		 * turn it off.
 		 */
 		memset(, 0, sizeof(ifr));
-		(void)strncpy(ifr.ifr_name,
+		pcap_strlcpy(ifr.ifr_name,
 		pb->device,
 		sizeof(ifr.ifr_name));
 		ifr.ifr_media =
@@ -2002,7 +2002,7 @@ pcap_activate_bpf(pcap_t *p)
 			status = PCAP_ERROR;
 			goto bad;
 		}
-		(void)strncpy(ifrname, p->opt.device, ifnamsiz);
+		pcap_strlcpy(ifrname, p->opt.device, ifnamsiz);
 		if (ioctl(fd, BIOCSETIF, (caddr_t)) < 0) {
 			pcap_fmt_errmsg_for_errno(p->errbuf, PCAP_ERRBUF_SIZE,
 			errno, "BIOCSETIF: %s", p->opt.device);
@@ -2033,7 +2033,7 @@ pcap_activate_bpf(pcap_t *p)
 			/*
 			 * Now bind to the device.
 			 */
-			(void)strncpy(ifrname, p->opt.device, ifnamsiz);
+			pcap_strlcpy(ifrname, p->opt.device, ifnamsiz);
 #ifdef BIOCSETLIF
 			if (ioctl(fd, BIOCSETLIF, (caddr_t)) < 0)
 #else
@@ -2066,7 +2066,7 @@ pcap_activate_bpf(pcap_t *p)
  */
 (void) ioctl(fd, BIOCSBLEN, (caddr_t));
 
-(void)strncpy(ifrname, p->opt.device, ifnamsiz);
+pcap_strlcpy(ifrname, p->opt.device, ifnamsiz);
 #ifdef BIOCSETLIF
 if (ioctl(fd, BIOCSETLIF, (caddr_t)) >= 0)
 #else
@@ -2764,7 +2764,7 @@ get_if_flags(const char *name, bpf_u_int
 		return (-1);
 	}
 	memset(, 0, sizeof(req));
-	strncpy(req.ifm_name, name, sizeof(req.ifm_name));
+	pcap_strlcpy(req.ifm_name, name, sizeof(req.ifm_name));
 	if (ioctl(sock, SIOCGIFMEDIA, ) < 0) {
 		if (errno == EOPNOTSUPP || errno == EINVAL || errno == ENOTTY ||
 		errno == ENODEV || errno == EPERM) {
@@ -2891,7 +2891,7 @@ monitor_mode(pcap_t *p, int set)
 	}
 
 	memset(, 0, sizeof req);
-	strncpy(req.ifm_name, p->opt.device, sizeof req.ifm_name);
+	pcap_strlcpy(req.ifm_name, p->opt.device, sizeof(req.ifm_name));
 
 	/*
 	 * Find out how many media types we have.
@@ -3001,7 +3001,7 @@ monitor_mode(pcap_t *p, int set)
 return (PCAP_ERROR);
 			}
 			memset(, 0, sizeof(ifr));
-			(void)strncpy(ifr.ifr_name, p->opt.device,
+			pcap_strlcpy(ifr.ifr_name, p->opt.device,
 			sizeof(ifr.ifr_name));
 			ifr.ifr_media = req.ifm_current | IFM_IEEE80211_MONITOR;
 			if (ioctl(sock, SIOCSIFMEDIA, ) == -1) {



CVS commit: src/external/bsd/libpcap/dist

2019-10-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Oct 11 18:20:20 UTC 2019

Modified Files:
src/external/bsd/libpcap/dist: pcap-bpf.c

Log Message:
Fix the rest of the places where strncpy was called instead of pcap_strlcpy
to copy the interface name. The kernel requires the interface to be NUL
terminated anyway and will fail with ENAMETOOLONG otherwise. Pointed out
by Robert Swindells.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/libpcap/dist/pcap-bpf.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/external/bsd/ipf/dist/man

2019-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 11 18:19:31 UTC 2019

Modified Files:
src/external/bsd/ipf/dist/man [netbsd-9]: ipf.5

Log Message:
Pull up following revision(s) (requested by uwe in ticket #299):

external/bsd/ipf/dist/man/ipf.5: revision 1.6

Typo.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.18.1 src/external/bsd/ipf/dist/man/ipf.5

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



CVS commit: src/sys/arch/macppc/macppc

2019-10-11 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Fri Oct 11 21:56:55 UTC 2019

Modified Files:
src/sys/arch/macppc/macppc: locore.S

Log Message:
don't zero the MSR when building with options FIRMWORKSBUGS
with this a FIRMWORKSBUGS kernel boots on my TiBook
first step to address PR2231


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/arch/macppc/macppc/locore.S

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/macppc/macppc/locore.S
diff -u src/sys/arch/macppc/macppc/locore.S:1.73 src/sys/arch/macppc/macppc/locore.S:1.74
--- src/sys/arch/macppc/macppc/locore.S:1.73	Sun Jul 15 05:16:43 2018
+++ src/sys/arch/macppc/macppc/locore.S	Fri Oct 11 21:56:55 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.73 2018/07/15 05:16:43 maxv Exp $	*/
+/*	$NetBSD: locore.S,v 1.74 2019/10/11 21:56:55 macallan Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -87,7 +87,9 @@ __start:
 	bl	_C_LABEL(cpu_model_init)	/* init oeacpufeat */
 
 	li	0,0
+#ifndef FIRMWORKSBUGS
 	mtmsr	0			/* Disable FPU/MMU/exceptions */
+#endif
 #if defined(PMAP_OEA64_BRIDGE)
 	mfmsr	0			/* Clear SF and ISF bits */
 	clrldi	0,0,3



CVS commit: src/sys/arch/macppc/macppc

2019-10-11 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Fri Oct 11 21:56:55 UTC 2019

Modified Files:
src/sys/arch/macppc/macppc: locore.S

Log Message:
don't zero the MSR when building with options FIRMWORKSBUGS
with this a FIRMWORKSBUGS kernel boots on my TiBook
first step to address PR2231


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/arch/macppc/macppc/locore.S

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



CVS commit: [netbsd-9] src/external/bsd/ipf/dist/man

2019-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 11 18:19:31 UTC 2019

Modified Files:
src/external/bsd/ipf/dist/man [netbsd-9]: ipf.5

Log Message:
Pull up following revision(s) (requested by uwe in ticket #299):

external/bsd/ipf/dist/man/ipf.5: revision 1.6

Typo.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.18.1 src/external/bsd/ipf/dist/man/ipf.5

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/ipf/dist/man/ipf.5
diff -u src/external/bsd/ipf/dist/man/ipf.5:1.5 src/external/bsd/ipf/dist/man/ipf.5:1.5.18.1
--- src/external/bsd/ipf/dist/man/ipf.5:1.5	Mon Dec 28 19:32:22 2015
+++ src/external/bsd/ipf/dist/man/ipf.5	Fri Oct 11 18:19:31 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ipf.5,v 1.5 2015/12/28 19:32:22 khorben Exp $
+.\"	$NetBSD: ipf.5,v 1.5.18.1 2019/10/11 18:19:31 martin Exp $
 .\"
 .TH IPF 5
 .SH NAME
@@ -880,7 +880,7 @@ through without needing to explicitly al
 An example of how this is done is as follows:
 .PP
 .nf
-pass in proto udp from any prot = 2049 to any with frags keep fags
+pass in proto udp from any prot = 2049 to any with frags keep frags
 .fi
 .SH Building a tree of rules
 .PP



CVS commit: [netbsd-9] src/doc

2019-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 11 18:23:40 UTC 2019

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

Log Message:
Tickets #299 and #300


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.73 -r1.1.2.74 src/doc/CHANGES-9.0

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

2019-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 11 18:23:40 UTC 2019

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

Log Message:
Tickets #299 and #300


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.73 -r1.1.2.74 src/doc/CHANGES-9.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-9.0
diff -u src/doc/CHANGES-9.0:1.1.2.73 src/doc/CHANGES-9.0:1.1.2.74
--- src/doc/CHANGES-9.0:1.1.2.73	Thu Oct 10 17:33:23 2019
+++ src/doc/CHANGES-9.0	Fri Oct 11 18:23:40 2019
@@ -1,5 +1,5 @@
 
-# $NetBSD: CHANGES-9.0,v 1.1.2.73 2019/10/10 17:33:23 martin Exp $
+# $NetBSD: CHANGES-9.0,v 1.1.2.74 2019/10/11 18:23:40 martin Exp $
 
 A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30
 until the 9.0 release:
@@ -4382,3 +4382,13 @@ sys/arch/x86/pci/if_vmx.c			1.51
 	Fix a kassert failure in vmxnet3_transmit().
 	[knakahara, ticket #298]
 
+external/bsd/ipf/dist/man/ipf.5			1.6
+
+	Fix typo.
+	[uwe, ticket #299]
+
+sys/netinet/if_arp.c1.289
+
+	ARP: Don't defend ARP probes.
+	[roy, ticket #300]
+



CVS commit: src/usr.sbin/tprof

2019-10-11 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Oct 11 20:18:20 UTC 2019

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

Log Message:
Add AMD Family 15h to supported model list


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/tprof/tprof.8

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/netinet

2019-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 11 18:22:14 UTC 2019

Modified Files:
src/sys/netinet [netbsd-9]: if_arp.c

Log Message:
Pull up following revision(s) (requested by roy in ticket #300):

sys/netinet/if_arp.c: revision 1.289

ARP: Don't defend ARP probes.

We should let the nature of ARP takes it's course here when our address
is neither tentative nor duplicated.
This allows the host to work with ARP ping, which was broken in r1.279.


To generate a diff of this commit:
cvs rdiff -u -r1.282.2.4 -r1.282.2.5 src/sys/netinet/if_arp.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/netinet/if_arp.c
diff -u src/sys/netinet/if_arp.c:1.282.2.4 src/sys/netinet/if_arp.c:1.282.2.5
--- src/sys/netinet/if_arp.c:1.282.2.4	Mon Sep 30 15:55:40 2019
+++ src/sys/netinet/if_arp.c	Fri Oct 11 18:22:14 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_arp.c,v 1.282.2.4 2019/09/30 15:55:40 martin Exp $	*/
+/*	$NetBSD: if_arp.c,v 1.282.2.5 2019/10/11 18:22:14 martin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.282.2.4 2019/09/30 15:55:40 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.282.2.5 2019/10/11 18:22:14 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -1157,15 +1157,17 @@ in_arpinput(struct mbuf *m)
 	/*
 	 * DAD check, RFC 5227.
 	 * Collision on sender address is always a duplicate.
-	 * Collision on target address is only a duplicate IF
-	 * the sender address is the null host (ie a DAD probe) AND
-	 * the message was broadcast - if it's unicast then it's
-	 * a valid Unicast Poll from RFC 1122.
+	 * Collision on target address is only a duplicate
+	 * IF the sender address is the null host (ie a DAD probe)
+	 * AND the message was broadcast
+	 * AND our address is either tentative or duplicated
+	 * If it was unicast then it's a valid Unicast Poll from RFC 1122.
 	 */
 	if (do_dad &&
 	(in_hosteq(isaddr, myaddr) ||
 	(in_nullhost(isaddr) && in_hosteq(itaddr, myaddr) &&
-	 m->m_flags & M_BCAST)))
+	 m->m_flags & M_BCAST &&
+	 ia->ia4_flags & (IN_IFF_TENTATIVE | IN_IFF_DUPLICATED
 	{
 		struct sockaddr_dl sdl, *sdlp;
 



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

2019-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 11 18:22:14 UTC 2019

Modified Files:
src/sys/netinet [netbsd-9]: if_arp.c

Log Message:
Pull up following revision(s) (requested by roy in ticket #300):

sys/netinet/if_arp.c: revision 1.289

ARP: Don't defend ARP probes.

We should let the nature of ARP takes it's course here when our address
is neither tentative nor duplicated.
This allows the host to work with ARP ping, which was broken in r1.279.


To generate a diff of this commit:
cvs rdiff -u -r1.282.2.4 -r1.282.2.5 src/sys/netinet/if_arp.c

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



CVS commit: src

2019-10-11 Thread Niclas Rosenvik
Module Name:src
Committed By:   nros
Date:   Fri Oct 11 18:36:22 UTC 2019

Modified Files:
src/distrib/sets/lists/comp: mi
src/lib/libm: Makefile

Log Message:
Add manpage links for frexpf and frexpl.

Manpage links were missing for frexpf and frexpl even thogh they were
mentioned in the manpage for frexp.


To generate a diff of this commit:
cvs rdiff -u -r1.2289 -r1.2290 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.210 -r1.211 src/lib/libm/Makefile

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.2289 src/distrib/sets/lists/comp/mi:1.2290
--- src/distrib/sets/lists/comp/mi:1.2289	Thu Oct  3 00:59:50 2019
+++ src/distrib/sets/lists/comp/mi	Fri Oct 11 18:36:22 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2289 2019/10/03 00:59:50 mrg Exp $
+#	$NetBSD: mi,v 1.2290 2019/10/11 18:36:22 nros Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.compcomp-sys-root
@@ -7102,6 +7102,8 @@
 ./usr/share/man/cat3/freemntopts.0		comp-c-catman		.cat
 ./usr/share/man/cat3/freopen.0			comp-c-catman		.cat
 ./usr/share/man/cat3/frexp.0			comp-c-catman		.cat
+./usr/share/man/cat3/frexpf.0			comp-c-catman		.cat
+./usr/share/man/cat3/frexpl.0			comp-c-catman		.cat
 ./usr/share/man/cat3/fropen.0			comp-c-catman		.cat
 ./usr/share/man/cat3/fropen2.0			comp-c-catman		.cat
 ./usr/share/man/cat3/fscanf.0			comp-c-catman		.cat
@@ -15120,6 +15122,8 @@
 ./usr/share/man/html3/freemntopts.html		comp-c-htmlman		html
 ./usr/share/man/html3/freopen.html		comp-c-htmlman		html
 ./usr/share/man/html3/frexp.html		comp-c-htmlman		html
+./usr/share/man/html3/frexpf.html		comp-c-htmlman		html
+./usr/share/man/html3/frexpl.html		comp-c-htmlman		html
 ./usr/share/man/html3/fropen.html		comp-c-htmlman		html
 ./usr/share/man/html3/fropen2.html		comp-c-htmlman		html
 ./usr/share/man/html3/fscanf.html		comp-c-htmlman		html
@@ -23076,6 +23080,8 @@
 ./usr/share/man/man3/freemntopts.3		comp-c-man		.man
 ./usr/share/man/man3/freopen.3			comp-c-man		.man
 ./usr/share/man/man3/frexp.3			comp-c-man		.man
+./usr/share/man/man3/frexpf.3			comp-c-man		.man
+./usr/share/man/man3/frexpl.3			comp-c-man		.man
 ./usr/share/man/man3/fropen.3			comp-c-man		.man
 ./usr/share/man/man3/fropen2.3			comp-c-man		.man
 ./usr/share/man/man3/fscanf.3			comp-c-man		.man

Index: src/lib/libm/Makefile
diff -u src/lib/libm/Makefile:1.210 src/lib/libm/Makefile:1.211
--- src/lib/libm/Makefile:1.210	Sat Apr 27 23:04:32 2019
+++ src/lib/libm/Makefile	Fri Oct 11 18:36:22 2019
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.210 2019/04/27 23:04:32 kamil Exp $
+#  $NetBSD: Makefile,v 1.211 2019/10/11 18:36:22 nros Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -456,6 +456,8 @@ MLINKS+=fdim.3 fdiml.3
 MLINKS+=fdim.3 fdimf.3
 MLINKS+=fma.3 fmaf.3 \
 	fma.3 fmal.3
+MLINKS+=frexp.3 frexpf.3 \
+	frexp.3 frexpl.3
 
 .if (${MKCOMPLEX} != "no")
 .include "${.CURDIR}/complex/Makefile.inc"



CVS commit: src

2019-10-11 Thread Niclas Rosenvik
Module Name:src
Committed By:   nros
Date:   Fri Oct 11 18:36:22 UTC 2019

Modified Files:
src/distrib/sets/lists/comp: mi
src/lib/libm: Makefile

Log Message:
Add manpage links for frexpf and frexpl.

Manpage links were missing for frexpf and frexpl even thogh they were
mentioned in the manpage for frexp.


To generate a diff of this commit:
cvs rdiff -u -r1.2289 -r1.2290 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.210 -r1.211 src/lib/libm/Makefile

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



Re: CVS commit: src/sys/arch/macppc/macppc

2019-10-11 Thread Sevan Janiyan



On 11/10/2019 22:56, Michael Lorenz wrote:
> first step to address PR2231

PR22316
http://gnats.netbsd.org/22316


Sevan


CVS commit: src/usr.sbin/tprof/arch

2019-10-11 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Oct 11 18:05:52 UTC 2019

Modified Files:
src/usr.sbin/tprof/arch: tprof_x86.c

Log Message:
Add support for AMD Family 15h


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 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/usr.sbin/tprof/arch/tprof_x86.c
diff -u src/usr.sbin/tprof/arch/tprof_x86.c:1.8 src/usr.sbin/tprof/arch/tprof_x86.c:1.9
--- src/usr.sbin/tprof/arch/tprof_x86.c:1.8	Wed May 29 17:09:18 2019
+++ src/usr.sbin/tprof/arch/tprof_x86.c	Fri Oct 11 18:05:52 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: tprof_x86.c,v 1.8 2019/05/29 17:09:18 maxv Exp $	*/
+/*	$NetBSD: tprof_x86.c,v 1.9 2019/10/11 18:05:52 jmcneill Exp $	*/
 
 /*
  * Copyright (c) 2018-2019 The NetBSD Foundation, Inc.
@@ -655,6 +655,120 @@ static struct event_table amd_f10h = {
 };
 
 /*
+ * AMD Family 15h
+ */
+static struct name_to_event amd_f15h_names[] = {
+	{ "FpPipeAssignment",		0x000, 0x77, true },
+	{ "FpSchedulerEmpty",		0x001, 0x00, true },
+	{ "FpRetSseAvxOps",		0x003, 0xff, true },
+	{ "FpNumMovElim",		0x004, 0x0f, true },
+	{ "FpRetiredSerOps",		0x005, 0x0f, true },
+	{ "LsSegRegLoads",		0x020, 0x7f, true },
+	{ "LsPipeRestartSelfMod",	0x021, 0x00, true },
+	{ "LsPipeRestartVarious",	0x022, 0x1f, true },
+	{ "LsLoadQueueStoreQFull",	0x023, 0x03, true },
+	{ "LsLockedOps",		0x024, 0x00, true },
+	{ "LsRetClflushInstr",		0x026, 0x00, true },
+	{ "LsRetCpuidInstr",		0x027, 0x00, true },
+	{ "LsDispatch",			0x029, 0x07, true },
+	{ "LsCanStoreToLoadFwOps",	0x02a, 0x03, true },
+	{ "LsSmisReceived",		0x02b, 0x00, true },
+	{ "LsExecClflushInstr",		0x030, 0x00, true },
+	{ "LsMisalignStore",		0x032, 0x00, true },
+	{ "LsFpLoadBufStall",		0x034, 0x00, true },
+	{ "LsStlf",			0x035, 0x00, true },
+	{ "DcCacheAccess",		0x040, 0x00, true },
+	{ "DcCacheMiss",		0x041, 0x00, true },
+	{ "DcCacheFillL2Sys",		0x042, 0x1f, true },
+	{ "DcCacheFillSys",		0x043, 0x00, true },
+	{ "DcUnifiedTlbHit",		0x045, 0x77, true },
+	{ "DcUnifiedTlbMiss",		0x046, 0x77, true },
+	{ "DcMisalignAccess",		0x047, 0x00, true },
+	{ "DcPrefetchInstrDisp",	0x04b, 0x07, true },
+	{ "DcIneffSwPrefetch",		0x052, 0x09, true },
+	{ "CuCmdVictimBuf",		0x060, 0x98, true },
+	{ "CuCmdMaskedOps",		0x061, 0x65, true },
+	{ "CuCmdReadBlkOps",		0x062, 0x77, true },
+	{ "CuCmdChgDirtyOps",		0x063, 0x08, true },
+	{ "CuDramSysReq",		0x064, 0x00, true },
+	{ "CuMemReqByType",		0x065, 0x83, true },
+	{ "CuDataCachePrefetch",	0x067, 0x03, true },
+	{ "CuMabReq",			0x068, 0xff, true },
+	{ "CuMabWaitCyc",		0x069, 0xff, true },
+	{ "CuSysRespCacheFill",		0x06c, 0x3f, true },
+	{ "CuOctwordsWritten",		0x06d, 0x01, true },
+	{ "CuCacheXInv",		0x075, 0x0f, true },
+	{ "CuCpuClkNotHalted",		0x076, 0x00, true },
+	{ "CuL2Req",			0x07d, 0x5f, true },
+	{ "CuL2Miss",			0x07e, 0x17, true },
+	{ "CuL2FillWb",			0x07f, 0x07, true },
+	{ "CuPageSplintering",		0x165, 0x07, true },
+	{ "CuL2PrefetchTrigEv",		0x16c, 0x03, true },
+	{ "CuXabAllocStall",		0x177, 0x03, true },
+	{ "CuFreeXabEntries",		0x17f, 0x01, true },
+	{ "IcCacheFetch",		0x080, 0x00, true },
+	{ "IcCacheMiss",		0x081, 0x00, true },
+	{ "IcCacheFillL2",		0x082, 0x00, true },
+	{ "IcCacheFillSys",		0x083, 0x00, true },
+	{ "IcL1TlbMissL2Hit",		0x084, 0x00, true },
+	{ "IcL1TlbMissL2Miss",		0x085, 0x07, true },
+	{ "IcPipeRestartInstrStrProbe",	0x086, 0x00, true },
+	{ "IcFetchStall",		0x087, 0x00, true },
+	{ "IcRetStackHits",		0x088, 0x00, true },
+	{ "IcRetStackOver",		0x089, 0x00, true },
+	{ "IcCacheVictims",		0x08b, 0x00, true },
+	{ "IcCacheLinesInv",		0x08c, 0x0f, true },
+	{ "IcTlbReload",		0x099, 0x00, true },
+	{ "IcTlbReloadAbort",		0x09a, 0x00, true },
+	{ "IcUopsDispatched",		0x186, 0x01, true },
+	{ "ExRetInstr",			0x0c0, 0x00, true },
+	{ "ExRetCops",			0x0c1, 0x00, true },
+	{ "ExRetBrn",			0x0c2, 0x00, true },
+	{ "ExRetBrnMisp",		0x0c3, 0x00, true },
+	{ "ExRetBrnTkn",		0x0c4, 0x00, true },
+	{ "ExRetBrnTknMisp",		0x0c5, 0x00, true },
+	{ "ExRetBrnFar",		0x0c6, 0x00, true },
+	{ "ExRetBrnResync",		0x0c7, 0x00, true },
+	{ "ExRetNearRet",		0x0c8, 0x00, true },
+	{ "ExRetNearRetMispred",	0x0c9, 0x00, true },
+	{ "ExRetBrnIndMisp",		0x0ca, 0x00, true },
+	{ "ExRetMmxFpInstr@X87",	0x0cb, 0x01, true },
+	{ "ExRetMmxFpInstr@Mmx",	0x0cb, 0x02, true },
+	{ "ExRetMmxFpInstr@Sse",	0x0cb, 0x04, true },
+	{ "ExIntMaskedCyc",		0x0cd, 0x00, true },
+	{ "ExIntMaskedCycIntPend",	0x0ce, 0x00, true },
+	{ "ExIntTaken",			0x0cf, 0x00, true },
+	{ "ExDecEmpty",			0x0d0, 0x00, true },
+	{ "ExDispStall",		0x0d1, 0x00, true },
+	{ "ExUseqStallSer",		0x0d2, 0x00, true },
+	{ "ExDispStallInstrRetQFull",	0x0d5, 0x00, true },
+	{ "ExDispStallIntSchedQFull",	0x0d6, 0x00, true },
+	{ "ExDispStallFpSchedQFull",	0x0d7, 0x00, true },
+	{ "ExDispStallLdqFull",		0x0d8, 0x00, true },
+	{ "ExUseqStallAllQuiet",	0x0d9, 0x00, true },
+	{ 

CVS commit: src/sys/dev/tprof

2019-10-11 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Oct 11 18:04:52 UTC 2019

Modified Files:
src/sys/dev/tprof: tprof_x86_amd.c

Log Message:
Match Family 15h


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/tprof/tprof_x86_amd.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_x86_amd.c
diff -u src/sys/dev/tprof/tprof_x86_amd.c:1.4 src/sys/dev/tprof/tprof_x86_amd.c:1.5
--- src/sys/dev/tprof/tprof_x86_amd.c:1.4	Fri Jun 14 11:50:35 2019
+++ src/sys/dev/tprof/tprof_x86_amd.c	Fri Oct 11 18:04:52 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: tprof_x86_amd.c,v 1.4 2019/06/14 11:50:35 msaitoh Exp $	*/
+/*	$NetBSD: tprof_x86_amd.c,v 1.5 2019/10/11 18:04:52 jmcneill Exp $	*/
 
 /*
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tprof_x86_amd.c,v 1.4 2019/06/14 11:50:35 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tprof_x86_amd.c,v 1.5 2019/10/11 18:04:52 jmcneill Exp $");
 
 #include 
 #include 
@@ -205,6 +205,7 @@ tprof_amd_ident(void)
 
 	switch (CPUID_TO_FAMILY(ci->ci_signature)) {
 	case 0x10:
+	case 0x15:
 	case 0x17:
 		return TPROF_IDENT_AMD_GENERIC;
 	}



CVS commit: src/sys/dev/tprof

2019-10-11 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Oct 11 18:04:52 UTC 2019

Modified Files:
src/sys/dev/tprof: tprof_x86_amd.c

Log Message:
Match Family 15h


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/tprof/tprof_x86_amd.c

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



CVS commit: src/usr.sbin/tprof/arch

2019-10-11 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Oct 11 18:05:52 UTC 2019

Modified Files:
src/usr.sbin/tprof/arch: tprof_x86.c

Log Message:
Add support for AMD Family 15h


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

2019-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 11 18:16:45 UTC 2019

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

Log Message:
Ticket #1404


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.49 -r1.1.2.50 src/doc/CHANGES-8.2

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

2019-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 11 18:16:45 UTC 2019

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

Log Message:
Ticket #1404


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.49 -r1.1.2.50 src/doc/CHANGES-8.2

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.2
diff -u src/doc/CHANGES-8.2:1.1.2.49 src/doc/CHANGES-8.2:1.1.2.50
--- src/doc/CHANGES-8.2:1.1.2.49	Tue Oct  8 18:18:30 2019
+++ src/doc/CHANGES-8.2	Fri Oct 11 18:16:45 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.2,v 1.1.2.49 2019/10/08 18:18:30 martin Exp $
+# $NetBSD: CHANGES-8.2,v 1.1.2.50 2019/10/11 18:16:45 martin Exp $
 
 A complete list of changes from the NetBSD 8.1 release to the NetBSD 8.2
 release:
@@ -1271,3 +1271,8 @@ sys/dev/pci/ixgbe/ixv.c1.139
 	ixv(4): set MTU correctly if mtu > 1500.
 	[msaitoh, ticket #1403]
 
+external/bsd/ipf/dist/man/ipf.5			1.6
+
+	Fix typo.
+	[uwe, ticket #1404]
+



CVS commit: src/usr.sbin/tprof

2019-10-11 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Oct 11 20:18:20 UTC 2019

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

Log Message:
Add AMD Family 15h to supported model list


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/tprof/tprof.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/tprof/tprof.8
diff -u src/usr.sbin/tprof/tprof.8:1.14 src/usr.sbin/tprof/tprof.8:1.15
--- src/usr.sbin/tprof/tprof.8:1.14	Wed May 29 17:09:17 2019
+++ src/usr.sbin/tprof/tprof.8	Fri Oct 11 20:18:20 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: tprof.8,v 1.14 2019/05/29 17:09:17 maxv Exp $
+.\"	$NetBSD: tprof.8,v 1.15 2019/10/11 20:18:20 jmcneill Exp $
 .\"
 .\" Copyright (c)2011 YAMAMOTO Takashi,
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd May 29, 2019
+.Dd October 11, 2019
 .Dt TPROF 8
 .Os
 .Sh NAME
@@ -130,6 +130,8 @@ ARMv8
 .It
 x86 AMD Family 10h
 .It
+x86 AMD Family 15h
+.It
 x86 AMD Family 17h
 .It
 x86 Intel Generic (all Intel CPUs)



CVS commit: src/sbin/gpt

2019-10-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Oct 11 23:04:52 UTC 2019

Modified Files:
src/sbin/gpt: gpt.c

Log Message:
gpt_uuid_parse does not set errno ...


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/sbin/gpt/gpt.c

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



CVS commit: src/sbin/gpt

2019-10-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Oct 11 23:04:52 UTC 2019

Modified Files:
src/sbin/gpt: gpt.c

Log Message:
gpt_uuid_parse does not set errno ...


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/sbin/gpt/gpt.c

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

Modified files:

Index: src/sbin/gpt/gpt.c
diff -u src/sbin/gpt/gpt.c:1.80 src/sbin/gpt/gpt.c:1.81
--- src/sbin/gpt/gpt.c:1.80	Mon Jun 24 23:50:18 2019
+++ src/sbin/gpt/gpt.c	Fri Oct 11 19:04:52 2019
@@ -35,7 +35,7 @@
 __FBSDID("$FreeBSD: src/sbin/gpt/gpt.c,v 1.16 2006/07/07 02:44:23 marcel Exp $");
 #endif
 #ifdef __RCSID
-__RCSID("$NetBSD: gpt.c,v 1.80 2019/06/25 03:50:18 jnemeth Exp $");
+__RCSID("$NetBSD: gpt.c,v 1.81 2019/10/11 23:04:52 christos Exp $");
 #endif
 
 #include 
@@ -1293,7 +1293,7 @@ gpt_uuid_get(gpt_t gpt, gpt_uuid_t *uuid
 	if (!gpt_uuid_is_nil(*uuid))
 		return -1;
 	if (gpt_uuid_parse(optarg, *uuid) != 0) {
-		gpt_warn(gpt, "Can't parse uuid");
+		gpt_warnx(gpt, "Can't parse uuid/type `%s'", optarg);
 		return -1;
 	}
 	return 0;



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

2019-10-11 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct 12 05:19:49 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: std.n900

Log Message:
Add __HAVE_GENERIC_START


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbarm/conf/std.n900

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



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

2019-10-11 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct 12 05:19:00 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: std.n900

Log Message:
Sort. NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/conf/std.n900

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



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

2019-10-11 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct 12 05:19:00 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: std.n900

Log Message:
Sort. NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/conf/std.n900

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/evbarm/conf/std.n900
diff -u src/sys/arch/evbarm/conf/std.n900:1.7 src/sys/arch/evbarm/conf/std.n900:1.8
--- src/sys/arch/evbarm/conf/std.n900:1.7	Mon Oct 15 16:54:54 2018
+++ src/sys/arch/evbarm/conf/std.n900	Sat Oct 12 05:19:00 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: std.n900,v 1.7 2018/10/15 16:54:54 skrll Exp $
+#	$NetBSD: std.n900,v 1.8 2019/10/12 05:19:00 skrll Exp $
 #
 # standard NetBSD/evbarm for N900 options
 
@@ -9,17 +9,17 @@ include		"arch/evbarm/conf/std.evbarm"
 include		"arch/evbarm/conf/files.n900"
 
 # To support easy transit to ../arch/arm/arm32
-options 	__HAVE_CPU_COUNTER
+options 	ARM_GENERIC_TODR
+options 	ARM_HAS_VBAR
 options 	CORTEX_PMC
+options 	FPU_VFP
+options 	TPIDRPRW_IS_CURCPU
+options 	__HAVE_CPU_COUNTER
 options 	__HAVE_FAST_SOFTINTS		# should be in types.h
-options 	ARM_HAS_VBAR
 options 	__HAVE_MM_MD_DIRECT_MAPPED_PHYS
-options 	TPIDRPRW_IS_CURCPU
-options 	FPU_VFP
 
 makeoptions 	LOADADDRESS="0x8030"
 makeoptions 	BOARDTYPE="n900"
 makeoptions 	BOARDMKFRAG="${THISARM}/conf/mk.beagle"
 
 options 	ARM_INTR_IMPL=""
-options 	ARM_GENERIC_TODR



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

2019-10-11 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct 12 05:19:49 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: std.n900

Log Message:
Add __HAVE_GENERIC_START


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbarm/conf/std.n900

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/evbarm/conf/std.n900
diff -u src/sys/arch/evbarm/conf/std.n900:1.8 src/sys/arch/evbarm/conf/std.n900:1.9
--- src/sys/arch/evbarm/conf/std.n900:1.8	Sat Oct 12 05:19:00 2019
+++ src/sys/arch/evbarm/conf/std.n900	Sat Oct 12 05:19:49 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: std.n900,v 1.8 2019/10/12 05:19:00 skrll Exp $
+#	$NetBSD: std.n900,v 1.9 2019/10/12 05:19:49 skrll Exp $
 #
 # standard NetBSD/evbarm for N900 options
 
@@ -16,6 +16,7 @@ options 	FPU_VFP
 options 	TPIDRPRW_IS_CURCPU
 options 	__HAVE_CPU_COUNTER
 options 	__HAVE_FAST_SOFTINTS		# should be in types.h
+options 	__HAVE_GENERIC_START
 options 	__HAVE_MM_MD_DIRECT_MAPPED_PHYS
 
 makeoptions 	LOADADDRESS="0x8030"



CVS commit: src/sys/opencrypto

2019-10-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 12 00:49:30 UTC 2019

Modified Files:
src/sys/opencrypto: cryptosoft.c cryptosoft_xform.c

Log Message:
add (void *) intermediate casts to elide gcc function cast warnings. This
is the simplest solution; choices:
- add pragmas, complex and ugly (need to be gcc-specific)
- add -Wno to COPTS. Needs to be done in many makefiles because of rump
- add intermediate functions: slows down things


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/opencrypto/cryptosoft.c
cvs rdiff -u -r1.27 -r1.28 src/sys/opencrypto/cryptosoft_xform.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/opencrypto/cryptosoft.c
diff -u src/sys/opencrypto/cryptosoft.c:1.53 src/sys/opencrypto/cryptosoft.c:1.54
--- src/sys/opencrypto/cryptosoft.c:1.53	Thu Jul 11 19:27:24 2019
+++ src/sys/opencrypto/cryptosoft.c	Fri Oct 11 20:49:30 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: cryptosoft.c,v 1.53 2019/07/11 23:27:24 christos Exp $ */
+/*	$NetBSD: cryptosoft.c,v 1.54 2019/10/12 00:49:30 christos Exp $ */
 /*	$FreeBSD: src/sys/opencrypto/cryptosoft.c,v 1.2.2.1 2002/11/21 23:34:23 sam Exp $	*/
 /*	$OpenBSD: cryptosoft.c,v 1.35 2002/04/26 08:43:50 deraadt Exp $	*/
 
@@ -24,7 +24,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cryptosoft.c,v 1.53 2019/07/11 23:27:24 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cryptosoft.c,v 1.54 2019/10/12 00:49:30 christos Exp $");
 
 #include 
 #include 
@@ -500,7 +500,7 @@ swcr_authcompute(struct cryptop *crp, st
 		break;
 	case CRYPTO_BUF_MBUF:
 		err = m_apply((struct mbuf *) buf, crd->crd_skip, crd->crd_len,
-		(int (*)(void*, void *, unsigned int)) axf->Update,
+		(int (*)(void*, void *, unsigned int))(void *)axf->Update,
 		(void *) );
 		if (err)
 			return err;
@@ -508,7 +508,7 @@ swcr_authcompute(struct cryptop *crp, st
 	case CRYPTO_BUF_IOV:
 		err = cuio_apply((struct uio *) buf, crd->crd_skip,
 		crd->crd_len,
-		(int (*)(void *, void *, unsigned int)) axf->Update,
+		(int (*)(void *, void *, unsigned int))(void *)axf->Update,
 		(void *) );
 		if (err) {
 			return err;

Index: src/sys/opencrypto/cryptosoft_xform.c
diff -u src/sys/opencrypto/cryptosoft_xform.c:1.27 src/sys/opencrypto/cryptosoft_xform.c:1.28
--- src/sys/opencrypto/cryptosoft_xform.c:1.27	Thu Nov 27 15:30:21 2014
+++ src/sys/opencrypto/cryptosoft_xform.c	Fri Oct 11 20:49:30 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: cryptosoft_xform.c,v 1.27 2014/11/27 20:30:21 christos Exp $ */
+/*	$NetBSD: cryptosoft_xform.c,v 1.28 2019/10/12 00:49:30 christos Exp $ */
 /*	$FreeBSD: src/sys/opencrypto/xform.c,v 1.1.2.1 2002/11/21 23:34:23 sam Exp $	*/
 /*	$OpenBSD: xform.c,v 1.19 2002/08/16 22:47:25 dhartmei Exp $	*/
 
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: cryptosoft_xform.c,v 1.27 2014/11/27 20:30:21 christos Exp $");
+__KERNEL_RCSID(1, "$NetBSD: cryptosoft_xform.c,v 1.28 2019/10/12 00:49:30 christos Exp $");
 
 #include 
 #include 
@@ -313,26 +313,26 @@ static const struct swcr_auth_hash swcr_
 
 static const struct swcr_auth_hash swcr_auth_hash_hmac_sha2_256 = {
 	_hash_hmac_sha2_256, sizeof(SHA256_CTX),
-	(void (*)(void *)) SHA256_Init, NULL, NULL, SHA256Update_int,
-	(void (*)(u_int8_t *, void *)) SHA256_Final
+	(void (*)(void *))(void *)SHA256_Init, NULL, NULL, SHA256Update_int,
+	(void (*)(u_int8_t *, void *))(void *)SHA256_Final
 };
 
 static const struct swcr_auth_hash swcr_auth_hash_hmac_sha2_384 = {
 	_hash_hmac_sha2_384, sizeof(SHA384_CTX),
-	(void (*)(void *)) SHA384_Init, NULL, NULL, SHA384Update_int,
-	(void (*)(u_int8_t *, void *)) SHA384_Final
+	(void (*)(void *))(void *)SHA384_Init, NULL, NULL, SHA384Update_int,
+	(void (*)(u_int8_t *, void *))(void *)SHA384_Final
 };
 
 static const struct swcr_auth_hash swcr_auth_hash_hmac_sha2_512 = {
 	_hash_hmac_sha2_512, sizeof(SHA512_CTX),
-	(void (*)(void *)) SHA512_Init, NULL, NULL, SHA512Update_int,
-	(void (*)(u_int8_t *, void *)) SHA512_Final
+	(void (*)(void *))(void *)SHA512_Init, NULL, NULL, SHA512Update_int,
+	(void (*)(u_int8_t *, void *))(void *)SHA512_Final
 };
 
 static const struct swcr_auth_hash swcr_auth_hash_aes_xcbc_mac = {
 	_hash_aes_xcbc_mac_96, sizeof(aesxcbc_ctx),
 	null_init,
-	(void (*)(void *, const u_int8_t *, u_int16_t))aes_xcbc_mac_init,
+	(void (*)(void *, const u_int8_t *, u_int16_t))(void *)aes_xcbc_mac_init,
 	NULL, aes_xcbc_mac_loop, aes_xcbc_mac_result
 };
 



CVS commit: src/sys/opencrypto

2019-10-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 12 00:49:30 UTC 2019

Modified Files:
src/sys/opencrypto: cryptosoft.c cryptosoft_xform.c

Log Message:
add (void *) intermediate casts to elide gcc function cast warnings. This
is the simplest solution; choices:
- add pragmas, complex and ugly (need to be gcc-specific)
- add -Wno to COPTS. Needs to be done in many makefiles because of rump
- add intermediate functions: slows down things


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/opencrypto/cryptosoft.c
cvs rdiff -u -r1.27 -r1.28 src/sys/opencrypto/cryptosoft_xform.c

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



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

2019-10-11 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Oct 11 11:01:23 UTC 2019

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

Log Message:
Import dhcpcd-8.1.0 with the following changes:

 * Fix carrier status after a route socket overflow
 * Allow domain spaced options
 * DHCP: Allow not sending Force Renew Nonce or Reconf Accept
 * IPv4LL: Now passes Apple Bonjour test versions 1.4 and 1.5
 * ARP: Fix a typo and remove pragma (thus working with old gcc)
 * DHCP6: Fix a cosmetic issue with infinite leases
 * DHCP6: SLA 0 and Prefix Len 0 will now add a delegatd /64 address
 * Ignore some virtual interfaces such as Tap and Bridge by default
 * BPF: Move validation logic out of BPF and back into dhcpcd 

Status:

Vendor Tag: ROY
Release Tags:   dhcpcd-8_1_0

U src/external/bsd/dhcpcd/dist/LICENSE
U src/external/bsd/dhcpcd/dist/README.md
U src/external/bsd/dhcpcd/dist/src/defs.h
U src/external/bsd/dhcpcd/dist/src/common.c
U src/external/bsd/dhcpcd/dist/src/control.c
C src/external/bsd/dhcpcd/dist/src/dhcpcd.c
U src/external/bsd/dhcpcd/dist/src/duid.c
U src/external/bsd/dhcpcd/dist/src/eloop.c
U src/external/bsd/dhcpcd/dist/src/logerr.c
U src/external/bsd/dhcpcd/dist/src/if.c
C src/external/bsd/dhcpcd/dist/src/if-options.c
U src/external/bsd/dhcpcd/dist/src/sa.c
U src/external/bsd/dhcpcd/dist/src/route.c
U src/external/bsd/dhcpcd/dist/src/dhcp-common.c
U src/external/bsd/dhcpcd/dist/src/script.c
U src/external/bsd/dhcpcd/dist/src/auth.c
C src/external/bsd/dhcpcd/dist/src/if-bsd.c
C src/external/bsd/dhcpcd/dist/src/dhcp.c
U src/external/bsd/dhcpcd/dist/src/ipv4.c
C src/external/bsd/dhcpcd/dist/src/bpf.c
U src/external/bsd/dhcpcd/dist/src/arp.c
U src/external/bsd/dhcpcd/dist/src/ipv4ll.c
U src/external/bsd/dhcpcd/dist/src/ipv6.c
U src/external/bsd/dhcpcd/dist/src/ipv6nd.c
C src/external/bsd/dhcpcd/dist/src/dhcp6.c
U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c
U src/external/bsd/dhcpcd/dist/src/common.h
U src/external/bsd/dhcpcd/dist/src/control.h
U src/external/bsd/dhcpcd/dist/src/dhcpcd.h
U src/external/bsd/dhcpcd/dist/src/duid.h
U src/external/bsd/dhcpcd/dist/src/eloop.h
U src/external/bsd/dhcpcd/dist/src/logerr.h
U src/external/bsd/dhcpcd/dist/src/if.h
U src/external/bsd/dhcpcd/dist/src/if-options.h
U src/external/bsd/dhcpcd/dist/src/sa.h
U src/external/bsd/dhcpcd/dist/src/route.h
U src/external/bsd/dhcpcd/dist/src/dhcp-common.h
U src/external/bsd/dhcpcd/dist/src/script.h
U src/external/bsd/dhcpcd/dist/src/auth.h
U src/external/bsd/dhcpcd/dist/src/dhcp.h
U src/external/bsd/dhcpcd/dist/src/ipv4.h
U src/external/bsd/dhcpcd/dist/src/bpf.h
U src/external/bsd/dhcpcd/dist/src/arp.h
U src/external/bsd/dhcpcd/dist/src/ipv4ll.h
U src/external/bsd/dhcpcd/dist/src/ipv6.h
U src/external/bsd/dhcpcd/dist/src/ipv6nd.h
U src/external/bsd/dhcpcd/dist/src/dhcp6.h
U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h
U src/external/bsd/dhcpcd/dist/src/dev.h
U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in
C src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf
U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.in
U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8.in
U src/external/bsd/dhcpcd/dist/hooks/01-test
U src/external/bsd/dhcpcd/dist/hooks/02-dump
U src/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant
U src/external/bsd/dhcpcd/dist/hooks/15-timezone
U src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf
U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname
U src/external/bsd/dhcpcd/dist/hooks/30-hostname
U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf
U src/external/bsd/dhcpcd/dist/hooks/50-ypbind.in

7 conflicts created by this import.
Use the following command to help the merge:

cvs checkout -jROY:yesterday -jROY src/external/bsd/dhcpcd/dist



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

2019-10-11 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Oct 11 11:01:23 UTC 2019

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

Log Message:
Import dhcpcd-8.1.0 with the following changes:

 * Fix carrier status after a route socket overflow
 * Allow domain spaced options
 * DHCP: Allow not sending Force Renew Nonce or Reconf Accept
 * IPv4LL: Now passes Apple Bonjour test versions 1.4 and 1.5
 * ARP: Fix a typo and remove pragma (thus working with old gcc)
 * DHCP6: Fix a cosmetic issue with infinite leases
 * DHCP6: SLA 0 and Prefix Len 0 will now add a delegatd /64 address
 * Ignore some virtual interfaces such as Tap and Bridge by default
 * BPF: Move validation logic out of BPF and back into dhcpcd 

Status:

Vendor Tag: ROY
Release Tags:   dhcpcd-8_1_0

U src/external/bsd/dhcpcd/dist/LICENSE
U src/external/bsd/dhcpcd/dist/README.md
U src/external/bsd/dhcpcd/dist/src/defs.h
U src/external/bsd/dhcpcd/dist/src/common.c
U src/external/bsd/dhcpcd/dist/src/control.c
C src/external/bsd/dhcpcd/dist/src/dhcpcd.c
U src/external/bsd/dhcpcd/dist/src/duid.c
U src/external/bsd/dhcpcd/dist/src/eloop.c
U src/external/bsd/dhcpcd/dist/src/logerr.c
U src/external/bsd/dhcpcd/dist/src/if.c
C src/external/bsd/dhcpcd/dist/src/if-options.c
U src/external/bsd/dhcpcd/dist/src/sa.c
U src/external/bsd/dhcpcd/dist/src/route.c
U src/external/bsd/dhcpcd/dist/src/dhcp-common.c
U src/external/bsd/dhcpcd/dist/src/script.c
U src/external/bsd/dhcpcd/dist/src/auth.c
C src/external/bsd/dhcpcd/dist/src/if-bsd.c
C src/external/bsd/dhcpcd/dist/src/dhcp.c
U src/external/bsd/dhcpcd/dist/src/ipv4.c
C src/external/bsd/dhcpcd/dist/src/bpf.c
U src/external/bsd/dhcpcd/dist/src/arp.c
U src/external/bsd/dhcpcd/dist/src/ipv4ll.c
U src/external/bsd/dhcpcd/dist/src/ipv6.c
U src/external/bsd/dhcpcd/dist/src/ipv6nd.c
C src/external/bsd/dhcpcd/dist/src/dhcp6.c
U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c
U src/external/bsd/dhcpcd/dist/src/common.h
U src/external/bsd/dhcpcd/dist/src/control.h
U src/external/bsd/dhcpcd/dist/src/dhcpcd.h
U src/external/bsd/dhcpcd/dist/src/duid.h
U src/external/bsd/dhcpcd/dist/src/eloop.h
U src/external/bsd/dhcpcd/dist/src/logerr.h
U src/external/bsd/dhcpcd/dist/src/if.h
U src/external/bsd/dhcpcd/dist/src/if-options.h
U src/external/bsd/dhcpcd/dist/src/sa.h
U src/external/bsd/dhcpcd/dist/src/route.h
U src/external/bsd/dhcpcd/dist/src/dhcp-common.h
U src/external/bsd/dhcpcd/dist/src/script.h
U src/external/bsd/dhcpcd/dist/src/auth.h
U src/external/bsd/dhcpcd/dist/src/dhcp.h
U src/external/bsd/dhcpcd/dist/src/ipv4.h
U src/external/bsd/dhcpcd/dist/src/bpf.h
U src/external/bsd/dhcpcd/dist/src/arp.h
U src/external/bsd/dhcpcd/dist/src/ipv4ll.h
U src/external/bsd/dhcpcd/dist/src/ipv6.h
U src/external/bsd/dhcpcd/dist/src/ipv6nd.h
U src/external/bsd/dhcpcd/dist/src/dhcp6.h
U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h
U src/external/bsd/dhcpcd/dist/src/dev.h
U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in
C src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf
U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.in
U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8.in
U src/external/bsd/dhcpcd/dist/hooks/01-test
U src/external/bsd/dhcpcd/dist/hooks/02-dump
U src/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant
U src/external/bsd/dhcpcd/dist/hooks/15-timezone
U src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf
U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname
U src/external/bsd/dhcpcd/dist/hooks/30-hostname
U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf
U src/external/bsd/dhcpcd/dist/hooks/50-ypbind.in

7 conflicts created by this import.
Use the following command to help the merge:

cvs checkout -jROY:yesterday -jROY src/external/bsd/dhcpcd/dist



CVS commit: src/doc

2019-10-11 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Oct 11 11:05:42 UTC 2019

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note import of dhcpcd-8.1.0


To generate a diff of this commit:
cvs rdiff -u -r1.1660 -r1.1661 src/doc/3RDPARTY
cvs rdiff -u -r1.2591 -r1.2592 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.1660 src/doc/3RDPARTY:1.1661
--- src/doc/3RDPARTY:1.1660	Thu Oct 10 18:23:43 2019
+++ src/doc/3RDPARTY	Fri Oct 11 11:05:41 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1660 2019/10/10 18:23:43 mrg Exp $
+#	$NetBSD: 3RDPARTY,v 1.1661 2019/10/11 11:05:41 roy Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -327,12 +327,12 @@ Notes:
 Use the dhcp2netbsd script.
 
 Package:	dhcpcd
-Version:	8.0.6
-Current Vers:	8.0.6
+Version:	8.1.0
+Current Vers:	8.1.0
 Maintainer:	roy
 Archive Site:	ftp://roy.marples.name/pub/dhcpcd/
 Home Page:	http://roy.marples.name/projects/dhcpcd/
-Date:		2019-09-13
+Date:		2019-10-11
 Mailing List: 	dhcpcd-disc...@marples.name
 License:	BSD (2-clause)
 Location:	external/bsd/dhcpcd/dist

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2591 src/doc/CHANGES:1.2592
--- src/doc/CHANGES:1.2591	Wed Oct  9 22:50:14 2019
+++ src/doc/CHANGES	Fri Oct 11 11:05:41 2019
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2591 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2592 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -54,3 +54,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	tzdata updates from 2019a to 2019c (incl 2019b) [kre 20191008]
 	services(5): Update to version 2019-10-04 from IANA.
 		[sevan 20191009]
+	dhcpcd(8): Import dhcpcd-8.1.0 [roy 20191011]



CVS commit: src/doc

2019-10-11 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Oct 11 11:05:42 UTC 2019

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note import of dhcpcd-8.1.0


To generate a diff of this commit:
cvs rdiff -u -r1.1660 -r1.1661 src/doc/3RDPARTY
cvs rdiff -u -r1.2591 -r1.2592 src/doc/CHANGES

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



CVS commit: src/sys/netinet

2019-10-11 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Oct 11 13:32:46 UTC 2019

Modified Files:
src/sys/netinet: if_arp.c

Log Message:
ARP: Don't defend ARP probes.

We should let the nature of ARP takes it's course here when our address
is neither tentative nor duplicated.
This allows the host to work with ARP ping, which was broken in r1.279.


To generate a diff of this commit:
cvs rdiff -u -r1.288 -r1.289 src/sys/netinet/if_arp.c

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



CVS commit: src/sys/netinet

2019-10-11 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Oct 11 13:32:46 UTC 2019

Modified Files:
src/sys/netinet: if_arp.c

Log Message:
ARP: Don't defend ARP probes.

We should let the nature of ARP takes it's course here when our address
is neither tentative nor duplicated.
This allows the host to work with ARP ping, which was broken in r1.279.


To generate a diff of this commit:
cvs rdiff -u -r1.288 -r1.289 src/sys/netinet/if_arp.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/netinet/if_arp.c
diff -u src/sys/netinet/if_arp.c:1.288 src/sys/netinet/if_arp.c:1.289
--- src/sys/netinet/if_arp.c:1.288	Wed Sep 25 09:52:32 2019
+++ src/sys/netinet/if_arp.c	Fri Oct 11 13:32:46 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_arp.c,v 1.288 2019/09/25 09:52:32 ozaki-r Exp $	*/
+/*	$NetBSD: if_arp.c,v 1.289 2019/10/11 13:32:46 roy Exp $	*/
 
 /*
  * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.288 2019/09/25 09:52:32 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.289 2019/10/11 13:32:46 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -1157,15 +1157,17 @@ in_arpinput(struct mbuf *m)
 	/*
 	 * DAD check, RFC 5227.
 	 * Collision on sender address is always a duplicate.
-	 * Collision on target address is only a duplicate IF
-	 * the sender address is the null host (ie a DAD probe) AND
-	 * the message was broadcast - if it's unicast then it's
-	 * a valid Unicast Poll from RFC 1122.
+	 * Collision on target address is only a duplicate
+	 * IF the sender address is the null host (ie a DAD probe)
+	 * AND the message was broadcast
+	 * AND our address is either tentative or duplicated
+	 * If it was unicast then it's a valid Unicast Poll from RFC 1122.
 	 */
 	if (do_dad &&
 	(in_hosteq(isaddr, myaddr) ||
 	(in_nullhost(isaddr) && in_hosteq(itaddr, myaddr) &&
-	 m->m_flags & M_BCAST)))
+	 m->m_flags & M_BCAST &&
+	 ia->ia4_flags & (IN_IFF_TENTATIVE | IN_IFF_DUPLICATED
 	{
 		struct sockaddr_dl sdl, *sdlp;
 



CVS commit: src/external/bsd/dhcpcd/dist/src

2019-10-11 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Oct 11 11:03:59 UTC 2019

Modified Files:
src/external/bsd/dhcpcd/dist/src: bpf.c dhcp.c dhcp6.c dhcpcd.8.in
dhcpcd.c if-bsd.c if-options.c

Log Message:
Sync


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/bsd/dhcpcd/dist/src/bpf.c \
src/external/bsd/dhcpcd/dist/src/dhcp6.c
cvs rdiff -u -r1.27 -r1.28 src/external/bsd/dhcpcd/dist/src/dhcp.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in
cvs rdiff -u -r1.26 -r1.27 src/external/bsd/dhcpcd/dist/src/dhcpcd.c
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/dhcpcd/dist/src/if-bsd.c
cvs rdiff -u -r1.17 -r1.18 src/external/bsd/dhcpcd/dist/src/if-options.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/bsd/dhcpcd/dist/src/bpf.c
diff -u src/external/bsd/dhcpcd/dist/src/bpf.c:1.12 src/external/bsd/dhcpcd/dist/src/bpf.c:1.13
--- src/external/bsd/dhcpcd/dist/src/bpf.c:1.12	Wed Aug 21 17:12:19 2019
+++ src/external/bsd/dhcpcd/dist/src/bpf.c	Fri Oct 11 11:03:59 2019
@@ -410,13 +410,7 @@ bpf_cmp_hwaddr(struct bpf_insn *bpf, siz
 #endif
 
 #ifdef ARP
-
 static const struct bpf_insn bpf_arp_ether [] = {
-	/* Ensure packet is at least correct size. */
-	BPF_STMT(BPF_LD + BPF_W + BPF_LEN, 0),
-	BPF_JUMP(BPF_JMP + BPF_JGE + BPF_K, sizeof(struct ether_arp), 1, 0),
-	BPF_STMT(BPF_RET + BPF_K, 0),
-
 	/* Check this is an ARP packet. */
 	BPF_STMT(BPF_LD + BPF_H + BPF_ABS,
 	 offsetof(struct ether_header, ether_type)),
@@ -552,17 +546,8 @@ bpf_arp(struct interface *ifp, int fd)
 }
 #endif
 
-#define	BPF_M_FHLEN	0
-#define	BPF_M_IPHLEN	1
-#define	BPF_M_IPLEN	2
-#define	BPF_M_UDP	3
-#define	BPF_M_UDPLEN	4
-
 #ifdef ARPHRD_NONE
 static const struct bpf_insn bpf_bootp_none[] = {
-	/* Set the frame header length to zero. */
-	BPF_STMT(BPF_LD + BPF_IMM, 0),
-	BPF_STMT(BPF_ST, BPF_M_FHLEN),
 };
 #define BPF_BOOTP_NONE_LEN	__arraycount(bpf_bootp_none)
 #endif
@@ -574,13 +559,14 @@ static const struct bpf_insn bpf_bootp_e
 	BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ETHERTYPE_IP, 1, 0),
 	BPF_STMT(BPF_RET + BPF_K, 0),
 
-	/* Load frame header length into X. */
-	BPF_STMT(BPF_LDX + BPF_W + BPF_IMM, sizeof(struct ether_header)),
-	/* Copy frame header length to memory */
-	BPF_STMT(BPF_STX, BPF_M_FHLEN),
+	/* Advance to the IP header. */
+	BPF_STMT(BPF_LDX + BPF_K, sizeof(struct ether_header)),
 };
 #define BPF_BOOTP_ETHER_LEN	__arraycount(bpf_bootp_ether)
 
+#define BOOTP_MIN_SIZE		sizeof(struct ip) + sizeof(struct udphdr) + \
+sizeof(struct bootp)
+
 static const struct bpf_insn bpf_bootp_filter[] = {
 	/* Make sure it's an IPv4 packet. */
 	BPF_STMT(BPF_LD + BPF_B + BPF_IND, 0),
@@ -588,15 +574,6 @@ static const struct bpf_insn bpf_bootp_f
 	BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, 0x40, 1, 0),
 	BPF_STMT(BPF_RET + BPF_K, 0),
 
-	/* Ensure IP header length is big enough and
-	 * store the IP header length in memory. */
-	BPF_STMT(BPF_LD + BPF_B + BPF_IND, 0),
-	BPF_STMT(BPF_ALU + BPF_AND + BPF_K, 0x0f),
-	BPF_STMT(BPF_ALU + BPF_MUL + BPF_K, 4),
-	BPF_JUMP(BPF_JMP + BPF_JGE + BPF_K, sizeof(struct ip), 1, 0),
-	BPF_STMT(BPF_RET + BPF_K, 0),
-	BPF_STMT(BPF_ST, BPF_M_IPHLEN),
-
 	/* Make sure it's a UDP packet. */
 	BPF_STMT(BPF_LD + BPF_B + BPF_IND, offsetof(struct ip, ip_p)),
 	BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, IPPROTO_UDP, 1, 0),
@@ -607,49 +584,17 @@ static const struct bpf_insn bpf_bootp_f
 	BPF_JUMP(BPF_JMP + BPF_JSET + BPF_K, 0x1fff, 0, 1),
 	BPF_STMT(BPF_RET + BPF_K, 0),
 
-	/* Store IP length. */
-	BPF_STMT(BPF_LD + BPF_H + BPF_IND, offsetof(struct ip, ip_len)),
-	BPF_STMT(BPF_ST, BPF_M_IPLEN),
-
 	/* Advance to the UDP header. */
-	BPF_STMT(BPF_LD + BPF_MEM, BPF_M_IPHLEN),
+	BPF_STMT(BPF_LD + BPF_B + BPF_IND, 0),
+	BPF_STMT(BPF_ALU + BPF_AND + BPF_K, 0x0f),
+	BPF_STMT(BPF_ALU + BPF_MUL + BPF_K, 4),
 	BPF_STMT(BPF_ALU + BPF_ADD + BPF_X, 0),
 	BPF_STMT(BPF_MISC + BPF_TAX, 0),
 
-	/* Store UDP location */
-	BPF_STMT(BPF_STX, BPF_M_UDP),
-
 	/* Make sure it's from and to the right port. */
 	BPF_STMT(BPF_LD + BPF_W + BPF_IND, 0),
 	BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, (BOOTPS << 16) + BOOTPC, 1, 0),
 	BPF_STMT(BPF_RET + BPF_K, 0),
-
-	/* Store UDP length. */
-	BPF_STMT(BPF_LD + BPF_H + BPF_IND, offsetof(struct udphdr, uh_ulen)),
-	BPF_STMT(BPF_ST, BPF_M_UDPLEN),
-
-	/* Ensure that UDP length + IP header length == IP length */
-	/* Copy IP header length to X. */
-	BPF_STMT(BPF_LDX + BPF_MEM, BPF_M_IPHLEN),
-	/* Add UDP length (A) to IP header length (X). */
-	BPF_STMT(BPF_ALU + BPF_ADD + BPF_X, 0),
-	/* Store result in X. */
-	BPF_STMT(BPF_MISC + BPF_TAX, 0),
-	/* Copy IP length to A. */
-	BPF_STMT(BPF_LD + BPF_MEM, BPF_M_IPLEN),
-	/* Ensure X == A. */
-	BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_X, 0, 1, 0),
-	BPF_STMT(BPF_RET + BPF_K, 0),
-
-	/* Advance to the BOOTP packet. */
-	BPF_STMT(BPF_LD + BPF_MEM, BPF_M_UDP),
-	BPF_STMT(BPF_ALU + BPF_ADD + BPF_K, 

CVS commit: src/external/bsd/dhcpcd/dist/src

2019-10-11 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Oct 11 11:03:59 UTC 2019

Modified Files:
src/external/bsd/dhcpcd/dist/src: bpf.c dhcp.c dhcp6.c dhcpcd.8.in
dhcpcd.c if-bsd.c if-options.c

Log Message:
Sync


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/bsd/dhcpcd/dist/src/bpf.c \
src/external/bsd/dhcpcd/dist/src/dhcp6.c
cvs rdiff -u -r1.27 -r1.28 src/external/bsd/dhcpcd/dist/src/dhcp.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in
cvs rdiff -u -r1.26 -r1.27 src/external/bsd/dhcpcd/dist/src/dhcpcd.c
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/dhcpcd/dist/src/if-bsd.c
cvs rdiff -u -r1.17 -r1.18 src/external/bsd/dhcpcd/dist/src/if-options.c

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



CVS commit: src/sys/dev

2019-10-11 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct 11 14:22:47 UTC 2019

Modified Files:
src/sys/dev/ic: am79900reg.h
src/sys/dev/pci: if_pcn.c

Log Message:
 Use unsigned to avoid undefined behavior. Found by kUBSan.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/ic/am79900reg.h
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/pci/if_pcn.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/ic/am79900reg.h
diff -u src/sys/dev/ic/am79900reg.h:1.9 src/sys/dev/ic/am79900reg.h:1.10
--- src/sys/dev/ic/am79900reg.h:1.9	Mon Apr 28 20:23:49 2008
+++ src/sys/dev/ic/am79900reg.h	Fri Oct 11 14:22:46 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: am79900reg.h,v 1.9 2008/04/28 20:23:49 martin Exp $	*/
+/*	$NetBSD: am79900reg.h,v 1.10 2019/10/11 14:22:46 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -96,7 +96,7 @@ struct leinit {
 };
 
 /* Receive message descriptor 1 (rmd1_bits) */
-#define	LE_R1_OWN	(1<<31)		/* LANCE owns the packet */
+#define	LE_R1_OWN	(1U<<31)	/* LANCE owns the packet */
 #define	LE_R1_ERR	(1<<30)		/* error summary */
 #define	LE_R1_FRAM	(1<<29)		/* framing error */
 #define	LE_R1_OFLO	(1<<28)		/* overflow error */
@@ -111,7 +111,7 @@ struct leinit {
 "\20\40OWN\37ERR\36FRAM\35OFLO\34CRC\33BUFF\32STP\31ENP"
 
 /* Transmit message descriptor 1 (tmd1_bits) */
-#define	LE_T1_OWN	(1<<31)		/* LANCE owns the packet */
+#define	LE_T1_OWN	(1U<<31)	/* LANCE owns the packet */
 #define	LE_T1_ERR	(1<<30)		/* error summary */
 #define	LE_T1_ADD_FCS	(1<<29)		/* add FCS (PCnet-PCI) */
 #define	LE_T1_NO_FCS	(1<<29)		/* no FCS (ILACC) */

Index: src/sys/dev/pci/if_pcn.c
diff -u src/sys/dev/pci/if_pcn.c:1.71 src/sys/dev/pci/if_pcn.c:1.72
--- src/sys/dev/pci/if_pcn.c:1.71	Tue May 28 07:41:49 2019
+++ src/sys/dev/pci/if_pcn.c	Fri Oct 11 14:22:46 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_pcn.c,v 1.71 2019/05/28 07:41:49 msaitoh Exp $	*/
+/*	$NetBSD: if_pcn.c,v 1.72 2019/10/11 14:22:46 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_pcn.c,v 1.71 2019/05/28 07:41:49 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_pcn.c,v 1.72 2019/10/11 14:22:46 msaitoh Exp $");
 
 #include 
 #include 
@@ -1708,12 +1708,13 @@ pcn_init(struct ifnet *ifp)
 	sc->sc_initblock.init_rdra = htole32(PCN_CDRXADDR(sc, 0));
 	sc->sc_initblock.init_tdra = htole32(PCN_CDTXADDR(sc, 0));
 	sc->sc_initblock.init_mode = htole32(sc->sc_mode |
-	((ffs(PCN_NTXDESC) - 1) << 28) |
+	(((uint32_t)ffs(PCN_NTXDESC) - 1) << 28) |
 	((ffs(PCN_NRXDESC) - 1) << 20));
 
 	/* Set the station address in the init block. */
 	sc->sc_initblock.init_padr[0] = htole32(enaddr[0] |
-	(enaddr[1] << 8) | (enaddr[2] << 16) | (enaddr[3] << 24));
+	(enaddr[1] << 8) | (enaddr[2] << 16) |
+	((uint32_t)enaddr[3] << 24));
 	sc->sc_initblock.init_padr[1] = htole32(enaddr[4] |
 	(enaddr[5] << 8));
 



CVS commit: src/sys/dev

2019-10-11 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct 11 14:22:47 UTC 2019

Modified Files:
src/sys/dev/ic: am79900reg.h
src/sys/dev/pci: if_pcn.c

Log Message:
 Use unsigned to avoid undefined behavior. Found by kUBSan.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/ic/am79900reg.h
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/pci/if_pcn.c

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