CVS commit: src/sys/dev/pci

2015-07-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jul 24 06:17:10 UTC 2015

Modified Files:
src/sys/dev/pci: oboe.c

Log Message:
Pass the device, not the struct softc to config_found().
Avoids a crash at attach time, PR port-i386/50076.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/dev/pci/oboe.c

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

Modified files:

Index: src/sys/dev/pci/oboe.c
diff -u src/sys/dev/pci/oboe.c:1.42 src/sys/dev/pci/oboe.c:1.43
--- src/sys/dev/pci/oboe.c:1.42	Sat Mar 29 19:28:25 2014
+++ src/sys/dev/pci/oboe.c	Fri Jul 24 06:17:10 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: oboe.c,v 1.42 2014/03/29 19:28:25 christos Exp $	*/
+/*	$NetBSD: oboe.c,v 1.43 2015/07/24 06:17:10 martin Exp $	*/
 
 /*	FVDL THIS DRIVER IS BROKEN FOR NON-i386 -- vtophys() usage	*/
 
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: oboe.c,v 1.42 2014/03/29 19:28:25 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: oboe.c,v 1.43 2015/07/24 06:17:10 martin Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -238,7 +238,7 @@ oboe_attach(device_t parent, device_t se
 
 	oboe_alloc_taskfile(sc);
 
-	sc-sc_child = config_found((void *)sc, ia, ir_print);
+	sc-sc_child = config_found(self, ia, ir_print);
 }
 
 static int



CVS commit: [netbsd-6-0] src/sys/netinet

2015-07-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jul 24 07:37:49 UTC 2015

Modified Files:
src/sys/netinet [netbsd-6-0]: tcp_input.c tcp_output.c

Log Message:
Pull up following revision(s) (requested by matt in ticket #1315):
sys/netinet/tcp_output.c: revision 1.184
sys/netinet/tcp_input.c: revision 1.343

If we are sending a window probe and there's unacked data in the
socket, make sure at least the persist timer is running.
Make sure that snd_win doesn't go negative.


To generate a diff of this commit:
cvs rdiff -u -r1.321 -r1.321.6.1 src/sys/netinet/tcp_input.c
cvs rdiff -u -r1.173.6.1 -r1.173.6.2 src/sys/netinet/tcp_output.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/tcp_input.c
diff -u src/sys/netinet/tcp_input.c:1.321 src/sys/netinet/tcp_input.c:1.321.6.1
--- src/sys/netinet/tcp_input.c:1.321	Wed Jan 11 14:39:08 2012
+++ src/sys/netinet/tcp_input.c	Fri Jul 24 07:37:49 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_input.c,v 1.321 2012/01/11 14:39:08 drochner Exp $	*/
+/*	$NetBSD: tcp_input.c,v 1.321.6.1 2015/07/24 07:37:49 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -148,7 +148,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tcp_input.c,v 1.321 2012/01/11 14:39:08 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: tcp_input.c,v 1.321.6.1 2015/07/24 07:37:49 martin Exp $);
 
 #include opt_inet.h
 #include opt_ipsec.h
@@ -2719,7 +2719,10 @@ after_listen:
 tp-t_lastm = NULL;
 			sbdrop(so-so_snd, acked);
 			tp-t_lastoff -= acked;
-			tp-snd_wnd -= acked;
+			if (tp-snd_wnd  acked)
+tp-snd_wnd -= acked;
+			else
+tp-snd_wnd = 0;
 			ourfinisacked = 0;
 		}
 		sowwakeup(so);

Index: src/sys/netinet/tcp_output.c
diff -u src/sys/netinet/tcp_output.c:1.173.6.1 src/sys/netinet/tcp_output.c:1.173.6.2
--- src/sys/netinet/tcp_output.c:1.173.6.1	Mon Nov  3 23:06:13 2014
+++ src/sys/netinet/tcp_output.c	Fri Jul 24 07:37:49 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_output.c,v 1.173.6.1 2014/11/03 23:06:13 msaitoh Exp $	*/
+/*	$NetBSD: tcp_output.c,v 1.173.6.2 2015/07/24 07:37:49 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -135,7 +135,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tcp_output.c,v 1.173.6.1 2014/11/03 23:06:13 msaitoh Exp $);
+__KERNEL_RCSID(0, $NetBSD: tcp_output.c,v 1.173.6.2 2015/07/24 07:37:49 martin Exp $);
 
 #include opt_inet.h
 #include opt_ipsec.h
@@ -1527,14 +1527,24 @@ send:
 		 * of retransmit time.
 		 */
 timer:
-		if (TCP_TIMER_ISARMED(tp, TCPT_REXMT) == 0 
-			((sack_rxmit  tp-snd_nxt != tp-snd_max) ||
-		tp-snd_nxt != tp-snd_una)) {
-			if (TCP_TIMER_ISARMED(tp, TCPT_PERSIST)) {
-TCP_TIMER_DISARM(tp, TCPT_PERSIST);
+		if (TCP_TIMER_ISARMED(tp, TCPT_REXMT) == 0) {
+			if ((sack_rxmit  tp-snd_nxt != tp-snd_max)
+			|| tp-snd_nxt != tp-snd_una) {
+if (TCP_TIMER_ISARMED(tp, TCPT_PERSIST)) {
+	TCP_TIMER_DISARM(tp, TCPT_PERSIST);
+	tp-t_rxtshift = 0;
+}
+TCP_TIMER_ARM(tp, TCPT_REXMT, tp-t_rxtcur);
+			} else if (len == 0  so-so_snd.sb_cc  0
+			 TCP_TIMER_ISARMED(tp, TCPT_PERSIST) == 0) {
+/*
+ * If we are sending a window probe and there's
+ * unacked data in the socket, make sure at
+ * least the persist timer is running.
+ */
 tp-t_rxtshift = 0;
+tcp_setpersist(tp);
 			}
-			TCP_TIMER_ARM(tp, TCPT_REXMT, tp-t_rxtcur);
 		}
 	} else
 		if (SEQ_GT(tp-snd_nxt + len, tp-snd_max))



CVS commit: [netbsd-6-1] src/sys/netinet

2015-07-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jul 24 07:36:05 UTC 2015

Modified Files:
src/sys/netinet [netbsd-6-1]: tcp_input.c tcp_output.c

Log Message:
Pull up following revision(s) (requested by matt in ticket #1315):
sys/netinet/tcp_output.c: revision 1.184
sys/netinet/tcp_input.c: revision 1.343

If we are sending a window probe and there's unacked data in the
socket, make sure at least the persist timer is running.
Make sure that snd_win doesn't go negative.


To generate a diff of this commit:
cvs rdiff -u -r1.321 -r1.321.8.1 src/sys/netinet/tcp_input.c
cvs rdiff -u -r1.173.8.1 -r1.173.8.2 src/sys/netinet/tcp_output.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/tcp_input.c
diff -u src/sys/netinet/tcp_input.c:1.321 src/sys/netinet/tcp_input.c:1.321.8.1
--- src/sys/netinet/tcp_input.c:1.321	Wed Jan 11 14:39:08 2012
+++ src/sys/netinet/tcp_input.c	Fri Jul 24 07:36:05 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_input.c,v 1.321 2012/01/11 14:39:08 drochner Exp $	*/
+/*	$NetBSD: tcp_input.c,v 1.321.8.1 2015/07/24 07:36:05 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -148,7 +148,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tcp_input.c,v 1.321 2012/01/11 14:39:08 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: tcp_input.c,v 1.321.8.1 2015/07/24 07:36:05 martin Exp $);
 
 #include opt_inet.h
 #include opt_ipsec.h
@@ -2719,7 +2719,10 @@ after_listen:
 tp-t_lastm = NULL;
 			sbdrop(so-so_snd, acked);
 			tp-t_lastoff -= acked;
-			tp-snd_wnd -= acked;
+			if (tp-snd_wnd  acked)
+tp-snd_wnd -= acked;
+			else
+tp-snd_wnd = 0;
 			ourfinisacked = 0;
 		}
 		sowwakeup(so);

Index: src/sys/netinet/tcp_output.c
diff -u src/sys/netinet/tcp_output.c:1.173.8.1 src/sys/netinet/tcp_output.c:1.173.8.2
--- src/sys/netinet/tcp_output.c:1.173.8.1	Mon Nov  3 23:05:59 2014
+++ src/sys/netinet/tcp_output.c	Fri Jul 24 07:36:05 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_output.c,v 1.173.8.1 2014/11/03 23:05:59 msaitoh Exp $	*/
+/*	$NetBSD: tcp_output.c,v 1.173.8.2 2015/07/24 07:36:05 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -135,7 +135,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tcp_output.c,v 1.173.8.1 2014/11/03 23:05:59 msaitoh Exp $);
+__KERNEL_RCSID(0, $NetBSD: tcp_output.c,v 1.173.8.2 2015/07/24 07:36:05 martin Exp $);
 
 #include opt_inet.h
 #include opt_ipsec.h
@@ -1527,14 +1527,24 @@ send:
 		 * of retransmit time.
 		 */
 timer:
-		if (TCP_TIMER_ISARMED(tp, TCPT_REXMT) == 0 
-			((sack_rxmit  tp-snd_nxt != tp-snd_max) ||
-		tp-snd_nxt != tp-snd_una)) {
-			if (TCP_TIMER_ISARMED(tp, TCPT_PERSIST)) {
-TCP_TIMER_DISARM(tp, TCPT_PERSIST);
+		if (TCP_TIMER_ISARMED(tp, TCPT_REXMT) == 0) {
+			if ((sack_rxmit  tp-snd_nxt != tp-snd_max)
+			|| tp-snd_nxt != tp-snd_una) {
+if (TCP_TIMER_ISARMED(tp, TCPT_PERSIST)) {
+	TCP_TIMER_DISARM(tp, TCPT_PERSIST);
+	tp-t_rxtshift = 0;
+}
+TCP_TIMER_ARM(tp, TCPT_REXMT, tp-t_rxtcur);
+			} else if (len == 0  so-so_snd.sb_cc  0
+			 TCP_TIMER_ISARMED(tp, TCPT_PERSIST) == 0) {
+/*
+ * If we are sending a window probe and there's
+ * unacked data in the socket, make sure at
+ * least the persist timer is running.
+ */
 tp-t_rxtshift = 0;
+tcp_setpersist(tp);
 			}
-			TCP_TIMER_ARM(tp, TCPT_REXMT, tp-t_rxtcur);
 		}
 	} else
 		if (SEQ_GT(tp-snd_nxt + len, tp-snd_max))



CVS commit: [netbsd-6-1] src/doc

2015-07-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jul 24 07:36:52 UTC 2015

Modified Files:
src/doc [netbsd-6-1]: CHANGES-6.1.6

Log Message:
Ticket #1315


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.44 -r1.1.2.45 src/doc/CHANGES-6.1.6

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-6.1.6
diff -u src/doc/CHANGES-6.1.6:1.1.2.44 src/doc/CHANGES-6.1.6:1.1.2.45
--- src/doc/CHANGES-6.1.6:1.1.2.44	Sun Jul 12 19:01:07 2015
+++ src/doc/CHANGES-6.1.6	Fri Jul 24 07:36:51 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1.6,v 1.1.2.44 2015/07/12 19:01:07 snj Exp $
+# $NetBSD: CHANGES-6.1.6,v 1.1.2.45 2015/07/24 07:36:51 martin Exp $
 
 A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6
 release:
@@ -5976,3 +5976,12 @@ doc/3RDPARTY	patch
 	Update OpenSSL to 1.0.1p.
 	[spz, ticket #1313]
 
+sys/netinet/tcp_input.c1.343
+sys/netinet/tcp_output.c			1.184
+
+	If we are sending a window probe and there's unacked data in the
+	socket, make sure at least the persist timer is running.
+	Make sure that snd_win doesn't go negative.
+	[matt, ticket #1315]
+
+



CVS commit: src/share/man/man9

2015-07-24 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Fri Jul 24 07:40:58 UTC 2015

Modified Files:
src/share/man/man9: pci_msi.9

Log Message:
fix typo. reported by nonaka@n.o


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man9/pci_msi.9

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

Modified files:

Index: src/share/man/man9/pci_msi.9
diff -u src/share/man/man9/pci_msi.9:1.5 src/share/man/man9/pci_msi.9:1.6
--- src/share/man/man9/pci_msi.9:1.5	Tue Jul 21 12:05:02 2015
+++ src/share/man/man9/pci_msi.9	Fri Jul 24 07:40:58 2015
@@ -1,4 +1,4 @@
-.\ $NetBSD: pci_msi.9,v 1.5 2015/07/21 12:05:02 wiz Exp $
+.\ $NetBSD: pci_msi.9,v 1.6 2015/07/24 07:40:58 knakahara Exp $
 .\
 .\ Copyright (c) 2015 Internet Initiative Japan Inc.
 .\ All rights reserved.
@@ -294,7 +294,7 @@ is
 .Ed
 on return.
 .Pp
-.Ft pci_intr_type_t
+.Fn pci_intr_type
 returns the interrupt type of
 .Fa ih .
 The return value is



CVS commit: [netbsd-6] src/doc

2015-07-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jul 24 07:40:57 UTC 2015

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket #1315


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.222 -r1.1.2.223 src/doc/CHANGES-6.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-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.222 src/doc/CHANGES-6.2:1.1.2.223
--- src/doc/CHANGES-6.2:1.1.2.222	Sun Jul 12 18:57:29 2015
+++ src/doc/CHANGES-6.2	Fri Jul 24 07:40:57 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.222 2015/07/12 18:57:29 snj Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.223 2015/07/24 07:40:57 martin Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -11790,3 +11790,11 @@ doc/3RDPARTY	patch
 	Update OpenSSL to 1.0.1p.
 	[spz, ticket #1313]
 
+sys/netinet/tcp_input.c1.343
+sys/netinet/tcp_output.c			1.184
+
+	If we are sending a window probe and there's unacked data in the
+	socket, make sure at least the persist timer is running.
+	Make sure that snd_win doesn't go negative.
+	[matt, ticket #1315]
+



CVS commit: [netbsd-5-1] src/doc

2015-07-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jul 24 07:47:34 UTC 2015

Modified Files:
src/doc [netbsd-5-1]: CHANGES-5.1.6

Log Message:
Ticket #1973


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.32 -r1.1.2.33 src/doc/CHANGES-5.1.6

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-5.1.6
diff -u src/doc/CHANGES-5.1.6:1.1.2.32 src/doc/CHANGES-5.1.6:1.1.2.33
--- src/doc/CHANGES-5.1.6:1.1.2.32	Wed Jul  1 07:19:29 2015
+++ src/doc/CHANGES-5.1.6	Fri Jul 24 07:47:34 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1.6,v 1.1.2.32 2015/07/01 07:19:29 bouyer Exp $
+# $NetBSD: CHANGES-5.1.6,v 1.1.2.33 2015/07/24 07:47:34 martin Exp $
 
 A complete list of changes from the NetBSD 5.1.5 release to the NetBSD 5.1.6
 release:
@@ -2647,3 +2647,11 @@ usr.bin/calendar/calendar.c			1.51
 	are serious if they happen.
 	[dholland, ticket #1971]
 
+sys/netinet/tcp_input.c1.343
+sys/netinet/tcp_output.c			1.184
+
+	If we are sending a window probe and there's unacked data in the
+	socket, make sure at least the persist timer is running.
+	Make sure that snd_win doesn't go negative.
+	[matt, ticket #1973]
+



CVS commit: [netbsd-5-1] src/sys/netinet

2015-07-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jul 24 07:47:03 UTC 2015

Modified Files:
src/sys/netinet [netbsd-5-1]: tcp_input.c tcp_output.c

Log Message:
Pull up following revision(s) (requested by matt in ticket #1973):
sys/netinet/tcp_output.c: revision 1.184
sys/netinet/tcp_input.c: revision 1.343

If we are sending a window probe and there's unacked data in the
socket, make sure at least the persist timer is running.
Make sure that snd_win doesn't go negative.


To generate a diff of this commit:
cvs rdiff -u -r1.291.4.5 -r1.291.4.5.2.1 src/sys/netinet/tcp_input.c
cvs rdiff -u -r1.167.20.1 -r1.167.20.2 src/sys/netinet/tcp_output.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/tcp_input.c
diff -u src/sys/netinet/tcp_input.c:1.291.4.5 src/sys/netinet/tcp_input.c:1.291.4.5.2.1
--- src/sys/netinet/tcp_input.c:1.291.4.5	Fri Jun 11 23:36:07 2010
+++ src/sys/netinet/tcp_input.c	Fri Jul 24 07:47:02 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_input.c,v 1.291.4.5 2010/06/11 23:36:07 riz Exp $	*/
+/*	$NetBSD: tcp_input.c,v 1.291.4.5.2.1 2015/07/24 07:47:02 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -145,7 +145,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tcp_input.c,v 1.291.4.5 2010/06/11 23:36:07 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: tcp_input.c,v 1.291.4.5.2.1 2015/07/24 07:47:02 martin Exp $);
 
 #include opt_inet.h
 #include opt_ipsec.h
@@ -2438,7 +2438,10 @@ after_listen:
 tp-t_lastm = NULL;
 			sbdrop(so-so_snd, acked);
 			tp-t_lastoff -= acked;
-			tp-snd_wnd -= acked;
+			if (tp-snd_wnd  acked)
+tp-snd_wnd -= acked;
+			else
+tp-snd_wnd = 0;
 			ourfinisacked = 0;
 		}
 		sowwakeup(so);

Index: src/sys/netinet/tcp_output.c
diff -u src/sys/netinet/tcp_output.c:1.167.20.1 src/sys/netinet/tcp_output.c:1.167.20.2
--- src/sys/netinet/tcp_output.c:1.167.20.1	Tue Mar 29 20:13:03 2011
+++ src/sys/netinet/tcp_output.c	Fri Jul 24 07:47:02 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_output.c,v 1.167.20.1 2011/03/29 20:13:03 riz Exp $	*/
+/*	$NetBSD: tcp_output.c,v 1.167.20.2 2015/07/24 07:47:02 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -135,7 +135,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tcp_output.c,v 1.167.20.1 2011/03/29 20:13:03 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: tcp_output.c,v 1.167.20.2 2015/07/24 07:47:02 martin Exp $);
 
 #include opt_inet.h
 #include opt_ipsec.h
@@ -1524,14 +1524,24 @@ send:
 		 * of retransmit time.
 		 */
 timer:
-		if (TCP_TIMER_ISARMED(tp, TCPT_REXMT) == 0 
-			((sack_rxmit  tp-snd_nxt != tp-snd_max) ||
-		tp-snd_nxt != tp-snd_una)) {
-			if (TCP_TIMER_ISARMED(tp, TCPT_PERSIST)) {
-TCP_TIMER_DISARM(tp, TCPT_PERSIST);
+		if (TCP_TIMER_ISARMED(tp, TCPT_REXMT) == 0) {
+			if ((sack_rxmit  tp-snd_nxt != tp-snd_max)
+			|| tp-snd_nxt != tp-snd_una) {
+if (TCP_TIMER_ISARMED(tp, TCPT_PERSIST)) {
+	TCP_TIMER_DISARM(tp, TCPT_PERSIST);
+	tp-t_rxtshift = 0;
+}
+TCP_TIMER_ARM(tp, TCPT_REXMT, tp-t_rxtcur);
+			} else if (len == 0  so-so_snd.sb_cc  0
+			 TCP_TIMER_ISARMED(tp, TCPT_PERSIST) == 0) {
+/*
+ * If we are sending a window probe and there's
+ * unacked data in the socket, make sure at
+ * least the persist timer is running.
+ */
 tp-t_rxtshift = 0;
+tcp_setpersist(tp);
 			}
-			TCP_TIMER_ARM(tp, TCPT_REXMT, tp-t_rxtcur);
 		}
 	} else
 		if (SEQ_GT(tp-snd_nxt + len, tp-snd_max))



CVS commit: [netbsd-7] src/doc

2015-07-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jul 24 07:32:50 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.0

Log Message:
Ticket #886


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.347 -r1.1.2.348 src/doc/CHANGES-7.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-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.347 src/doc/CHANGES-7.0:1.1.2.348
--- src/doc/CHANGES-7.0:1.1.2.347	Thu Jul 23 18:45:15 2015
+++ src/doc/CHANGES-7.0	Fri Jul 24 07:32:50 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.347 2015/07/23 18:45:15 snj Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.348 2015/07/24 07:32:50 martin Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -33440,3 +33440,11 @@ sys/sys/param.h	patched by hand
 	Welcome to 7.0_RC2!
 	[snj]
 
+sys/netinet/tcp_input.c1.343
+sys/netinet/tcp_output.c			1.184
+
+	If we are sending a window probe and there's unacked data in the
+	socket, make sure at least the persist timer is running.
+	Make sure that snd_win doesn't go negative.
+	[matt, ticket #886]
+



CVS commit: [netbsd-6-0] src/doc

2015-07-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jul 24 07:38:24 UTC 2015

Modified Files:
src/doc [netbsd-6-0]: CHANGES-6.0.7

Log Message:
Ticket #1315


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.45 -r1.1.2.46 src/doc/CHANGES-6.0.7

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-6.0.7
diff -u src/doc/CHANGES-6.0.7:1.1.2.45 src/doc/CHANGES-6.0.7:1.1.2.46
--- src/doc/CHANGES-6.0.7:1.1.2.45	Sun Jul 12 19:00:48 2015
+++ src/doc/CHANGES-6.0.7	Fri Jul 24 07:38:24 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.7,v 1.1.2.45 2015/07/12 19:00:48 snj Exp $
+# $NetBSD: CHANGES-6.0.7,v 1.1.2.46 2015/07/24 07:38:24 martin Exp $
 
 A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7
 release:
@@ -6256,3 +6256,11 @@ doc/3RDPARTY	patch
 	Update OpenSSL to 1.0.1p.
 	[spz, ticket #1313]
 
+sys/netinet/tcp_input.c1.343
+sys/netinet/tcp_output.c			1.184
+
+	If we are sending a window probe and there's unacked data in the
+	socket, make sure at least the persist timer is running.
+	Make sure that snd_win doesn't go negative.
+	[matt, ticket #1315]
+



CVS commit: src/sys/ufs/lfs

2015-07-24 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Fri Jul 24 06:51:46 UTC 2015

Modified Files:
src/sys/ufs/lfs: lfs.h

Log Message:
ulfs2_dinode, having never actually been used with lfs, doesn't have a
di_inumber field. Fix that. First preliminary step on PR 5.


To generate a diff of this commit:
cvs rdiff -u -r1.162 -r1.163 src/sys/ufs/lfs/lfs.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/ufs/lfs/lfs.h
diff -u src/sys/ufs/lfs/lfs.h:1.162 src/sys/ufs/lfs/lfs.h:1.163
--- src/sys/ufs/lfs/lfs.h:1.162	Sun May 31 15:44:31 2015
+++ src/sys/ufs/lfs/lfs.h	Fri Jul 24 06:51:46 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs.h,v 1.162 2015/05/31 15:44:31 hannken Exp $	*/
+/*	$NetBSD: lfs.h,v 1.163 2015/07/24 06:51:46 dholland Exp $	*/
 
 /*  from NetBSD: dinode.h,v 1.22 2013/01/22 09:39:18 dholland Exp  */
 /*  from NetBSD: dir.h,v 1.21 2009/07/22 04:49:19 dholland Exp  */
@@ -396,7 +396,8 @@ struct ulfs2_dinode {
 	int64_t		di_db[ULFS_NDADDR]; /* 112: Direct disk blocks. */
 	int64_t		di_ib[ULFS_NIADDR]; /* 208: Indirect disk blocks. */
 	u_int64_t	di_modrev;	/* 232: i_modrev for NFSv4 */
-	int64_t		di_spare[2];	/* 240: Reserved; currently unused */
+	u_int32_t	di_inumber;	/* 240: Inode number */
+	u_int32_t	di_spare[3];	/* 244: Reserved; currently unused */
 };
 
 /*



CVS commit: src

2015-07-24 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Fri Jul 24 06:59:32 UTC 2015

Modified Files:
src/libexec/lfs_cleanerd: cleaner.h coalesce.c lfs_cleanerd.c
src/sbin/dump_lfs: lfs_inode.c
src/sbin/fsck_lfs: inode.c lfs.c main.c pass1.c pass5.c pass6.c
segwrite.c setup.c utilities.c
src/sbin/newfs_lfs: make_lfs.c
src/sbin/resize_lfs: resize_lfs.c
src/sbin/scan_ffs: scan_ffs.c
src/sys/ufs/lfs: lfs.h lfs_alloc.c lfs_balloc.c lfs_bio.c lfs_inode.c
lfs_pages.c lfs_rfw.c lfs_segment.c lfs_subr.c lfs_syscalls.c
lfs_vfsops.c lfs_vnops.c ulfs_inode.h ulfs_quota2.c
ulfs_readwrite.c
src/usr.sbin/dumplfs: dumplfs.c

Log Message:
More lfs superblock accessors.
(This changes the rest of the code over; all the accessors were
already added.)

The difference between this commit and the previous one is arbitrary,
but the previous one passed the regression tests on its own so I'm
keeping it separate to help with any bisections that might be needed
in the future.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/libexec/lfs_cleanerd/cleaner.h
cvs rdiff -u -r1.25 -r1.26 src/libexec/lfs_cleanerd/coalesce.c
cvs rdiff -u -r1.39 -r1.40 src/libexec/lfs_cleanerd/lfs_cleanerd.c
cvs rdiff -u -r1.20 -r1.21 src/sbin/dump_lfs/lfs_inode.c
cvs rdiff -u -r1.55 -r1.56 src/sbin/fsck_lfs/inode.c
cvs rdiff -u -r1.46 -r1.47 src/sbin/fsck_lfs/lfs.c
cvs rdiff -u -r1.50 -r1.51 src/sbin/fsck_lfs/main.c
cvs rdiff -u -r1.38 -r1.39 src/sbin/fsck_lfs/pass1.c \
src/sbin/fsck_lfs/utilities.c
cvs rdiff -u -r1.30 -r1.31 src/sbin/fsck_lfs/pass5.c
cvs rdiff -u -r1.35 -r1.36 src/sbin/fsck_lfs/pass6.c
cvs rdiff -u -r1.32 -r1.33 src/sbin/fsck_lfs/segwrite.c
cvs rdiff -u -r1.47 -r1.48 src/sbin/fsck_lfs/setup.c
cvs rdiff -u -r1.32 -r1.33 src/sbin/newfs_lfs/make_lfs.c
cvs rdiff -u -r1.10 -r1.11 src/sbin/resize_lfs/resize_lfs.c
cvs rdiff -u -r1.26 -r1.27 src/sbin/scan_ffs/scan_ffs.c
cvs rdiff -u -r1.164 -r1.165 src/sys/ufs/lfs/lfs.h
cvs rdiff -u -r1.122 -r1.123 src/sys/ufs/lfs/lfs_alloc.c
cvs rdiff -u -r1.82 -r1.83 src/sys/ufs/lfs/lfs_balloc.c \
src/sys/ufs/lfs/lfs_subr.c
cvs rdiff -u -r1.129 -r1.130 src/sys/ufs/lfs/lfs_bio.c
cvs rdiff -u -r1.138 -r1.139 src/sys/ufs/lfs/lfs_inode.c
cvs rdiff -u -r1.2 -r1.3 src/sys/ufs/lfs/lfs_pages.c
cvs rdiff -u -r1.22 -r1.23 src/sys/ufs/lfs/lfs_rfw.c
cvs rdiff -u -r1.242 -r1.243 src/sys/ufs/lfs/lfs_segment.c
cvs rdiff -u -r1.161 -r1.162 src/sys/ufs/lfs/lfs_syscalls.c
cvs rdiff -u -r1.327 -r1.328 src/sys/ufs/lfs/lfs_vfsops.c
cvs rdiff -u -r1.274 -r1.275 src/sys/ufs/lfs/lfs_vnops.c
cvs rdiff -u -r1.13 -r1.14 src/sys/ufs/lfs/ulfs_inode.h
cvs rdiff -u -r1.19 -r1.20 src/sys/ufs/lfs/ulfs_quota2.c
cvs rdiff -u -r1.18 -r1.19 src/sys/ufs/lfs/ulfs_readwrite.c
cvs rdiff -u -r1.43 -r1.44 src/usr.sbin/dumplfs/dumplfs.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/lfs_cleanerd/cleaner.h
diff -u src/libexec/lfs_cleanerd/cleaner.h:1.6 src/libexec/lfs_cleanerd/cleaner.h:1.7
--- src/libexec/lfs_cleanerd/cleaner.h:1.6	Fri Jul 24 06:56:41 2015
+++ src/libexec/lfs_cleanerd/cleaner.h	Fri Jul 24 06:59:31 2015
@@ -52,7 +52,8 @@ struct clfs {
 	static __unused inline void\
 	clfs_sb_add##field(struct clfs *fs, type val)		\
 	{			\
-		fs-lfs_dlfs.dlfs_##field += val;		\
+		type *p = fs-lfs_dlfs.dlfs_##field;		\
+		*p += val;	\
 	}
 
 /* more ugh... */
@@ -61,22 +62,57 @@ CLFS_DEF_SB_ACCESSOR(u_int32_t, bsize);
 CLFS_DEF_SB_ACCESSOR(u_int32_t, fsize);
 CLFS_DEF_SB_ACCESSOR(u_int32_t, frag);
 CLFS_DEF_SB_ACCESSOR(u_int32_t, ifile);
+CLFS_DEF_SB_ACCESSOR(u_int32_t, inopb);
 CLFS_DEF_SB_ACCESSOR(u_int32_t, ifpb);
 CLFS_DEF_SB_ACCESSOR(u_int32_t, sepb);
 CLFS_DEF_SB_ACCESSOR(u_int32_t, nseg);
 CLFS_DEF_SB_ACCESSOR(u_int32_t, cleansz);
 CLFS_DEF_SB_ACCESSOR(u_int32_t, segtabsz);
+CLFS_DEF_SB_ACCESSOR(u_int64_t, bmask);
+CLFS_DEF_SB_ACCESSOR(u_int32_t, bshift);
+CLFS_DEF_SB_ACCESSOR(u_int64_t, ffmask);
+CLFS_DEF_SB_ACCESSOR(u_int32_t, ffshift);
+CLFS_DEF_SB_ACCESSOR(u_int32_t, fbshift);
+CLFS_DEF_SB_ACCESSOR(u_int32_t, blktodb);
+CLFS_DEF_SB_ACCESSOR(u_int32_t, minfreeseg);
+CLFS_DEF_SB_ACCESSOR(u_int32_t, sumsize);
+CLFS_DEF_SB_ACCESSOR(u_int32_t, ibsize);
+CLFS_DEF_SB_ACCESSOR(int32_t, s0addr);
+static __unused inline int32_t
+clfs_sb_getsboff(struct clfs *fs, unsigned n)
+{
+	assert(n  LFS_MAXNUMSB);
+	return fs-lfs_dlfs.dlfs_sboffs[n];
+}
+static __unused inline const char *
+clfs_sb_getfsmnt(struct clfs *fs)
+{
+	return (const char *)fs-lfs_dlfs.dlfs_fsmnt;
+}
 
 /* still more ugh... */
 #define lfs_sb_getssize(fs) clfs_sb_getssize(fs)
 #define lfs_sb_getbsize(fs) clfs_sb_getbsize(fs)
 #define lfs_sb_getfsize(fs) clfs_sb_getfsize(fs)
 #define lfs_sb_getfrag(fs) clfs_sb_getfrag(fs)
+#define lfs_sb_getinopb(fs) clfs_sb_getinopb(fs)
 #define lfs_sb_getifpb(fs) clfs_sb_getifpb(fs)
 #define 

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

2015-07-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jul 24 07:40:17 UTC 2015

Modified Files:
src/sys/netinet [netbsd-6]: tcp_input.c tcp_output.c

Log Message:
Pull up following revision(s) (requested by matt in ticket #1315):
sys/netinet/tcp_output.c: revision 1.184
sys/netinet/tcp_input.c: revision 1.343

If we are sending a window probe and there's unacked data in the
socket, make sure at least the persist timer is running.
Make sure that snd_win doesn't go negative.


To generate a diff of this commit:
cvs rdiff -u -r1.321 -r1.321.2.1 src/sys/netinet/tcp_input.c
cvs rdiff -u -r1.173.2.1 -r1.173.2.2 src/sys/netinet/tcp_output.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/tcp_input.c
diff -u src/sys/netinet/tcp_input.c:1.321 src/sys/netinet/tcp_input.c:1.321.2.1
--- src/sys/netinet/tcp_input.c:1.321	Wed Jan 11 14:39:08 2012
+++ src/sys/netinet/tcp_input.c	Fri Jul 24 07:40:17 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_input.c,v 1.321 2012/01/11 14:39:08 drochner Exp $	*/
+/*	$NetBSD: tcp_input.c,v 1.321.2.1 2015/07/24 07:40:17 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -148,7 +148,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tcp_input.c,v 1.321 2012/01/11 14:39:08 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: tcp_input.c,v 1.321.2.1 2015/07/24 07:40:17 martin Exp $);
 
 #include opt_inet.h
 #include opt_ipsec.h
@@ -2719,7 +2719,10 @@ after_listen:
 tp-t_lastm = NULL;
 			sbdrop(so-so_snd, acked);
 			tp-t_lastoff -= acked;
-			tp-snd_wnd -= acked;
+			if (tp-snd_wnd  acked)
+tp-snd_wnd -= acked;
+			else
+tp-snd_wnd = 0;
 			ourfinisacked = 0;
 		}
 		sowwakeup(so);

Index: src/sys/netinet/tcp_output.c
diff -u src/sys/netinet/tcp_output.c:1.173.2.1 src/sys/netinet/tcp_output.c:1.173.2.2
--- src/sys/netinet/tcp_output.c:1.173.2.1	Mon Nov  3 23:05:45 2014
+++ src/sys/netinet/tcp_output.c	Fri Jul 24 07:40:17 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_output.c,v 1.173.2.1 2014/11/03 23:05:45 msaitoh Exp $	*/
+/*	$NetBSD: tcp_output.c,v 1.173.2.2 2015/07/24 07:40:17 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -135,7 +135,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tcp_output.c,v 1.173.2.1 2014/11/03 23:05:45 msaitoh Exp $);
+__KERNEL_RCSID(0, $NetBSD: tcp_output.c,v 1.173.2.2 2015/07/24 07:40:17 martin Exp $);
 
 #include opt_inet.h
 #include opt_ipsec.h
@@ -1527,14 +1527,24 @@ send:
 		 * of retransmit time.
 		 */
 timer:
-		if (TCP_TIMER_ISARMED(tp, TCPT_REXMT) == 0 
-			((sack_rxmit  tp-snd_nxt != tp-snd_max) ||
-		tp-snd_nxt != tp-snd_una)) {
-			if (TCP_TIMER_ISARMED(tp, TCPT_PERSIST)) {
-TCP_TIMER_DISARM(tp, TCPT_PERSIST);
+		if (TCP_TIMER_ISARMED(tp, TCPT_REXMT) == 0) {
+			if ((sack_rxmit  tp-snd_nxt != tp-snd_max)
+			|| tp-snd_nxt != tp-snd_una) {
+if (TCP_TIMER_ISARMED(tp, TCPT_PERSIST)) {
+	TCP_TIMER_DISARM(tp, TCPT_PERSIST);
+	tp-t_rxtshift = 0;
+}
+TCP_TIMER_ARM(tp, TCPT_REXMT, tp-t_rxtcur);
+			} else if (len == 0  so-so_snd.sb_cc  0
+			 TCP_TIMER_ISARMED(tp, TCPT_PERSIST) == 0) {
+/*
+ * If we are sending a window probe and there's
+ * unacked data in the socket, make sure at
+ * least the persist timer is running.
+ */
 tp-t_rxtshift = 0;
+tcp_setpersist(tp);
 			}
-			TCP_TIMER_ARM(tp, TCPT_REXMT, tp-t_rxtcur);
 		}
 	} else
 		if (SEQ_GT(tp-snd_nxt + len, tp-snd_max))



CVS commit: [netbsd-5-2] src/doc

2015-07-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jul 24 07:46:03 UTC 2015

Modified Files:
src/doc [netbsd-5-2]: CHANGES-5.2.4

Log Message:
Ticket #1973


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.33 -r1.1.2.34 src/doc/CHANGES-5.2.4

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

Modified files:

Index: src/doc/CHANGES-5.2.4
diff -u src/doc/CHANGES-5.2.4:1.1.2.33 src/doc/CHANGES-5.2.4:1.1.2.34
--- src/doc/CHANGES-5.2.4:1.1.2.33	Wed Jul  1 07:19:30 2015
+++ src/doc/CHANGES-5.2.4	Fri Jul 24 07:46:03 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2.4,v 1.1.2.33 2015/07/01 07:19:30 bouyer Exp $
+# $NetBSD: CHANGES-5.2.4,v 1.1.2.34 2015/07/24 07:46:03 martin Exp $
 
 A complete list of changes from the NetBSD 5.2.3 release to the NetBSD 5.2.4
 release:
@@ -2647,3 +2647,11 @@ usr.bin/calendar/calendar.c			1.51
 	are serious if they happen.
 	[dholland, ticket #1971]
 
+sys/netinet/tcp_input.c1.343
+sys/netinet/tcp_output.c			1.184
+
+	If we are sending a window probe and there's unacked data in the
+	socket, make sure at least the persist timer is running.
+	Make sure that snd_win doesn't go negative.
+	[matt, ticket #1973]
+



CVS commit: src/sys/arch/x86/pci

2015-07-24 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Fri Jul 24 06:49:58 UTC 2015

Modified Files:
src/sys/arch/x86/pci: pci_intr_machdep.c

Log Message:
fix pci_intr_alloc(..., NULL, 0). reported nonaka@n.o


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/x86/pci/pci_intr_machdep.c

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

Modified files:

Index: src/sys/arch/x86/pci/pci_intr_machdep.c
diff -u src/sys/arch/x86/pci/pci_intr_machdep.c:1.34 src/sys/arch/x86/pci/pci_intr_machdep.c:1.35
--- src/sys/arch/x86/pci/pci_intr_machdep.c:1.34	Tue Jul 21 03:10:42 2015
+++ src/sys/arch/x86/pci/pci_intr_machdep.c	Fri Jul 24 06:49:58 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_intr_machdep.c,v 1.34 2015/07/21 03:10:42 knakahara Exp $	*/
+/*	$NetBSD: pci_intr_machdep.c,v 1.35 2015/07/24 06:49:58 knakahara Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 2009 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pci_intr_machdep.c,v 1.34 2015/07/21 03:10:42 knakahara Exp $);
+__KERNEL_RCSID(0, $NetBSD: pci_intr_machdep.c,v 1.35 2015/07/24 06:49:58 knakahara Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -484,7 +484,8 @@ pci_intr_alloc(const struct pci_attach_a
 		}
 	}
 
-	memset(counts, 0, sizeof(counts[0]) * PCI_INTR_TYPE_SIZE);
+	if (counts != NULL)
+		memset(counts, 0, sizeof(counts[0]) * PCI_INTR_TYPE_SIZE);
 	error = EINVAL;
 
 	/* try MSI-X */
@@ -493,6 +494,8 @@ pci_intr_alloc(const struct pci_attach_a
 	if (msix_count  0) {
 		error = pci_msix_alloc_exact(pa, ihps, msix_count);
 		if (error == 0) {
+			KASSERTMSG(counts != NULL,
+			If MSI-X is used, counts must not be NULL.);
 			counts[PCI_INTR_TYPE_MSIX] = msix_count;
 			goto out;
 		}
@@ -504,10 +507,9 @@ pci_intr_alloc(const struct pci_attach_a
 	if (msi_count  0) {
 		error = pci_msi_alloc_exact(pa, ihps, msi_count);
 		if (error == 0) {
-			if (counts != NULL) {
+			if (counts != NULL)
 counts[PCI_INTR_TYPE_MSI] = msi_count;
-goto out;
-			}
+			goto out;
 		}
 	}
 



CVS commit: src/sys/lib/libsa

2015-07-24 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Fri Jul 24 06:53:24 UTC 2015

Modified Files:
src/sys/lib/libsa: lfsv1.c lfsv2.c ufs.c

Log Message:
Rearrange the structures in the lfs bootbollocks slightly.
This generates the same output (at least on amd64) but will be more
robust until we're ready to deploy lfs64 bootblocks too.

XXX: I don't think these actually work right now, and the logic for
picking between v1 and v2 lfs formats (which is not related to ffsv1
vs. ffsv2) is definitely broken. But I haven't made it any worse.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/lib/libsa/lfsv1.c src/sys/lib/libsa/lfsv2.c
cvs rdiff -u -r1.65 -r1.66 src/sys/lib/libsa/ufs.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/lib/libsa/lfsv1.c
diff -u src/sys/lib/libsa/lfsv1.c:1.9 src/sys/lib/libsa/lfsv1.c:1.10
--- src/sys/lib/libsa/lfsv1.c:1.9	Sun Jun 23 07:28:36 2013
+++ src/sys/lib/libsa/lfsv1.c	Fri Jul 24 06:53:24 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: lfsv1.c,v 1.9 2013/06/23 07:28:36 dholland Exp $ */
+/* $NetBSD: lfsv1.c,v 1.10 2015/07/24 06:53:24 dholland Exp $ */
 
 #define	LIBSA_LFS
 #define	REQUIRED_LFS_VERSION	1
@@ -15,12 +15,12 @@
 
 #define ufs_dinode		ulfs1_dinode
 
-#define	fs_bsize		lfs_ibsize
+#define	fs_bsize		dlfs_ibsize
 #define	IFILE_Vx		IFILE_V1
 
 #define	INOPBx(fs) LFS_INOPB(fs)
 
-#define UFS_NINDIR		LFS_NINDIR
+#define UFS_NINDIR(fs)		((fs)-dlfs_nindir)
 #define ufs_blkoff(a, b)	lfs_blkoff((a), (b))
 #define ufs_lblkno(a, b)	lfs_lblkno((a), (b))
 #define dblksize(a, b, c)	lfs_dblksize((a), (b), (c))
Index: src/sys/lib/libsa/lfsv2.c
diff -u src/sys/lib/libsa/lfsv2.c:1.9 src/sys/lib/libsa/lfsv2.c:1.10
--- src/sys/lib/libsa/lfsv2.c:1.9	Sun Jun 23 07:28:36 2013
+++ src/sys/lib/libsa/lfsv2.c	Fri Jul 24 06:53:24 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: lfsv2.c,v 1.9 2013/06/23 07:28:36 dholland Exp $ */
+/* $NetBSD: lfsv2.c,v 1.10 2015/07/24 06:53:24 dholland Exp $ */
 
 #define	LIBSA_LFS
 #define	REQUIRED_LFS_VERSION	2
@@ -16,7 +16,7 @@
 /* XXX wrong! but for now it won't build with ulfs2_dinode */
 #define ufs_dinode		ulfs1_dinode
 
-#define	fs_bsize		lfs_bsize
+#define	fs_bsize		dlfs_bsize
 #define	IFILE_Vx		IFILE
 
 #ifdef LFS_IFILE_FRAG_ADDRESSING	/* XXX see sys/ufs/lfs/ -- not tested */
@@ -25,7 +25,7 @@
 #define	INOPBx(fs) LFS_INOPB(fs)
 #endif
 
-#define UFS_NINDIR		LFS_NINDIR
+#define UFS_NINDIR(fs)		((fs)-dlfs_nindir)
 #define ufs_blkoff(a, b)	lfs_blkoff((a), (b))
 #define ufs_lblkno(a, b)	lfs_lblkno((a), (b))
 #define dblksize(a, b, c)	lfs_dblksize((a), (b), (c))

Index: src/sys/lib/libsa/ufs.c
diff -u src/sys/lib/libsa/ufs.c:1.65 src/sys/lib/libsa/ufs.c:1.66
--- src/sys/lib/libsa/ufs.c:1.65	Thu Mar 20 03:13:18 2014
+++ src/sys/lib/libsa/ufs.c	Fri Jul 24 06:53:24 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ufs.c,v 1.65 2014/03/20 03:13:18 christos Exp $	*/
+/*	$NetBSD: ufs.c,v 1.66 2015/07/24 06:53:24 dholland Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -101,19 +101,42 @@
 
 #ifdef LIBSA_LFS
 /*
- * In-core LFS superblock.  This exists only to placate the macros in lfs.h,
+ * In-core LFS superblock - just the on-disk one.
  */
-struct fs {
-	struct dlfs	lfs_dlfs;
-};
-#define fs_magic	lfs_magic
-#define fs_maxsymlinklen lfs_maxsymlinklen
+typedef struct dlfs FS;
+#define fs_magic	dlfs_magic
+#define fs_maxsymlinklen dlfs_maxsymlinklen
+
+/* XXX these will go away in the near future */
+#undef lfs_bmask
+#define lfs_bmask dlfs_bmask
+#undef lfs_ifile
+#define lfs_ifile dlfs_ifile
+#undef lfs_ifpb
+#define lfs_ifpb dlfs_ifpb
+#undef lfs_cleansz
+#define lfs_cleansz dlfs_cleansz
+#undef lfs_segtabsz
+#define lfs_segtabsz dlfs_segtabsz
+#undef lfs_idaddr
+#define lfs_idaddr dlfs_idaddr
+#undef lfs_inopb
+#define lfs_inopb dlfs_inopb
+#undef lfs_bshift
+#define lfs_bshift dlfs_bshift
+#undef lfs_bsize
+#define lfs_bsize dlfs_bsize
+#undef lfs_ffmask
+#define lfs_ffmask dlfs_ffmask
+#undef lfs_fsbtodb
+#define lfs_fsbtodb dlfs_fsbtodb
 
 #define FS_MAGIC	LFS_MAGIC
 #define SBLOCKSIZE	LFS_SBPAD
 #define SBLOCKOFFSET	LFS_LABELPAD
 #else
-/* NB ufs2 doesn't use the common suberblock code... */
+/* NB ufs2 doesn't use the common superblock code... */
+typedef struct fs FS;
 #define FS_MAGIC	FS_UFS1_MAGIC
 #define SBLOCKOFFSET	SBLOCK_UFS1
 #endif
@@ -167,7 +190,7 @@ typedef uint32_t	ino32_t;
  */
 struct file {
 	off_t		f_seekp;	/* seek pointer */
-	struct fs	*f_fs;		/* pointer to super-block */
+	FS		*f_fs;		/* pointer to super-block */
 	struct ufs_dinode	f_di;		/* copy of on-disk inode */
 	uint		f_nishift;	/* for blocks in indirect block */
 	indp_t		f_ind_cache_block;
@@ -183,10 +206,10 @@ static int block_map(struct open_file *,
 static int buf_read_file(struct open_file *, char **, size_t *);
 static int search_directory(const char *, int, struct open_file *, ino32_t *);
 #ifdef LIBSA_FFSv1
-static void ffs_oldfscompat(struct fs *);
+static void ffs_oldfscompat(FS *);
 

CVS commit: src/distrib/sets/lists/xserver

2015-07-24 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Jul 24 07:13:34 UTC 2015

Modified Files:
src/distrib/sets/lists/xserver: md.amd64 md.i386

Log Message:
un-obsolete xf86-video-intel-old components that were being installed
but deleted by postinstall.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/distrib/sets/lists/xserver/md.amd64
cvs rdiff -u -r1.100 -r1.101 src/distrib/sets/lists/xserver/md.i386

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/xserver/md.amd64
diff -u src/distrib/sets/lists/xserver/md.amd64:1.82 src/distrib/sets/lists/xserver/md.amd64:1.83
--- src/distrib/sets/lists/xserver/md.amd64:1.82	Fri Jul 24 04:29:27 2015
+++ src/distrib/sets/lists/xserver/md.amd64	Fri Jul 24 07:13:34 2015
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.82 2015/07/24 04:29:27 mrg Exp $
+# $NetBSD: md.amd64,v 1.83 2015/07/24 07:13:34 mrg Exp $
 ./usr/X11R6/bin/X	-unknown-	x11
 ./usr/X11R6/bin/XFree86	-unknown-	x11
 ./usr/X11R6/bin/gtf	-unknown-	x11
@@ -397,10 +397,10 @@
 ./usr/X11R7/lib/modules/drivers/ast_drv.so.1		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/ati_drv.so		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/ati_drv.so.6		-unknown-	xorg
-./usr/X11R7/lib/modules/drivers/ch7017_drv.so		-unknown-	obsolete
-./usr/X11R7/lib/modules/drivers/ch7017_drv.so.2		-unknown-	obsolete
-./usr/X11R7/lib/modules/drivers/ch7xxx_drv.so		-unknown-	obsolete
-./usr/X11R7/lib/modules/drivers/ch7xxx_drv.so.2		-unknown-	obsolete
+./usr/X11R7/lib/modules/drivers/ch7017_drv.so		-unknown-	xorg
+./usr/X11R7/lib/modules/drivers/ch7017_drv.so.2		-unknown-	xorg
+./usr/X11R7/lib/modules/drivers/ch7xxx_drv.so		-unknown-	xorg
+./usr/X11R7/lib/modules/drivers/ch7xxx_drv.so.2		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/chips_drv.so		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/chips_drv.so.1		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/cirrus_alpine.so	-unknown-	xorg
@@ -427,8 +427,8 @@
 ./usr/X11R7/lib/modules/drivers/intel_drv.so.2		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/intel_drv_old.so	-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/intel_drv_old.so.2	-unknown-	xorg
-./usr/X11R7/lib/modules/drivers/ivch_drv.so		-unknown-	obsolete
-./usr/X11R7/lib/modules/drivers/ivch_drv.so.2		-unknown-	obsolete
+./usr/X11R7/lib/modules/drivers/ivch_drv.so		-unknown-	xorg
+./usr/X11R7/lib/modules/drivers/ivch_drv.so.2		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/kbd_drv.so		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/kbd_drv.so.1		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/mach64_drv.so		-unknown-	xorg
@@ -459,16 +459,16 @@
 ./usr/X11R7/lib/modules/drivers/s3virge_drv.so.1	-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/savage_drv.so		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/savage_drv.so.2		-unknown-	xorg
-./usr/X11R7/lib/modules/drivers/sil164_drv.so		-unknown-	obsolete
-./usr/X11R7/lib/modules/drivers/sil164_drv.so.2		-unknown-	obsolete
+./usr/X11R7/lib/modules/drivers/sil164_drv.so		-unknown-	xorg
+./usr/X11R7/lib/modules/drivers/sil164_drv.so.2		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/siliconmotion_drv.so	-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/siliconmotion_drv.so.1	-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/sis_drv.so		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/sis_drv.so.0		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/tdfx_drv.so		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/tdfx_drv.so.1		-unknown-	xorg
-./usr/X11R7/lib/modules/drivers/tfp410_drv.so		-unknown-	obsolete
-./usr/X11R7/lib/modules/drivers/tfp410_drv.so.2		-unknown-	obsolete
+./usr/X11R7/lib/modules/drivers/tfp410_drv.so		-unknown-	xorg
+./usr/X11R7/lib/modules/drivers/tfp410_drv.so.2		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/tga_drv.so		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/tga_drv.so.1		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/trident_drv.so		-unknown-	xorg

Index: src/distrib/sets/lists/xserver/md.i386
diff -u src/distrib/sets/lists/xserver/md.i386:1.100 src/distrib/sets/lists/xserver/md.i386:1.101
--- src/distrib/sets/lists/xserver/md.i386:1.100	Wed Jul 22 16:37:33 2015
+++ src/distrib/sets/lists/xserver/md.i386	Fri Jul 24 07:13:34 2015
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.100 2015/07/22 16:37:33 mrg Exp $
+# $NetBSD: md.i386,v 1.101 2015/07/24 07:13:34 mrg Exp $
 ./usr/X11R6/bin/X	-unknown-	x11
 ./usr/X11R6/bin/XFree86	-unknown-	x11
 ./usr/X11R6/bin/gtf	-unknown-	x11
@@ -433,10 +433,10 @@
 ./usr/X11R7/lib/modules/drivers/ast_drv.so.1		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/ati_drv.so		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/ati_drv.so.6		-unknown-	xorg
-./usr/X11R7/lib/modules/drivers/ch7017_drv.so		-unknown-	obsolete
-./usr/X11R7/lib/modules/drivers/ch7017_drv.so.2		-unknown-	obsolete
-./usr/X11R7/lib/modules/drivers/ch7xxx_drv.so		-unknown-	obsolete

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

2015-07-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jul 24 07:30:40 UTC 2015

Modified Files:
src/sys/netinet [netbsd-7]: tcp_input.c tcp_output.c

Log Message:
Pull up following revision(s) (requested by matt in ticket #886):
sys/netinet/tcp_output.c: revision 1.184
sys/netinet/tcp_input.c: revision 1.343

If we are sending a window probe and there's unacked data in the
socket, make sure at least the persist timer is running.
Make sure that snd_win doesn't go negative.


To generate a diff of this commit:
cvs rdiff -u -r1.334.2.1 -r1.334.2.2 src/sys/netinet/tcp_input.c
cvs rdiff -u -r1.176.2.4 -r1.176.2.5 src/sys/netinet/tcp_output.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/tcp_input.c
diff -u src/sys/netinet/tcp_input.c:1.334.2.1 src/sys/netinet/tcp_input.c:1.334.2.2
--- src/sys/netinet/tcp_input.c:1.334.2.1	Sat Feb 21 13:40:19 2015
+++ src/sys/netinet/tcp_input.c	Fri Jul 24 07:30:40 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_input.c,v 1.334.2.1 2015/02/21 13:40:19 martin Exp $	*/
+/*	$NetBSD: tcp_input.c,v 1.334.2.2 2015/07/24 07:30:40 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -148,7 +148,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tcp_input.c,v 1.334.2.1 2015/02/21 13:40:19 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: tcp_input.c,v 1.334.2.2 2015/07/24 07:30:40 martin Exp $);
 
 #include opt_inet.h
 #include opt_ipsec.h
@@ -2714,7 +2714,10 @@ after_listen:
 tp-t_lastm = NULL;
 			sbdrop(so-so_snd, acked);
 			tp-t_lastoff -= acked;
-			tp-snd_wnd -= acked;
+			if (tp-snd_wnd  acked)
+tp-snd_wnd -= acked;
+			else
+tp-snd_wnd = 0;
 			ourfinisacked = 0;
 		}
 		sowwakeup(so);

Index: src/sys/netinet/tcp_output.c
diff -u src/sys/netinet/tcp_output.c:1.176.2.4 src/sys/netinet/tcp_output.c:1.176.2.5
--- src/sys/netinet/tcp_output.c:1.176.2.4	Sat Feb 21 13:40:19 2015
+++ src/sys/netinet/tcp_output.c	Fri Jul 24 07:30:40 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_output.c,v 1.176.2.4 2015/02/21 13:40:19 martin Exp $	*/
+/*	$NetBSD: tcp_output.c,v 1.176.2.5 2015/07/24 07:30:40 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -135,7 +135,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tcp_output.c,v 1.176.2.4 2015/02/21 13:40:19 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: tcp_output.c,v 1.176.2.5 2015/07/24 07:30:40 martin Exp $);
 
 #include opt_inet.h
 #include opt_ipsec.h
@@ -1522,14 +1522,24 @@ send:
 		 * of retransmit time.
 		 */
 timer:
-		if (TCP_TIMER_ISARMED(tp, TCPT_REXMT) == 0 
-			((sack_rxmit  tp-snd_nxt != tp-snd_max) ||
-		tp-snd_nxt != tp-snd_una)) {
-			if (TCP_TIMER_ISARMED(tp, TCPT_PERSIST)) {
-TCP_TIMER_DISARM(tp, TCPT_PERSIST);
+		if (TCP_TIMER_ISARMED(tp, TCPT_REXMT) == 0) {
+			if ((sack_rxmit  tp-snd_nxt != tp-snd_max)
+			|| tp-snd_nxt != tp-snd_una) {
+if (TCP_TIMER_ISARMED(tp, TCPT_PERSIST)) {
+	TCP_TIMER_DISARM(tp, TCPT_PERSIST);
+	tp-t_rxtshift = 0;
+}
+TCP_TIMER_ARM(tp, TCPT_REXMT, tp-t_rxtcur);
+			} else if (len == 0  so-so_snd.sb_cc  0
+			 TCP_TIMER_ISARMED(tp, TCPT_PERSIST) == 0) {
+/*
+ * If we are sending a window probe and there's
+ * unacked data in the socket, make sure at
+ * least the persist timer is running.
+ */
 tp-t_rxtshift = 0;
+tcp_setpersist(tp);
 			}
-			TCP_TIMER_ARM(tp, TCPT_REXMT, tp-t_rxtcur);
 		}
 	} else
 		if (SEQ_GT(tp-snd_nxt + len, tp-snd_max))



CVS commit: src/sys/netinet6

2015-07-24 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Fri Jul 24 07:36:29 UTC 2015

Modified Files:
src/sys/netinet6: icmp6.c

Log Message:
Fix rtfree-ing wrong rtentry


To generate a diff of this commit:
cvs rdiff -u -r1.171 -r1.172 src/sys/netinet6/icmp6.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/netinet6/icmp6.c
diff -u src/sys/netinet6/icmp6.c:1.171 src/sys/netinet6/icmp6.c:1.172
--- src/sys/netinet6/icmp6.c:1.171	Fri Jul 17 02:21:08 2015
+++ src/sys/netinet6/icmp6.c	Fri Jul 24 07:36:29 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: icmp6.c,v 1.171 2015/07/17 02:21:08 ozaki-r Exp $	*/
+/*	$NetBSD: icmp6.c,v 1.172 2015/07/24 07:36:29 ozaki-r Exp $	*/
 /*	$KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: icmp6.c,v 1.171 2015/07/17 02:21:08 ozaki-r Exp $);
+__KERNEL_RCSID(0, $NetBSD: icmp6.c,v 1.172 2015/07/24 07:36:29 ozaki-r Exp $);
 
 #include opt_inet.h
 #include opt_ipsec.h
@@ -2473,7 +2473,7 @@ icmp6_redirect_output(struct mbuf *m0, s
 		len = (len + 7)  ~7;	/* round by 8 */
 		/* safety check */
 		if (len + (p - (u_char *)ip6)  maxlen) {
-			rtfree(rt);
+			rtfree(rt_nexthop);
 			goto nolladdropt;
 		}
 		if (!(rt_nexthop-rt_flags  RTF_GATEWAY) 
@@ -2488,7 +2488,7 @@ icmp6_redirect_output(struct mbuf *m0, s
 			memcpy(lladdr, CLLADDR(sdl), ifp-if_addrlen);
 			p += len;
 		}
-		rtfree(rt);
+		rtfree(rt_nexthop);
 	}
   nolladdropt:;
 



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

2015-07-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jul 24 07:42:43 UTC 2015

Modified Files:
src/sys/netinet [netbsd-5]: tcp_input.c tcp_output.c

Log Message:
Pull up following revision(s) (requested by matt in ticket #1973):
sys/netinet/tcp_output.c: revision 1.184
sys/netinet/tcp_input.c: revision 1.343

If we are sending a window probe and there's unacked data in the
socket, make sure at least the persist timer is running.
Make sure that snd_win doesn't go negative.


To generate a diff of this commit:
cvs rdiff -u -r1.291.4.5 -r1.291.4.6 src/sys/netinet/tcp_input.c
cvs rdiff -u -r1.167.10.1 -r1.167.10.2 src/sys/netinet/tcp_output.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/tcp_input.c
diff -u src/sys/netinet/tcp_input.c:1.291.4.5 src/sys/netinet/tcp_input.c:1.291.4.6
--- src/sys/netinet/tcp_input.c:1.291.4.5	Fri Jun 11 23:36:07 2010
+++ src/sys/netinet/tcp_input.c	Fri Jul 24 07:42:43 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_input.c,v 1.291.4.5 2010/06/11 23:36:07 riz Exp $	*/
+/*	$NetBSD: tcp_input.c,v 1.291.4.6 2015/07/24 07:42:43 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -145,7 +145,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tcp_input.c,v 1.291.4.5 2010/06/11 23:36:07 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: tcp_input.c,v 1.291.4.6 2015/07/24 07:42:43 martin Exp $);
 
 #include opt_inet.h
 #include opt_ipsec.h
@@ -2438,7 +2438,10 @@ after_listen:
 tp-t_lastm = NULL;
 			sbdrop(so-so_snd, acked);
 			tp-t_lastoff -= acked;
-			tp-snd_wnd -= acked;
+			if (tp-snd_wnd  acked)
+tp-snd_wnd -= acked;
+			else
+tp-snd_wnd = 0;
 			ourfinisacked = 0;
 		}
 		sowwakeup(so);

Index: src/sys/netinet/tcp_output.c
diff -u src/sys/netinet/tcp_output.c:1.167.10.1 src/sys/netinet/tcp_output.c:1.167.10.2
--- src/sys/netinet/tcp_output.c:1.167.10.1	Tue Mar 29 20:12:14 2011
+++ src/sys/netinet/tcp_output.c	Fri Jul 24 07:42:43 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_output.c,v 1.167.10.1 2011/03/29 20:12:14 riz Exp $	*/
+/*	$NetBSD: tcp_output.c,v 1.167.10.2 2015/07/24 07:42:43 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -135,7 +135,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tcp_output.c,v 1.167.10.1 2011/03/29 20:12:14 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: tcp_output.c,v 1.167.10.2 2015/07/24 07:42:43 martin Exp $);
 
 #include opt_inet.h
 #include opt_ipsec.h
@@ -1524,14 +1524,24 @@ send:
 		 * of retransmit time.
 		 */
 timer:
-		if (TCP_TIMER_ISARMED(tp, TCPT_REXMT) == 0 
-			((sack_rxmit  tp-snd_nxt != tp-snd_max) ||
-		tp-snd_nxt != tp-snd_una)) {
-			if (TCP_TIMER_ISARMED(tp, TCPT_PERSIST)) {
-TCP_TIMER_DISARM(tp, TCPT_PERSIST);
+		if (TCP_TIMER_ISARMED(tp, TCPT_REXMT) == 0) {
+			if ((sack_rxmit  tp-snd_nxt != tp-snd_max)
+			|| tp-snd_nxt != tp-snd_una) {
+if (TCP_TIMER_ISARMED(tp, TCPT_PERSIST)) {
+	TCP_TIMER_DISARM(tp, TCPT_PERSIST);
+	tp-t_rxtshift = 0;
+}
+TCP_TIMER_ARM(tp, TCPT_REXMT, tp-t_rxtcur);
+			} else if (len == 0  so-so_snd.sb_cc  0
+			 TCP_TIMER_ISARMED(tp, TCPT_PERSIST) == 0) {
+/*
+ * If we are sending a window probe and there's
+ * unacked data in the socket, make sure at
+ * least the persist timer is running.
+ */
 tp-t_rxtshift = 0;
+tcp_setpersist(tp);
 			}
-			TCP_TIMER_ARM(tp, TCPT_REXMT, tp-t_rxtcur);
 		}
 	} else
 		if (SEQ_GT(tp-snd_nxt + len, tp-snd_max))



CVS commit: [netbsd-5-2] src/sys/netinet

2015-07-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jul 24 07:44:35 UTC 2015

Modified Files:
src/sys/netinet [netbsd-5-2]: tcp_input.c tcp_output.c

Log Message:
Pull up following revision(s) (requested by matt in ticket #1973):
sys/netinet/tcp_output.c: revision 1.184
sys/netinet/tcp_input.c: revision 1.343

If we are sending a window probe and there's unacked data in the
socket, make sure at least the persist timer is running.
Make sure that snd_win doesn't go negative.


To generate a diff of this commit:
cvs rdiff -u -r1.291.4.5 -r1.291.4.5.6.1 src/sys/netinet/tcp_input.c
cvs rdiff -u -r1.167.10.1 -r1.167.10.1.2.1 src/sys/netinet/tcp_output.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/tcp_input.c
diff -u src/sys/netinet/tcp_input.c:1.291.4.5 src/sys/netinet/tcp_input.c:1.291.4.5.6.1
--- src/sys/netinet/tcp_input.c:1.291.4.5	Fri Jun 11 23:36:07 2010
+++ src/sys/netinet/tcp_input.c	Fri Jul 24 07:44:35 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_input.c,v 1.291.4.5 2010/06/11 23:36:07 riz Exp $	*/
+/*	$NetBSD: tcp_input.c,v 1.291.4.5.6.1 2015/07/24 07:44:35 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -145,7 +145,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tcp_input.c,v 1.291.4.5 2010/06/11 23:36:07 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: tcp_input.c,v 1.291.4.5.6.1 2015/07/24 07:44:35 martin Exp $);
 
 #include opt_inet.h
 #include opt_ipsec.h
@@ -2438,7 +2438,10 @@ after_listen:
 tp-t_lastm = NULL;
 			sbdrop(so-so_snd, acked);
 			tp-t_lastoff -= acked;
-			tp-snd_wnd -= acked;
+			if (tp-snd_wnd  acked)
+tp-snd_wnd -= acked;
+			else
+tp-snd_wnd = 0;
 			ourfinisacked = 0;
 		}
 		sowwakeup(so);

Index: src/sys/netinet/tcp_output.c
diff -u src/sys/netinet/tcp_output.c:1.167.10.1 src/sys/netinet/tcp_output.c:1.167.10.1.2.1
--- src/sys/netinet/tcp_output.c:1.167.10.1	Tue Mar 29 20:12:14 2011
+++ src/sys/netinet/tcp_output.c	Fri Jul 24 07:44:35 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_output.c,v 1.167.10.1 2011/03/29 20:12:14 riz Exp $	*/
+/*	$NetBSD: tcp_output.c,v 1.167.10.1.2.1 2015/07/24 07:44:35 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -135,7 +135,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tcp_output.c,v 1.167.10.1 2011/03/29 20:12:14 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: tcp_output.c,v 1.167.10.1.2.1 2015/07/24 07:44:35 martin Exp $);
 
 #include opt_inet.h
 #include opt_ipsec.h
@@ -1524,14 +1524,24 @@ send:
 		 * of retransmit time.
 		 */
 timer:
-		if (TCP_TIMER_ISARMED(tp, TCPT_REXMT) == 0 
-			((sack_rxmit  tp-snd_nxt != tp-snd_max) ||
-		tp-snd_nxt != tp-snd_una)) {
-			if (TCP_TIMER_ISARMED(tp, TCPT_PERSIST)) {
-TCP_TIMER_DISARM(tp, TCPT_PERSIST);
+		if (TCP_TIMER_ISARMED(tp, TCPT_REXMT) == 0) {
+			if ((sack_rxmit  tp-snd_nxt != tp-snd_max)
+			|| tp-snd_nxt != tp-snd_una) {
+if (TCP_TIMER_ISARMED(tp, TCPT_PERSIST)) {
+	TCP_TIMER_DISARM(tp, TCPT_PERSIST);
+	tp-t_rxtshift = 0;
+}
+TCP_TIMER_ARM(tp, TCPT_REXMT, tp-t_rxtcur);
+			} else if (len == 0  so-so_snd.sb_cc  0
+			 TCP_TIMER_ISARMED(tp, TCPT_PERSIST) == 0) {
+/*
+ * If we are sending a window probe and there's
+ * unacked data in the socket, make sure at
+ * least the persist timer is running.
+ */
 tp-t_rxtshift = 0;
+tcp_setpersist(tp);
 			}
-			TCP_TIMER_ARM(tp, TCPT_REXMT, tp-t_rxtcur);
 		}
 	} else
 		if (SEQ_GT(tp-snd_nxt + len, tp-snd_max))



CVS commit: [netbsd-5] src/doc

2015-07-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jul 24 07:43:27 UTC 2015

Modified Files:
src/doc [netbsd-5]: CHANGES-5.3

Log Message:
Ticket #1973


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.121 -r1.1.2.122 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.121 src/doc/CHANGES-5.3:1.1.2.122
--- src/doc/CHANGES-5.3:1.1.2.121	Wed Jul  1 07:19:25 2015
+++ src/doc/CHANGES-5.3	Fri Jul 24 07:43:27 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.121 2015/07/01 07:19:25 bouyer Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.122 2015/07/24 07:43:27 martin Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3936,3 +3936,11 @@ usr.bin/calendar/calendar.c			1.51
 	are serious if they happen.
 	[dholland, ticket #1971]
 
+sys/netinet/tcp_input.c1.343
+sys/netinet/tcp_output.c			1.184
+
+	If we are sending a window probe and there's unacked data in the
+	socket, make sure at least the persist timer is running.
+	Make sure that snd_win doesn't go negative.
+	[matt, ticket #1973]
+



CVS commit: src/sys

2015-07-24 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Fri Jul 24 13:02:52 UTC 2015

Modified Files:
src/sys/compat/common: kern_time_50.c vfs_syscalls_20.c
src/sys/compat/linux/common: linux_socket.c
src/sys/compat/linux32/common: linux32_socket.c
src/sys/compat/netbsd32: netbsd32_compat_50.c
src/sys/compat/ultrix: ultrix_fs.c
src/sys/kern: kern_ntptime.c kern_time.c kern_veriexec.c sys_lwp.c
vfs_syscalls.c
src/sys/miscfs/procfs: procfs_linux.c
src/sys/ufs/ffs: ffs_vfsops.c

Log Message:
Unused inits (harmless).

Found by Brainy.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/compat/common/kern_time_50.c
cvs rdiff -u -r1.38 -r1.39 src/sys/compat/common/vfs_syscalls_20.c
cvs rdiff -u -r1.125 -r1.126 src/sys/compat/linux/common/linux_socket.c
cvs rdiff -u -r1.19 -r1.20 src/sys/compat/linux32/common/linux32_socket.c
cvs rdiff -u -r1.29 -r1.30 src/sys/compat/netbsd32/netbsd32_compat_50.c
cvs rdiff -u -r1.54 -r1.55 src/sys/compat/ultrix/ultrix_fs.c
cvs rdiff -u -r1.55 -r1.56 src/sys/kern/kern_ntptime.c
cvs rdiff -u -r1.179 -r1.180 src/sys/kern/kern_time.c
cvs rdiff -u -r1.8 -r1.9 src/sys/kern/kern_veriexec.c
cvs rdiff -u -r1.56 -r1.57 src/sys/kern/sys_lwp.c
cvs rdiff -u -r1.499 -r1.500 src/sys/kern/vfs_syscalls.c
cvs rdiff -u -r1.70 -r1.71 src/sys/miscfs/procfs/procfs_linux.c
cvs rdiff -u -r1.334 -r1.335 src/sys/ufs/ffs/ffs_vfsops.c

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

Modified files:

Index: src/sys/compat/common/kern_time_50.c
diff -u src/sys/compat/common/kern_time_50.c:1.28 src/sys/compat/common/kern_time_50.c:1.29
--- src/sys/compat/common/kern_time_50.c:1.28	Sun Nov  9 17:48:07 2014
+++ src/sys/compat/common/kern_time_50.c	Fri Jul 24 13:02:52 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_time_50.c,v 1.28 2014/11/09 17:48:07 maxv Exp $	*/
+/*	$NetBSD: kern_time_50.c,v 1.29 2015/07/24 13:02:52 maxv Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_time_50.c,v 1.28 2014/11/09 17:48:07 maxv Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_time_50.c,v 1.29 2015/07/24 13:02:52 maxv Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_aio.h
@@ -123,7 +123,7 @@ compat_50_sys_clock_getres(struct lwp *l
 	} */
 	struct timespec50 ats50;
 	struct timespec ats;
-	int error = 0;
+	int error;
 
 	error = clock_getres1(SCARG(uap, clock_id), ats);
 	if (error != 0)

Index: src/sys/compat/common/vfs_syscalls_20.c
diff -u src/sys/compat/common/vfs_syscalls_20.c:1.38 src/sys/compat/common/vfs_syscalls_20.c:1.39
--- src/sys/compat/common/vfs_syscalls_20.c:1.38	Fri Sep  5 09:21:54 2014
+++ src/sys/compat/common/vfs_syscalls_20.c	Fri Jul 24 13:02:52 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls_20.c,v 1.38 2014/09/05 09:21:54 matt Exp $	*/
+/*	$NetBSD: vfs_syscalls_20.c,v 1.39 2015/07/24 13:02:52 maxv Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vfs_syscalls_20.c,v 1.38 2014/09/05 09:21:54 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: vfs_syscalls_20.c,v 1.39 2015/07/24 13:02:52 maxv Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_compat_netbsd.h
@@ -90,7 +90,7 @@ static int
 vfs2fs(struct statfs12 *bfs, const struct statvfs *fs)
 {
 	struct statfs12 ofs;
-	int i = 0;
+	int i;
 	ofs.f_type = 0;
 	ofs.f_oflags = (short)fs-f_flag;
 
@@ -139,7 +139,7 @@ compat_20_sys_statfs(struct lwp *l, cons
 	} */
 	struct mount *mp;
 	struct statvfs *sbuf;
-	int error = 0;
+	int error;
 	struct vnode *vp;
 
 	error = namei_simple_user(SCARG(uap, path),

Index: src/sys/compat/linux/common/linux_socket.c
diff -u src/sys/compat/linux/common/linux_socket.c:1.125 src/sys/compat/linux/common/linux_socket.c:1.126
--- src/sys/compat/linux/common/linux_socket.c:1.125	Sun May 24 17:07:26 2015
+++ src/sys/compat/linux/common/linux_socket.c	Fri Jul 24 13:02:52 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_socket.c,v 1.125 2015/05/24 17:07:26 rtr Exp $	*/
+/*	$NetBSD: linux_socket.c,v 1.126 2015/07/24 13:02:52 maxv Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_socket.c,v 1.125 2015/05/24 17:07:26 rtr Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_socket.c,v 1.126 2015/07/24 13:02:52 maxv Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_inet.h
@@ -1115,7 +1115,7 @@ linux_getifconf(struct lwp *l, register_
 	struct ifaddr *ifa;
 	struct sockaddr *sa;
 	struct osockaddr *osa;
-	int space = 0, error = 0;
+	int space = 0, error;
 	const int sz = (int)sizeof(ifr);
 	bool docopy;
 

Index: src/sys/compat/linux32/common/linux32_socket.c
diff -u src/sys/compat/linux32/common/linux32_socket.c:1.19 src/sys/compat/linux32/common/linux32_socket.c:1.20
--- src/sys/compat/linux32/common/linux32_socket.c:1.19	Wed Nov 26 

CVS commit: src/sys/arch/x86/x86

2015-07-24 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri Jul 24 15:20:37 UTC 2015

Modified Files:
src/sys/arch/x86/x86: pmap_tlb.c

Log Message:
Operation pmap_tlb_processpacket() uses x86_ipi(.., LAPIC_DEST_ALLEXCL, ...)
when cpuset target equals kcpuset_running.  During boot, while some CPUs
are not running yet, this will result in more IPI interrupts than expected
and pmap_tlb_pendcount related KASSERTs fire.

Compare the cpuset target against kcpuset_attached, as this set represents
the CPUs LAPIC_DEST_ALLEXCL will notify.

Should fix PR port-amd64/47437


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x86/x86/pmap_tlb.c

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

Modified files:

Index: src/sys/arch/x86/x86/pmap_tlb.c
diff -u src/sys/arch/x86/x86/pmap_tlb.c:1.6 src/sys/arch/x86/x86/pmap_tlb.c:1.7
--- src/sys/arch/x86/x86/pmap_tlb.c:1.6	Sat Apr 21 22:22:48 2012
+++ src/sys/arch/x86/x86/pmap_tlb.c	Fri Jul 24 15:20:37 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_tlb.c,v 1.6 2012/04/21 22:22:48 rmind Exp $	*/
+/*	$NetBSD: pmap_tlb.c,v 1.7 2015/07/24 15:20:37 hannken Exp $	*/
 
 /*-
  * Copyright (c) 2008-2012 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap_tlb.c,v 1.6 2012/04/21 22:22:48 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap_tlb.c,v 1.7 2015/07/24 15:20:37 hannken Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -297,7 +297,7 @@ pmap_tlb_processpacket(pmap_tlb_packet_t
 {
 	int err = 0;
 
-	if (!kcpuset_match(target, kcpuset_running)) {
+	if (!kcpuset_match(target, kcpuset_attached)) {
 		const struct cpu_info * const self = curcpu();
 		CPU_INFO_ITERATOR cii;
 		struct cpu_info *lci;



CVS commit: src/sys/dev/pci

2015-07-24 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Fri Jul 24 15:43:38 UTC 2015

Modified Files:
src/sys/dev/pci: if_iwm.c

Log Message:
Use pci_intr_alloc().


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/pci/if_iwm.c

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

Modified files:

Index: src/sys/dev/pci/if_iwm.c
diff -u src/sys/dev/pci/if_iwm.c:1.36 src/sys/dev/pci/if_iwm.c:1.37
--- src/sys/dev/pci/if_iwm.c:1.36	Wed Jul 22 15:18:01 2015
+++ src/sys/dev/pci/if_iwm.c	Fri Jul 24 15:43:38 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_iwm.c,v 1.36 2015/07/22 15:18:01 nonaka Exp $	*/
+/*	$NetBSD: if_iwm.c,v 1.37 2015/07/24 15:43:38 nonaka Exp $	*/
 /*	OpenBSD: if_iwm.c,v 1.41 2015/05/22 06:50:54 kettenis Exp	*/
 
 /*
@@ -105,7 +105,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_iwm.c,v 1.36 2015/07/22 15:18:01 nonaka Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_iwm.c,v 1.37 2015/07/24 15:43:38 nonaka Exp $);
 
 #include sys/param.h
 #include sys/conf.h
@@ -6607,6 +6607,7 @@ iwm_attach(device_t parent, device_t sel
 	pci_intr_handle_t ih;
 #endif
 	pcireg_t reg, memtype;
+	char intrbuf[PCI_INTRSTR_LEN];
 	const char *intrstr;
 	int error;
 	int txq_i;
@@ -6655,29 +6656,20 @@ iwm_attach(device_t parent, device_t sel
 
 	/* Install interrupt handler. */
 #ifdef __HAVE_PCI_MSI_MSIX
-	error = ENODEV;
-	if (pci_msi_count(pa)  0)
-		error = pci_msi_alloc_exact(pa, sc-sc_pihp, 1);
+	error = pci_intr_alloc(pa, sc-sc_pihp, NULL, 0);
 	if (error != 0) {
-		if (pci_intx_alloc(pa, sc-sc_pihp)) {
-			aprint_error_dev(self, can't map interrupt\n);
-			return;
-		}
-	}
-#else	/* !__HAVE_PCI_MSI_MSIX */
-	if (pci_intr_map(pa, ih)) {
-		aprint_error_dev(self, can't map interrupt\n);
+		aprint_error_dev(self, can't allocate interrupt\n);
 		return;
 	}
-#endif	/* __HAVE_PCI_MSI_MSIX */
-
-	char intrbuf[PCI_INTRSTR_LEN];
-#ifdef __HAVE_PCI_MSI_MSIX
 	intrstr = pci_intr_string(sc-sc_pct, sc-sc_pihp[0], intrbuf,
 	sizeof(intrbuf));
 	sc-sc_ih = pci_intr_establish(sc-sc_pct, sc-sc_pihp[0], IPL_NET,
 	iwm_intr, sc);
 #else	/* !__HAVE_PCI_MSI_MSIX */
+	if (pci_intr_map(pa, ih)) {
+		aprint_error_dev(self, can't map interrupt\n);
+		return;
+	}
 	intrstr = pci_intr_string(sc-sc_pct, ih, intrbuf, sizeof(intrbuf));
 	sc-sc_ih = pci_intr_establish(sc-sc_pct, ih, IPL_NET, iwm_intr, sc);
 #endif	/* __HAVE_PCI_MSI_MSIX */



CVS commit: src/sys/sys

2015-07-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jul 24 21:09:25 UTC 2015

Modified Files:
src/sys/sys: exec_elf.h

Log Message:
Add a few more EM_*


To generate a diff of this commit:
cvs rdiff -u -r1.146 -r1.147 src/sys/sys/exec_elf.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/sys/exec_elf.h
diff -u src/sys/sys/exec_elf.h:1.146 src/sys/sys/exec_elf.h:1.147
--- src/sys/sys/exec_elf.h:1.146	Wed May 20 04:08:54 2015
+++ src/sys/sys/exec_elf.h	Fri Jul 24 21:09:25 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf.h,v 1.146 2015/05/20 04:08:54 matt Exp $	*/
+/*	$NetBSD: exec_elf.h,v 1.147 2015/07/24 21:09:25 matt Exp $	*/
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -305,8 +305,15 @@ typedef struct {
 #define EM_SEP		108	/* Sharp embedded microprocessor */
 #define EM_ARCA		109	/* Arca RISC microprocessor */
 #define EM_UNICORE	110	/* UNICORE from PKU-Unity Ltd. and MPRC Peking University */
+#define EM_ALTERA_NIOS2	113	/* Altera Nios II soft-core processor */
 #define EM_AARCH64	183	/* AArch64 64-bit ARM microprocessor */
-#define EM_RISCV	243	/* RISCV */
+#define EM_AVR32	185	/* Atmel Corporation 32-bit microprocessor family*/
+#define EM_TILE64	187	/* Tilera TILE64 multicore architecture family */
+#define EM_TILEPRO	188	/* Tilera TILEPro multicore architecture family */
+#define EM_MICROBLAZE	189	/* Xilinx MicroBlaze 32-bit RISC soft processor core */
+#define EM_TILEGX	192	/* Tilera TILE-GX multicore architecture family */
+#define EM_Z80		220	/* Zilog Z80 */
+#define EM_RISCV	243	/* RISC-V */
 
 /* Unofficial machine types follow */
 #define EM_AVR32	6317	/* used by NetBSD/avr32 */



CVS commit: src/sys/sys

2015-07-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jul 24 21:27:03 UTC 2015

Modified Files:
src/sys/sys: exec_elf.h

Log Message:
Remove unofficial AVR32


To generate a diff of this commit:
cvs rdiff -u -r1.147 -r1.148 src/sys/sys/exec_elf.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/sys/exec_elf.h
diff -u src/sys/sys/exec_elf.h:1.147 src/sys/sys/exec_elf.h:1.148
--- src/sys/sys/exec_elf.h:1.147	Fri Jul 24 21:09:25 2015
+++ src/sys/sys/exec_elf.h	Fri Jul 24 21:27:03 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf.h,v 1.147 2015/07/24 21:09:25 matt Exp $	*/
+/*	$NetBSD: exec_elf.h,v 1.148 2015/07/24 21:27:03 matt Exp $	*/
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -316,7 +316,6 @@ typedef struct {
 #define EM_RISCV	243	/* RISC-V */
 
 /* Unofficial machine types follow */
-#define EM_AVR32	6317	/* used by NetBSD/avr32 */
 #define EM_ALPHA_EXP	36902	/* used by NetBSD/alpha; obsolete */
 #define EM_NUM		36903
 



CVS commit: src

2015-07-24 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jul 24 14:11:11 UTC 2015

Modified Files:
src/lib/librumpuser: rumpuser.c
src/sys/rump/librump/rumpkern: emul.c

Log Message:
Since the rump kernel does not know when the container it's running in
actually halts, print halted in the hypercall.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/lib/librumpuser/rumpuser.c
cvs rdiff -u -r1.171 -r1.172 src/sys/rump/librump/rumpkern/emul.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/librumpuser/rumpuser.c
diff -u src/lib/librumpuser/rumpuser.c:1.64 src/lib/librumpuser/rumpuser.c:1.65
--- src/lib/librumpuser/rumpuser.c:1.64	Wed Nov  5 00:43:55 2014
+++ src/lib/librumpuser/rumpuser.c	Fri Jul 24 14:11:11 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpuser.c,v 1.64 2014/11/05 00:43:55 pooka Exp $	*/
+/*	$NetBSD: rumpuser.c,v 1.65 2015/07/24 14:11:11 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2010 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
 #include rumpuser_port.h
 
 #if !defined(lint)
-__RCSID($NetBSD: rumpuser.c,v 1.64 2014/11/05 00:43:55 pooka Exp $);
+__RCSID($NetBSD: rumpuser.c,v 1.65 2015/07/24 14:11:11 pooka Exp $);
 #endif /* !lint */
 
 #include sys/stat.h
@@ -232,6 +232,7 @@ __dead void
 rumpuser_exit(int rv)
 {
 
+	fprintf(stderr, halted\n);
 	if (rv == RUMPUSER_PANIC)
 		abort();
 	else

Index: src/sys/rump/librump/rumpkern/emul.c
diff -u src/sys/rump/librump/rumpkern/emul.c:1.171 src/sys/rump/librump/rumpkern/emul.c:1.172
--- src/sys/rump/librump/rumpkern/emul.c:1.171	Wed Apr 22 16:49:42 2015
+++ src/sys/rump/librump/rumpkern/emul.c	Fri Jul 24 14:11:11 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: emul.c,v 1.171 2015/04/22 16:49:42 pooka Exp $	*/
+/*	$NetBSD: emul.c,v 1.172 2015/07/24 14:11:11 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: emul.c,v 1.171 2015/04/22 16:49:42 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: emul.c,v 1.172 2015/07/24 14:11:11 pooka Exp $);
 
 #include sys/param.h
 #include sys/null.h
@@ -380,7 +380,7 @@ cpu_reboot(int howto, char *bootstr)
 
 	/* your wish is my command */
 	if (howto  RB_HALT) {
-		printf(rump kernel halted\n);
+		printf(rump kernel halted (with RB_HALT, not exiting)\n);
 		rump_sysproxy_fini(finiarg);
 		for (;;) {
 			rumpuser_clock_sleep(RUMPUSER_CLOCK_RELWALL, 10, 0);
@@ -389,7 +389,6 @@ cpu_reboot(int howto, char *bootstr)
 
 	/* this function is __dead, we must exit */
  out:
-	printf(halted\n);
 	rump_sysproxy_fini(finiarg);
 	rumpuser_exit(ruhow);
 }



CVS commit: src/usr.bin/patch

2015-07-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jul 24 18:56:44 UTC 2015

Modified Files:
src/usr.bin/patch: common.h

Log Message:
Use absolute paths for RCS commands (Martin Natano)


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/usr.bin/patch/common.h

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/patch/common.h
diff -u src/usr.bin/patch/common.h:1.20 src/usr.bin/patch/common.h:1.21
--- src/usr.bin/patch/common.h:1.20	Tue Nov 25 19:31:32 2014
+++ src/usr.bin/patch/common.h	Fri Jul 24 14:56:44 2015
@@ -1,7 +1,7 @@
 /*
  * $OpenBSD: common.h,v 1.26 2006/03/11 19:41:30 otto Exp $
  * $DragonFly: src/usr.bin/patch/common.h,v 1.5 2008/08/10 23:50:12 joerg Exp $
- * $NetBSD: common.h,v 1.20 2014/11/26 00:31:32 christos Exp $
+ * $NetBSD: common.h,v 1.21 2015/07/24 18:56:44 christos Exp $
  */
 
 /*
@@ -50,8 +50,8 @@
 #define SCCSDIFF get -p %s | diff - %s /dev/null
 
 #define RCSSUFFIX ,v
-#define CHECKOUT co -l %s
-#define RCSDIFF rcsdiff %s  /dev/null
+#define CHECKOUT /usr/bin/co
+#define RCSDIFF /usr/bin/rcsdiff
 
 #define ORIGEXT .orig
 #define REJEXT .rej



CVS commit: src/usr.bin/patch

2015-07-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jul 24 18:56:00 UTC 2015

Modified Files:
src/usr.bin/patch: inp.c

Log Message:
From Martin Natano @bitrig: Use execve(2) instead of system to apply patches
that require rcs command execution instead system(3) to avoid malicious
filenames in patches causing bad things to happen. In the process, lose SCCS
support. It is not like we are shipping sccs commands for that to work.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/usr.bin/patch/inp.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/patch/inp.c
diff -u src/usr.bin/patch/inp.c:1.23 src/usr.bin/patch/inp.c:1.24
--- src/usr.bin/patch/inp.c:1.23	Wed Oct 21 13:16:11 2009
+++ src/usr.bin/patch/inp.c	Fri Jul 24 14:56:00 2015
@@ -1,7 +1,7 @@
 /*
  * $OpenBSD: inp.c,v 1.34 2006/03/11 19:41:30 otto Exp $
  * $DragonFly: src/usr.bin/patch/inp.c,v 1.6 2007/09/29 23:11:10 swildner Exp $
- * $NetBSD: inp.c,v 1.23 2009/10/21 17:16:11 joerg Exp $
+ * $NetBSD: inp.c,v 1.24 2015/07/24 18:56:00 christos Exp $
  */
 
 /*
@@ -31,14 +31,16 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: inp.c,v 1.23 2009/10/21 17:16:11 joerg Exp $);
+__RCSID($NetBSD: inp.c,v 1.24 2015/07/24 18:56:00 christos Exp $);
 
 #include sys/types.h
 #include sys/file.h
 #include sys/stat.h
 #include sys/mman.h
+#include sys/wait.h
 
 #include ctype.h
+#include errno.h
 #include fcntl.h
 #include libgen.h
 #include limits.h
@@ -139,12 +141,14 @@ reallocate_lines(size_t *lines_allocated
 static bool
 plan_a(const char *filename)
 {
-	int		ifd, statfailed;
+	int		ifd, statfailed, devnull, pstat;
 	char		*p, *s, lbuf[MAXLINELEN];
 	struct stat	filestat;
 	off_t		i;
 	ptrdiff_t	sz;
 	size_t		iline, lines_allocated;
+	pid_t		pid;
+	char		*argp[4] = {NULL};
 
 #ifdef DEBUGGING
 	if (debug  8)
@@ -172,13 +176,13 @@ plan_a(const char *filename)
 	}
 	if (statfailed  check_only)
 		fatal(%s not found, -C mode, can't probe further\n, filename);
-	/* For nonexistent or read-only files, look for RCS or SCCS versions.  */
+	/* For nonexistent or read-only files, look for RCS versions.  */
 	if (statfailed ||
 	/* No one can write to it.  */
 	(filestat.st_mode  0222) == 0 ||
 	/* I can't write to it.  */
 	((filestat.st_mode  0022) == 0  filestat.st_uid != getuid())) {
-		const char	*cs = NULL, *filebase, *filedir;
+		char	*filebase, *filedir;
 		struct stat	cstat;
 		char *tmp_filename1, *tmp_filename2;
 
@@ -186,43 +190,26 @@ plan_a(const char *filename)
 		tmp_filename2 = strdup(filename);
 		if (tmp_filename1 == NULL || tmp_filename2 == NULL)
 			fatal(strdupping filename);
-		filebase = basename(tmp_filename1);
-		filedir = dirname(tmp_filename2);
-
-		/* Leave room in lbuf for the diff command.  */
-		s = lbuf + 20;
-
+ 
+ 		filebase = basename(tmp_filename1);
+ 		filedir = dirname(tmp_filename2);
+ 
 #define try(f, a1, a2, a3) \
-	(snprintf(s, sizeof lbuf - 20, f, a1, a2, a3), stat(s, cstat) == 0)
-
-		if (try(%s/RCS/%s%s, filedir, filebase, RCSSUFFIX) ||
-		try(%s/RCS/%s%s, filedir, filebase, ) ||
-		try(%s/%s%s, filedir, filebase, RCSSUFFIX)) {
-			snprintf(buf, buf_len, CHECKOUT, filename);
-			snprintf(lbuf, sizeof lbuf, RCSDIFF, filename);
-			cs = RCS;
-		} else if (try(%s/SCCS/%s%s, filedir, SCCSPREFIX, filebase) ||
-		try(%s/%s%s, filedir, SCCSPREFIX, filebase)) {
-			snprintf(buf, buf_len, GET, s);
-			snprintf(lbuf, sizeof lbuf, SCCSDIFF, s, filename);
-			cs = SCCS;
-		} else if (statfailed)
-			fatal(can't find %s\n, filename);
-
-		free(tmp_filename1);
-		free(tmp_filename2);
+	(snprintf(lbuf, sizeof lbuf, f, a1, a2, a3), stat(lbuf, cstat) == 0)
 
 		/*
 		 * else we can't write to it but it's not under a version
 		 * control system, so just proceed.
 		 */
-		if (cs) {
+		if (try(%s/RCS/%s%s, filedir, filebase, RCSSUFFIX) ||
+		try(%s/RCS/%s%s, filedir, filebase, ) ||
+		try(%s/%s%s, filedir, filebase, RCSSUFFIX)) {
 			if (!statfailed) {
 if ((filestat.st_mode  0222) != 0)
 	/* The owner can write to it.  */
 	fatal(file %s seems to be locked 
-	by somebody else under %s\n,
-	filename, cs);
+	by somebody else under RCS\n,
+	filename);
 /*
  * It might be checked out unlocked.  See if
  * it's safe to check out the default version
@@ -230,21 +217,59 @@ plan_a(const char *filename)
  */
 if (verbose)
 	say(Comparing file %s to default 
-	%s version...\n,
-	filename, cs);
-if (system(lbuf))
+	RCS version...\n, filename);
+
+switch (pid = fork()) {
+case -1:
+	fatal(can't fork: %s\n,
+	strerror(errno));
+case 0:
+	devnull = open(/dev/null, O_RDONLY);
+	if (devnull == -1) {
+		fatal(can't open /dev/null: %s,
+		strerror(errno));
+	}
+	(void)dup2(devnull, STDOUT_FILENO);
+	argp[0] = __UNCONST(RCSDIFF);
+	argp[1] 

CVS commit: src/sys/kern

2015-07-24 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Fri Jul 24 12:29:55 UTC 2015

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

Log Message:
typo (comment)


To generate a diff of this commit:
cvs rdiff -u -r1.161 -r1.162 src/sys/kern/uipc_mbuf.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/uipc_mbuf.c
diff -u src/sys/kern/uipc_mbuf.c:1.161 src/sys/kern/uipc_mbuf.c:1.162
--- src/sys/kern/uipc_mbuf.c:1.161	Sun Feb  8 14:46:30 2015
+++ src/sys/kern/uipc_mbuf.c	Fri Jul 24 12:29:55 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_mbuf.c,v 1.161 2015/02/08 14:46:30 mlelstv Exp $	*/
+/*	$NetBSD: uipc_mbuf.c,v 1.162 2015/07/24 12:29:55 maxv Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uipc_mbuf.c,v 1.161 2015/02/08 14:46:30 mlelstv Exp $);
+__KERNEL_RCSID(0, $NetBSD: uipc_mbuf.c,v 1.162 2015/07/24 12:29:55 maxv Exp $);
 
 #include opt_mbuftrace.h
 #include opt_nmbclusters.h
@@ -1689,7 +1689,7 @@ m_getptr(struct mbuf *m, int loc, int *o
 /*
  * m_ext_free: release a reference to the mbuf external storage.
  *
- * = free the mbuf m itsself as well.
+ * = free the mbuf m itself as well.
  */
 
 void