CVS commit: src/sys/dev/usb

2019-08-29 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Aug 30 05:59:17 UTC 2019

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

Log Message:
don't try to set dying when we haven't usbnet_attach()d yet.

reported by maxv.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/dev/usb/if_url.c

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



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

2019-08-29 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Fri Aug 30 05:03:32 UTC 2019

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

Log Message:
vmxnet3_softc.vmx_stats should not count globally. pointed out by hikaru@n.o

divide vmxnet3_softc.vmx_stats to each vmxnet3_txqueue and vmxnet3_rxqueue,
furthermore make them evcnt.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/x86/pci/if_vmx.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/if_vmx.c
diff -u src/sys/arch/x86/pci/if_vmx.c:1.48 src/sys/arch/x86/pci/if_vmx.c:1.49
--- src/sys/arch/x86/pci/if_vmx.c:1.48	Mon Aug 19 05:25:38 2019
+++ src/sys/arch/x86/pci/if_vmx.c	Fri Aug 30 05:03:32 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_vmx.c,v 1.48 2019/08/19 05:25:38 knakahara Exp $	*/
+/*	$NetBSD: if_vmx.c,v 1.49 2019/08/30 05:03:32 knakahara Exp $	*/
 /*	$OpenBSD: if_vmx.c,v 1.16 2014/01/22 06:04:17 brad Exp $	*/
 
 /*
@@ -19,7 +19,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.48 2019/08/19 05:25:38 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.49 2019/08/30 05:03:32 knakahara Exp $");
 
 #include 
 #include 
@@ -207,6 +207,8 @@ struct vmxnet3_txqueue {
 	struct evcnt vxtxq_pcqdrop;
 	struct evcnt vxtxq_transmitdef;
 	struct evcnt vxtxq_watchdogto;
+	struct evcnt vxtxq_defragged;
+	struct evcnt vxtxq_defrag_failed;
 };
 
 struct vmxnet3_rxq_stats {
@@ -230,6 +232,8 @@ struct vmxnet3_rxqueue {
 	struct evcnt vxrxq_intr;
 	struct evcnt vxrxq_defer;
 	struct evcnt vxrxq_deferreq;
+	struct evcnt vxrxq_mgetcl_failed;
+	struct evcnt vxrxq_mbuf_load_failed;
 };
 
 struct vmxnet3_queue {
@@ -244,13 +248,6 @@ struct vmxnet3_queue {
 	struct work vxq_wq_cookie;
 };
 
-struct vmxnet3_statistics {
-	uint32_t vmst_defragged;
-	uint32_t vmst_defrag_failed;
-	uint32_t vmst_mgetcl_failed;
-	uint32_t vmst_mbuf_load_failed;
-};
-
 struct vmxnet3_softc {
 	device_t vmx_dev;
 	struct ethercom vmx_ethercom;
@@ -281,7 +278,6 @@ struct vmxnet3_softc {
 	int vmx_nrxdescs;
 	int vmx_max_rxsegs;
 
-	struct vmxnet3_statistics vmx_stats;
 	struct evcnt vmx_event_intr;
 	struct evcnt vmx_event_link;
 	struct evcnt vmx_event_txqerror;
@@ -395,7 +391,8 @@ int vmxnet3_setup_interface(struct vmxne
 
 void vmxnet3_evintr(struct vmxnet3_softc *);
 bool vmxnet3_txq_eof(struct vmxnet3_txqueue *, u_int);
-int vmxnet3_newbuf(struct vmxnet3_softc *, struct vmxnet3_rxring *);
+int vmxnet3_newbuf(struct vmxnet3_softc *, struct vmxnet3_rxqueue *,
+struct vmxnet3_rxring *);
 void vmxnet3_rxq_eof_discard(struct vmxnet3_rxqueue *,
 struct vmxnet3_rxring *, int);
 void vmxnet3_rxq_discard_chain(struct vmxnet3_rxqueue *);
@@ -1971,6 +1968,10 @@ vmxnet3_setup_stats(struct vmxnet3_softc
 		NULL, txq->vxtxq_name, "Deferred transmit");
 		evcnt_attach_dynamic(>vxtxq_watchdogto, EVCNT_TYPE_MISC,
 		NULL, txq->vxtxq_name, "Watchdog timeount");
+		evcnt_attach_dynamic(>vxtxq_defragged, EVCNT_TYPE_MISC,
+		NULL, txq->vxtxq_name, "m_defrag sucessed");
+		evcnt_attach_dynamic(>vxtxq_defrag_failed, EVCNT_TYPE_MISC,
+		NULL, txq->vxtxq_name, "m_defrag failed");
 	}
 
 	for (i = 0; i < sc->vmx_nrxqueues; i++) {
@@ -1982,6 +1983,10 @@ vmxnet3_setup_stats(struct vmxnet3_softc
 		NULL, rxq->vxrxq_name, "Handled queue in softint/workqueue");
 		evcnt_attach_dynamic(>vxrxq_deferreq, EVCNT_TYPE_MISC,
 		NULL, rxq->vxrxq_name, "Requested in softint/workqueue");
+		evcnt_attach_dynamic(>vxrxq_mgetcl_failed, EVCNT_TYPE_MISC,
+		NULL, rxq->vxrxq_name, "MCLGET failed");
+		evcnt_attach_dynamic(>vxrxq_mbuf_load_failed, EVCNT_TYPE_MISC,
+		NULL, rxq->vxrxq_name, "bus_dmamap_load_mbuf failed");
 	}
 
 	evcnt_attach_dynamic(>vmx_event_intr, EVCNT_TYPE_INTR,
@@ -2017,6 +2022,8 @@ vmxnet3_teardown_stats(struct vmxnet3_so
 		evcnt_detach(>vxtxq_pcqdrop);
 		evcnt_detach(>vxtxq_transmitdef);
 		evcnt_detach(>vxtxq_watchdogto);
+		evcnt_detach(>vxtxq_defragged);
+		evcnt_detach(>vxtxq_defrag_failed);
 	}
 
 	for (i = 0; i < sc->vmx_nrxqueues; i++) {
@@ -2025,6 +2032,8 @@ vmxnet3_teardown_stats(struct vmxnet3_so
 		evcnt_detach(>vxrxq_intr);
 		evcnt_detach(>vxrxq_defer);
 		evcnt_detach(>vxrxq_deferreq);
+		evcnt_detach(>vxrxq_mgetcl_failed);
+		evcnt_detach(>vxrxq_mbuf_load_failed);
 	}
 
 	evcnt_detach(>vmx_event_intr);
@@ -2154,7 +2163,8 @@ vmxnet3_txq_eof(struct vmxnet3_txqueue *
 }
 
 int
-vmxnet3_newbuf(struct vmxnet3_softc *sc, struct vmxnet3_rxring *rxr)
+vmxnet3_newbuf(struct vmxnet3_softc *sc, struct vmxnet3_rxqueue *rxq,
+struct vmxnet3_rxring *rxr)
 {
 	struct mbuf *m;
 	struct vmxnet3_rxdesc *rxd;
@@ -2180,7 +2190,7 @@ vmxnet3_newbuf(struct vmxnet3_softc *sc,
 
 	MCLGET(m, M_DONTWAIT);
 	if ((m->m_flags & M_EXT) == 0) {
-		sc->vmx_stats.vmst_mgetcl_failed++;
+		rxq->vxrxq_mgetcl_failed.ev_count++;
 		m_freem(m);
 		return (ENOBUFS);
 	}
@@ -2191,7 +2201,7 @@ vmxnet3_newbuf(struct vmxnet3_softc *sc,
 	

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

2019-08-29 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Fri Aug 30 05:03:32 UTC 2019

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

Log Message:
vmxnet3_softc.vmx_stats should not count globally. pointed out by hikaru@n.o

divide vmxnet3_softc.vmx_stats to each vmxnet3_txqueue and vmxnet3_rxqueue,
furthermore make them evcnt.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/x86/pci/if_vmx.c

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



CVS commit: src/sys/external/bsd/drm/dist/shared-core

2019-08-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Aug 30 03:34:37 UTC 2019

Modified Files:
src/sys/external/bsd/drm/dist/shared-core: radeon_cs.c

Log Message:
Delete dead-as-a-doornail-in-a-dead-horse branch.

If dev_priv is null here, you're hosed to begin with, so the apparent
null pointer dereference in this branch is moot; also this is the old
drm code that we should maybe just delete altogether...

Potential null pointer dereference reported by Dr Silvio Cesare of
InfoSect.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/drm/dist/shared-core/radeon_cs.c

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



CVS commit: src/sys/external/bsd/drm/dist/shared-core

2019-08-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Aug 30 03:34:37 UTC 2019

Modified Files:
src/sys/external/bsd/drm/dist/shared-core: radeon_cs.c

Log Message:
Delete dead-as-a-doornail-in-a-dead-horse branch.

If dev_priv is null here, you're hosed to begin with, so the apparent
null pointer dereference in this branch is moot; also this is the old
drm code that we should maybe just delete altogether...

Potential null pointer dereference reported by Dr Silvio Cesare of
InfoSect.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/drm/dist/shared-core/radeon_cs.c

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

Modified files:

Index: src/sys/external/bsd/drm/dist/shared-core/radeon_cs.c
diff -u src/sys/external/bsd/drm/dist/shared-core/radeon_cs.c:1.2 src/sys/external/bsd/drm/dist/shared-core/radeon_cs.c:1.3
--- src/sys/external/bsd/drm/dist/shared-core/radeon_cs.c:1.2	Thu Oct 17 21:15:18 2013
+++ src/sys/external/bsd/drm/dist/shared-core/radeon_cs.c	Fri Aug 30 03:34:37 2019
@@ -148,11 +148,6 @@ int radeon_cs_ioctl(struct drm_device *d
 	cs_id = 0;
 	cs->cs_id = cs_id;
 
-	if (dev_priv == NULL) {
-		DRM_ERROR("called with no initialization\n");
-		DRM_SPINUNLOCK(_priv->cs.cs_mutex);
-		return -EINVAL;
-	}
 	if (!cs->num_chunks) {
 		DRM_SPINUNLOCK(_priv->cs.cs_mutex);
 		return 0;



CVS commit: src/sys/dev/eisa

2019-08-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Aug 30 00:36:53 UTC 2019

Modified Files:
src/sys/dev/eisa: if_fea.c

Log Message:
Delete dead null test after malloc(M_WAITOK).

Reported as a possible null pointer dereference by Dr Silvio Cesare
of InfoSect, but the branch is dead code anyway.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/eisa/if_fea.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/eisa/if_fea.c
diff -u src/sys/dev/eisa/if_fea.c:1.47 src/sys/dev/eisa/if_fea.c:1.48
--- src/sys/dev/eisa/if_fea.c:1.47	Thu Jul 14 10:19:06 2016
+++ src/sys/dev/eisa/if_fea.c	Fri Aug 30 00:36:53 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_fea.c,v 1.47 2016/07/14 10:19:06 msaitoh Exp $	*/
+/*	$NetBSD: if_fea.c,v 1.48 2019/08/30 00:36:53 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1996 Matt Thomas 
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_fea.c,v 1.47 2016/07/14 10:19:06 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_fea.c,v 1.48 2019/08/30 00:36:53 riastradh Exp $");
 
 #include "opt_inet.h"
 
@@ -245,10 +245,6 @@ pdq_eisa_attach(
 int irq = ffs(ed->ioconf.irq) - 1;
 
 sc = (pdq_softc_t *) malloc(sizeof(*sc), M_DEVBUF, M_WAITOK|M_ZERO);
-if (sc == NULL) {
-	printf("fea%d: malloc failed!\n", sc->sc_if.if_unit);
-	return -1;
-}
 pdqs_eisa[ed->unit] = sc;
 
 sc->sc_if.if_name = "fea";



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

2019-08-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Aug 30 00:33:55 UTC 2019

Modified Files:
src/sys/arch/arm/gemini: gemini_ipi.c

Log Message:
Don't dereference pointer when we're about to panic because it's null.

Reported by Dr Silvio Cesare of InfoSect.


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

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



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

2019-08-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Aug 30 00:33:55 UTC 2019

Modified Files:
src/sys/arch/arm/gemini: gemini_ipi.c

Log Message:
Don't dereference pointer when we're about to panic because it's null.

Reported by Dr Silvio Cesare of InfoSect.


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

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

Modified files:

Index: src/sys/arch/arm/gemini/gemini_ipi.c
diff -u src/sys/arch/arm/gemini/gemini_ipi.c:1.6 src/sys/arch/arm/gemini/gemini_ipi.c:1.7
--- src/sys/arch/arm/gemini/gemini_ipi.c:1.6	Sat Oct 27 17:17:38 2012
+++ src/sys/arch/arm/gemini/gemini_ipi.c	Fri Aug 30 00:33:55 2019
@@ -7,7 +7,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: gemini_ipi.c,v 1.6 2012/10/27 17:17:38 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gemini_ipi.c,v 1.7 2019/08/30 00:33:55 riastradh Exp $");
 
 #include 
 #include 
@@ -169,7 +169,7 @@ ipi_intr_disestablish(void *ih)
 gemini_ipi_softc_t *sc = gemini_ipi_sc;
 
 	if (sc == NULL)
-		panic("%s: NULL gemini_ipi_sc", device_xname(sc->sc_dev));
+		panic("NULL gemini_ipi_sc");
 
 gemini_ipi_intrq_remove(sc, ih);
 }



CVS commit: src/sys/stand/efiboot

2019-08-29 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Aug 30 00:01:33 UTC 2019

Modified Files:
src/sys/stand/efiboot: efifdt.c

Log Message:
Only set #address-cells and #size-cells properties on /chosen if we are
fabricating a devicetree (ACPI mode). Fixes PR# 54494


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/stand/efiboot/efifdt.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/stand/efiboot/efifdt.c
diff -u src/sys/stand/efiboot/efifdt.c:1.18 src/sys/stand/efiboot/efifdt.c:1.19
--- src/sys/stand/efiboot/efifdt.c:1.18	Thu Aug  1 13:11:16 2019
+++ src/sys/stand/efiboot/efifdt.c	Fri Aug 30 00:01:33 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: efifdt.c,v 1.18 2019/08/01 13:11:16 jmcneill Exp $ */
+/* $NetBSD: efifdt.c,v 1.19 2019/08/30 00:01:33 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2019 Jason R. Thorpe
@@ -292,8 +292,15 @@ efi_fdt_gop(void)
 			continue;
 		}
 
+		fdt_setprop_u32(fdt_data,
+		fdt_path_offset(fdt_data, FDT_CHOSEN_NODE_PATH), "#address-cells", 2);
+		fdt_setprop_u32(fdt_data,
+		fdt_path_offset(fdt_data, FDT_CHOSEN_NODE_PATH), "#size-cells", 2);
+		fdt_setprop_empty(fdt_data,
+		fdt_path_offset(fdt_data, FDT_CHOSEN_NODE_PATH), "ranges");
+
 		snprintf(buf, sizeof(buf), "framebuffer@%" PRIx64, mode->FrameBufferBase);
-		fb = fdt_add_subnode(fdt_data, fdt_path_offset(fdt_data, "/chosen"), buf);
+		fb = fdt_add_subnode(fdt_data, fdt_path_offset(fdt_data, FDT_CHOSEN_NODE_PATH), buf);
 		if (fb < 0)
 			panic("FDT: Failed to create framebuffer node");
 
@@ -327,10 +334,6 @@ efi_fdt_bootargs(const char *bootargs)
 	if (chosen < 0)
 		panic("FDT: Failed to create " FDT_CHOSEN_NODE_PATH " node");
 
-	fdt_setprop_u32(fdt_data, chosen, "#address-cells", 2);
-	fdt_setprop_u32(fdt_data, chosen, "#size-cells", 2);
-	fdt_setprop_empty(fdt_data, chosen, "ranges");
-
 	if (*bootargs)
 		fdt_setprop_string(fdt_data, chosen, "bootargs", bootargs);
 



CVS commit: src/sys/stand/efiboot

2019-08-29 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Aug 30 00:01:33 UTC 2019

Modified Files:
src/sys/stand/efiboot: efifdt.c

Log Message:
Only set #address-cells and #size-cells properties on /chosen if we are
fabricating a devicetree (ACPI mode). Fixes PR# 54494


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/stand/efiboot/efifdt.c

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



CVS commit: src/doc

2019-08-29 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Aug 29 17:54:32 UTC 2019

Modified Files:
src/doc: CHANGES

Log Message:
Note inet6 change about router -> host.


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

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2573 src/doc/CHANGES:1.2574
--- src/doc/CHANGES:1.2573	Wed Aug 21 17:14:26 2019
+++ src/doc/CHANGES	Thu Aug 29 17:54:32 2019
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2573 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2574 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -32,3 +32,5 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	usbnet(9): Port kue(4) and upl(4). [mrg 20190818]
 	boot(8): GPT and RAIDframe support for x86 bootstrap [manu 20190818]
 	dhcpcd(8): Import dhcpcd-8.0.3 [roy 20190821]
+	inet6: Announce Router to Host via RTM_CHANGE without a lladdr.
+		dhcpcd no longer needs to parse NA messages. [roy 20190829]



CVS commit: src/doc

2019-08-29 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Aug 29 17:54:32 UTC 2019

Modified Files:
src/doc: CHANGES

Log Message:
Note inet6 change about router -> host.


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

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-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug 29 16:58:40 UTC 2019

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

Log Message:
Tickets #120 and #121


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.32 -r1.1.2.33 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-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug 29 16:58:40 UTC 2019

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

Log Message:
Tickets #120 and #121


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.32 -r1.1.2.33 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.32 src/doc/CHANGES-9.0:1.1.2.33
--- src/doc/CHANGES-9.0:1.1.2.32	Thu Aug 29 06:46:44 2019
+++ src/doc/CHANGES-9.0	Thu Aug 29 16:58:40 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.0,v 1.1.2.32 2019/08/29 06:46:44 msaitoh Exp $
+# $NetBSD: CHANGES-9.0,v 1.1.2.33 2019/08/29 16:58:40 martin Exp $
 
 A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30
 until the 9.0 release:
@@ -2256,3 +2256,55 @@ usr.sbin/sysinst/bsddisklabel.c			1.27
 
 	Remove dead (#if 0) code.
 	[martin, ticket #130]
+
+distrib/sets/lists/tests/mi			1.819
+tests/usr.bin/c++/Makefile			1.12
+tests/usr.bin/c++/t_fuzzer_oom.sh		1.1,1.2
+tests/usr.bin/c++/t_fuzzer_simple.sh		1.1,1.2
+tests/usr.bin/c++/t_fuzzer_timeout.sh		1.1,1.2
+tests/usr.bin/c++/t_msan_allocated_memory.sh	1.1,1.2
+tests/usr.bin/c++/t_msan_check_mem.sh		1.1,1.2
+tests/usr.bin/c++/t_msan_free.sh		1.1,1.2
+tests/usr.bin/c++/t_msan_heap.sh		1.1,1.2
+tests/usr.bin/c++/t_msan_partial_poison.sh	1.1,1.2
+tests/usr.bin/c++/t_msan_poison.sh		1.1,1.2
+tests/usr.bin/c++/t_msan_realloc.sh		1.1,1.2
+tests/usr.bin/c++/t_msan_shadow.sh		1.1,1.2
+tests/usr.bin/c++/t_msan_stack.sh		1.1,1.2
+tests/usr.bin/c++/t_msan_unpoison.sh		1.1,1.2
+tests/usr.bin/c++/t_tsan_data_race.sh		1.1,1.2
+tests/usr.bin/c++/t_tsan_heap_use_after_free.sh	1.1,1.2
+tests/usr.bin/c++/t_tsan_lock_order_inversion.sh 1.1,1.2
+tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh 1.1,1.2
+tests/usr.bin/c++/t_tsan_signal_errno.sh	1.1,1.2
+tests/usr.bin/c++/t_tsan_thread_leak.sh		1.1,1.2
+tests/usr.bin/c++/t_tsan_vptr_race.sh		1.1,1.2
+tests/usr.bin/cc/Makefile			1.8
+tests/usr.bin/cc/t_fuzzer_oom.sh		1.1,1.2
+tests/usr.bin/cc/t_fuzzer_simple.sh		1.1,1.2
+tests/usr.bin/cc/t_fuzzer_timeout.sh		1.1,1.2
+tests/usr.bin/cc/t_msan_allocated_memory.sh	1.1,1.2
+tests/usr.bin/cc/t_msan_check_mem.sh		1.1,1.2
+tests/usr.bin/cc/t_msan_free.sh			1.1,1.2
+tests/usr.bin/cc/t_msan_heap.sh			1.1,1.2
+tests/usr.bin/cc/t_msan_partial_poison.sh	1.1,1.2
+tests/usr.bin/cc/t_msan_poison.sh		1.1,1.2
+tests/usr.bin/cc/t_msan_realloc.sh		1.1,1.2
+tests/usr.bin/cc/t_msan_shadow.sh		1.1,1.2
+tests/usr.bin/cc/t_msan_stack.sh		1.1,1.2
+tests/usr.bin/cc/t_msan_unpoison.sh		1.1,1.2
+tests/usr.bin/cc/t_tsan_data_race.sh		1.1,1.2
+tests/usr.bin/cc/t_tsan_heap_use_after_free.sh	1.1,1.2
+tests/usr.bin/cc/t_tsan_lock_order_inversion.sh	1.1,1.2
+tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh	1.1,1.2
+tests/usr.bin/cc/t_tsan_signal_errno.sh		1.1,1.2
+tests/usr.bin/cc/t_tsan_thread_leak.sh		1.1,1.2
+
+	Add ATF c and c++ tests for TSan, MSan, libFuzzer.
+	[kamil, ticket #120]
+
+distrib/i386/ramdisks/common/Makefile.ramdisk	1.14
+
+	Set NOSANITIZER in i386 ramdisk image.
+	[kamil, ticket #121]
+



CVS commit: [netbsd-9] src/distrib/i386/ramdisks/common

2019-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug 29 16:48:44 UTC 2019

Modified Files:
src/distrib/i386/ramdisks/common [netbsd-9]: Makefile.ramdisk

Log Message:
Pull up following revision(s) (requested by kamil in ticket #121):

distrib/i386/ramdisks/common/Makefile.ramdisk: revision 1.14

Set NOSANITIZER in i386 ramdisk image


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.13.4.1 \
src/distrib/i386/ramdisks/common/Makefile.ramdisk

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

Modified files:

Index: src/distrib/i386/ramdisks/common/Makefile.ramdisk
diff -u src/distrib/i386/ramdisks/common/Makefile.ramdisk:1.13 src/distrib/i386/ramdisks/common/Makefile.ramdisk:1.13.4.1
--- src/distrib/i386/ramdisks/common/Makefile.ramdisk:1.13	Tue Mar 13 02:22:43 2018
+++ src/distrib/i386/ramdisks/common/Makefile.ramdisk	Thu Aug 29 16:48:44 2019
@@ -1,4 +1,6 @@
-#	$NetBSD: Makefile.ramdisk,v 1.13 2018/03/13 02:22:43 mrg Exp $
+#	$NetBSD: Makefile.ramdisk,v 1.13.4.1 2019/08/29 16:48:44 martin Exp $
+
+NOSANITIZER=	# defined
 
 .include 
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"



CVS commit: [netbsd-9] src/distrib/i386/ramdisks/common

2019-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug 29 16:48:44 UTC 2019

Modified Files:
src/distrib/i386/ramdisks/common [netbsd-9]: Makefile.ramdisk

Log Message:
Pull up following revision(s) (requested by kamil in ticket #121):

distrib/i386/ramdisks/common/Makefile.ramdisk: revision 1.14

Set NOSANITIZER in i386 ramdisk image


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.13.4.1 \
src/distrib/i386/ramdisks/common/Makefile.ramdisk

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



CVS commit: [netbsd-9] src

2019-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug 29 16:45:26 UTC 2019

Modified Files:
src/distrib/sets/lists/tests [netbsd-9]: mi
src/tests/usr.bin/c++ [netbsd-9]: Makefile
src/tests/usr.bin/cc [netbsd-9]: Makefile
Added Files:
src/tests/usr.bin/c++ [netbsd-9]: t_fuzzer_oom.sh t_fuzzer_simple.sh
t_fuzzer_timeout.sh t_msan_allocated_memory.sh t_msan_check_mem.sh
t_msan_free.sh t_msan_heap.sh t_msan_partial_poison.sh
t_msan_poison.sh t_msan_realloc.sh t_msan_shadow.sh t_msan_stack.sh
t_msan_unpoison.sh t_tsan_data_race.sh
t_tsan_heap_use_after_free.sh t_tsan_lock_order_inversion.sh
t_tsan_locked_mutex_destroy.sh t_tsan_signal_errno.sh
t_tsan_thread_leak.sh t_tsan_vptr_race.sh
src/tests/usr.bin/cc [netbsd-9]: t_fuzzer_oom.sh t_fuzzer_simple.sh
t_fuzzer_timeout.sh t_msan_allocated_memory.sh t_msan_check_mem.sh
t_msan_free.sh t_msan_heap.sh t_msan_partial_poison.sh
t_msan_poison.sh t_msan_realloc.sh t_msan_shadow.sh t_msan_stack.sh
t_msan_unpoison.sh t_tsan_data_race.sh
t_tsan_heap_use_after_free.sh t_tsan_lock_order_inversion.sh
t_tsan_locked_mutex_destroy.sh t_tsan_signal_errno.sh
t_tsan_thread_leak.sh

Log Message:
Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: 

CVS commit: [netbsd-8] src/doc

2019-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug 29 16:33:56 UTC 2019

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

Log Message:
Tickets #1345 - #1347


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.29 -r1.1.2.30 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.29 src/doc/CHANGES-8.2:1.1.2.30
--- src/doc/CHANGES-8.2:1.1.2.29	Mon Aug 26 13:17:02 2019
+++ src/doc/CHANGES-8.2	Thu Aug 29 16:33:56 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.2,v 1.1.2.29 2019/08/26 13:17:02 martin Exp $
+# $NetBSD: CHANGES-8.2,v 1.1.2.30 2019/08/29 16:33:56 martin Exp $
 
 A complete list of changes from the NetBSD 8.1 release to the NetBSD 8.2
 release:
@@ -618,3 +618,21 @@ sys/dev/sysmon/sysmon.c1.30
 	MODULE_CLASS_DRIVER, not MODULE_CLASS_MISC.
 	[nakayama, ticket #1344]
 
+sys/fs/tmpfs/tmpfs_rename.c			1.9
+
+	Fix uninitialized variable that could have caused a KASSERT to
+	wrongfully fire.
+	[maxv, ticket #1345]
+
+sys/miscfs/kernfs/kernfs_vnops.c		1.161
+sys/miscfs/procfs/procfs_vnops.c		1.207
+
+	Add missing operation VOP_GETPAGES() returning EFAULT.
+	[hannken, ticket #1346]
+
+sys/dev/pci/ixgbe/ixgbe.c			1.205,1.206
+
+	Fix typo in error handling of ixgbe_allocate_legacy().
+	Fix panic on single cpu systems.
+	[knakahara, ticket #1347]
+



CVS commit: [netbsd-8] src/doc

2019-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug 29 16:33:56 UTC 2019

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

Log Message:
Tickets #1345 - #1347


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

2019-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug 29 16:31:53 UTC 2019

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

Log Message:
Pull up following revision(s) (requested by knakahara in ticket #1347):

sys/dev/pci/ixgbe/ixgbe.c: revision 1.205
sys/dev/pci/ixgbe/ixgbe.c: revision 1.206

fix typo in error handling of ixgbe_allocate_legacy().
ok by msaitoh@n.o
pullup-8, pullup-9

 -

Fix panic when ncpu == 1 && sysctl -w hw.ixg0.txrx_workqueue=1. Reported by 
nonaka@n.o.

ok by msaitoh@n.o and nonaka@n.o
pullup-8, pullup-9


To generate a diff of this commit:
cvs rdiff -u -r1.88.2.31 -r1.88.2.32 src/sys/dev/pci/ixgbe/ixgbe.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/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.31 src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.32
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.31	Thu Aug  1 14:14:30 2019
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Thu Aug 29 16:31:53 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.88.2.31 2019/08/01 14:14:30 martin Exp $ */
+/* $NetBSD: ixgbe.c,v 1.88.2.32 2019/08/29 16:31:53 martin Exp $ */
 
 /**
 
@@ -6410,7 +6410,9 @@ ixgbe_allocate_legacy(struct adapter *ad
 	int		counts[PCI_INTR_TYPE_SIZE];
 	pci_intr_type_t intr_type, max_type;
 	char		intrbuf[PCI_INTRSTR_LEN];
+	char		wqname[MAXCOMLEN];
 	const char	*intrstr = NULL;
+	int defertx_error = 0, error;
 
 	/* We allocate a single interrupt resource */
 	max_type = PCI_INTR_TYPE_MSI;
@@ -6472,15 +6474,27 @@ alloc_retry:
 	 * Try allocating a fast interrupt and the associated deferred
 	 * processing contexts.
 	 */
-	if (!(adapter->feat_en & IXGBE_FEATURE_LEGACY_TX))
+	if (!(adapter->feat_en & IXGBE_FEATURE_LEGACY_TX)) {
 		txr->txr_si =
 		softint_establish(SOFTINT_NET | IXGBE_SOFTINFT_FLAGS,
 			ixgbe_deferred_mq_start, txr);
+
+		snprintf(wqname, sizeof(wqname), "%sdeferTx", device_xname(dev));
+		defertx_error = workqueue_create(>txr_wq, wqname,
+		ixgbe_deferred_mq_start_work, adapter, IXGBE_WORKQUEUE_PRI,
+		IPL_NET, IXGBE_WORKQUEUE_FLAGS);
+		adapter->txr_wq_enqueued = percpu_alloc(sizeof(u_int));
+	}
 	que->que_si = softint_establish(SOFTINT_NET | IXGBE_SOFTINFT_FLAGS,
 	ixgbe_handle_que, que);
+	snprintf(wqname, sizeof(wqname), "%sTxRx", device_xname(dev));
+	error = workqueue_create(>que_wq, wqname,
+	ixgbe_handle_que_work, adapter, IXGBE_WORKQUEUE_PRI, IPL_NET,
+	IXGBE_WORKQUEUE_FLAGS);
 
 	if ((!(adapter->feat_en & IXGBE_FEATURE_LEGACY_TX)
-		& (txr->txr_si == NULL)) || (que->que_si == NULL)) {
+		&& ((txr->txr_si == NULL) || defertx_error != 0))
+	|| (que->que_si == NULL) || error != 0) {
 		aprint_error_dev(dev,
 		"could not establish software interrupts\n");
 



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

2019-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug 29 16:31:53 UTC 2019

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

Log Message:
Pull up following revision(s) (requested by knakahara in ticket #1347):

sys/dev/pci/ixgbe/ixgbe.c: revision 1.205
sys/dev/pci/ixgbe/ixgbe.c: revision 1.206

fix typo in error handling of ixgbe_allocate_legacy().
ok by msaitoh@n.o
pullup-8, pullup-9

 -

Fix panic when ncpu == 1 && sysctl -w hw.ixg0.txrx_workqueue=1. Reported by 
nonaka@n.o.

ok by msaitoh@n.o and nonaka@n.o
pullup-8, pullup-9


To generate a diff of this commit:
cvs rdiff -u -r1.88.2.31 -r1.88.2.32 src/sys/dev/pci/ixgbe/ixgbe.c

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



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

2019-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug 29 16:28:47 UTC 2019

Modified Files:
src/sys/miscfs/kernfs [netbsd-8]: kernfs_vnops.c
src/sys/miscfs/procfs [netbsd-8]: procfs_vnops.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #1346):

sys/miscfs/kernfs/kernfs_vnops.c: revision 1.161
sys/miscfs/procfs/procfs_vnops.c: revision 1.207

Add missing operation VOP_GETPAGES() returning EFAULT.

Without this operation posix_fadvise(..., POSIX_FADV_WILLNEED)
would leave the v_interlock held.

Observed by maxv@


To generate a diff of this commit:
cvs rdiff -u -r1.158 -r1.158.2.1 src/sys/miscfs/kernfs/kernfs_vnops.c
cvs rdiff -u -r1.197.2.2 -r1.197.2.3 src/sys/miscfs/procfs/procfs_vnops.c

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



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

2019-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug 29 16:28:47 UTC 2019

Modified Files:
src/sys/miscfs/kernfs [netbsd-8]: kernfs_vnops.c
src/sys/miscfs/procfs [netbsd-8]: procfs_vnops.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #1346):

sys/miscfs/kernfs/kernfs_vnops.c: revision 1.161
sys/miscfs/procfs/procfs_vnops.c: revision 1.207

Add missing operation VOP_GETPAGES() returning EFAULT.

Without this operation posix_fadvise(..., POSIX_FADV_WILLNEED)
would leave the v_interlock held.

Observed by maxv@


To generate a diff of this commit:
cvs rdiff -u -r1.158 -r1.158.2.1 src/sys/miscfs/kernfs/kernfs_vnops.c
cvs rdiff -u -r1.197.2.2 -r1.197.2.3 src/sys/miscfs/procfs/procfs_vnops.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/miscfs/kernfs/kernfs_vnops.c
diff -u src/sys/miscfs/kernfs/kernfs_vnops.c:1.158 src/sys/miscfs/kernfs/kernfs_vnops.c:1.158.2.1
--- src/sys/miscfs/kernfs/kernfs_vnops.c:1.158	Fri May 26 14:21:01 2017
+++ src/sys/miscfs/kernfs/kernfs_vnops.c	Thu Aug 29 16:28:47 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: kernfs_vnops.c,v 1.158 2017/05/26 14:21:01 riastradh Exp $	*/
+/*	$NetBSD: kernfs_vnops.c,v 1.158.2.1 2019/08/29 16:28:47 martin Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kernfs_vnops.c,v 1.158 2017/05/26 14:21:01 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kernfs_vnops.c,v 1.158.2.1 2019/08/29 16:28:47 martin Exp $");
 
 #include 
 #include 
@@ -172,6 +172,7 @@ int	kernfs_print(void *);
 int	kernfs_pathconf(void *);
 #define	kernfs_advlock	genfs_einval
 #define	kernfs_bwrite	genfs_eopnotsupp
+int	kernfs_getpages(void *);
 #define	kernfs_putpages	genfs_putpages
 
 static int	kernfs_xread(struct kernfs_node *, int, char **,
@@ -219,6 +220,7 @@ const struct vnodeopv_entry_desc kernfs_
 	{ _pathconf_desc, kernfs_pathconf },	/* pathconf */
 	{ _advlock_desc, kernfs_advlock },		/* advlock */
 	{ _bwrite_desc, kernfs_bwrite },		/* bwrite */
+	{ _getpages_desc, kernfs_getpages },	/* getpages */
 	{ _putpages_desc, kernfs_putpages },	/* putpages */
 	{ NULL, NULL }
 };
@@ -1170,3 +1172,23 @@ kernfs_symlink(void *v)
 	VOP_ABORTOP(ap->a_dvp, ap->a_cnp);
 	return (EROFS);
 }
+ 
+int
+kernfs_getpages(void *v)
+{
+	struct vop_getpages_args /* {
+		struct vnode *a_vp;
+		voff_t a_offset;
+		struct vm_page **a_m;
+		int *a_count;
+		int a_centeridx;
+		vm_prot_t a_access_type;
+		int a_advice;
+		int a_flags;
+	} */ *ap = v;
+
+	if ((ap->a_flags & PGO_LOCKED) == 0)
+		mutex_exit(ap->a_vp->v_interlock);
+
+	return (EFAULT);
+}

Index: src/sys/miscfs/procfs/procfs_vnops.c
diff -u src/sys/miscfs/procfs/procfs_vnops.c:1.197.2.2 src/sys/miscfs/procfs/procfs_vnops.c:1.197.2.3
--- src/sys/miscfs/procfs/procfs_vnops.c:1.197.2.2	Thu Apr 12 13:42:48 2018
+++ src/sys/miscfs/procfs/procfs_vnops.c	Thu Aug 29 16:28:47 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: procfs_vnops.c,v 1.197.2.2 2018/04/12 13:42:48 martin Exp $	*/
+/*	$NetBSD: procfs_vnops.c,v 1.197.2.3 2019/08/29 16:28:47 martin Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -105,7 +105,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.197.2.2 2018/04/12 13:42:48 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.197.2.3 2019/08/29 16:28:47 martin Exp $");
 
 #include 
 #include 
@@ -240,6 +240,7 @@ int	procfs_pathconf(void *);
 #define	procfs_islocked	genfs_islocked
 #define	procfs_advlock	genfs_einval
 #define	procfs_bwrite	genfs_eopnotsupp
+int	procfs_getpages(void *);
 #define procfs_putpages	genfs_null_putpages
 
 static int atoi(const char *, size_t);
@@ -287,6 +288,7 @@ const struct vnodeopv_entry_desc procfs_
 	{ _islocked_desc, procfs_islocked },	/* islocked */
 	{ _pathconf_desc, procfs_pathconf },	/* pathconf */
 	{ _advlock_desc, procfs_advlock },		/* advlock */
+	{ _getpages_desc, procfs_getpages },	/* getpages */
 	{ _putpages_desc, procfs_putpages },	/* putpages */
 	{ NULL, NULL }
 };
@@ -1733,6 +1735,26 @@ procfs_readlink(void *v)
 	return error;
 }
 
+int
+procfs_getpages(void *v)
+{
+	struct vop_getpages_args /* {
+		struct vnode *a_vp;
+		voff_t a_offset;
+		struct vm_page **a_m;
+		int *a_count;
+		int a_centeridx;
+		vm_prot_t a_access_type;
+		int a_advice;
+		int a_flags;
+	} */ *ap = v;
+
+	if ((ap->a_flags & PGO_LOCKED) == 0)
+		mutex_exit(ap->a_vp->v_interlock);
+
+	return (EFAULT);
+}
+
 /*
  * convert decimal ascii to int
  */



CVS commit: [netbsd-8] src/sys/fs/tmpfs

2019-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug 29 16:26:46 UTC 2019

Modified Files:
src/sys/fs/tmpfs [netbsd-8]: tmpfs_rename.c

Log Message:
Pull up following revision(s) (requested by maxv in ticket #1345):

sys/fs/tmpfs/tmpfs_rename.c: revision 1.9

Fix uninitialized variable: if 'tvp' is NULL, '*tdep' is not initialized.

This could have caused the KASSERT to wrongfully fire.

ok riastradh@


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.8.10.1 src/sys/fs/tmpfs/tmpfs_rename.c

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



CVS commit: [netbsd-8] src/sys/fs/tmpfs

2019-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug 29 16:26:46 UTC 2019

Modified Files:
src/sys/fs/tmpfs [netbsd-8]: tmpfs_rename.c

Log Message:
Pull up following revision(s) (requested by maxv in ticket #1345):

sys/fs/tmpfs/tmpfs_rename.c: revision 1.9

Fix uninitialized variable: if 'tvp' is NULL, '*tdep' is not initialized.

This could have caused the KASSERT to wrongfully fire.

ok riastradh@


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.8.10.1 src/sys/fs/tmpfs/tmpfs_rename.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/fs/tmpfs/tmpfs_rename.c
diff -u src/sys/fs/tmpfs/tmpfs_rename.c:1.8 src/sys/fs/tmpfs/tmpfs_rename.c:1.8.10.1
--- src/sys/fs/tmpfs/tmpfs_rename.c:1.8	Mon Jul  6 10:24:59 2015
+++ src/sys/fs/tmpfs/tmpfs_rename.c	Thu Aug 29 16:26:46 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: tmpfs_rename.c,v 1.8 2015/07/06 10:24:59 wiz Exp $	*/
+/*	$NetBSD: tmpfs_rename.c,v 1.8.10.1 2019/08/29 16:26:46 martin Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tmpfs_rename.c,v 1.8 2015/07/06 10:24:59 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmpfs_rename.c,v 1.8.10.1 2019/08/29 16:26:46 martin Exp $");
 
 #include 
 #include 
@@ -282,7 +282,7 @@ tmpfs_gro_rename(struct mount *mp, kauth
 	KASSERT(tcnp != NULL);
 	KASSERT(tdep != NULL);
 	KASSERT(fdep != tdep);
-	KASSERT((*fdep) != (*tdep));
+	KASSERT((tvp == NULL) || (*fdep) != (*tdep));
 	KASSERT((*fdep) != NULL);
 	KASSERT((*fdep)->td_node == VP_TO_TMPFS_NODE(fvp));
 	KASSERT((tvp == NULL) || ((*tdep) != NULL));



CVS commit: src/sys/netinet6

2019-08-29 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Aug 29 16:26:43 UTC 2019

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

Log Message:
Userland really has no business with NA messages.
However, RFC 4861 6.2.5 only says departing routers
*SHOULD* send RA with lifetime of zero and *MUST*
send all subsequent NA messages if the router flag
unset.

To help userland avoid the expensive process of
parsing NA messages, send RTM_CHANGE without a
lladdr in the gateway.
This is different from the intial RTM_ADD also
without a lladdr in the gateway and RTM_DELETE.


To generate a diff of this commit:
cvs rdiff -u -r1.169 -r1.170 src/sys/netinet6/nd6_nbr.c

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



CVS commit: src/sys/netinet6

2019-08-29 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Aug 29 16:26:43 UTC 2019

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

Log Message:
Userland really has no business with NA messages.
However, RFC 4861 6.2.5 only says departing routers
*SHOULD* send RA with lifetime of zero and *MUST*
send all subsequent NA messages if the router flag
unset.

To help userland avoid the expensive process of
parsing NA messages, send RTM_CHANGE without a
lladdr in the gateway.
This is different from the intial RTM_ADD also
without a lladdr in the gateway and RTM_DELETE.


To generate a diff of this commit:
cvs rdiff -u -r1.169 -r1.170 src/sys/netinet6/nd6_nbr.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/nd6_nbr.c
diff -u src/sys/netinet6/nd6_nbr.c:1.169 src/sys/netinet6/nd6_nbr.c:1.170
--- src/sys/netinet6/nd6_nbr.c:1.169	Thu Aug 29 14:28:06 2019
+++ src/sys/netinet6/nd6_nbr.c	Thu Aug 29 16:26:43 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6_nbr.c,v 1.169 2019/08/29 14:28:06 roy Exp $	*/
+/*	$NetBSD: nd6_nbr.c,v 1.170 2019/08/29 16:26:43 roy Exp $	*/
 /*	$KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.169 2019/08/29 14:28:06 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.170 2019/08/29 16:26:43 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -854,10 +854,27 @@ nd6_na_input(struct mbuf *m, int off, in
 			 * Remove the sender from the Default Router List and
 			 * update the Destination Cache entries.
 			 */
+			const struct in6_addr *in6 = >r_l3addr.addr6;
 			struct nd_defrouter *dr;
-			const struct in6_addr *in6;
+			struct sockaddr_in6 sin6;
 
-			in6 = >r_l3addr.addr6;
+			/*
+			 * Userland really has no business with NA messages.
+			 * However, RFC 4861 6.2.5 only says departing routers
+			 * *SHOULD* send RA with lifetime of zero and *MUST*
+			 * send all subsequent NA messages if the router flag
+			 * unset.
+			 *
+			 * To help userland avoid the expensive process of
+			 * parsing NA messages, send RTM_CHANGE without a
+			 * lladdr in the gateway.
+			 * This is different from the intial RTM_ADD also
+			 * without a lladdr in the gateway and RTM_DELETE.
+			 */
+			sockaddr_in6_init(, in6, 0, 0, 0);
+			rt_clonedmsg(RTM_CHANGE, sin6tosa(), NULL,
+			ln->lle_tbl->llt_ifp);
+			rt_announce = true;
 
 			ND6_WLOCK();
 			dr = nd6_defrouter_lookup(in6, ln->lle_tbl->llt_ifp);
@@ -887,8 +904,9 @@ nd6_na_input(struct mbuf *m, int off, in
 	if (rt_announce) {
 		struct sockaddr_in6 sin6;
 
-		sockaddr_in6_init(, , 0, 0, 0);
-		rt_clonedmsg(RTM_CHANGE, sin6tosa(), lladdr, ifp);
+		sockaddr_in6_init(, >r_l3addr.addr6, 0, 0, 0);
+		rt_clonedmsg(RTM_CHANGE, sin6tosa(),
+		(char *)>ll_addr, ln->lle_tbl->llt_ifp);
 	}
 
  freeit:



CVS commit: src/sys/dev

2019-08-29 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Thu Aug 29 16:20:48 UTC 2019

Modified Files:
src/sys/dev: md.c

Log Message:
Add "d_minphys" to "mddkdriver" to make physio() on wedges happy.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/sys/dev/md.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/md.c
diff -u src/sys/dev/md.c:1.81 src/sys/dev/md.c:1.82
--- src/sys/dev/md.c:1.81	Sun May 26 10:22:07 2019
+++ src/sys/dev/md.c	Thu Aug 29 16:20:48 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.81 2019/05/26 10:22:07 hannken Exp $	*/
+/*	$NetBSD: md.c,v 1.82 2019/08/29 16:20:48 hannken Exp $	*/
 
 /*
  * Copyright (c) 1995 Gordon W. Ross, Leo Weppelman.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.81 2019/05/26 10:22:07 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.82 2019/08/29 16:20:48 hannken Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_md.h"
@@ -132,7 +132,8 @@ const struct cdevsw md_cdevsw = {
 };
 
 static struct dkdriver mddkdriver = {
-	.d_strategy = mdstrategy
+	.d_strategy = mdstrategy,
+	.d_minphys = minphys
 };
 
 CFATTACH_DECL3_NEW(md, sizeof(struct md_softc),



CVS commit: src/sys/dev

2019-08-29 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Thu Aug 29 16:20:48 UTC 2019

Modified Files:
src/sys/dev: md.c

Log Message:
Add "d_minphys" to "mddkdriver" to make physio() on wedges happy.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/sys/dev/md.c

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



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

2019-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug 29 16:17:08 UTC 2019

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

Log Message:
Ticket #1703


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.147 -r1.1.2.148 src/doc/CHANGES-7.0.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-7.0.3
diff -u src/doc/CHANGES-7.0.3:1.1.2.147 src/doc/CHANGES-7.0.3:1.1.2.148
--- src/doc/CHANGES-7.0.3:1.1.2.147	Sat Jun 15 15:59:33 2019
+++ src/doc/CHANGES-7.0.3	Thu Aug 29 16:17:08 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.3,v 1.1.2.147 2019/06/15 15:59:33 martin Exp $
+# $NetBSD: CHANGES-7.0.3,v 1.1.2.148 2019/08/29 16:17:08 martin Exp $
 
 A complete list of changes from the NetBSD 7.0.2 release to the NetBSD 7.0.3
 release:
@@ -5855,3 +5855,9 @@ libexec/httpd/testsuite/test-simple		1.6
 	Avoid an assertion failure when using cgihandler (-C option).
 	[mrg, ticket #1699]
 
+sys/miscfs/kernfs/kernfs_vnops.c		1.161
+sys/miscfs/procfs/procfs_vnops.c		1.207
+
+	Add missing operation VOP_GETPAGES() returning EFAULT.
+	[hannken, ticket #1703]
+



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

2019-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug 29 16:17:08 UTC 2019

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

Log Message:
Ticket #1703


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.147 -r1.1.2.148 src/doc/CHANGES-7.0.3

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



CVS commit: [netbsd-7-0] src/sys/miscfs

2019-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug 29 16:15:36 UTC 2019

Modified Files:
src/sys/miscfs/kernfs [netbsd-7-0]: kernfs_vnops.c
src/sys/miscfs/procfs [netbsd-7-0]: procfs_vnops.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #1703):

sys/miscfs/kernfs/kernfs_vnops.c: revision 1.161
sys/miscfs/procfs/procfs_vnops.c: revision 1.207

Add missing operation VOP_GETPAGES() returning EFAULT.

Without this operation posix_fadvise(..., POSIX_FADV_WILLNEED)
would leave the v_interlock held.

Observed by maxv@


To generate a diff of this commit:
cvs rdiff -u -r1.154 -r1.154.6.1 src/sys/miscfs/kernfs/kernfs_vnops.c
cvs rdiff -u -r1.191 -r1.191.4.1 src/sys/miscfs/procfs/procfs_vnops.c

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



CVS commit: [netbsd-7-0] src/sys/miscfs

2019-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug 29 16:15:36 UTC 2019

Modified Files:
src/sys/miscfs/kernfs [netbsd-7-0]: kernfs_vnops.c
src/sys/miscfs/procfs [netbsd-7-0]: procfs_vnops.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #1703):

sys/miscfs/kernfs/kernfs_vnops.c: revision 1.161
sys/miscfs/procfs/procfs_vnops.c: revision 1.207

Add missing operation VOP_GETPAGES() returning EFAULT.

Without this operation posix_fadvise(..., POSIX_FADV_WILLNEED)
would leave the v_interlock held.

Observed by maxv@


To generate a diff of this commit:
cvs rdiff -u -r1.154 -r1.154.6.1 src/sys/miscfs/kernfs/kernfs_vnops.c
cvs rdiff -u -r1.191 -r1.191.4.1 src/sys/miscfs/procfs/procfs_vnops.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/miscfs/kernfs/kernfs_vnops.c
diff -u src/sys/miscfs/kernfs/kernfs_vnops.c:1.154 src/sys/miscfs/kernfs/kernfs_vnops.c:1.154.6.1
--- src/sys/miscfs/kernfs/kernfs_vnops.c:1.154	Fri Jul 25 08:20:52 2014
+++ src/sys/miscfs/kernfs/kernfs_vnops.c	Thu Aug 29 16:15:35 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: kernfs_vnops.c,v 1.154 2014/07/25 08:20:52 dholland Exp $	*/
+/*	$NetBSD: kernfs_vnops.c,v 1.154.6.1 2019/08/29 16:15:35 martin Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kernfs_vnops.c,v 1.154 2014/07/25 08:20:52 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kernfs_vnops.c,v 1.154.6.1 2019/08/29 16:15:35 martin Exp $");
 
 #include 
 #include 
@@ -172,6 +172,7 @@ int	kernfs_print(void *);
 int	kernfs_pathconf(void *);
 #define	kernfs_advlock	genfs_einval
 #define	kernfs_bwrite	genfs_eopnotsupp
+int	kernfs_getpages(void *);
 #define	kernfs_putpages	genfs_putpages
 
 static int	kernfs_xread(struct kernfs_node *, int, char **,
@@ -219,6 +220,7 @@ const struct vnodeopv_entry_desc kernfs_
 	{ _pathconf_desc, kernfs_pathconf },	/* pathconf */
 	{ _advlock_desc, kernfs_advlock },		/* advlock */
 	{ _bwrite_desc, kernfs_bwrite },		/* bwrite */
+	{ _getpages_desc, kernfs_getpages },	/* getpages */
 	{ _putpages_desc, kernfs_putpages },	/* putpages */
 	{ NULL, NULL }
 };
@@ -1171,3 +1173,23 @@ kernfs_symlink(void *v)
 	VOP_ABORTOP(ap->a_dvp, ap->a_cnp);
 	return (EROFS);
 }
+ 
+int
+kernfs_getpages(void *v)
+{
+	struct vop_getpages_args /* {
+		struct vnode *a_vp;
+		voff_t a_offset;
+		struct vm_page **a_m;
+		int *a_count;
+		int a_centeridx;
+		vm_prot_t a_access_type;
+		int a_advice;
+		int a_flags;
+	} */ *ap = v;
+
+	if ((ap->a_flags & PGO_LOCKED) == 0)
+		mutex_exit(ap->a_vp->v_interlock);
+
+	return (EFAULT);
+}

Index: src/sys/miscfs/procfs/procfs_vnops.c
diff -u src/sys/miscfs/procfs/procfs_vnops.c:1.191 src/sys/miscfs/procfs/procfs_vnops.c:1.191.4.1
--- src/sys/miscfs/procfs/procfs_vnops.c:1.191	Sun Jul 27 16:47:26 2014
+++ src/sys/miscfs/procfs/procfs_vnops.c	Thu Aug 29 16:15:35 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: procfs_vnops.c,v 1.191 2014/07/27 16:47:26 hannken Exp $	*/
+/*	$NetBSD: procfs_vnops.c,v 1.191.4.1 2019/08/29 16:15:35 martin Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -105,7 +105,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.191 2014/07/27 16:47:26 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.191.4.1 2019/08/29 16:15:35 martin Exp $");
 
 #include 
 #include 
@@ -239,6 +239,7 @@ int	procfs_pathconf(void *);
 #define	procfs_islocked	genfs_islocked
 #define	procfs_advlock	genfs_einval
 #define	procfs_bwrite	genfs_eopnotsupp
+int	procfs_getpages(void *);
 #define procfs_putpages	genfs_null_putpages
 
 static int atoi(const char *, size_t);
@@ -286,6 +287,7 @@ const struct vnodeopv_entry_desc procfs_
 	{ _islocked_desc, procfs_islocked },	/* islocked */
 	{ _pathconf_desc, procfs_pathconf },	/* pathconf */
 	{ _advlock_desc, procfs_advlock },		/* advlock */
+	{ _getpages_desc, procfs_getpages },	/* getpages */
 	{ _putpages_desc, procfs_putpages },	/* putpages */
 	{ NULL, NULL }
 };
@@ -1709,6 +1711,26 @@ procfs_readlink(void *v)
 	return error;
 }
 
+int
+procfs_getpages(void *v)
+{
+	struct vop_getpages_args /* {
+		struct vnode *a_vp;
+		voff_t a_offset;
+		struct vm_page **a_m;
+		int *a_count;
+		int a_centeridx;
+		vm_prot_t a_access_type;
+		int a_advice;
+		int a_flags;
+	} */ *ap = v;
+
+	if ((ap->a_flags & PGO_LOCKED) == 0)
+		mutex_exit(ap->a_vp->v_interlock);
+
+	return (EFAULT);
+}
+
 /*
  * convert decimal ascii to int
  */



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

2019-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug 29 16:15:06 UTC 2019

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

Log Message:
Ticket #1703


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.54 -r1.1.2.55 src/doc/CHANGES-7.1.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-7.1.3
diff -u src/doc/CHANGES-7.1.3:1.1.2.54 src/doc/CHANGES-7.1.3:1.1.2.55
--- src/doc/CHANGES-7.1.3:1.1.2.54	Sat Jun 15 15:59:55 2019
+++ src/doc/CHANGES-7.1.3	Thu Aug 29 16:15:06 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1.3,v 1.1.2.54 2019/06/15 15:59:55 martin Exp $
+# $NetBSD: CHANGES-7.1.3,v 1.1.2.55 2019/08/29 16:15:06 martin Exp $
 
 A complete list of changes from the NetBSD 7.1.2 release to the NetBSD 7.1.3
 release:
@@ -547,3 +547,9 @@ libexec/httpd/testsuite/test-simple		1.6
 	Avoid an assertion failure when using cgihandler (-C option).
 	[mrg, ticket #1699]
 
+sys/miscfs/kernfs/kernfs_vnops.c		1.161
+sys/miscfs/procfs/procfs_vnops.c		1.207
+
+	Add missing operation VOP_GETPAGES() returning EFAULT.
+	[hannken, ticket #1703]
+



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

2019-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug 29 16:15:06 UTC 2019

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

Log Message:
Ticket #1703


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.54 -r1.1.2.55 src/doc/CHANGES-7.1.3

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



CVS commit: [netbsd-7-1] src/sys/miscfs

2019-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug 29 16:14:37 UTC 2019

Modified Files:
src/sys/miscfs/kernfs [netbsd-7-1]: kernfs_vnops.c
src/sys/miscfs/procfs [netbsd-7-1]: procfs_vnops.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #1703):

sys/miscfs/kernfs/kernfs_vnops.c: revision 1.161
sys/miscfs/procfs/procfs_vnops.c: revision 1.207

Add missing operation VOP_GETPAGES() returning EFAULT.

Without this operation posix_fadvise(..., POSIX_FADV_WILLNEED)
would leave the v_interlock held.

Observed by maxv@


To generate a diff of this commit:
cvs rdiff -u -r1.154 -r1.154.10.1 src/sys/miscfs/kernfs/kernfs_vnops.c
cvs rdiff -u -r1.191 -r1.191.8.1 src/sys/miscfs/procfs/procfs_vnops.c

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



CVS commit: [netbsd-7-1] src/sys/miscfs

2019-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug 29 16:14:37 UTC 2019

Modified Files:
src/sys/miscfs/kernfs [netbsd-7-1]: kernfs_vnops.c
src/sys/miscfs/procfs [netbsd-7-1]: procfs_vnops.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #1703):

sys/miscfs/kernfs/kernfs_vnops.c: revision 1.161
sys/miscfs/procfs/procfs_vnops.c: revision 1.207

Add missing operation VOP_GETPAGES() returning EFAULT.

Without this operation posix_fadvise(..., POSIX_FADV_WILLNEED)
would leave the v_interlock held.

Observed by maxv@


To generate a diff of this commit:
cvs rdiff -u -r1.154 -r1.154.10.1 src/sys/miscfs/kernfs/kernfs_vnops.c
cvs rdiff -u -r1.191 -r1.191.8.1 src/sys/miscfs/procfs/procfs_vnops.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/miscfs/kernfs/kernfs_vnops.c
diff -u src/sys/miscfs/kernfs/kernfs_vnops.c:1.154 src/sys/miscfs/kernfs/kernfs_vnops.c:1.154.10.1
--- src/sys/miscfs/kernfs/kernfs_vnops.c:1.154	Fri Jul 25 08:20:52 2014
+++ src/sys/miscfs/kernfs/kernfs_vnops.c	Thu Aug 29 16:14:37 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: kernfs_vnops.c,v 1.154 2014/07/25 08:20:52 dholland Exp $	*/
+/*	$NetBSD: kernfs_vnops.c,v 1.154.10.1 2019/08/29 16:14:37 martin Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kernfs_vnops.c,v 1.154 2014/07/25 08:20:52 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kernfs_vnops.c,v 1.154.10.1 2019/08/29 16:14:37 martin Exp $");
 
 #include 
 #include 
@@ -172,6 +172,7 @@ int	kernfs_print(void *);
 int	kernfs_pathconf(void *);
 #define	kernfs_advlock	genfs_einval
 #define	kernfs_bwrite	genfs_eopnotsupp
+int	kernfs_getpages(void *);
 #define	kernfs_putpages	genfs_putpages
 
 static int	kernfs_xread(struct kernfs_node *, int, char **,
@@ -219,6 +220,7 @@ const struct vnodeopv_entry_desc kernfs_
 	{ _pathconf_desc, kernfs_pathconf },	/* pathconf */
 	{ _advlock_desc, kernfs_advlock },		/* advlock */
 	{ _bwrite_desc, kernfs_bwrite },		/* bwrite */
+	{ _getpages_desc, kernfs_getpages },	/* getpages */
 	{ _putpages_desc, kernfs_putpages },	/* putpages */
 	{ NULL, NULL }
 };
@@ -1171,3 +1173,23 @@ kernfs_symlink(void *v)
 	VOP_ABORTOP(ap->a_dvp, ap->a_cnp);
 	return (EROFS);
 }
+ 
+int
+kernfs_getpages(void *v)
+{
+	struct vop_getpages_args /* {
+		struct vnode *a_vp;
+		voff_t a_offset;
+		struct vm_page **a_m;
+		int *a_count;
+		int a_centeridx;
+		vm_prot_t a_access_type;
+		int a_advice;
+		int a_flags;
+	} */ *ap = v;
+
+	if ((ap->a_flags & PGO_LOCKED) == 0)
+		mutex_exit(ap->a_vp->v_interlock);
+
+	return (EFAULT);
+}

Index: src/sys/miscfs/procfs/procfs_vnops.c
diff -u src/sys/miscfs/procfs/procfs_vnops.c:1.191 src/sys/miscfs/procfs/procfs_vnops.c:1.191.8.1
--- src/sys/miscfs/procfs/procfs_vnops.c:1.191	Sun Jul 27 16:47:26 2014
+++ src/sys/miscfs/procfs/procfs_vnops.c	Thu Aug 29 16:14:37 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: procfs_vnops.c,v 1.191 2014/07/27 16:47:26 hannken Exp $	*/
+/*	$NetBSD: procfs_vnops.c,v 1.191.8.1 2019/08/29 16:14:37 martin Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -105,7 +105,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.191 2014/07/27 16:47:26 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.191.8.1 2019/08/29 16:14:37 martin Exp $");
 
 #include 
 #include 
@@ -239,6 +239,7 @@ int	procfs_pathconf(void *);
 #define	procfs_islocked	genfs_islocked
 #define	procfs_advlock	genfs_einval
 #define	procfs_bwrite	genfs_eopnotsupp
+int	procfs_getpages(void *);
 #define procfs_putpages	genfs_null_putpages
 
 static int atoi(const char *, size_t);
@@ -286,6 +287,7 @@ const struct vnodeopv_entry_desc procfs_
 	{ _islocked_desc, procfs_islocked },	/* islocked */
 	{ _pathconf_desc, procfs_pathconf },	/* pathconf */
 	{ _advlock_desc, procfs_advlock },		/* advlock */
+	{ _getpages_desc, procfs_getpages },	/* getpages */
 	{ _putpages_desc, procfs_putpages },	/* putpages */
 	{ NULL, NULL }
 };
@@ -1709,6 +1711,26 @@ procfs_readlink(void *v)
 	return error;
 }
 
+int
+procfs_getpages(void *v)
+{
+	struct vop_getpages_args /* {
+		struct vnode *a_vp;
+		voff_t a_offset;
+		struct vm_page **a_m;
+		int *a_count;
+		int a_centeridx;
+		vm_prot_t a_access_type;
+		int a_advice;
+		int a_flags;
+	} */ *ap = v;
+
+	if ((ap->a_flags & PGO_LOCKED) == 0)
+		mutex_exit(ap->a_vp->v_interlock);
+
+	return (EFAULT);
+}
+
 /*
  * convert decimal ascii to int
  */



CVS commit: [netbsd-7] src/doc

2019-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug 29 16:14:07 UTC 2019

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

Log Message:
Tickets #1702 and #1703


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.57 -r1.1.2.58 src/doc/CHANGES-7.3

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



CVS commit: [netbsd-7] src/doc

2019-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug 29 16:14:07 UTC 2019

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

Log Message:
Tickets #1702 and #1703


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.57 -r1.1.2.58 src/doc/CHANGES-7.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-7.3
diff -u src/doc/CHANGES-7.3:1.1.2.57 src/doc/CHANGES-7.3:1.1.2.58
--- src/doc/CHANGES-7.3:1.1.2.57	Fri Aug  9 19:25:47 2019
+++ src/doc/CHANGES-7.3	Thu Aug 29 16:14:07 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.3,v 1.1.2.57 2019/08/09 19:25:47 martin Exp $
+# $NetBSD: CHANGES-7.3,v 1.1.2.58 2019/08/29 16:14:07 martin Exp $
 
 A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3
 release:
@@ -620,3 +620,16 @@ sys/external/bsd/ipf/netinet/fil.c		1.30
 	0x as bad.
 	[christos, ticket #1701]
 
+distrib/hpcarm/miniroot/list			1.11
+distrib/hpcmips/miniroot/list			1.19
+distrib/hpcsh/miniroot/list			1.11
+
+	sysctl(8) is useful to have in the install env when debugging.
+	[sevan, ticket #1702]
+
+sys/miscfs/kernfs/kernfs_vnops.c		1.161
+sys/miscfs/procfs/procfs_vnops.c		1.207
+
+	Add missing operation VOP_GETPAGES() returning EFAULT.
+	[hannken, ticket #1703]
+



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

2019-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug 29 16:13:37 UTC 2019

Modified Files:
src/sys/miscfs/kernfs [netbsd-7]: kernfs_vnops.c
src/sys/miscfs/procfs [netbsd-7]: procfs_vnops.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #1703):

sys/miscfs/kernfs/kernfs_vnops.c: revision 1.161
sys/miscfs/procfs/procfs_vnops.c: revision 1.207

Add missing operation VOP_GETPAGES() returning EFAULT.

Without this operation posix_fadvise(..., POSIX_FADV_WILLNEED)
would leave the v_interlock held.

Observed by maxv@


To generate a diff of this commit:
cvs rdiff -u -r1.154 -r1.154.2.1 src/sys/miscfs/kernfs/kernfs_vnops.c
cvs rdiff -u -r1.191 -r1.191.2.1 src/sys/miscfs/procfs/procfs_vnops.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/miscfs/kernfs/kernfs_vnops.c
diff -u src/sys/miscfs/kernfs/kernfs_vnops.c:1.154 src/sys/miscfs/kernfs/kernfs_vnops.c:1.154.2.1
--- src/sys/miscfs/kernfs/kernfs_vnops.c:1.154	Fri Jul 25 08:20:52 2014
+++ src/sys/miscfs/kernfs/kernfs_vnops.c	Thu Aug 29 16:13:37 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: kernfs_vnops.c,v 1.154 2014/07/25 08:20:52 dholland Exp $	*/
+/*	$NetBSD: kernfs_vnops.c,v 1.154.2.1 2019/08/29 16:13:37 martin Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kernfs_vnops.c,v 1.154 2014/07/25 08:20:52 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kernfs_vnops.c,v 1.154.2.1 2019/08/29 16:13:37 martin Exp $");
 
 #include 
 #include 
@@ -172,6 +172,7 @@ int	kernfs_print(void *);
 int	kernfs_pathconf(void *);
 #define	kernfs_advlock	genfs_einval
 #define	kernfs_bwrite	genfs_eopnotsupp
+int	kernfs_getpages(void *);
 #define	kernfs_putpages	genfs_putpages
 
 static int	kernfs_xread(struct kernfs_node *, int, char **,
@@ -219,6 +220,7 @@ const struct vnodeopv_entry_desc kernfs_
 	{ _pathconf_desc, kernfs_pathconf },	/* pathconf */
 	{ _advlock_desc, kernfs_advlock },		/* advlock */
 	{ _bwrite_desc, kernfs_bwrite },		/* bwrite */
+	{ _getpages_desc, kernfs_getpages },	/* getpages */
 	{ _putpages_desc, kernfs_putpages },	/* putpages */
 	{ NULL, NULL }
 };
@@ -1171,3 +1173,23 @@ kernfs_symlink(void *v)
 	VOP_ABORTOP(ap->a_dvp, ap->a_cnp);
 	return (EROFS);
 }
+ 
+int
+kernfs_getpages(void *v)
+{
+	struct vop_getpages_args /* {
+		struct vnode *a_vp;
+		voff_t a_offset;
+		struct vm_page **a_m;
+		int *a_count;
+		int a_centeridx;
+		vm_prot_t a_access_type;
+		int a_advice;
+		int a_flags;
+	} */ *ap = v;
+
+	if ((ap->a_flags & PGO_LOCKED) == 0)
+		mutex_exit(ap->a_vp->v_interlock);
+
+	return (EFAULT);
+}

Index: src/sys/miscfs/procfs/procfs_vnops.c
diff -u src/sys/miscfs/procfs/procfs_vnops.c:1.191 src/sys/miscfs/procfs/procfs_vnops.c:1.191.2.1
--- src/sys/miscfs/procfs/procfs_vnops.c:1.191	Sun Jul 27 16:47:26 2014
+++ src/sys/miscfs/procfs/procfs_vnops.c	Thu Aug 29 16:13:37 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: procfs_vnops.c,v 1.191 2014/07/27 16:47:26 hannken Exp $	*/
+/*	$NetBSD: procfs_vnops.c,v 1.191.2.1 2019/08/29 16:13:37 martin Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -105,7 +105,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.191 2014/07/27 16:47:26 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.191.2.1 2019/08/29 16:13:37 martin Exp $");
 
 #include 
 #include 
@@ -239,6 +239,7 @@ int	procfs_pathconf(void *);
 #define	procfs_islocked	genfs_islocked
 #define	procfs_advlock	genfs_einval
 #define	procfs_bwrite	genfs_eopnotsupp
+int	procfs_getpages(void *);
 #define procfs_putpages	genfs_null_putpages
 
 static int atoi(const char *, size_t);
@@ -286,6 +287,7 @@ const struct vnodeopv_entry_desc procfs_
 	{ _islocked_desc, procfs_islocked },	/* islocked */
 	{ _pathconf_desc, procfs_pathconf },	/* pathconf */
 	{ _advlock_desc, procfs_advlock },		/* advlock */
+	{ _getpages_desc, procfs_getpages },	/* getpages */
 	{ _putpages_desc, procfs_putpages },	/* putpages */
 	{ NULL, NULL }
 };
@@ -1709,6 +1711,26 @@ procfs_readlink(void *v)
 	return error;
 }
 
+int
+procfs_getpages(void *v)
+{
+	struct vop_getpages_args /* {
+		struct vnode *a_vp;
+		voff_t a_offset;
+		struct vm_page **a_m;
+		int *a_count;
+		int a_centeridx;
+		vm_prot_t a_access_type;
+		int a_advice;
+		int a_flags;
+	} */ *ap = v;
+
+	if ((ap->a_flags & PGO_LOCKED) == 0)
+		mutex_exit(ap->a_vp->v_interlock);
+
+	return (EFAULT);
+}
+
 /*
  * convert decimal ascii to int
  */



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

2019-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug 29 16:13:37 UTC 2019

Modified Files:
src/sys/miscfs/kernfs [netbsd-7]: kernfs_vnops.c
src/sys/miscfs/procfs [netbsd-7]: procfs_vnops.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #1703):

sys/miscfs/kernfs/kernfs_vnops.c: revision 1.161
sys/miscfs/procfs/procfs_vnops.c: revision 1.207

Add missing operation VOP_GETPAGES() returning EFAULT.

Without this operation posix_fadvise(..., POSIX_FADV_WILLNEED)
would leave the v_interlock held.

Observed by maxv@


To generate a diff of this commit:
cvs rdiff -u -r1.154 -r1.154.2.1 src/sys/miscfs/kernfs/kernfs_vnops.c
cvs rdiff -u -r1.191 -r1.191.2.1 src/sys/miscfs/procfs/procfs_vnops.c

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



CVS commit: [netbsd-7] src/distrib

2019-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug 29 16:10:28 UTC 2019

Modified Files:
src/distrib/hpcarm/miniroot [netbsd-7]: list
src/distrib/hpcmips/miniroot [netbsd-7]: list
src/distrib/hpcsh/miniroot [netbsd-7]: list

Log Message:
Pull up following revision(s) (requested by sevan in ticket #1702):

distrib/hpcsh/miniroot/list: revision 1.11
distrib/hpcarm/miniroot/list: revision 1.11
distrib/hpcmips/miniroot/list: revision 1.19

sysctl(8) is useful to have in the install env when debugging


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.4.1 src/distrib/hpcarm/miniroot/list
cvs rdiff -u -r1.18 -r1.18.4.1 src/distrib/hpcmips/miniroot/list
cvs rdiff -u -r1.10 -r1.10.4.1 src/distrib/hpcsh/miniroot/list

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



CVS commit: [netbsd-7] src/distrib

2019-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug 29 16:10:28 UTC 2019

Modified Files:
src/distrib/hpcarm/miniroot [netbsd-7]: list
src/distrib/hpcmips/miniroot [netbsd-7]: list
src/distrib/hpcsh/miniroot [netbsd-7]: list

Log Message:
Pull up following revision(s) (requested by sevan in ticket #1702):

distrib/hpcsh/miniroot/list: revision 1.11
distrib/hpcarm/miniroot/list: revision 1.11
distrib/hpcmips/miniroot/list: revision 1.19

sysctl(8) is useful to have in the install env when debugging


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.4.1 src/distrib/hpcarm/miniroot/list
cvs rdiff -u -r1.18 -r1.18.4.1 src/distrib/hpcmips/miniroot/list
cvs rdiff -u -r1.10 -r1.10.4.1 src/distrib/hpcsh/miniroot/list

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

Modified files:

Index: src/distrib/hpcarm/miniroot/list
diff -u src/distrib/hpcarm/miniroot/list:1.10 src/distrib/hpcarm/miniroot/list:1.10.4.1
--- src/distrib/hpcarm/miniroot/list:1.10	Sat Nov 30 08:27:17 2013
+++ src/distrib/hpcarm/miniroot/list	Thu Aug 29 16:10:27 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: list,v 1.10 2013/11/30 08:27:17 nakayama Exp $
+#	$NetBSD: list,v 1.10.4.1 2019/08/29 16:10:27 martin Exp $
 
 # extras in bin
 PROG	bin/csh
@@ -13,6 +13,7 @@ PROG	sbin/fdisk
 PROG	sbin/fsck_msdos
 PROG	sbin/mount_msdos
 PROG	sbin/newfs_msdos
+PROG	sbin/sysctl
 
 # extras in /usr.bin
 PROG	usr/bin/netstat

Index: src/distrib/hpcmips/miniroot/list
diff -u src/distrib/hpcmips/miniroot/list:1.18 src/distrib/hpcmips/miniroot/list:1.18.4.1
--- src/distrib/hpcmips/miniroot/list:1.18	Sat Nov 30 08:27:17 2013
+++ src/distrib/hpcmips/miniroot/list	Thu Aug 29 16:10:27 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: list,v 1.18 2013/11/30 08:27:17 nakayama Exp $
+#	$NetBSD: list,v 1.18.4.1 2019/08/29 16:10:27 martin Exp $
 
 # extras in bin
 PROG	bin/csh
@@ -13,6 +13,7 @@ PROG	sbin/fdisk
 PROG	sbin/fsck_msdos
 PROG	sbin/mount_msdos
 PROG	sbin/newfs_msdos
+PROG	sbin/sysctl
 
 # extras in /usr.bin
 PROG	usr/bin/netstat

Index: src/distrib/hpcsh/miniroot/list
diff -u src/distrib/hpcsh/miniroot/list:1.10 src/distrib/hpcsh/miniroot/list:1.10.4.1
--- src/distrib/hpcsh/miniroot/list:1.10	Sat Nov 30 08:27:18 2013
+++ src/distrib/hpcsh/miniroot/list	Thu Aug 29 16:10:27 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: list,v 1.10 2013/11/30 08:27:18 nakayama Exp $
+#	$NetBSD: list,v 1.10.4.1 2019/08/29 16:10:27 martin Exp $
 
 # extras in bin
 #PROG	bin/csh
@@ -13,6 +13,7 @@ PROG	sbin/fdisk
 PROG	sbin/fsck_msdos
 PROG	sbin/mount_msdos
 PROG	sbin/newfs_msdos
+PROG	sbin/sysctl
 
 # extras in /usr.bin
 #PROG	usr/bin/netstat



CVS commit: src/share/man/man4

2019-08-29 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Thu Aug 29 16:08:14 UTC 2019

Modified Files:
src/share/man/man4: null.4

Log Message:
New sentence - new line.  Minor markup tweaks.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/null.4

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/man4/null.4
diff -u src/share/man/man4/null.4:1.5 src/share/man/man4/null.4:1.6
--- src/share/man/man4/null.4:1.5	Thu Aug 29 15:22:08 2019
+++ src/share/man/man4/null.4	Thu Aug 29 16:08:14 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: null.4,v 1.5 2019/08/29 15:22:08 sevan Exp $
+.\"	$NetBSD: null.4,v 1.6 2019/08/29 16:08:14 uwe Exp $
 .\"
 .\" Copyright (c) 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -38,13 +38,13 @@
 .Sh DESCRIPTION
 The
 .Nm
-device accepts and reads data as any ordinary (and willing)
-file \-
-but throws it away. The length of the
+device accepts and reads data as any ordinary (and willing) file \(em
+but throws it away.
+The length of the
 .Nm null
 device is always zero.
 .Sh FILES
-.Bl -tag -width /dev/null
+.Bl -tag -width Pa -compact
 .It Pa /dev/null
 .El
 .Sh HISTORY



CVS commit: src/share/man/man4

2019-08-29 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Thu Aug 29 16:08:14 UTC 2019

Modified Files:
src/share/man/man4: null.4

Log Message:
New sentence - new line.  Minor markup tweaks.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/null.4

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



CVS commit: src/share/man/man4

2019-08-29 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Thu Aug 29 15:22:08 UTC 2019

Modified Files:
src/share/man/man4: null.4

Log Message:
Earliest reference to /dev/null I can find is in v4 sh(1) and nulldev in
nsys/ken/subr.c
via TUHS archive
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V4


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/null.4

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



CVS commit: src/share/man/man4

2019-08-29 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Thu Aug 29 15:22:08 UTC 2019

Modified Files:
src/share/man/man4: null.4

Log Message:
Earliest reference to /dev/null I can find is in v4 sh(1) and nulldev in
nsys/ken/subr.c
via TUHS archive
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V4


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/null.4

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/man4/null.4
diff -u src/share/man/man4/null.4:1.4 src/share/man/man4/null.4:1.5
--- src/share/man/man4/null.4:1.4	Thu Aug  7 10:31:03 2003
+++ src/share/man/man4/null.4	Thu Aug 29 15:22:08 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: null.4,v 1.4 2003/08/07 10:31:03 agc Exp $
+.\"	$NetBSD: null.4,v 1.5 2019/08/29 15:22:08 sevan Exp $
 .\"
 .\" Copyright (c) 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	@(#)null.4	8.1 (Berkeley) 6/5/93
 .\"
-.Dd June 5, 1993
+.Dd August 29, 2019
 .Dt NULL 4
 .Os
 .Sh NAME
@@ -51,4 +51,4 @@ device is always zero.
 A
 .Nm
 device appeared in
-.At v7 .
+.At v4 .



CVS commit: src/sys/netinet6

2019-08-29 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Aug 29 14:28:06 UTC 2019

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

Log Message:
more bool


To generate a diff of this commit:
cvs rdiff -u -r1.168 -r1.169 src/sys/netinet6/nd6_nbr.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/nd6_nbr.c
diff -u src/sys/netinet6/nd6_nbr.c:1.168 src/sys/netinet6/nd6_nbr.c:1.169
--- src/sys/netinet6/nd6_nbr.c:1.168	Thu Aug 29 14:26:55 2019
+++ src/sys/netinet6/nd6_nbr.c	Thu Aug 29 14:28:06 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6_nbr.c,v 1.168 2019/08/29 14:26:55 roy Exp $	*/
+/*	$NetBSD: nd6_nbr.c,v 1.169 2019/08/29 14:28:06 roy Exp $	*/
 /*	$KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.168 2019/08/29 14:26:55 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.169 2019/08/29 14:28:06 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -735,7 +735,7 @@ nd6_na_input(struct mbuf *m, int off, in
 	if (ln == NULL)
 		goto freeit;
 
-	rt_announce = 0;
+	rt_announce = false;
 	if (ln->ln_state == ND6_LLINFO_INCOMPLETE) {
 		/*
 		 * If the link-layer has address, and no lladdr option came,
@@ -749,7 +749,7 @@ nd6_na_input(struct mbuf *m, int off, in
 		 */
 		memcpy(>ll_addr, lladdr, ifp->if_addrlen);
 		ln->la_flags |= LLE_VALID;
-		rt_announce = 1;
+		rt_announce = true;
 		if (is_solicited) {
 			ln->ln_state = ND6_LLINFO_REACHABLE;
 			ln->ln_byhint = 0;



CVS commit: src/sys/netinet6

2019-08-29 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Aug 29 14:28:06 UTC 2019

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

Log Message:
more bool


To generate a diff of this commit:
cvs rdiff -u -r1.168 -r1.169 src/sys/netinet6/nd6_nbr.c

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



CVS commit: src/sys/netinet6

2019-08-29 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Aug 29 14:26:55 UTC 2019

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

Log Message:
inet6: change rt_announce and llchange to bool in nd6_na_input()


To generate a diff of this commit:
cvs rdiff -u -r1.167 -r1.168 src/sys/netinet6/nd6_nbr.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/nd6_nbr.c
diff -u src/sys/netinet6/nd6_nbr.c:1.167 src/sys/netinet6/nd6_nbr.c:1.168
--- src/sys/netinet6/nd6_nbr.c:1.167	Thu Aug 22 21:22:50 2019
+++ src/sys/netinet6/nd6_nbr.c	Thu Aug 29 14:26:55 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6_nbr.c,v 1.167 2019/08/22 21:22:50 roy Exp $	*/
+/*	$NetBSD: nd6_nbr.c,v 1.168 2019/08/29 14:26:55 roy Exp $	*/
 /*	$KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.167 2019/08/22 21:22:50 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.168 2019/08/29 14:26:55 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -611,7 +611,7 @@ nd6_na_input(struct mbuf *m, int off, in
 	struct llentry *ln = NULL;
 	union nd_opts ndopts;
 	struct sockaddr_in6 ssin6;
-	int rt_announce;
+	bool rt_announce;
 	bool checklink = false;
 	struct psref psref;
 	struct psref psref_ia;
@@ -770,21 +770,21 @@ nd6_na_input(struct mbuf *m, int off, in
 			checklink = true;
 		}
 	} else {
-		int llchange;
+		bool llchange;
 
 		/*
 		 * Check if the link-layer address has changed or not.
 		 */
 		if (lladdr == NULL)
-			llchange = 0;
+			llchange = false;
 		else {
 			if (ln->la_flags & LLE_VALID) {
 if (memcmp(lladdr, >ll_addr, ifp->if_addrlen))
-	llchange = rt_announce = 1;
+	llchange = rt_announce = true;
 else
-	llchange = 0;
+	llchange = false;
 			} else
-llchange = rt_announce = 1;
+llchange = rt_announce = true;
 		}
 
 		/*



CVS commit: src/sys/netinet6

2019-08-29 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Aug 29 14:26:55 UTC 2019

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

Log Message:
inet6: change rt_announce and llchange to bool in nd6_na_input()


To generate a diff of this commit:
cvs rdiff -u -r1.167 -r1.168 src/sys/netinet6/nd6_nbr.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/audio

2019-08-29 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Thu Aug 29 13:01:07 UTC 2019

Modified Files:
src/sys/dev/audio: audio.c audiovar.h

Log Message:
Fix lock assertion on async I/O mode.
psignal() must be called without any spin locks.
Thanks maxv@!


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/audio/audio.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/audio/audiovar.h

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

Modified files:

Index: src/sys/dev/audio/audio.c
diff -u src/sys/dev/audio/audio.c:1.29 src/sys/dev/audio/audio.c:1.30
--- src/sys/dev/audio/audio.c:1.29	Fri Aug 23 09:41:26 2019
+++ src/sys/dev/audio/audio.c	Thu Aug 29 13:01:07 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: audio.c,v 1.29 2019/08/23 09:41:26 maxv Exp $	*/
+/*	$NetBSD: audio.c,v 1.30 2019/08/29 13:01:07 isaki Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -142,7 +142,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.29 2019/08/23 09:41:26 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.30 2019/08/29 13:01:07 isaki Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -5730,6 +5730,36 @@ audio_track_drain(struct audio_softc *sc
 }
 
 /*
+ * Send signal to process.
+ * This is intended to be called only from audio_softintr_{rd,wr}.
+ * Must be called with sc_lock && sc_intr_lock held.
+ */
+static inline void
+audio_psignal(struct audio_softc *sc, pid_t pid, int signum)
+{
+	proc_t *p;
+
+	KASSERT(mutex_owned(sc->sc_lock));
+	KASSERT(mutex_owned(sc->sc_intr_lock));
+	KASSERT(pid != 0);
+
+	/*
+	 * psignal() must be called without spin lock held.
+	 * So leave intr_lock temporarily here.
+	 */
+	mutex_exit(sc->sc_intr_lock);
+
+	mutex_enter(proc_lock);
+	p = proc_find(pid);
+	if (p)
+		psignal(p, signum);
+	mutex_exit(proc_lock);
+
+	/* Enter intr_lock again */
+	mutex_enter(sc->sc_intr_lock);
+}
+
+/*
  * This is software interrupt handler for record.
  * It is called from recording hardware interrupt everytime.
  * It does:
@@ -5747,7 +5777,6 @@ audio_softintr_rd(void *cookie)
 {
 	struct audio_softc *sc = cookie;
 	audio_file_t *f;
-	proc_t *p;
 	pid_t pid;
 
 	mutex_enter(sc->sc_lock);
@@ -5767,10 +5796,7 @@ audio_softintr_rd(void *cookie)
 		pid = f->async_audio;
 		if (pid != 0) {
 			TRACEF(4, f, "sending SIGIO %d", pid);
-			mutex_enter(proc_lock);
-			if ((p = proc_find(pid)) != NULL)
-psignal(p, SIGIO);
-			mutex_exit(proc_lock);
+			audio_psignal(sc, pid, SIGIO);
 		}
 	}
 	mutex_exit(sc->sc_intr_lock);
@@ -5799,7 +5825,6 @@ audio_softintr_wr(void *cookie)
 	struct audio_softc *sc = cookie;
 	audio_file_t *f;
 	bool found;
-	proc_t *p;
 	pid_t pid;
 
 	TRACE(4, "called");
@@ -5826,14 +5851,13 @@ audio_softintr_wr(void *cookie)
 		 */
 		if (track->usrbuf.used <= track->usrbuf_usedlow &&
 		!track->is_pause) {
+			/* For selnotify */
 			found = true;
+			/* For SIGIO */
 			pid = f->async_audio;
 			if (pid != 0) {
 TRACEF(4, f, "sending SIGIO %d", pid);
-mutex_enter(proc_lock);
-if ((p = proc_find(pid)) != NULL)
-	psignal(p, SIGIO);
-mutex_exit(proc_lock);
+audio_psignal(sc, pid, SIGIO);
 			}
 		}
 	}

Index: src/sys/dev/audio/audiovar.h
diff -u src/sys/dev/audio/audiovar.h:1.4 src/sys/dev/audio/audiovar.h:1.5
--- src/sys/dev/audio/audiovar.h:1.4	Wed Jun 26 06:57:45 2019
+++ src/sys/dev/audio/audiovar.h	Thu Aug 29 13:01:07 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: audiovar.h,v 1.4 2019/06/26 06:57:45 isaki Exp $	*/
+/*	$NetBSD: audiovar.h,v 1.5 2019/08/29 13:01:07 isaki Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -149,7 +149,8 @@ struct audio_softc {
 
 	/*
 	 * List of opened descriptors.
-	 * Must be protected by sc_intr_lock.
+	 * Must be protected by sc_lock || sc_intr_lock for traversal(FOREACH).
+	 * Must be protected by sc_lock && sc_intr_lock for insertion/removal.
 	 */
 	SLIST_HEAD(, audio_file) sc_files;
 



CVS commit: src/sys/dev/audio

2019-08-29 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Thu Aug 29 13:01:07 UTC 2019

Modified Files:
src/sys/dev/audio: audio.c audiovar.h

Log Message:
Fix lock assertion on async I/O mode.
psignal() must be called without any spin locks.
Thanks maxv@!


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/audio/audio.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/audio/audiovar.h

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



Re: CVS commit: src/external/gpl3/gcc/dist/gcc, vax crashes

2019-08-29 Thread maya
For future reference, proably by me:

Reproducer for the crash without the local diff:

#!/bin/sh

cat << EOF > oacc.i
int a, b;
int e() {
  short *c = 0;
  char d = c[a + 1];
  b = d;
  a += 2;
}
EOF
vax--netbsdelf-gcc -O2 -c oacc.i


This hits an assertion:
emit-rtl.c:2310 gcc_assert (memory_address_addr_space_p (mode, addr, as));
This points to vax code, vax_legitimate_address_p.
This function might not handle some addressing modes, possibly one of
these two:
   c:   b0 40 9f 02 movw *0x2[r0],r1
   c:   98 40 a0 02 cvtbl 0x2(r0)[r0],15 


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

2019-08-29 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Thu Aug 29 11:45:29 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc: dse.c reload.c

Log Message:
Don't keep our local modifications as ifdef __NetBSD__.
When we build netbsd on another OS, we produce a cross compiler without
these definitions.

Fixes some compiler crashes when building netbsd/vax on linux.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/gcc/dist/gcc/dse.c
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gcc/dist/gcc/reload.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/gpl3/gcc/dist/gcc/dse.c
diff -u src/external/gpl3/gcc/dist/gcc/dse.c:1.9 src/external/gpl3/gcc/dist/gcc/dse.c:1.10
--- src/external/gpl3/gcc/dist/gcc/dse.c:1.9	Sat Jan 19 12:10:04 2019
+++ src/external/gpl3/gcc/dist/gcc/dse.c	Thu Aug 29 11:45:29 2019
@@ -290,7 +290,7 @@ static unsigned HOST_WIDE_INT
 lowpart_bitmask (int n)
 {
   unsigned HOST_WIDE_INT mask = HOST_WIDE_INT_M1U;
-#ifdef __NetBSD__ // XXXMRG
+#if 1 // XXXMRG
   gcc_assert(n >= 0 && n <= HOST_BITS_PER_WIDE_INT);
   if (n == 0)
 return 0;

Index: src/external/gpl3/gcc/dist/gcc/reload.c
diff -u src/external/gpl3/gcc/dist/gcc/reload.c:1.7 src/external/gpl3/gcc/dist/gcc/reload.c:1.8
--- src/external/gpl3/gcc/dist/gcc/reload.c:1.7	Sat Jan 19 12:10:04 2019
+++ src/external/gpl3/gcc/dist/gcc/reload.c	Thu Aug 29 11:45:29 2019
@@ -1148,7 +1148,7 @@ push_reload (rtx in, rtx out, rtx *inloc
 		   SUBREG_BYTE (in),
 		   GET_MODE (in)),
 			  REGNO (SUBREG_REG (in)));
-#ifdef __NetBSD__ // XXXMRG
+#if 1 // XXXMRG
   else if (REG_P (SUBREG_REG (in))
|| GET_CODE (SUBREG_REG (in)) == SYMBOL_REF)
 #else



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

2019-08-29 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Thu Aug 29 11:45:29 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc: dse.c reload.c

Log Message:
Don't keep our local modifications as ifdef __NetBSD__.
When we build netbsd on another OS, we produce a cross compiler without
these definitions.

Fixes some compiler crashes when building netbsd/vax on linux.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/gcc/dist/gcc/dse.c
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gcc/dist/gcc/reload.c

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



CVS commit: src/sys/dev/pci/ixgbe

2019-08-29 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Thu Aug 29 09:45:22 UTC 2019

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

Log Message:
Fix panic when ncpu == 1 && sysctl -w hw.ixg0.txrx_workqueue=1. Reported by 
nonaka@n.o.

ok by msaitoh@n.o and nonaka@n.o

pullup-8, pullup-9


To generate a diff of this commit:
cvs rdiff -u -r1.205 -r1.206 src/sys/dev/pci/ixgbe/ixgbe.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/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.205 src/sys/dev/pci/ixgbe/ixgbe.c:1.206
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.205	Thu Aug 29 09:35:18 2019
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Thu Aug 29 09:45:22 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.205 2019/08/29 09:35:18 knakahara Exp $ */
+/* $NetBSD: ixgbe.c,v 1.206 2019/08/29 09:45:22 knakahara Exp $ */
 
 /**
 
@@ -6467,7 +6467,9 @@ ixgbe_allocate_legacy(struct adapter *ad
 	int		counts[PCI_INTR_TYPE_SIZE];
 	pci_intr_type_t intr_type, max_type;
 	char		intrbuf[PCI_INTRSTR_LEN];
+	char		wqname[MAXCOMLEN];
 	const char	*intrstr = NULL;
+	int defertx_error = 0, error;
 
 	/* We allocate a single interrupt resource */
 	max_type = PCI_INTR_TYPE_MSI;
@@ -6529,15 +6531,27 @@ alloc_retry:
 	 * Try allocating a fast interrupt and the associated deferred
 	 * processing contexts.
 	 */
-	if (!(adapter->feat_en & IXGBE_FEATURE_LEGACY_TX))
+	if (!(adapter->feat_en & IXGBE_FEATURE_LEGACY_TX)) {
 		txr->txr_si =
 		softint_establish(SOFTINT_NET | IXGBE_SOFTINFT_FLAGS,
 			ixgbe_deferred_mq_start, txr);
+
+		snprintf(wqname, sizeof(wqname), "%sdeferTx", device_xname(dev));
+		defertx_error = workqueue_create(>txr_wq, wqname,
+		ixgbe_deferred_mq_start_work, adapter, IXGBE_WORKQUEUE_PRI,
+		IPL_NET, IXGBE_WORKQUEUE_FLAGS);
+		adapter->txr_wq_enqueued = percpu_alloc(sizeof(u_int));
+	}
 	que->que_si = softint_establish(SOFTINT_NET | IXGBE_SOFTINFT_FLAGS,
 	ixgbe_handle_que, que);
+	snprintf(wqname, sizeof(wqname), "%sTxRx", device_xname(dev));
+	error = workqueue_create(>que_wq, wqname,
+	ixgbe_handle_que_work, adapter, IXGBE_WORKQUEUE_PRI, IPL_NET,
+	IXGBE_WORKQUEUE_FLAGS);
 
 	if ((!(adapter->feat_en & IXGBE_FEATURE_LEGACY_TX)
-		&& (txr->txr_si == NULL)) || (que->que_si == NULL)) {
+		&& ((txr->txr_si == NULL) || defertx_error != 0))
+	|| (que->que_si == NULL) || error != 0) {
 		aprint_error_dev(dev,
 		"could not establish software interrupts\n");
 



CVS commit: src/sys/dev/pci/ixgbe

2019-08-29 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Thu Aug 29 09:45:22 UTC 2019

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

Log Message:
Fix panic when ncpu == 1 && sysctl -w hw.ixg0.txrx_workqueue=1. Reported by 
nonaka@n.o.

ok by msaitoh@n.o and nonaka@n.o

pullup-8, pullup-9


To generate a diff of this commit:
cvs rdiff -u -r1.205 -r1.206 src/sys/dev/pci/ixgbe/ixgbe.c

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



CVS commit: src/sys/dev/pci/ixgbe

2019-08-29 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Thu Aug 29 09:35:18 UTC 2019

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

Log Message:
fix typo in error handling of ixgbe_allocate_legacy().

ok by msaitoh@n.o

pullup-8, pullup-9


To generate a diff of this commit:
cvs rdiff -u -r1.204 -r1.205 src/sys/dev/pci/ixgbe/ixgbe.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/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.204 src/sys/dev/pci/ixgbe/ixgbe.c:1.205
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.204	Wed Aug 28 08:54:21 2019
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Thu Aug 29 09:35:18 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.204 2019/08/28 08:54:21 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.205 2019/08/29 09:35:18 knakahara Exp $ */
 
 /**
 
@@ -6537,7 +6537,7 @@ alloc_retry:
 	ixgbe_handle_que, que);
 
 	if ((!(adapter->feat_en & IXGBE_FEATURE_LEGACY_TX)
-		& (txr->txr_si == NULL)) || (que->que_si == NULL)) {
+		&& (txr->txr_si == NULL)) || (que->que_si == NULL)) {
 		aprint_error_dev(dev,
 		"could not establish software interrupts\n");
 



CVS commit: src/sys/dev/pci/ixgbe

2019-08-29 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Thu Aug 29 09:35:18 UTC 2019

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

Log Message:
fix typo in error handling of ixgbe_allocate_legacy().

ok by msaitoh@n.o

pullup-8, pullup-9


To generate a diff of this commit:
cvs rdiff -u -r1.204 -r1.205 src/sys/dev/pci/ixgbe/ixgbe.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/usb

2019-08-29 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Aug 29 09:17:51 UTC 2019

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

Log Message:
fix a lock hang reported by sc.dying in PR#54495.

remove locking in usbnet_tick().  assume that all locking
needs are handled inside usbnet_tick_task(), which runs in
the usbtask thread.  ensure that usbnet private is valid
before using it.

also check NULL private pointer in usbnet_isdying().
all the other cases should never happen.


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

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

Modified files:

Index: src/sys/dev/usb/usbnet.c
diff -u src/sys/dev/usb/usbnet.c:1.24 src/sys/dev/usb/usbnet.c:1.25
--- src/sys/dev/usb/usbnet.c:1.24	Wed Aug 28 06:07:21 2019
+++ src/sys/dev/usb/usbnet.c	Thu Aug 29 09:17:51 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbnet.c,v 1.24 2019/08/28 06:07:21 mrg Exp $	*/
+/*	$NetBSD: usbnet.c,v 1.25 2019/08/29 09:17:51 mrg Exp $	*/
 
 /*
  * Copyright (c) 2019 Matthew R. Green
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.24 2019/08/28 06:07:21 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.25 2019/08/29 09:17:51 mrg Exp $");
 
 #include 
 #include 
@@ -1101,12 +1101,10 @@ usbnet_tick(void *arg)
 	struct usbnet * const un = arg;
 	struct usbnet_private * const unp = un->un_pri;
 
-	mutex_enter(>unp_lock);
-	if (!unp->unp_stopping && !unp->unp_dying) {
+	if (unp != NULL && !unp->unp_stopping && !unp->unp_dying) {
 		/* Perform periodic stuff in process context */
 		usb_add_task(un->un_udev, >unp_ticktask, USB_TASKQ_DRIVER);
 	}
-	mutex_exit(>unp_lock);
 }
 
 static void
@@ -1225,7 +1223,6 @@ usbnet_rndsrc(struct usbnet *un)
 void *
 usbnet_softc(struct usbnet *un)
 {
-	//return un->un_pri->unp_sc;
 	return un->un_sc;
 }
 
@@ -1238,7 +1235,7 @@ usbnet_havelink(struct usbnet *un)
 bool
 usbnet_isdying(struct usbnet *un)
 {
-	return un->un_pri->unp_dying;
+	return un->un_pri == NULL || un->un_pri->unp_dying;
 }
 
 



CVS commit: src/sys/dev/usb

2019-08-29 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Aug 29 09:17:51 UTC 2019

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

Log Message:
fix a lock hang reported by sc.dying in PR#54495.

remove locking in usbnet_tick().  assume that all locking
needs are handled inside usbnet_tick_task(), which runs in
the usbtask thread.  ensure that usbnet private is valid
before using it.

also check NULL private pointer in usbnet_isdying().
all the other cases should never happen.


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

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



CVS commit: [netbsd-9] src/doc

2019-08-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Aug 29 06:46:44 UTC 2019

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

Log Message:
 Ticket 130.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.31 -r1.1.2.32 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.31 src/doc/CHANGES-9.0:1.1.2.32
--- src/doc/CHANGES-9.0:1.1.2.31	Thu Aug 29 06:44:16 2019
+++ src/doc/CHANGES-9.0	Thu Aug 29 06:46:44 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.0,v 1.1.2.31 2019/08/29 06:44:16 msaitoh Exp $
+# $NetBSD: CHANGES-9.0,v 1.1.2.32 2019/08/29 06:46:44 msaitoh Exp $
 
 A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30
 until the 9.0 release:
@@ -2251,3 +2251,8 @@ usr.sbin/sysinst/mbr.c1.21
 	When requesting no special FS sub type, default to FAT32 with LBA.
 	Fixes one part of PR 54490.
 	[martin, ticket #125]
+
+usr.sbin/sysinst/bsddisklabel.c			1.27
+
+	Remove dead (#if 0) code.
+	[martin, ticket #130]



CVS commit: [netbsd-9] src/usr.sbin/sysinst

2019-08-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Aug 29 06:46:13 UTC 2019

Modified Files:
src/usr.sbin/sysinst [netbsd-9]: bsddisklabel.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #130):
usr.sbin/sysinst/bsddisklabel.c: revision 1.27
Remove dead (#if 0) code.


To generate a diff of this commit:
cvs rdiff -u -r1.23.2.2 -r1.23.2.3 src/usr.sbin/sysinst/bsddisklabel.c

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

Modified files:

Index: src/usr.sbin/sysinst/bsddisklabel.c
diff -u src/usr.sbin/sysinst/bsddisklabel.c:1.23.2.2 src/usr.sbin/sysinst/bsddisklabel.c:1.23.2.3
--- src/usr.sbin/sysinst/bsddisklabel.c:1.23.2.2	Fri Aug  2 05:45:54 2019
+++ src/usr.sbin/sysinst/bsddisklabel.c	Thu Aug 29 06:46:13 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: bsddisklabel.c,v 1.23.2.2 2019/08/02 05:45:54 msaitoh Exp $	*/
+/*	$NetBSD: bsddisklabel.c,v 1.23.2.3 2019/08/29 06:46:13 msaitoh Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -147,73 +147,6 @@ default_parts_init[] =
 	{ .def_size = DEFVARSIZE*(MEG/512), .mount = "/var", .type = PT_root },
 };
 
-#if 0 // XXX
-static int
-save_ptn(int ptn, daddr_t start, daddr_t size, int fstype, const char *mountpt)
-{
-	static int maxptn;
-	partinfo *p;
-	int pp;
-	char *buf;
-
-	if (maxptn == 0)
-		maxptn = getmaxpartitions();
-
-	if (ptn < 0 || PI_FSTYPE(>bsdlabel[ptn]) != FS_UNUSED) {
-		ptn = getrawpartition() + 1;
-#ifdef PART_FIRST_FREE
-		if (ptn < PART_FIRST_FREE)
-			ptn = PART_FIRST_FREE;
-#endif
-		for (;; ptn++) {
-			if (ptn >= maxptn)
-return -1;
-// XXX			if (ptn == PART_USR)
-//continue;
-			if (PI_FSTYPE(>bsdlabel[ptn]) == FS_UNUSED)
-break;
-		}
-	}
-
-	if (fstype == FS_UNUSED)
-		return ptn;
-
-	p = pm->bsdlabel + ptn;
-	PI_SET_OFFSET(p, start);
-	PI_SET_SIZE(p, size);
-	set_ptype(p, fstype, mountpt ? PIF_NEWFS : 0);
-
-	/* Hack because we does not have something like FS_LVMPV */
-	p->lvmpv = 0;
-	if (mountpt != NULL && strcmp(mountpt, "lvm") == 0)
-		p->lvmpv = 1;
-	else if (mountpt != NULL) {
-		for (pp = 0; pp < maxptn; pp++) {
-			if (strcmp(pm->bsdlabel[pp].pi_mount, mountpt) == 0)
-pm->bsdlabel[pp].pi_flags &= ~PIF_MOUNT;
-		}
-		if (mountpt[0] != '/')
-			asprintf(, "/%s", mountpt);
-		else
-			asprintf(, "%s", mountpt);
-		strlcpy(p->pi_mount, buf, sizeof p->pi_mount);
-		p->pi_flags |= PIF_MOUNT;
-		/* Default to UFS2. */
-		if (PI_FSTYPE(p) == FS_BSDFFS) {
-#ifdef DEFAULT_UFS2
-#ifndef HAVE_UFS2_BOOT
-			if (strcmp(mountpt, "/") != 0)
-#endif
-p->pi_flags |= PIF_FFSv2;
-#endif
-		}
-		free(buf);
-	}
-	return ptn;
-}
-#endif
-
-
 static const char size_separator[] =
 "--- - ";
 static char size_menu_title[STRSIZE];
@@ -644,177 +577,7 @@ get_ptn_sizes(struct partition_usage_set
 	pset->menu = -1;
 	pset->menu_opts = NULL;
 
-	if (!pset->ok)
-		return false;
-
-#if 0
-	if (cur_ptns.menu_no < 0) {
-		/* If there is a swap partition elsewhere, don't add one here.*/
-		if (no_swap || (swap_created && partman_go)) {
-			cur_ptns.ptn_sizes[PI_SWAP].size = 0;
-		} else {
-#if DEFSWAPSIZE == -1
-			/* Dynamic swap size. */
-			cur_ptns.ptn_sizes[PI_SWAP].dflt_size = get_ramsize();
-			cur_ptns.ptn_sizes[PI_SWAP].size =
-			cur_ptns.ptn_sizes[PI_SWAP].dflt_size;
-#endif
-		}
-
-		/* If installing X increase default size of /usr */
-		if (set_X11_selected())
-			cur_ptns.ptn_sizes[PI_USR].dflt_size += XNEEDMB;
-
-		/* Start of planning to give free space to / */
-		cur_ptns.pool_part = _ptns.ptn_sizes[PI_ROOT];
-		/* Make size of root include default size of /usr */
-		cur_ptns.ptn_sizes[PI_ROOT].size += cur_ptns.ptn_sizes[PI_USR].dflt_size;
-
-		sm = MEG / pm->sectorsize;
-
-		if (root_limit != 0) {
-			/* Bah - bios can not read all the disk, limit root */
-			cur_ptns.ptn_sizes[PI_ROOT].limit = root_limit -
-			part_start;
-			/* Allocate a /usr partition if bios can't read
-			 * everything except swap.
-			 */
-			if (cur_ptns.ptn_sizes[PI_ROOT].limit
-			< sectors - cur_ptns.ptn_sizes[PI_SWAP].size * sm) {
-/* Root won't be able to access all the space */
-/* Claw back space for /usr */
-cur_ptns.ptn_sizes[PI_USR].size =
-		cur_ptns.ptn_sizes[PI_USR].dflt_size;
-cur_ptns.ptn_sizes[PI_ROOT].size -=
-		cur_ptns.ptn_sizes[PI_USR].dflt_size;
-cur_ptns.ptn_sizes[PI_ROOT].changed = 1;
-/* Give free space to /usr */
-cur_ptns.pool_part = _ptns.ptn_sizes[PI_USR];
-			}
-		}
-
-		/* Change preset sizes from MB to sectors */
-		cur_ptns.free_space = sectors;
-		for (p = cur_ptns.ptn_sizes; p->mount[0]; p++) {
-			p->size = NUMSEC(p->size, sm, pm->dlcylsize);
-			p->dflt_size = NUMSEC(p->dflt_size, sm, pm->dlcylsize);
-			cur_ptns.free_space -= p->size;
-		}
-
-		/* Steal space from swap to make things fit.. */
-		if (cur_ptns.free_space < 0) {
-			i = roundup(-cur_ptns.free_space, pm->dlcylsize);
-			if (i 

CVS commit: [netbsd-9] src/doc

2019-08-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Aug 29 06:46:44 UTC 2019

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

Log Message:
 Ticket 130.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.31 -r1.1.2.32 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/usr.sbin/sysinst

2019-08-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Aug 29 06:46:13 UTC 2019

Modified Files:
src/usr.sbin/sysinst [netbsd-9]: bsddisklabel.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #130):
usr.sbin/sysinst/bsddisklabel.c: revision 1.27
Remove dead (#if 0) code.


To generate a diff of this commit:
cvs rdiff -u -r1.23.2.2 -r1.23.2.3 src/usr.sbin/sysinst/bsddisklabel.c

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



CVS commit: [netbsd-9] src/doc

2019-08-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Aug 29 06:44:16 UTC 2019

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

Log Message:
 Ticket 123 and 125.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.30 -r1.1.2.31 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.30 src/doc/CHANGES-9.0:1.1.2.31
--- src/doc/CHANGES-9.0:1.1.2.30	Tue Aug 27 04:22:08 2019
+++ src/doc/CHANGES-9.0	Thu Aug 29 06:44:16 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.0,v 1.1.2.30 2019/08/27 04:22:08 msaitoh Exp $
+# $NetBSD: CHANGES-9.0,v 1.1.2.31 2019/08/29 06:44:16 msaitoh Exp $
 
 A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30
 until the 9.0 release:
@@ -2237,3 +2237,17 @@ usr.sbin/sysinst/gpt.c1.11
 	Fix a bug when installing to pre-exising GPT partitions.
 	Handle GPT labels with spaces.
 	[martin, ticket #119]
+
+usr.sbin/sysinst/defs.h1.44
+usr.sbin/sysinst/upgrade.c			1.13
+usr.sbin/sysinst/util.c1.32
+
+	Do not offer to upgrade the "current system" if we are running off a CD
+	(i.e. / is mounted read-only)
+	[martin, ticket #123]
+
+usr.sbin/sysinst/mbr.c1.21
+
+	When requesting no special FS sub type, default to FAT32 with LBA.
+	Fixes one part of PR 54490.
+	[martin, ticket #125]



CVS commit: [netbsd-9] src/doc

2019-08-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Aug 29 06:44:16 UTC 2019

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

Log Message:
 Ticket 123 and 125.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.30 -r1.1.2.31 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: src/sys/miscfs

2019-08-29 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Thu Aug 29 06:43:13 UTC 2019

Modified Files:
src/sys/miscfs/kernfs: kernfs_vnops.c
src/sys/miscfs/procfs: procfs_vnops.c

Log Message:
Add missing operation VOP_GETPAGES() returning EFAULT.

Without this operation posix_fadvise(..., POSIX_FADV_WILLNEED)
would leave the v_interlock held.

Observed by maxv@


To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/sys/miscfs/kernfs/kernfs_vnops.c
cvs rdiff -u -r1.206 -r1.207 src/sys/miscfs/procfs/procfs_vnops.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/miscfs/kernfs/kernfs_vnops.c
diff -u src/sys/miscfs/kernfs/kernfs_vnops.c:1.160 src/sys/miscfs/kernfs/kernfs_vnops.c:1.161
--- src/sys/miscfs/kernfs/kernfs_vnops.c:1.160	Mon Sep  3 16:29:35 2018
+++ src/sys/miscfs/kernfs/kernfs_vnops.c	Thu Aug 29 06:43:13 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: kernfs_vnops.c,v 1.160 2018/09/03 16:29:35 riastradh Exp $	*/
+/*	$NetBSD: kernfs_vnops.c,v 1.161 2019/08/29 06:43:13 hannken Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kernfs_vnops.c,v 1.160 2018/09/03 16:29:35 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kernfs_vnops.c,v 1.161 2019/08/29 06:43:13 hannken Exp $");
 
 #include 
 #include 
@@ -172,6 +172,7 @@ int	kernfs_print(void *);
 int	kernfs_pathconf(void *);
 #define	kernfs_advlock	genfs_einval
 #define	kernfs_bwrite	genfs_eopnotsupp
+int	kernfs_getpages(void *);
 #define	kernfs_putpages	genfs_putpages
 
 static int	kernfs_xread(struct kernfs_node *, int, char **,
@@ -219,6 +220,7 @@ const struct vnodeopv_entry_desc kernfs_
 	{ _pathconf_desc, kernfs_pathconf },	/* pathconf */
 	{ _advlock_desc, kernfs_advlock },		/* advlock */
 	{ _bwrite_desc, kernfs_bwrite },		/* bwrite */
+	{ _getpages_desc, kernfs_getpages },	/* getpages */
 	{ _putpages_desc, kernfs_putpages },	/* putpages */
 	{ NULL, NULL }
 };
@@ -1169,3 +1171,23 @@ kernfs_symlink(void *v)
 	VOP_ABORTOP(ap->a_dvp, ap->a_cnp);
 	return (EROFS);
 }
+ 
+int
+kernfs_getpages(void *v)
+{
+	struct vop_getpages_args /* {
+		struct vnode *a_vp;
+		voff_t a_offset;
+		struct vm_page **a_m;
+		int *a_count;
+		int a_centeridx;
+		vm_prot_t a_access_type;
+		int a_advice;
+		int a_flags;
+	} */ *ap = v;
+
+	if ((ap->a_flags & PGO_LOCKED) == 0)
+		mutex_exit(ap->a_vp->v_interlock);
+
+	return (EFAULT);
+}

Index: src/sys/miscfs/procfs/procfs_vnops.c
diff -u src/sys/miscfs/procfs/procfs_vnops.c:1.206 src/sys/miscfs/procfs/procfs_vnops.c:1.207
--- src/sys/miscfs/procfs/procfs_vnops.c:1.206	Sat Mar 30 23:28:30 2019
+++ src/sys/miscfs/procfs/procfs_vnops.c	Thu Aug 29 06:43:13 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: procfs_vnops.c,v 1.206 2019/03/30 23:28:30 christos Exp $	*/
+/*	$NetBSD: procfs_vnops.c,v 1.207 2019/08/29 06:43:13 hannken Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -105,7 +105,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.206 2019/03/30 23:28:30 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.207 2019/08/29 06:43:13 hannken Exp $");
 
 #include 
 #include 
@@ -243,6 +243,7 @@ int	procfs_pathconf(void *);
 #define	procfs_islocked	genfs_islocked
 #define	procfs_advlock	genfs_einval
 #define	procfs_bwrite	genfs_eopnotsupp
+int	procfs_getpages(void *);
 #define procfs_putpages	genfs_null_putpages
 
 static int atoi(const char *, size_t);
@@ -291,6 +292,7 @@ const struct vnodeopv_entry_desc procfs_
 	{ _islocked_desc, procfs_islocked },	/* islocked */
 	{ _pathconf_desc, procfs_pathconf },	/* pathconf */
 	{ _advlock_desc, procfs_advlock },		/* advlock */
+	{ _getpages_desc, procfs_getpages },	/* getpages */
 	{ _putpages_desc, procfs_putpages },	/* putpages */
 	{ NULL, NULL }
 };
@@ -1719,6 +1721,26 @@ procfs_readlink(void *v)
 	return error;
 }
 
+int
+procfs_getpages(void *v)
+{
+	struct vop_getpages_args /* {
+		struct vnode *a_vp;
+		voff_t a_offset;
+		struct vm_page **a_m;
+		int *a_count;
+		int a_centeridx;
+		vm_prot_t a_access_type;
+		int a_advice;
+		int a_flags;
+	} */ *ap = v;
+
+	if ((ap->a_flags & PGO_LOCKED) == 0)
+		mutex_exit(ap->a_vp->v_interlock);
+
+	return (EFAULT);
+}
+
 /*
  * convert decimal ascii to int
  */



CVS commit: src/sys/miscfs

2019-08-29 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Thu Aug 29 06:43:13 UTC 2019

Modified Files:
src/sys/miscfs/kernfs: kernfs_vnops.c
src/sys/miscfs/procfs: procfs_vnops.c

Log Message:
Add missing operation VOP_GETPAGES() returning EFAULT.

Without this operation posix_fadvise(..., POSIX_FADV_WILLNEED)
would leave the v_interlock held.

Observed by maxv@


To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/sys/miscfs/kernfs/kernfs_vnops.c
cvs rdiff -u -r1.206 -r1.207 src/sys/miscfs/procfs/procfs_vnops.c

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