CVS commit: src/sys/dev/ic

2019-05-07 Thread Constantine A. Murenin
Module Name:src
Committed By:   cnst
Date:   Wed May  8 05:40:51 UTC 2019

Modified Files:
src/sys/dev/ic: cac.c ciss.c

Log Message:
bio(4) drivers: remove noop fallthrough-to-default bio(4) cmd cases

* Makes it easier to do code/feature analysis by not having
  extra noop code/symbols spattered around.

* Only an issue in cac(4) and ciss(4); other drivers don't do this.

* No binary changes.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/ic/cac.c
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/ic/ciss.c

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

Modified files:

Index: src/sys/dev/ic/cac.c
diff -u src/sys/dev/ic/cac.c:1.59 src/sys/dev/ic/cac.c:1.60
--- src/sys/dev/ic/cac.c:1.59	Mon Sep  3 16:29:31 2018
+++ src/sys/dev/ic/cac.c	Wed May  8 05:40:51 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: cac.c,v 1.59 2018/09/03 16:29:31 riastradh Exp $	*/
+/*	$NetBSD: cac.c,v 1.60 2019/05/08 05:40:51 cnst Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2006, 2007 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cac.c,v 1.59 2018/09/03 16:29:31 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cac.c,v 1.60 2019/05/08 05:40:51 cnst Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "bio.h"
@@ -642,9 +642,6 @@ cac_ioctl(device_t dev, u_long cmd, void
 		/* No disk information yet */
 		break;
 
-	case BIOCBLINK:
-	case BIOCALARM:
-	case BIOCSETSTATE:
 	default:
 		error = EINVAL;
 	}

Index: src/sys/dev/ic/ciss.c
diff -u src/sys/dev/ic/ciss.c:1.39 src/sys/dev/ic/ciss.c:1.40
--- src/sys/dev/ic/ciss.c:1.39	Mon Sep  3 16:29:31 2018
+++ src/sys/dev/ic/ciss.c	Wed May  8 05:40:51 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ciss.c,v 1.39 2018/09/03 16:29:31 riastradh Exp $	*/
+/*	$NetBSD: ciss.c,v 1.40 2019/05/08 05:40:51 cnst Exp $	*/
 /*	$OpenBSD: ciss.c,v 1.68 2013/05/30 16:15:02 deraadt Exp $	*/
 
 /*
@@ -19,7 +19,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.39 2018/09/03 16:29:31 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.40 2019/05/08 05:40:51 cnst Exp $");
 
 #include "bio.h"
 
@@ -1390,8 +1390,6 @@ ciss_ioctl(device_t dev, u_long cmd, voi
 		}
 		break;
 
-	case BIOCALARM:
-	case BIOCSETSTATE:
 	default:
 		error = EINVAL;
 	}



CVS commit: src/common/lib/libprop

2019-05-07 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed May  8 04:34:33 UTC 2019

Modified Files:
src/common/lib/libprop: prop_object.c

Log Message:
Use posix_madvise() rather than the legacy madvise() call, and
wrapp the calls in #ifdef for the advice we're giving.  Should
address reports of host tool build issues.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/common/lib/libprop/prop_object.c

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

Modified files:

Index: src/common/lib/libprop/prop_object.c
diff -u src/common/lib/libprop/prop_object.c:1.30 src/common/lib/libprop/prop_object.c:1.31
--- src/common/lib/libprop/prop_object.c:1.30	Tue May 12 14:59:35 2015
+++ src/common/lib/libprop/prop_object.c	Wed May  8 04:34:33 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: prop_object.c,v 1.30 2015/05/12 14:59:35 christos Exp $	*/
+/*	$NetBSD: prop_object.c,v 1.31 2019/05/08 04:34:33 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007 The NetBSD Foundation, Inc.
@@ -950,7 +950,10 @@ _prop_object_internalize_map_file(const 
 		_PROP_FREE(mf, M_TEMP);
 		return (NULL);
 	}
-	(void) madvise(mf->poimf_xml, mf->poimf_mapsize, MADV_SEQUENTIAL);
+#ifdef POSIX_MADV_SEQUENTIAL
+	(void) posix_madvise(mf->poimf_xml, mf->poimf_mapsize,
+	POSIX_MADV_SEQUENTIAL);
+#endif
 
 	if (need_guard) {
 		if (mmap(mf->poimf_xml + mf->poimf_mapsize,
@@ -976,7 +979,10 @@ _prop_object_internalize_unmap_file(
 struct _prop_object_internalize_mapped_file *mf)
 {
 
-	(void) madvise(mf->poimf_xml, mf->poimf_mapsize, MADV_DONTNEED);
+#ifdef POSIX_MADV_DONTNEED
+	(void) posix_madvise(mf->poimf_xml, mf->poimf_mapsize,
+	POSIX_MADV_DONTNEED);
+#endif
 	(void) munmap(mf->poimf_xml, mf->poimf_mapsize);
 	_PROP_FREE(mf, M_TEMP);
 }



CVS commit: src/sbin/bioctl

2019-05-07 Thread Constantine A. Murenin
Module Name:src
Committed By:   cnst
Date:   Wed May  8 03:29:59 UTC 2019

Modified Files:
src/sbin/bioctl: bioctl.8

Log Message:
bioctl(8): Xr ataraid(4), mpii(4) && mfii(4);


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sbin/bioctl/bioctl.8

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

Modified files:

Index: src/sbin/bioctl/bioctl.8
diff -u src/sbin/bioctl/bioctl.8:1.23 src/sbin/bioctl/bioctl.8:1.24
--- src/sbin/bioctl/bioctl.8:1.23	Mon Jul  3 21:33:41 2017
+++ src/sbin/bioctl/bioctl.8	Wed May  8 03:29:59 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: bioctl.8,v 1.23 2017/07/03 21:33:41 wiz Exp $
+.\"	$NetBSD: bioctl.8,v 1.24 2019/05/08 03:29:59 cnst Exp $
 .\"	$OpenBSD: bioctl.8,v 1.43 2007/03/20 06:12:11 jmc Exp $
 .\"
 .\" Copyright (c) 2007, 2008 Juan Romero Pardines
@@ -25,7 +25,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd September 11, 2016
+.Dd May 7, 2019
 .Dt BIOCTL 8
 .Os
 .Sh NAME
@@ -145,11 +145,14 @@ To remove the volume 0 previously create
 .Pp
 .Dl $ bioctl arcmsr0 remove volume 0 0:15.0
 .Sh SEE ALSO
+.Xr ataraid 4 ,
 .Xr arcmsr 4 ,
 .Xr bio 4 ,
 .Xr cac 4 ,
 .Xr ciss 4 ,
 .Xr mfi 4 ,
+.Xr mfii 4 ,
+.Xr mpii 4 ,
 .Xr mpt 4
 .Sh HISTORY
 The



CVS commit: src/share/man/man4

2019-05-07 Thread Constantine A. Murenin
Module Name:src
Committed By:   cnst
Date:   Wed May  8 03:12:48 UTC 2019

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

Log Message:
mpii(4): Xr bio(4) and mention first appearance in Nx;


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/mpii.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/mpii.4
diff -u src/share/man/man4/mpii.4:1.4 src/share/man/man4/mpii.4:1.5
--- src/share/man/man4/mpii.4:1.4	Tue Dec  4 08:02:14 2018
+++ src/share/man/man4/mpii.4	Wed May  8 03:12:48 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mpii.4,v 1.4 2018/12/04 08:02:14 wiz Exp $
+.\"	$NetBSD: mpii.4,v 1.5 2019/05/08 03:12:48 cnst Exp $
 .\"	OpenBSD: mpii.4,v 1.8 2010/10/01 12:27:36 mikeb Exp
 .\"
 .\" Copyright (c) 2010 Marco Peereboom 
@@ -16,7 +16,7 @@
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd December 3, 2018
+.Dd May 7, 2019
 .Dt MPII 4
 .Os
 .Sh NAME
@@ -86,6 +86,7 @@ event will be sent to the
 .Pa /etc/powerd/scripts/sensor_drive
 script when such condition happens.
 .Sh SEE ALSO
+.Xr bio 4 ,
 .Xr intro 4 ,
 .Xr pci 4 ,
 .Xr scsi 4 ,
@@ -98,6 +99,9 @@ The
 .Nm
 driver first appeared in
 .Ox 4.7 .
+.Nx
+support was added in
+.Nx 6.0 .
 .Sh AUTHORS
 .An -nosplit
 The



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

2019-05-07 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed May  8 02:57:11 UTC 2019

Modified Files:
src/sys/arch/aarch64/aarch64: TODO

Log Message:
Add DTrace.


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

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

Modified files:

Index: src/sys/arch/aarch64/aarch64/TODO
diff -u src/sys/arch/aarch64/aarch64/TODO:1.6 src/sys/arch/aarch64/aarch64/TODO:1.7
--- src/sys/arch/aarch64/aarch64/TODO:1.6	Fri Apr 12 09:29:26 2019
+++ src/sys/arch/aarch64/aarch64/TODO	Wed May  8 02:57:11 2019
@@ -1,7 +1,8 @@
-$NetBSD: TODO,v 1.6 2019/04/12 09:29:26 ryo Exp $
+$NetBSD: TODO,v 1.7 2019/05/08 02:57:11 msaitoh Exp $
 
 TODO list for NetBSD/aarch64
   - kernel preemption
   - Implement __HAVE_UCAS_FULL or __HAVE_UCAS_MP (don't use full generic impl)
   - pmap should be work even if PID_MAX >= 65536 (don't depend 16bit ASID)
   - TLB ASID in pmap should be randomized
+  - DTrace



CVS commit: src/share/man/man4

2019-05-07 Thread Constantine A. Murenin
Module Name:src
Committed By:   cnst
Date:   Wed May  8 02:49:10 UTC 2019

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

Log Message:
bio(4): enlist ataraid(4), mpii(4) and mfii(4) in bio(4);


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/share/man/man4/bio.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/bio.4
diff -u src/share/man/man4/bio.4:1.13 src/share/man/man4/bio.4:1.14
--- src/share/man/man4/bio.4:1.13	Mon Jul  3 21:30:58 2017
+++ src/share/man/man4/bio.4	Wed May  8 02:49:10 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: bio.4,v 1.13 2017/07/03 21:30:58 wiz Exp $
+.\"	$NetBSD: bio.4,v 1.14 2019/05/08 02:49:10 cnst Exp $
 .\"	$OpenBSD: bio.4,v 1.19 2006/09/20 22:22:37 jmc Exp $
 .\"
 .\" Copyright (c) 2002 Niklas Hallqvist
@@ -28,7 +28,7 @@
 .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd Sep 27, 2014
+.Dd May 7, 2019
 .Dt BIO 4
 .Os
 .Sh NAME
@@ -56,17 +56,23 @@ The following device drivers register wi
 .Nm
 for volume management:
 .Pp
-.Bl -tag -width ciss(4)XX -offset indent -compact
+.Bl -tag -width ataraid(4)XX -offset indent -compact
 .\" .It Xr ami 4
 .\" American Megatrends Inc. MegaRAID PATA/SATA/SCSI RAID controller
 .It Xr arcmsr 4
 Areca Technology Corporation SATA RAID controller
+.It Xr ataraid 4
+Software BIOS RAID
 .It Xr cac 4
 Compaq RAID array controller
 .It Xr ciss 4
 Compaq Smart ARRAY 5/6 SAS/SATA/SCSI RAID controller
 .It Xr mfi 4
 LSI Logic & Dell MegaRAID SAS RAID controller
+.It Xr mfii 4
+LSI Logic MegaRAID SAS Fusion RAID controller
+.It Xr mpii 4
+LSI Logic Fusion-MPT Message Passing Interface II
 .It Xr mpt 4
 LSI Fusion-MPT RAID controller
 .El



CVS commit: src

2019-05-07 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed May  8 02:25:50 UTC 2019

Modified Files:
src/common/lib/libprop: prop_bool.c prop_data.c prop_number.c
prop_object_impl.h prop_stack.c prop_string.c
src/tools/compat: Makefile
src/tools/libprop: Makefile
Added Files:
src/tools/compat/sys: rbtree.h

Log Message:
Fix building libprop as a host tool library on platforms that don't have
the Matt Thomas rbtree:

- Include rb.c in libnbcompat, and provide a nbcompat sys/rbtree.h
  header.
- Make sure libprop's source file include prop_object_impl.h before
  anything else, and pull in nbtool_config.h from there.

Tested by simulating such a host system by renaming the host's
 out of the way (which reproduced the build failure)
and verifying that the host-tool installboot contained the rb_*
functions in its own .text segment.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/common/lib/libprop/prop_bool.c
cvs rdiff -u -r1.14 -r1.15 src/common/lib/libprop/prop_data.c
cvs rdiff -u -r1.30 -r1.31 src/common/lib/libprop/prop_number.c
cvs rdiff -u -r1.32 -r1.33 src/common/lib/libprop/prop_object_impl.h
cvs rdiff -u -r1.2 -r1.3 src/common/lib/libprop/prop_stack.c
cvs rdiff -u -r1.12 -r1.13 src/common/lib/libprop/prop_string.c
cvs rdiff -u -r1.86 -r1.87 src/tools/compat/Makefile
cvs rdiff -u -r0 -r1.1 src/tools/compat/sys/rbtree.h
cvs rdiff -u -r1.1 -r1.2 src/tools/libprop/Makefile

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

Modified files:

Index: src/common/lib/libprop/prop_bool.c
diff -u src/common/lib/libprop/prop_bool.c:1.17 src/common/lib/libprop/prop_bool.c:1.18
--- src/common/lib/libprop/prop_bool.c:1.17	Sat Jan  3 18:31:33 2009
+++ src/common/lib/libprop/prop_bool.c	Wed May  8 02:25:50 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: prop_bool.c,v 1.17 2009/01/03 18:31:33 pooka Exp $	*/
+/*	$NetBSD: prop_bool.c,v 1.18 2019/05/08 02:25:50 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -29,8 +29,8 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include 
 #include "prop_object_impl.h"
+#include 
 
 struct _prop_bool {
 	struct _prop_object	pb_obj;

Index: src/common/lib/libprop/prop_data.c
diff -u src/common/lib/libprop/prop_data.c:1.14 src/common/lib/libprop/prop_data.c:1.15
--- src/common/lib/libprop/prop_data.c:1.14	Sun Jan 25 06:59:35 2009
+++ src/common/lib/libprop/prop_data.c	Wed May  8 02:25:50 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: prop_data.c,v 1.14 2009/01/25 06:59:35 cyber Exp $	*/
+/*	$NetBSD: prop_data.c,v 1.15 2019/05/08 02:25:50 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -29,8 +29,8 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include 
 #include "prop_object_impl.h"
+#include 
 
 #if defined(_KERNEL)
 #include 

Index: src/common/lib/libprop/prop_number.c
diff -u src/common/lib/libprop/prop_number.c:1.30 src/common/lib/libprop/prop_number.c:1.31
--- src/common/lib/libprop/prop_number.c:1.30	Tue Jun 28 06:47:35 2016
+++ src/common/lib/libprop/prop_number.c	Wed May  8 02:25:50 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: prop_number.c,v 1.30 2016/06/28 06:47:35 pgoyette Exp $	*/
+/*	$NetBSD: prop_number.c,v 1.31 2019/05/08 02:25:50 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -29,9 +29,9 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include 
-#include 
 #include "prop_object_impl.h"
+#include 
+#include 
 
 #if defined(_KERNEL)
 #include 

Index: src/common/lib/libprop/prop_object_impl.h
diff -u src/common/lib/libprop/prop_object_impl.h:1.32 src/common/lib/libprop/prop_object_impl.h:1.33
--- src/common/lib/libprop/prop_object_impl.h:1.32	Mon May 11 16:50:35 2015
+++ src/common/lib/libprop/prop_object_impl.h	Wed May  8 02:25:50 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: prop_object_impl.h,v 1.32 2015/05/11 16:50:35 christos Exp $	*/
+/*	$NetBSD: prop_object_impl.h,v 1.33 2019/05/08 02:25:50 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -32,6 +32,10 @@
 #ifndef _PROPLIB_PROP_OBJECT_IMPL_H_
 #define	_PROPLIB_PROP_OBJECT_IMPL_H_
 
+#if defined(HAVE_NBTOOL_CONFIG_H)
+#include "nbtool_config.h"
+#endif
+
 #if defined(_KERNEL) || defined(_STANDALONE)
 #include 
 #else

Index: src/common/lib/libprop/prop_stack.c
diff -u src/common/lib/libprop/prop_stack.c:1.2 src/common/lib/libprop/prop_stack.c:1.3
--- src/common/lib/libprop/prop_stack.c:1.2	Thu Aug 30 12:23:54 2007
+++ src/common/lib/libprop/prop_stack.c	Wed May  8 02:25:50 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: prop_stack.c,v 1.2 2007/08/30 12:23:54 joerg Exp $ */
+/* $NetBSD: prop_stack.c,v 1.3 2019/05/08 02:25:50 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2007 Joerg Sonnenberger .
@@ -29,8 +29,8 @@
  * SUCH DAMAGE.
  */
 
-#include "prop_stack.h"
 #include "prop_object_impl.h"
+#include "prop_stack.h"
 
 void
 _prop_stack_init(prop_stack_t stack)

Index: src/common/lib/libprop/prop_string.c
diff -u 

CVS commit: src/doc

2019-05-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed May  8 01:08:18 UTC 2019

Modified Files:
src/doc: TODO.clang

Log Message:
add more


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/doc/TODO.clang

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

Modified files:

Index: src/doc/TODO.clang
diff -u src/doc/TODO.clang:1.20 src/doc/TODO.clang:1.21
--- src/doc/TODO.clang:1.20	Wed Jan 11 07:19:03 2017
+++ src/doc/TODO.clang	Tue May  7 21:08:18 2019
@@ -1,13 +1,28 @@
-$NetBSD: TODO.clang,v 1.20 2017/01/11 12:19:03 joerg Exp $
+$NetBSD: TODO.clang,v 1.21 2019/05/08 01:08:18 christos Exp $
 
 Hacks for the clang integration
 ---
 
-"-no-integrated-as" is used in src/sys/arch/i386/stand to compensate
-for the incomplete explicit positioning support in LLVM MC.
+src/sys/arch/i386/stand
+"-no-integrated-as" is used to compensate
+for the incomplete explicit positioning support in LLVM MC.
 
-src/external/gpl3/gcc/usr.bin/backend forces tree.c to be compiled with -O0.
-g++ otherwise crashes on trivial input.
+src/external/gpl3/gcc/usr.bin/backend
+forces tree.c to be compiled with -O0.
+g++ otherwise crashes on trivial input.
+
+src/external/mit/xorg/lib/pixman
+uses -fno-integrated-as on ARM for the macro (ab)use.
+
+src/external/libc++/lib
+Avoid clang bug on earm with SSP/FORTIFY:
+rt_libelftc_dem_gnu3.c:3567:3: warning: '__builtin___memset_chk'
+will always overflow destination buffer [-Wbuiltin-memcpy-chk-size]
+			memset(, 0, FLOAT_EXTENED_BYTES);
+
+src/external/mit/xorg/lib/gallium
+has atomic alignment issues and uses unknown pragma
+
+src/external/mpl/bind/
+has atomic alignment issues 
 
-src/external/mit/xorg/lib/pixman uses -fno-integrated-as on ARM for the
-macro (ab)use.



CVS commit: src/sys/kern

2019-05-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed May  8 00:55:18 UTC 2019

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

Log Message:
Add slop of 1000 and explain why.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/kern/sys_select.c

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

Modified files:

Index: src/sys/kern/sys_select.c
diff -u src/sys/kern/sys_select.c:1.44 src/sys/kern/sys_select.c:1.45
--- src/sys/kern/sys_select.c:1.44	Tue May  7 16:10:21 2019
+++ src/sys/kern/sys_select.c	Tue May  7 20:55:18 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_select.c,v 1.44 2019/05/07 20:10:21 christos Exp $	*/
+/*	$NetBSD: sys_select.c,v 1.45 2019/05/08 00:55:18 christos Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
@@ -84,7 +84,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sys_select.c,v 1.44 2019/05/07 20:10:21 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_select.c,v 1.45 2019/05/08 00:55:18 christos Exp $");
 
 #include 
 #include 
@@ -488,7 +488,7 @@ pollcommon(register_t *retval, struct po
 	int		error;
 	size_t		ni;
 
-	if (nfds > curlwp->l_proc->p_rlimit[RLIMIT_NOFILE].rlim_max) {
+	if (nfds > curlwp->l_proc->p_rlimit[RLIMIT_NOFILE].rlim_max + 1000) {
 		/*
 		 * Prevent userland from causing over-allocation.
 		 * Raising the default limit too high can still cause
@@ -505,7 +505,11 @@ pollcommon(register_t *retval, struct po
 		 *
 		 * Using the max limit equivalent to sysctl
 		 * kern.maxfiles is the moral equivalent of OPEN_MAX
-		 * as specified by POSIX
+		 * as specified by POSIX.
+		 *
+		 * We add a slop of 1000 in case the resource limit was
+		 * changed after opening descriptors or the same descriptor
+		 * was specified more than once.
 		 */
 		return EINVAL;
 	}



CVS commit: src

2019-05-07 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue May  7 22:00:10 UTC 2019

Modified Files:
src/share/man/man4: umcs.4
src/sys/arch/amd64/conf: ALL
src/sys/arch/i386/conf: ALL
src/sys/dev/usb: TODO.usbmp files.usb
Removed Files:
src/sys/dev/usb: moscom.c

Log Message:
obsolete moscom(4).  it was never in any default configs, did
not work for some cases.

umcs(4) supports everything it does plus one additional chipset,
has been in default configurations since netbsd 7.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/umcs.4
cvs rdiff -u -r1.118 -r1.119 src/sys/arch/amd64/conf/ALL
cvs rdiff -u -r1.467 -r1.468 src/sys/arch/i386/conf/ALL
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/usb/TODO.usbmp
cvs rdiff -u -r1.154 -r1.155 src/sys/dev/usb/files.usb
cvs rdiff -u -r1.12 -r0 src/sys/dev/usb/moscom.c

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/umcs.4
diff -u src/share/man/man4/umcs.4:1.2 src/share/man/man4/umcs.4:1.3
--- src/share/man/man4/umcs.4:1.2	Sun Mar 16 09:37:47 2014
+++ src/share/man/man4/umcs.4	Tue May  7 22:00:10 2019
@@ -1,4 +1,4 @@
-.\" $NetBSD: umcs.4,v 1.2 2014/03/16 09:37:47 wiz Exp $
+.\" $NetBSD: umcs.4,v 1.3 2019/05/07 22:00:10 mrg Exp $
 .\"
 .\" Copyright (c) 2014 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd March 16, 2014
+.Dd May 7, 2019
 .Dt UMCS 4
 .Os
 .Sh NAME
@@ -69,7 +69,3 @@ The
 driver
 appeared in
 .Nx 7 .
-.Pp
-It superseded the
-.Xr moscom 4
-driver.

Index: src/sys/arch/amd64/conf/ALL
diff -u src/sys/arch/amd64/conf/ALL:1.118 src/sys/arch/amd64/conf/ALL:1.119
--- src/sys/arch/amd64/conf/ALL:1.118	Fri Apr 26 22:46:03 2019
+++ src/sys/arch/amd64/conf/ALL	Tue May  7 22:00:10 2019
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.118 2019/04/26 22:46:03 sevan Exp $
+# $NetBSD: ALL,v 1.119 2019/05/07 22:00:10 mrg Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"ALL-$Revision: 1.118 $"
+#ident		"ALL-$Revision: 1.119 $"
 
 maxusers	64		# estimated number of users
 
@@ -1289,8 +1289,8 @@ ucom*	at uvscom? portno ?
 uark* at uhub? port ?
 ucom*	at uark? portno ?
 
-moscom* at uhub? port ?
-ucom*	at moscom? portno ?
+umcs* at uhub? port ?		# Moschip MCS7xxx serial adapter
+ucom*	at umcs? portno ?
 
 uhmodem* at uhub?
 ucom*	at uhmodem? portno ?

Index: src/sys/arch/i386/conf/ALL
diff -u src/sys/arch/i386/conf/ALL:1.467 src/sys/arch/i386/conf/ALL:1.468
--- src/sys/arch/i386/conf/ALL:1.467	Fri Apr 26 22:46:03 2019
+++ src/sys/arch/i386/conf/ALL	Tue May  7 22:00:10 2019
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.467 2019/04/26 22:46:03 sevan Exp $
+# $NetBSD: ALL,v 1.468 2019/05/07 22:00:10 mrg Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@ include 	"arch/i386/conf/std.i386"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"ALL-$Revision: 1.467 $"
+#ident		"ALL-$Revision: 1.468 $"
 
 maxusers	64		# estimated number of users
 
@@ -1392,9 +1392,6 @@ ucom*	at uvscom? portno ?
 uark* at uhub? port ?
 ucom*	at uark? portno ?
 
-moscom* at uhub? port ?
-ucom*	at moscom? portno ?
-
 umcs* at uhub? port ?		# Moschip MCS7xxx serial adapter
 ucom*	at umcs? portno ?
 

Index: src/sys/dev/usb/TODO.usbmp
diff -u src/sys/dev/usb/TODO.usbmp:1.11 src/sys/dev/usb/TODO.usbmp:1.12
--- src/sys/dev/usb/TODO.usbmp:1.11	Mon Nov 21 08:48:00 2016
+++ src/sys/dev/usb/TODO.usbmp	Tue May  7 22:00:10 2019
@@ -1,4 +1,4 @@
-$NetBSD: TODO.usbmp,v 1.11 2016/11/21 08:48:00 skrll Exp $
+$NetBSD: TODO.usbmp,v 1.12 2019/05/07 22:00:10 mrg Exp $
 
 
 the majority of the USB MP device interface is documented in usbdivar.h.
@@ -201,7 +201,7 @@ ucom attachments:
   - uplcom		attaches ok
   - uslsa		working
   - uvscom
-  - moscom
+  - umcs
   - uvisor
   - ukyopon
   - u3g

Index: src/sys/dev/usb/files.usb
diff -u src/sys/dev/usb/files.usb:1.154 src/sys/dev/usb/files.usb:1.155
--- src/sys/dev/usb/files.usb:1.154	Wed Feb  6 11:55:06 2019
+++ src/sys/dev/usb/files.usb	Tue May  7 22:00:10 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: files.usb,v 1.154 2019/02/06 11:55:06 rin Exp $
+#	$NetBSD: files.usb,v 1.155 2019/05/07 22:00:10 mrg Exp $
 #
 # Config file and device description for machine-independent USB code.
 # Included by ports that need it.  Ports that use it must provide
@@ -418,11 +418,6 @@ attach	umct at usbdevif
 file	dev/usb/umct.c			umct
 
 # MOSCHIP MCS7xxx serial driver
-device	moscom: ucombus
-attach	moscom at usbdevif
-file	dev/usb/moscom.c		moscom
-
-# andother driver for the same chip
 device	umcs: ucombus
 attach	umcs at 

CVS commit: src/share/misc

2019-05-07 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Tue May  7 21:14:46 UTC 2019

Modified Files:
src/share/misc: acronyms.comp

Log Message:
TMG


To generate a diff of this commit:
cvs rdiff -u -r1.250 -r1.251 src/share/misc/acronyms.comp

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

Modified files:

Index: src/share/misc/acronyms.comp
diff -u src/share/misc/acronyms.comp:1.250 src/share/misc/acronyms.comp:1.251
--- src/share/misc/acronyms.comp:1.250	Mon May  6 00:29:12 2019
+++ src/share/misc/acronyms.comp	Tue May  7 21:14:46 2019
@@ -1,4 +1,4 @@
-$NetBSD: acronyms.comp,v 1.250 2019/05/06 00:29:12 sevan Exp $
+$NetBSD: acronyms.comp,v 1.251 2019/05/07 21:14:46 sevan Exp $
 3WHS	three-way handshake
 8VSB	8-state vestigial side band modulation
 AA	anti-aliasing
@@ -1479,6 +1479,7 @@ TLS	thread local storage
 TLS	transport layer security
 TM	Turing machine
 TM	thermal monitor
+TMG	transmogrifier
 TMDS	transition minimized differential signaling
 TMO	timeout
 TOD	time of day



CVS commit: src/sys/kern

2019-05-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue May  7 20:10:21 UTC 2019

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

Log Message:
Use the max limit (aka maxfiles or the moral equivalent of OPEN_MAX) which
makes poll(2) align with the Posix documentation (which allows EINVAL if
nfds > OPEN_MAX). From: Anthony Mallet


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/kern/sys_select.c

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

Modified files:

Index: src/sys/kern/sys_select.c
diff -u src/sys/kern/sys_select.c:1.43 src/sys/kern/sys_select.c:1.44
--- src/sys/kern/sys_select.c:1.43	Sun May  5 16:45:08 2019
+++ src/sys/kern/sys_select.c	Tue May  7 16:10:21 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_select.c,v 1.43 2019/05/05 20:45:08 christos Exp $	*/
+/*	$NetBSD: sys_select.c,v 1.44 2019/05/07 20:10:21 christos Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
@@ -84,7 +84,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sys_select.c,v 1.43 2019/05/05 20:45:08 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_select.c,v 1.44 2019/05/07 20:10:21 christos Exp $");
 
 #include 
 #include 
@@ -488,7 +488,7 @@ pollcommon(register_t *retval, struct po
 	int		error;
 	size_t		ni;
 
-	if (nfds > curlwp->l_proc->p_rlimit[RLIMIT_NOFILE].rlim_cur) {
+	if (nfds > curlwp->l_proc->p_rlimit[RLIMIT_NOFILE].rlim_max) {
 		/*
 		 * Prevent userland from causing over-allocation.
 		 * Raising the default limit too high can still cause
@@ -502,6 +502,10 @@ pollcommon(register_t *retval, struct po
 		 *
 		 * Historically the code silently truncated 'fds' to
 		 * dt_nfiles entries - but that does cause issues.
+		 *
+		 * Using the max limit equivalent to sysctl
+		 * kern.maxfiles is the moral equivalent of OPEN_MAX
+		 * as specified by POSIX
 		 */
 		return EINVAL;
 	}



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

2019-05-07 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue May  7 18:55:48 UTC 2019

Modified Files:
src/sys/netsmb [netbsd-7-0]: smb_conn.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1696):

sys/netsmb/smb_conn.c: revision 1.30

Prevent a NULL pointer dereference when the local endpoint is not defined.

>From Andy Nguyen, many thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.29.18.1 src/sys/netsmb/smb_conn.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/netsmb/smb_conn.c
diff -u src/sys/netsmb/smb_conn.c:1.29 src/sys/netsmb/smb_conn.c:1.29.18.1
--- src/sys/netsmb/smb_conn.c:1.29	Sun Apr 29 20:27:31 2012
+++ src/sys/netsmb/smb_conn.c	Tue May  7 18:55:48 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: smb_conn.c,v 1.29 2012/04/29 20:27:31 dsl Exp $	*/
+/*	$NetBSD: smb_conn.c,v 1.29.18.1 2019/05/07 18:55:48 martin Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: smb_conn.c,v 1.29 2012/04/29 20:27:31 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smb_conn.c,v 1.29.18.1 2019/05/07 18:55:48 martin Exp $");
 
 /*
  * Connection engine.
@@ -553,7 +553,8 @@ smb_vc_create(struct smb_vcspec *vcspec,
 	if ((vcp->vc_paddr = dup_sockaddr(vcspec->sap, 1)) == NULL)
 		goto fail;
 
-	if ((vcp->vc_laddr = dup_sockaddr(vcspec->lap, 1)) == NULL)
+	if (vcspec->lap && 
+	(vcp->vc_laddr = dup_sockaddr(vcspec->lap, 1)) == NULL)
 		goto fail;
 
 	if ((vcp->vc_pass = smb_strdup(vcspec->pass)) == NULL)



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

2019-05-07 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue May  7 18:56:53 UTC 2019

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

Log Message:
Ticket #1696


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.142 -r1.1.2.143 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.142 src/doc/CHANGES-7.0.3:1.1.2.143
--- src/doc/CHANGES-7.0.3:1.1.2.142	Sun May  5 09:12:01 2019
+++ src/doc/CHANGES-7.0.3	Tue May  7 18:56:53 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.3,v 1.1.2.142 2019/05/05 09:12:01 martin Exp $
+# $NetBSD: CHANGES-7.0.3,v 1.1.2.143 2019/05/07 18:56:53 martin Exp $
 
 A complete list of changes from the NetBSD 7.0.2 release to the NetBSD 7.0.3
 release:
@@ -5808,4 +5808,9 @@ external/bsd/dhcpcd/dist/src/dhcp6.c		(a
 	DHCPv6: Fix a potential read overflow with D6_OPTION_PD_EXCLUDE.
 	[roy, ticket #1694]
 
+sys/netsmb/smb_conn.c1.30
+
+	Prevent a NULL pointer dereference when the local endpoint is not
+	defined.
+	[christos, ticket #1696]
 



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

2019-05-07 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue May  7 18:55:20 UTC 2019

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

Log Message:
Ticket #1696


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.49 -r1.1.2.50 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.49 src/doc/CHANGES-7.1.3:1.1.2.50
--- src/doc/CHANGES-7.1.3:1.1.2.49	Sun May  5 09:09:04 2019
+++ src/doc/CHANGES-7.1.3	Tue May  7 18:55:20 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1.3,v 1.1.2.49 2019/05/05 09:09:04 martin Exp $
+# $NetBSD: CHANGES-7.1.3,v 1.1.2.50 2019/05/07 18:55:20 martin Exp $
 
 A complete list of changes from the NetBSD 7.1.2 release to the NetBSD 7.1.3
 release:
@@ -500,4 +500,9 @@ external/bsd/dhcpcd/dist/src/dhcp6.c		(a
 	DHCPv6: Fix a potential read overflow with D6_OPTION_PD_EXCLUDE.
 	[roy, ticket #1694]
 
+sys/netsmb/smb_conn.c1.30
+
+	Prevent a NULL pointer dereference when the local endpoint is not
+	defined.
+	[christos, ticket #1696]
 



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

2019-05-07 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue May  7 18:54:56 UTC 2019

Modified Files:
src/sys/netsmb [netbsd-7-1]: smb_conn.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1696):

sys/netsmb/smb_conn.c: revision 1.30

Prevent a NULL pointer dereference when the local endpoint is not defined.

>From Andy Nguyen, many thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.29.26.1 src/sys/netsmb/smb_conn.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/netsmb/smb_conn.c
diff -u src/sys/netsmb/smb_conn.c:1.29 src/sys/netsmb/smb_conn.c:1.29.26.1
--- src/sys/netsmb/smb_conn.c:1.29	Sun Apr 29 20:27:31 2012
+++ src/sys/netsmb/smb_conn.c	Tue May  7 18:54:56 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: smb_conn.c,v 1.29 2012/04/29 20:27:31 dsl Exp $	*/
+/*	$NetBSD: smb_conn.c,v 1.29.26.1 2019/05/07 18:54:56 martin Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: smb_conn.c,v 1.29 2012/04/29 20:27:31 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smb_conn.c,v 1.29.26.1 2019/05/07 18:54:56 martin Exp $");
 
 /*
  * Connection engine.
@@ -553,7 +553,8 @@ smb_vc_create(struct smb_vcspec *vcspec,
 	if ((vcp->vc_paddr = dup_sockaddr(vcspec->sap, 1)) == NULL)
 		goto fail;
 
-	if ((vcp->vc_laddr = dup_sockaddr(vcspec->lap, 1)) == NULL)
+	if (vcspec->lap && 
+	(vcp->vc_laddr = dup_sockaddr(vcspec->lap, 1)) == NULL)
 		goto fail;
 
 	if ((vcp->vc_pass = smb_strdup(vcspec->pass)) == NULL)



CVS commit: [netbsd-7] src/doc

2019-05-07 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue May  7 18:54:28 UTC 2019

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

Log Message:
Ticket #1696


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.51 -r1.1.2.52 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.51 src/doc/CHANGES-7.3:1.1.2.52
--- src/doc/CHANGES-7.3:1.1.2.51	Sun May  5 09:04:48 2019
+++ src/doc/CHANGES-7.3	Tue May  7 18:54:28 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.3,v 1.1.2.51 2019/05/05 09:04:48 martin Exp $
+# $NetBSD: CHANGES-7.3,v 1.1.2.52 2019/05/07 18:54:28 martin Exp $
 
 A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3
 release:
@@ -567,3 +567,9 @@ external/bsd/dhcpcd/dist/src/dhcp6.c		(a
 	DHCPv6: Fix a potential read overflow with D6_OPTION_PD_EXCLUDE.
 	[roy, ticket #1695]
 
+sys/netsmb/smb_conn.c1.30
+
+	Prevent a NULL pointer dereference when the local endpoint is not
+	defined.
+	[christos, ticket #1696]
+



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

2019-05-07 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue May  7 18:53:51 UTC 2019

Modified Files:
src/sys/netsmb [netbsd-7]: smb_conn.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1696):

sys/netsmb/smb_conn.c: revision 1.30

Prevent a NULL pointer dereference when the local endpoint is not defined.

>From Andy Nguyen, many thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.29.14.1 src/sys/netsmb/smb_conn.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/netsmb/smb_conn.c
diff -u src/sys/netsmb/smb_conn.c:1.29 src/sys/netsmb/smb_conn.c:1.29.14.1
--- src/sys/netsmb/smb_conn.c:1.29	Sun Apr 29 20:27:31 2012
+++ src/sys/netsmb/smb_conn.c	Tue May  7 18:53:51 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: smb_conn.c,v 1.29 2012/04/29 20:27:31 dsl Exp $	*/
+/*	$NetBSD: smb_conn.c,v 1.29.14.1 2019/05/07 18:53:51 martin Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: smb_conn.c,v 1.29 2012/04/29 20:27:31 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smb_conn.c,v 1.29.14.1 2019/05/07 18:53:51 martin Exp $");
 
 /*
  * Connection engine.
@@ -553,7 +553,8 @@ smb_vc_create(struct smb_vcspec *vcspec,
 	if ((vcp->vc_paddr = dup_sockaddr(vcspec->sap, 1)) == NULL)
 		goto fail;
 
-	if ((vcp->vc_laddr = dup_sockaddr(vcspec->lap, 1)) == NULL)
+	if (vcspec->lap && 
+	(vcp->vc_laddr = dup_sockaddr(vcspec->lap, 1)) == NULL)
 		goto fail;
 
 	if ((vcp->vc_pass = smb_strdup(vcspec->pass)) == NULL)



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

2019-05-07 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue May  7 18:50:45 UTC 2019

Modified Files:
src/sys/netsmb [netbsd-8]: smb_conn.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1258):

sys/netsmb/smb_conn.c: revision 1.30

Prevent a NULL pointer dereference when the local endpoint is not defined.

>From Andy Nguyen, many thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.29.32.1 src/sys/netsmb/smb_conn.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/netsmb/smb_conn.c
diff -u src/sys/netsmb/smb_conn.c:1.29 src/sys/netsmb/smb_conn.c:1.29.32.1
--- src/sys/netsmb/smb_conn.c:1.29	Sun Apr 29 20:27:31 2012
+++ src/sys/netsmb/smb_conn.c	Tue May  7 18:50:45 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: smb_conn.c,v 1.29 2012/04/29 20:27:31 dsl Exp $	*/
+/*	$NetBSD: smb_conn.c,v 1.29.32.1 2019/05/07 18:50:45 martin Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: smb_conn.c,v 1.29 2012/04/29 20:27:31 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smb_conn.c,v 1.29.32.1 2019/05/07 18:50:45 martin Exp $");
 
 /*
  * Connection engine.
@@ -553,7 +553,8 @@ smb_vc_create(struct smb_vcspec *vcspec,
 	if ((vcp->vc_paddr = dup_sockaddr(vcspec->sap, 1)) == NULL)
 		goto fail;
 
-	if ((vcp->vc_laddr = dup_sockaddr(vcspec->lap, 1)) == NULL)
+	if (vcspec->lap && 
+	(vcp->vc_laddr = dup_sockaddr(vcspec->lap, 1)) == NULL)
 		goto fail;
 
 	if ((vcp->vc_pass = smb_strdup(vcspec->pass)) == NULL)



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

2019-05-07 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue May  7 18:47:01 UTC 2019

Modified Files:
src/sys/dev/usb [netbsd-8]: ucom.c umodem_common.c umodemvar.h

Log Message:
Backout the following changes (requested by mrg in ticket #1240):

sys/dev/usb/umodem_common.c: revision 1.27
sys/dev/usb/umodemvar.h: revision 1.10
sys/dev/usb/ucom.c: revision 1.122

fix umodem(4) detach.
There are different fixes upcoming.


To generate a diff of this commit:
cvs rdiff -u -r1.118.8.3 -r1.118.8.4 src/sys/dev/usb/ucom.c
cvs rdiff -u -r1.25.8.1 -r1.25.8.2 src/sys/dev/usb/umodem_common.c
cvs rdiff -u -r1.9.10.1 -r1.9.10.2 src/sys/dev/usb/umodemvar.h

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

Modified files:

Index: src/sys/dev/usb/ucom.c
diff -u src/sys/dev/usb/ucom.c:1.118.8.3 src/sys/dev/usb/ucom.c:1.118.8.4
--- src/sys/dev/usb/ucom.c:1.118.8.3	Mon Apr 22 08:17:50 2019
+++ src/sys/dev/usb/ucom.c	Tue May  7 18:47:01 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ucom.c,v 1.118.8.3 2019/04/22 08:17:50 martin Exp $	*/
+/*	$NetBSD: ucom.c,v 1.118.8.4 2019/05/07 18:47:01 martin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.118.8.3 2019/04/22 08:17:50 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.118.8.4 2019/05/07 18:47:01 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -441,8 +441,10 @@ ucom_detach(device_t self, int flags)
 			mutex_spin_exit(_lock);
 		}
 		/* Wait for processes to go away. */
-		if (cv_timedwait(>sc_detachcv, >sc_lock, hz * 60))
-			aprint_error_dev(self, ": didn't detach\n");
+		if (cv_timedwait(>sc_detachcv, >sc_lock, hz * 60)) {
+			printf("%s: %s didn't detach\n", __func__,
+			device_xname(sc->sc_dev));
+		}
 	}
 
 	softint_disestablish(sc->sc_si);
@@ -1269,9 +1271,7 @@ ucomhwiflow(struct tty *tp, int block)
 
 	if (old && !block) {
 		sc->sc_rx_unblock = 1;
-		kpreempt_disable();
 		softint_schedule(sc->sc_si);
-		kpreempt_enable();
 	}
 	mutex_exit(>sc_lock);
 
@@ -1339,9 +1339,7 @@ ucomstart(struct tty *tp)
 
 	SIMPLEQ_INSERT_TAIL(>sc_obuff_full, ub, ub_link);
 
-	kpreempt_disable();
 	softint_schedule(sc->sc_si);
-	kpreempt_enable();
 
  out:
 	DPRINTF("... done", 0, 0, 0, 0);
@@ -1383,9 +1381,7 @@ ucom_write_status(struct ucom_softc *sc,
 		break;
 	case USBD_STALLED:
 		ub->ub_index = 0;
-		kpreempt_disable();
 		softint_schedule(sc->sc_si);
-		kpreempt_enable();
 		break;
 	case USBD_NORMAL_COMPLETION:
 		usbd_get_xfer_status(ub->ub_xfer, NULL, NULL, , NULL);

Index: src/sys/dev/usb/umodem_common.c
diff -u src/sys/dev/usb/umodem_common.c:1.25.8.1 src/sys/dev/usb/umodem_common.c:1.25.8.2
--- src/sys/dev/usb/umodem_common.c:1.25.8.1	Mon Apr 22 08:17:50 2019
+++ src/sys/dev/usb/umodem_common.c	Tue May  7 18:47:01 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: umodem_common.c,v 1.25.8.1 2019/04/22 08:17:50 martin Exp $	*/
+/*	$NetBSD: umodem_common.c,v 1.25.8.2 2019/05/07 18:47:01 martin Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -44,7 +44,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: umodem_common.c,v 1.25.8.1 2019/04/22 08:17:50 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umodem_common.c,v 1.25.8.2 2019/05/07 18:47:01 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -94,16 +94,16 @@ int	umodemdebug = 0;
 #define UMODEMIBUFSIZE 4096
 #define UMODEMOBUFSIZE 4096
 
-static usbd_status umodem_set_comm_feature(struct umodem_softc *,
+Static usbd_status umodem_set_comm_feature(struct umodem_softc *,
 	   int, int);
-static usbd_status umodem_set_line_coding(struct umodem_softc *,
+Static usbd_status umodem_set_line_coding(struct umodem_softc *,
 	  usb_cdc_line_state_t *);
 
-static void	umodem_dtr(struct umodem_softc *, int);
-static void	umodem_rts(struct umodem_softc *, int);
-static void	umodem_break(struct umodem_softc *, int);
-static void	umodem_set_line_state(struct umodem_softc *);
-static void	umodem_intr(struct usbd_xfer *, void *, usbd_status);
+Static void	umodem_dtr(struct umodem_softc *, int);
+Static void	umodem_rts(struct umodem_softc *, int);
+Static void	umodem_break(struct umodem_softc *, int);
+Static void	umodem_set_line_state(struct umodem_softc *);
+Static void	umodem_intr(struct usbd_xfer *, void *, usbd_status);
 
 int
 umodem_common_attach(device_t self, struct umodem_softc *sc,
@@ -120,15 +120,10 @@ umodem_common_attach(device_t self, stru
 	sc->sc_dev = self;
 	sc->sc_udev = dev;
 	sc->sc_ctl_iface = uiaa->uiaa_iface;
-	sc->sc_refcnt = 0;
-	sc->sc_dying = false;
 
 	aprint_naive("\n");
 	aprint_normal("\n");
 
-	mutex_init(>sc_lock, MUTEX_DEFAULT, IPL_SOFTUSB);
-	cv_init(>sc_detach_cv, "umodemdet");
-
 	id = usbd_get_interface_descriptor(sc->sc_ctl_iface);
 	devinfop = usbd_devinfo_alloc(uiaa->uiaa_device, 0);
 	aprint_normal_dev(self, "%s, iclass %d/%d\n",
@@ -261,7 +256,7 @@ 

CVS commit: src/lib/libpthread

2019-05-07 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Tue May  7 18:45:37 UTC 2019

Modified Files:
src/lib/libpthread: Makefile

Log Message:
Make CLEANFILES actually work. .TARGET is not defined when not in a target
rule.

Thanks xtos for the heads up.


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/lib/libpthread/Makefile

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

Modified files:

Index: src/lib/libpthread/Makefile
diff -u src/lib/libpthread/Makefile:1.93 src/lib/libpthread/Makefile:1.94
--- src/lib/libpthread/Makefile:1.93	Tue May  7 18:12:53 2019
+++ src/lib/libpthread/Makefile	Tue May  7 18:45:37 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.93 2019/05/07 18:12:53 maya Exp $
+#	$NetBSD: Makefile,v 1.94 2019/05/07 18:45:37 maya Exp $
 #
 
 NOSANITIZER=	# defined
@@ -281,7 +281,7 @@ __archivebuild: .USE
 	${LD} -r -o ${.TARGET}.o `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
 	${AR} ${_ARFL} ${.TARGET} ${.TARGET}.o
 
-CLEANFILES+=	${.TARGET}.o
+CLEANFILES+=	${_LIBS:=.o}
 
 .include 
 



CVS commit: [netbsd-8] src/doc

2019-05-07 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue May  7 18:52:49 UTC 2019

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

Log Message:
Remove backed out ticket #1240, add ticket #1258


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.139 -r1.1.2.140 src/doc/CHANGES-8.1

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.1
diff -u src/doc/CHANGES-8.1:1.1.2.139 src/doc/CHANGES-8.1:1.1.2.140
--- src/doc/CHANGES-8.1:1.1.2.139	Sun May  5 08:43:44 2019
+++ src/doc/CHANGES-8.1	Tue May  7 18:52:49 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.1,v 1.1.2.139 2019/05/05 08:43:44 martin Exp $
+# $NetBSD: CHANGES-8.1,v 1.1.2.140 2019/05/07 18:52:49 martin Exp $
 
 A complete list of changes from the NetBSD 8.0 release to the NetBSD 8.1
 release:
@@ -2900,14 +2900,6 @@ sys/external/bsd/drm2/ttm/ttm_bo_vm.c		1
 	netbsd errnos.
 	[mrg, ticket #1239]
 
-sys/dev/usb/ucom.c1.122
-sys/dev/usb/umodem_common.c			1.27
-sys/dev/usb/umodemvar.h1.10
-
-	Fix umodem(4) detach when unpluging a device while it is still
-	open.
-	[mrg, ticket #1240]
-
 sys/net/if_gif.c1.146
 
 	gif(4): prevent duplicate tunnels early.
@@ -3092,3 +3084,9 @@ sys/arch/i386/i386/copy.S			1.31
 	Don't forget to clear the direction flag if kcopy fails.
 	[maxv, ticket #1257]
 
+sys/netsmb/smb_conn.c1.30
+
+	Prevent a NULL pointer dereference when the local endpoint is not
+	defined.
+	[christos, ticket #1258]
+



CVS commit: src/lib/libpthread

2019-05-07 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Tue May  7 18:12:53 UTC 2019

Modified Files:
src/lib/libpthread: Makefile

Log Message:
Replace the link command for libpthread.a so that we create a single section
with all the libpthread symbols in it.
This makes -lpthread behave like to -Wl,--whole-archive -lpthread.

This avoids a situation where threaded static binaries use some libc thread
stubs, which are racy.

Fixes PR lib/54001: call_once2_32, call_once2_static test cases failing on
amd64 since gcc7 import.

Suggested by Jonathan Wakely, thanks!


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/lib/libpthread/Makefile

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

Modified files:

Index: src/lib/libpthread/Makefile
diff -u src/lib/libpthread/Makefile:1.92 src/lib/libpthread/Makefile:1.93
--- src/lib/libpthread/Makefile:1.92	Wed Apr 24 11:43:19 2019
+++ src/lib/libpthread/Makefile	Tue May  7 18:12:53 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.92 2019/04/24 11:43:19 kamil Exp $
+#	$NetBSD: Makefile,v 1.93 2019/05/07 18:12:53 maya Exp $
 #
 
 NOSANITIZER=	# defined
@@ -269,6 +269,20 @@ MLINKS+=	tss.3 tss_set.3
 
 INCS+=		threads.h
 
+# PR lib/54001: create libpthread.a as a single large object, with all the
+# symbols in one section. ensures that if any libpthread function is used,
+# you get all of them from libpthread, and not the libc stubs.
+#
+# This makes -lpthread equivalent to -Wl,--whole-archive -lpthread
+
+__archivebuild: .USE
+	${_MKTARGET_BUILD}
+	@rm -f ${.TARGET}
+	${LD} -r -o ${.TARGET}.o `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
+	${AR} ${_ARFL} ${.TARGET} ${.TARGET}.o
+
+CLEANFILES+=	${.TARGET}.o
+
 .include 
 
 .else



CVS commit: src/sys/dev/pci

2019-05-07 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue May  7 15:23:32 UTC 2019

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

Log Message:
- Use bus_dmamem_unmap() correctly in txp_dma_free() to prevent panic.
  The code was wrong since rev. 1.1. This panic was found by adding KASSERT
  in uvm_map.c rev. 1.351. This bug may be related to PR kern/26204.
- Use aprint_normal() for non-error message.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/pci/if_txp.c

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

Modified files:

Index: src/sys/dev/pci/if_txp.c
diff -u src/sys/dev/pci/if_txp.c:1.53 src/sys/dev/pci/if_txp.c:1.54
--- src/sys/dev/pci/if_txp.c:1.53	Fri Apr 26 06:33:34 2019
+++ src/sys/dev/pci/if_txp.c	Tue May  7 15:23:32 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: if_txp.c,v 1.53 2019/04/26 06:33:34 msaitoh Exp $ */
+/* $NetBSD: if_txp.c,v 1.54 2019/05/07 15:23:32 msaitoh Exp $ */
 
 /*
  * Copyright (c) 2001
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_txp.c,v 1.53 2019/04/26 06:33:34 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_txp.c,v 1.54 2019/05/07 15:23:32 msaitoh Exp $");
 
 #include "opt_inet.h"
 
@@ -257,7 +257,7 @@ txp_attach(device_t parent, device_t sel
 		aprint_normal("\n");
 		return;
 	}
-	aprint_error(": interrupting at %s\n", intrstr);
+	aprint_normal(": interrupting at %s\n", intrstr);
 
 	if (txp_chip_init(sc))
 		goto cleanupintr;
@@ -1237,8 +1237,10 @@ fail_0:
 void
 txp_dma_free(struct txp_softc *sc, struct txp_dma_alloc *dma)
 {
+	bus_size_t mapsize = dma->dma_map->dm_mapsize;
+
 	bus_dmamap_unload(sc->sc_dmat, dma->dma_map);
-	bus_dmamem_unmap(sc->sc_dmat, dma->dma_vaddr, dma->dma_map->dm_mapsize);
+	bus_dmamem_unmap(sc->sc_dmat, dma->dma_vaddr, mapsize);
 	bus_dmamem_free(sc->sc_dmat, >dma_seg, dma->dma_nseg);
 	bus_dmamap_destroy(sc->sc_dmat, dma->dma_map);
 }



CVS commit: [isaki-audio2] src/sys

2019-05-07 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Tue May  7 15:01:50 UTC 2019

Modified Files:
src/sys/modules/audio [isaki-audio2]: Makefile
src/sys/modules/spkr [isaki-audio2]: Makefile
src/sys/rump/dev/lib/libaudio [isaki-audio2]: Makefile
Removed Files:
src/sys/rump/dev/lib/libaudio [isaki-audio2]: aurateconv.h mulaw.h

Log Message:
Fix paths and flags.
- aurateconv is gone.  mulaw is a part of audio inseparably.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.3.2.1 src/sys/modules/audio/Makefile
cvs rdiff -u -r1.8 -r1.8.2.1 src/sys/modules/spkr/Makefile
cvs rdiff -u -r1.6 -r1.6.12.1 src/sys/rump/dev/lib/libaudio/Makefile
cvs rdiff -u -r1.1 -r0 src/sys/rump/dev/lib/libaudio/aurateconv.h \
src/sys/rump/dev/lib/libaudio/mulaw.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/modules/audio/Makefile
diff -u src/sys/modules/audio/Makefile:1.3 src/sys/modules/audio/Makefile:1.3.2.1
--- src/sys/modules/audio/Makefile:1.3	Sun Feb 17 04:05:43 2019
+++ src/sys/modules/audio/Makefile	Tue May  7 15:01:50 2019
@@ -1,18 +1,17 @@
-#	$NetBSD: Makefile,v 1.3 2019/02/17 04:05:43 rin Exp $
+#	$NetBSD: Makefile,v 1.3.2.1 2019/05/07 15:01:50 isaki Exp $
 
 .include "../Makefile.inc"
 
-.PATH:	${S}/dev
+.PATH:	${S}/dev/audio
 
 KMOD=	audio
 IOCONF=	audio.ioconf
 SRCS=	audio.c \
-	auconv.c \
-	aurateconv.c \
-	auvolconv.c \
+	alaw.c \
+	linear.c \
 	mulaw.c
 
-CPPFLAGS+=	-DNAUDIO=1 -DNAURATECONV=1 -DNMULAW=1
+CPPFLAGS+=	-DNAUDIO=1
 
 WARNS=	3
 

Index: src/sys/modules/spkr/Makefile
diff -u src/sys/modules/spkr/Makefile:1.8 src/sys/modules/spkr/Makefile:1.8.2.1
--- src/sys/modules/spkr/Makefile:1.8	Sun Feb 17 04:05:58 2019
+++ src/sys/modules/spkr/Makefile	Tue May  7 15:01:50 2019
@@ -1,15 +1,18 @@
-# $NetBSD: Makefile,v 1.8 2019/02/17 04:05:58 rin Exp $
+# $NetBSD: Makefile,v 1.8.2.1 2019/05/07 15:01:50 isaki Exp $
 
 .include "../Makefile.inc"
 
-.PATH:	${S}/dev/isa ${S}/dev
+.PATH:	${S}/dev/isa
 
 KMOD=	spkr
 IOCONF=	spkr.ioconf
 SRCS=	spkr.c spkr_pcppi.c
 
 .PATH:	${S}/dev
-SRCS+=	spkr_audio.c audiobell.c
+SRCS+=	spkr_audio.c
+
+.PATH:	${S}/dev/audio
+SRCS+=	audiobell.c
 
 CPPFLAGS+=	-DNWSMUX=1
 

Index: src/sys/rump/dev/lib/libaudio/Makefile
diff -u src/sys/rump/dev/lib/libaudio/Makefile:1.6 src/sys/rump/dev/lib/libaudio/Makefile:1.6.12.1
--- src/sys/rump/dev/lib/libaudio/Makefile:1.6	Thu Jun  1 09:44:30 2017
+++ src/sys/rump/dev/lib/libaudio/Makefile	Tue May  7 15:01:50 2019
@@ -1,17 +1,17 @@
-#	$NetBSD: Makefile,v 1.6 2017/06/01 09:44:30 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.6.12.1 2019/05/07 15:01:50 isaki Exp $
 #
 
-.PATH:	${.CURDIR}/../../../../dev
+.PATH:	${.CURDIR}/../../../../dev/audio
 
 LIB=	rumpdev_audio
 COMMENT=Audio support (incl. /dev/audio and /dev/mixer)
 
 IOCONF=	AUDIO.ioconf
 
-SRCS=	audio.c auconv.c aurateconv.c auvolconv.c mulaw.c
+SRCS=	alaw.c audio.c linear.c mulaw.c
 SRCS+=	audio_component.c
 
-CPPFLAGS+=	-DNAUDIO=1 -DNAURATECONV=1 -DNMULAW=1
+CPPFLAGS+=	-DNAUDIO=1
 
 .include 
 .include 



CVS commit: src/tools

2019-05-07 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Tue May  7 10:22:54 UTC 2019

Modified Files:
src/tools: Makefile

Log Message:
Fix build, "pax" must be built before "libprop".

Ok: Matthew Green mrg@


To generate a diff of this commit:
cvs rdiff -u -r1.202 -r1.203 src/tools/Makefile

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

Modified files:

Index: src/tools/Makefile
diff -u src/tools/Makefile:1.202 src/tools/Makefile:1.203
--- src/tools/Makefile:1.202	Tue May  7 04:29:45 2019
+++ src/tools/Makefile	Tue May  7 10:22:54 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.202 2019/05/07 04:29:45 thorpej Exp $
+#	$NetBSD: Makefile,v 1.203 2019/05/07 10:22:54 hannken Exp $
 
 .include 
 .include 
@@ -101,12 +101,11 @@ SUBDIR+= cap_mkdb crunchgen ctags gencat
 .endif
 
 SUBDIR+= cat rpcgen join lorder m4 mkdep tsort xz-include .WAIT yacc .WAIT awk .WAIT lex
-SUBDIR+= grep xz-lib libprop
+SUBDIR+= grep xz-lib pax .WAIT libprop
 
 .if ${TOOLS_BUILDRUMP} == "no"
 SUBDIR += .WAIT texinfo \
 	.WAIT tic \
-	.WAIT pax \
 	.WAIT ${TOOLCHAIN_BITS} \
 	${DTRACE_BITS} \
 		asn1_compile cksum compile_et db \



CVS commit: src

2019-05-07 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Tue May  7 08:51:10 UTC 2019

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: spa_misc.c zfs_ioctl.c
src/external/cddl/osnet/dist/uts/common/sys/fs: zfs.h
src/external/cddl/osnet/sys/kern: mod.c
src/sys/rump/fs/lib/libzfs: zfs_component.c

Log Message:
Cleanup modules "solaris" and "zfs":

- Defer spa_config_load() until root is mounted.
- Restore the config path to "/etc/zfs/zpool.cache".
- Module "zfs" is type MODULE_CLASS_VFS and no longer depends on "rootvnode".
- Module "solaris" no longer depends on "mp_online".
- Fix rump component registration to not detach "/dev/zfs" if
  it didn't attach it.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/spa_misc.c
cvs rdiff -u -r1.16 -r1.17 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c
cvs rdiff -u -r1.5 -r1.6 src/external/cddl/osnet/dist/uts/common/sys/fs/zfs.h
cvs rdiff -u -r1.4 -r1.5 src/external/cddl/osnet/sys/kern/mod.c
cvs rdiff -u -r1.2 -r1.3 src/sys/rump/fs/lib/libzfs/zfs_component.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/cddl/osnet/dist/uts/common/fs/zfs/spa_misc.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/spa_misc.c:1.4 src/external/cddl/osnet/dist/uts/common/fs/zfs/spa_misc.c:1.5
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/spa_misc.c:1.4	Thu Nov 15 04:55:38 2018
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/spa_misc.c	Tue May  7 08:51:09 2019
@@ -60,6 +60,10 @@
 #include 
 #endif
 
+#if defined( __NetBSD__) && defined(_KERNEL)
+#include 
+#endif
+
 /*
  * SPA locking
  *
@@ -2071,7 +2075,11 @@ spa_init(int mode)
 	zfs_prop_init();
 	zpool_prop_init();
 	zpool_feature_init();
+#if defined(__NetBSD__) && defined(_KERNEL)
+	config_mountroot((device_t) 0, (void (*)(device_t)) spa_config_load);
+#else
 	spa_config_load();
+#endif
 	l2arc_start();
 #ifdef __FreeBSD__
 #ifdef _KERNEL

Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c:1.16 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c:1.17
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c:1.16	Tue Feb  5 09:54:36 2019
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c	Tue May  7 08:51:09 2019
@@ -6973,7 +6973,7 @@ MODULE_DEPEND(zfsctrl, acl_nfs4, 1, 1, 1
 #include 
 #include 
 
-MODULE(MODULE_CLASS_DRIVER, zfs, "solaris");
+MODULE(MODULE_CLASS_VFS, zfs, "solaris");
 
 static const struct fileops zfs_fileops;
 
@@ -7180,9 +7180,6 @@ zfs_modcmd(modcmd_t cmd, void *arg)
 
 	switch (cmd) {
 	case MODULE_CMD_INIT:
-		if (!rootvnode)
-			return EAGAIN;
-
 		/* XXXNETBSD trim is not supported yet */
 		zfs_trim_enabled = B_FALSE;
 

Index: src/external/cddl/osnet/dist/uts/common/sys/fs/zfs.h
diff -u src/external/cddl/osnet/dist/uts/common/sys/fs/zfs.h:1.5 src/external/cddl/osnet/dist/uts/common/sys/fs/zfs.h:1.6
--- src/external/cddl/osnet/dist/uts/common/sys/fs/zfs.h:1.5	Mon May 28 21:05:08 2018
+++ src/external/cddl/osnet/dist/uts/common/sys/fs/zfs.h	Tue May  7 08:51:09 2019
@@ -630,7 +630,7 @@ typedef struct zpool_rewind_policy {
 #define	ZPOOL_CACHE		"/boot/zfs/zpool.cache"
 #endif
 #ifdef __NetBSD__
-#define	ZPOOL_CACHE		"/var/db/zfs/zpool.cache"
+#define	ZPOOL_CACHE		"/etc/zfs/zpool.cache"
 #endif
 
 /*

Index: src/external/cddl/osnet/sys/kern/mod.c
diff -u src/external/cddl/osnet/sys/kern/mod.c:1.4 src/external/cddl/osnet/sys/kern/mod.c:1.5
--- src/external/cddl/osnet/sys/kern/mod.c:1.4	Thu Dec 13 10:19:47 2018
+++ src/external/cddl/osnet/sys/kern/mod.c	Tue May  7 08:51:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: mod.c,v 1.4 2018/12/13 10:19:47 hannken Exp $	*/
+/*	$NetBSD: mod.c,v 1.5 2019/05/07 08:51:09 hannken Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mod.c,v 1.4 2018/12/13 10:19:47 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mod.c,v 1.5 2019/05/07 08:51:09 hannken Exp $");
 
 #include 
 #include 
@@ -49,9 +49,6 @@ solaris_modcmd(modcmd_t cmd, void *arg)
 
 	switch (cmd) {
 	case MODULE_CMD_INIT:
-		if (!mp_online)
-			return EAGAIN;
-
 		opensolaris_utsname_init();
 		callb_init(NULL);
 		taskq_init();

Index: src/sys/rump/fs/lib/libzfs/zfs_component.c
diff -u src/sys/rump/fs/lib/libzfs/zfs_component.c:1.2 src/sys/rump/fs/lib/libzfs/zfs_component.c:1.3
--- src/sys/rump/fs/lib/libzfs/zfs_component.c:1.2	Tue Jan 26 23:12:17 2016
+++ src/sys/rump/fs/lib/libzfs/zfs_component.c	Tue May  7 08:51:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: zfs_component.c,v 1.2 2016/01/26 23:12:17 pooka Exp $	*/
+/*	$NetBSD: zfs_component.c,v 1.3 2019/05/07 08:51:09 hannken Exp $	*/
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, 

CVS commit: src/external/cddl/osnet

2019-05-07 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Tue May  7 08:49:59 UTC 2019

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: spa.c zio.c
src/external/cddl/osnet/dist/uts/common/sys: taskq.h
src/external/cddl/osnet/sys/kern: taskq.c
src/external/cddl/osnet/sys/sys: zfs_context.h

Log Message:
This implementation of Solaris taskq API is incomplete and doesn't track
Solaris upstream.  FreeBSD already replaced it with a glue to their
taskqueue API.

Replace it with a glue component that queues Solaris taskq requests to
threadpool jobs.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/cddl/osnet/dist/uts/common/fs/zfs/spa.c
cvs rdiff -u -r1.5 -r1.6 src/external/cddl/osnet/dist/uts/common/fs/zfs/zio.c
cvs rdiff -u -r1.2 -r1.3 src/external/cddl/osnet/dist/uts/common/sys/taskq.h
cvs rdiff -u -r1.8 -r1.9 src/external/cddl/osnet/sys/kern/taskq.c
cvs rdiff -u -r1.20 -r1.21 src/external/cddl/osnet/sys/sys/zfs_context.h

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

Modified files:

Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/spa.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/spa.c:1.7 src/external/cddl/osnet/dist/uts/common/fs/zfs/spa.c:1.8
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/spa.c:1.7	Mon May 28 21:05:07 2018
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/spa.c	Tue May  7 08:49:59 2019
@@ -924,7 +924,7 @@ spa_taskqs_init(spa_t *spa, zio_type_t t
 			 *   then a difference between them is insignificant.
 			 */
 			if (t == ZIO_TYPE_WRITE && q == ZIO_TASKQ_ISSUE)
-#ifdef illumos
+#if defined(illumos) || defined(__NetBSD__)
 pri--;
 #else
 pri += 4;

Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zio.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zio.c:1.5 src/external/cddl/osnet/dist/uts/common/fs/zfs/zio.c:1.6
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/zio.c:1.5	Mon May 28 21:05:07 2018
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zio.c	Tue May  7 08:49:59 2019
@@ -1537,8 +1537,10 @@ zio_taskq_dispatch(zio_t *zio, zio_taskq
 	 * to a single taskq at a time.  It would be a grievous error
 	 * to dispatch the zio to another taskq at the same time.
 	 */
-#if defined(illumos) || defined(__NetBSD__) || !defined(_KERNEL)
+#if defined(illumos) || !defined(_KERNEL)
 	ASSERT(zio->io_tqent.tqent_next == NULL);
+#elif defined(__NetBSD__)
+	ASSERT(zio->io_tqent.tqent_queued == 0);
 #else
 	ASSERT(zio->io_tqent.tqent_task.ta_pending == 0);
 #endif
@@ -3842,8 +3844,10 @@ zio_done(zio_t *zio)
 			 * Reexecution is potentially a huge amount of work.
 			 * Hand it off to the otherwise-unused claim taskq.
 			 */
-#if defined(illumos) || defined(__NetBSD__) || !defined(_KERNEL)
+#if defined(illumos) || !defined(_KERNEL)
 			ASSERT(zio->io_tqent.tqent_next == NULL);
+#elif defined(__NetBSD__)
+			ASSERT(zio->io_tqent.tqent_queued == 0);
 #else
 			ASSERT(zio->io_tqent.tqent_task.ta_pending == 0);
 #endif

Index: src/external/cddl/osnet/dist/uts/common/sys/taskq.h
diff -u src/external/cddl/osnet/dist/uts/common/sys/taskq.h:1.2 src/external/cddl/osnet/dist/uts/common/sys/taskq.h:1.3
--- src/external/cddl/osnet/dist/uts/common/sys/taskq.h:1.2	Mon May 28 21:05:08 2018
+++ src/external/cddl/osnet/dist/uts/common/sys/taskq.h	Tue May  7 08:49:59 2019
@@ -54,6 +54,16 @@ typedef struct taskq taskq_t;
 typedef uintptr_t taskqid_t;
 typedef void (task_func_t)(void *);
 
+#ifdef __NetBSD__
+typedef struct taskq_ent {
+	SIMPLEQ_ENTRY(taskq_ent) tqent_list; /* Task queue. */
+	task_func_t	*tqent_func;	/* Function to run. */
+	void		*tqent_arg;	/* Argument to function above. */
+	unsigned	tqent_dynamic:1; /* Must kmem_free() if true. */
+	unsigned	tqent_queued:1; /* Queued and waiting to run if true. */
+} taskq_ent_t;
+#endif
+
 struct proc;
 
 /*
@@ -89,7 +99,7 @@ taskq_t	*taskq_create_proc(const char *,
 taskq_t	*taskq_create_sysdc(const char *, int, int, int,
 struct proc *, uint_t, uint_t);
 taskqid_t taskq_dispatch(taskq_t *, task_func_t, void *, uint_t);
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__NetBSD__)
 void	taskq_dispatch_ent(taskq_t *, task_func_t, void *, uint_t,
 taskq_ent_t *);
 #endif

Index: src/external/cddl/osnet/sys/kern/taskq.c
diff -u src/external/cddl/osnet/sys/kern/taskq.c:1.8 src/external/cddl/osnet/sys/kern/taskq.c:1.9
--- src/external/cddl/osnet/sys/kern/taskq.c:1.8	Sat Jan 12 10:42:40 2019
+++ src/external/cddl/osnet/sys/kern/taskq.c	Tue May  7 08:49:59 2019
@@ -1,1594 +1,323 @@
-/*	$NetBSD: taskq.c,v 1.8 2019/01/12 10:42:40 hannken Exp $	*/
+/*	$NetBSD: taskq.c,v 1.9 2019/05/07 08:49:59 hannken Exp $	*/
 
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can 

CVS commit: src/usr.sbin/installboot

2019-05-07 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue May  7 08:14:59 UTC 2019

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

Log Message:
Fix typos. Fix link. Use Pa for path.


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/usr.sbin/installboot/installboot.8

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

Modified files:

Index: src/usr.sbin/installboot/installboot.8
diff -u src/usr.sbin/installboot/installboot.8:1.96 src/usr.sbin/installboot/installboot.8:1.97
--- src/usr.sbin/installboot/installboot.8:1.96	Tue May  7 05:02:42 2019
+++ src/usr.sbin/installboot/installboot.8	Tue May  7 08:14:59 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: installboot.8,v 1.96 2019/05/07 05:02:42 thorpej Exp $
+.\"	$NetBSD: installboot.8,v 1.97 2019/05/07 08:14:59 wiz Exp $
 .\"
 .\" Copyright (c) 2002-2019 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -299,15 +299,16 @@ Modify the default boot command line.
 Set the console device,  must be one of:
 pc, com0, com1, com2, com3, com0kbd, com1kbd, com2kbd, com3kbd or auto.
 .
-.It Sy dtb=
+.It Sy dtb=/path/to/dtb/file
 .Sy [ evbarm ]
 Attempt to determine the board type from information in the device tree
-blob file at .
+blob file at
+.Pa /path/to/dtb/file .
 If both
 .Sy board
 and
 .Sy dtb
-optios are specified,
+options are specified,
 .Sy board
 takes precendence.
 .
@@ -479,7 +480,7 @@ packages with
 .Nm installboot
 installation overlays.
 If multiple overlays are found, overlays from paths closer to the front
-of the list take precensence.
+of the list take precedence.
 If not specified, the default path is
 .Pa /usr/pkg/share/u-boot .
 This environment variable is only used on platforms that support
@@ -950,7 +951,7 @@ already present:
 .Xr disklabel 8 ,
 .Xr dumpfs 8 ,
 .Xr fdisk 8 ,
-.Xr pxeboot 8
+.Xr x86/pxeboot 8
 .
 .Sh HISTORY
 This implementation of