CVS commit: [netbsd-7] src/doc

2017-01-28 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Jan 29 05:31:46 UTC 2017

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

Log Message:
1349, 1350


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.146 -r1.1.2.147 src/doc/CHANGES-7.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-7.1
diff -u src/doc/CHANGES-7.1:1.1.2.146 src/doc/CHANGES-7.1:1.1.2.147
--- src/doc/CHANGES-7.1:1.1.2.146	Sun Jan 22 05:53:52 2017
+++ src/doc/CHANGES-7.1	Sun Jan 29 05:31:46 2017
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.146 2017/01/22 05:53:52 snj Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.147 2017/01/29 05:31:46 snj Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -7924,3 +7924,17 @@ crypto/external/bsd/openssh/dist/moduli	
 	Update moduli file.
 	[aymeric/agc, ticket #1318]
 
+lib/libutil/opendisk.31.12, 1.13
+lib/libutil/opendisk.c1.14
+
+	PR/51216: Instead of trying to open files in the current
+	working directory first for paths that don't contain "/", first
+	try the /dev paths to avoid confusion with files in the working
+	directory that happen to match disk names.
+	[pgoyette, ticket #1349]
+
+sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c	1.8
+
+	Guarantee no zero-size uao/kmem allocations via ttm.
+	[maya, ticket #1350]
+



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

2017-01-28 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Jan 29 05:25:27 UTC 2017

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

Log Message:
1350


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.20 -r1.1.2.21 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.20 src/doc/CHANGES-7.0.3:1.1.2.21
--- src/doc/CHANGES-7.0.3:1.1.2.20	Sun Jan 22 05:53:23 2017
+++ src/doc/CHANGES-7.0.3	Sun Jan 29 05:25:27 2017
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.3,v 1.1.2.20 2017/01/22 05:53:23 snj Exp $
+# $NetBSD: CHANGES-7.0.3,v 1.1.2.21 2017/01/29 05:25:27 snj Exp $
 
 A complete list of changes from the NetBSD 7.0.2 release to the NetBSD 7.0.3
 release:
@@ -325,3 +325,8 @@ crypto/external/bsd/openssh/dist/moduli	
 	Update moduli file.
 	[aymeric/agc, ticket #1318]
 
+sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c	1.8
+
+	Guarantee no zero-size uao/kmem allocations via ttm.
+	[maya, ticket #1350]
+



CVS commit: [netbsd-7-0] src/sys/external/bsd/drm2/dist/drm/ttm

2017-01-28 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Jan 29 05:25:03 UTC 2017

Modified Files:
src/sys/external/bsd/drm2/dist/drm/ttm [netbsd-7-0]: ttm_tt.c

Log Message:
Pull up following revision(s) (requested by maya in ticket #1350):
sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c: revision 1.8
Guarantee no zero-size uao/kmem allocations via ttm.
It may be that all callers guarantee no zero-size ttm objects, but I
can't prove that in five minutes of browsing callers.  Rather than
add a KASSERT, lacking proof, we'll add a warning message so that if
it does happen then it happens noisily, but we'll also prevent the
bad consequences of passing zero into uao_create by rounding up to a
harmless nonzero allocation.
XXX pullup-7


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.6.8.1 src/sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c

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

Modified files:

Index: src/sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c
diff -u src/sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c:1.6 src/sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c:1.6.8.1
--- src/sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c:1.6	Sun Jul 27 00:40:39 2014
+++ src/sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c	Sun Jan 29 05:25:03 2017
@@ -203,6 +203,9 @@ int ttm_tt_init(struct ttm_tt *ttm, stru
 	ttm->dummy_read_page = dummy_read_page;
 	ttm->state = tt_unpopulated;
 #ifdef __NetBSD__
+	WARN(size == 0, "zero-size allocation in %s, please file a NetBSD PR",
+	__func__);	/* paranoia -- can't prove in five minutes */
+	size = MAX(size, 1);
 	ttm->swap_storage = uao_create(roundup2(size, PAGE_SIZE), 0);
 	uao_set_pgfl(ttm->swap_storage, bus_dmamem_pgfl(bdev->dmat));
 #else
@@ -245,6 +248,9 @@ int ttm_dma_tt_init(struct ttm_dma_tt *t
 	ttm->dummy_read_page = dummy_read_page;
 	ttm->state = tt_unpopulated;
 #ifdef __NetBSD__
+	WARN(size == 0, "zero-size allocation in %s, please file a NetBSD PR",
+	__func__);	/* paranoia -- can't prove in five minutes */
+	size = MAX(size, 1);
 	ttm->swap_storage = uao_create(roundup2(size, PAGE_SIZE), 0);
 	uao_set_pgfl(ttm->swap_storage, bus_dmamem_pgfl(bdev->dmat));
 #else



CVS commit: [netbsd-7] src/sys/external/bsd/drm2/dist/drm/ttm

2017-01-28 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Jan 29 05:24:16 UTC 2017

Modified Files:
src/sys/external/bsd/drm2/dist/drm/ttm [netbsd-7]: ttm_tt.c

Log Message:
Pull up following revision(s) (requested by maya in ticket #1350):
sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c: revision 1.8
Guarantee no zero-size uao/kmem allocations via ttm.
It may be that all callers guarantee no zero-size ttm objects, but I
can't prove that in five minutes of browsing callers.  Rather than
add a KASSERT, lacking proof, we'll add a warning message so that if
it does happen then it happens noisily, but we'll also prevent the
bad consequences of passing zero into uao_create by rounding up to a
harmless nonzero allocation.


To generate a diff of this commit:
cvs rdiff -u -r1.6.2.1 -r1.6.2.2 \
src/sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c

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

Modified files:

Index: src/sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c
diff -u src/sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c:1.6.2.1 src/sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c:1.6.2.2
--- src/sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c:1.6.2.1	Mon Dec 12 09:13:42 2016
+++ src/sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c	Sun Jan 29 05:24:16 2017
@@ -203,6 +203,9 @@ int ttm_tt_init(struct ttm_tt *ttm, stru
 	ttm->dummy_read_page = dummy_read_page;
 	ttm->state = tt_unpopulated;
 #ifdef __NetBSD__
+	WARN(size == 0, "zero-size allocation in %s, please file a NetBSD PR",
+	__func__);	/* paranoia -- can't prove in five minutes */
+	size = MAX(size, 1);
 	ttm->swap_storage = uao_create(roundup2(size, PAGE_SIZE), 0);
 	uao_set_pgfl(ttm->swap_storage, bus_dmamem_pgfl(bdev->dmat));
 #else
@@ -245,6 +248,9 @@ int ttm_dma_tt_init(struct ttm_dma_tt *t
 	ttm->dummy_read_page = dummy_read_page;
 	ttm->state = tt_unpopulated;
 #ifdef __NetBSD__
+	WARN(size == 0, "zero-size allocation in %s, please file a NetBSD PR",
+	__func__);	/* paranoia -- can't prove in five minutes */
+	size = MAX(size, 1);
 	ttm->swap_storage = uao_create(roundup2(size, PAGE_SIZE), 0);
 	uao_set_pgfl(ttm->swap_storage, bus_dmamem_pgfl(bdev->dmat));
 #else



CVS commit: [netbsd-7] src/lib/libutil

2017-01-28 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Jan 29 05:17:33 UTC 2017

Modified Files:
src/lib/libutil [netbsd-7]: opendisk.3 opendisk.c

Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #1349):
lib/libutil/opendisk.c: revision 1.14
lib/libutil/opendisk.3: revision 1.12, 1.13
PR/51216: Instead of trying to open files in the current working
directory first for paths that don't contain "/", first try the
/dev paths to avoid confusion with files in the working directory
that happen to match disk names.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.42.1 src/lib/libutil/opendisk.3
cvs rdiff -u -r1.12 -r1.12.24.1 src/lib/libutil/opendisk.c

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

Modified files:

Index: src/lib/libutil/opendisk.3
diff -u src/lib/libutil/opendisk.3:1.11 src/lib/libutil/opendisk.3:1.11.42.1
--- src/lib/libutil/opendisk.3:1.11	Wed Apr 30 13:10:52 2008
+++ src/lib/libutil/opendisk.3	Sun Jan 29 05:17:33 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: opendisk.3,v 1.11 2008/04/30 13:10:52 martin Exp $
+.\"	$NetBSD: opendisk.3,v 1.11.42.1 2017/01/29 05:17:33 snj Exp $
 .\"
 .\" Copyright (c) 1997, 2001 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 December 11, 2001
+.Dd June 6, 2016
 .Dt OPENDISK 3
 .Os
 .Sh NAME
@@ -71,20 +71,6 @@ are tried.
 attempts to open the following variations of
 .Fa path ,
 in order:
-.Bl -tag -width "/dev/rpathX"
-.It Pa path
-The pathname as given.
-.It Pa path Ns Em X
-.Fa path
-with a suffix of
-.Sq Em X ,
-where
-.Sq Em X
-represents the raw partition of the device, as determined by
-.Xr getrawpartition 3 ,
-usually
-.Dq c .
-.El
 .Pp
 If
 .Fa path
@@ -93,13 +79,12 @@ slash
 .Pq Dq / ,
 the following variations are attempted:
 .Pp
-.Bl -dash -offset indent
+.Bl -dash -compact
 .It
 If
 .Fa iscooked
 is zero:
-.Pp
-.Bl -tag -width "/dev/rpathX"
+.Bl -tag -compact -width "/dev/rpathX"
 .It Pa /dev/rpath
 .Fa path
 with a prefix of
@@ -116,7 +101,7 @@ and a suffix of
 If
 .Fa iscooked
 is non-zero:
-.Bl -tag -width "/dev/rpathX"
+.Bl -tag -compact -width "/dev/rpathX"
 .It Pa /dev/path
 .Fa path
 with a prefix of
@@ -130,6 +115,31 @@ and a suffix of
 (q.v.).
 .El
 .El
+.Pp
+If the above fails, than the original
+.Fa path
+is tried using the following two variations:
+.Pp
+.Bl -dash -compact
+.It
+The
+.Fa iscooked
+value is ignored:
+.Bl -tag -compact -width "/dev/rpathX"
+.It Pa path
+The pathname as given.
+.It Pa path Ns Em X
+.Fa path
+with a suffix of
+.Sq Em X ,
+where
+.Sq Em X
+represents the raw partition of the device, as determined by
+.Xr getrawpartition 3 ,
+usually
+.Dq c .
+.El
+.El
 .Sh RETURN VALUES
 An open file descriptor, or -1 if the
 .Xr open 2
@@ -170,3 +180,11 @@ The
 .Fn opendisk
 function first appeared in
 .Nx 1.3 .
+.Pp
+The lookup order of
+.Fn opendisk
+was changed in
+.Nx 7.1
+to first look in
+.Pa /dev
+in order to avoid opening random files in the current working directory.

Index: src/lib/libutil/opendisk.c
diff -u src/lib/libutil/opendisk.c:1.12 src/lib/libutil/opendisk.c:1.12.24.1
--- src/lib/libutil/opendisk.c:1.12	Tue Oct 13 22:00:31 2009
+++ src/lib/libutil/opendisk.c	Sun Jan 29 05:17:33 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: opendisk.c,v 1.12 2009/10/13 22:00:31 pooka Exp $	*/
+/*	$NetBSD: opendisk.c,v 1.12.24.1 2017/01/29 05:17:33 snj Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -31,61 +31,76 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: opendisk.c,v 1.12 2009/10/13 22:00:31 pooka Exp $");
+__RCSID("$NetBSD: opendisk.c,v 1.12.24.1 2017/01/29 05:17:33 snj Exp $");
 #endif
 
 #include 
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
 
+static int __printflike(5, 6)
+opd(char *buf, size_t len, int (*ofn)(const char *, int, ...),
+int flags, const char *fmt, ...)
+{
+	va_list ap;
+
+	va_start(ap, fmt);
+	vsnprintf(buf, len, fmt, ap);
+	va_end(ap);
+
+	return (*ofn)(buf, flags, 0);
+}
+
 static int
 __opendisk(const char *path, int flags, char *buf, size_t buflen, int iscooked,
 	int (*ofn)(const char *, int, ...))
 {
-	int f, rawpart;
+	int f, part;
 
 	if (buf == NULL) {
 		errno = EFAULT;
-		return (-1);
+		return -1;
 	}
-	snprintf(buf, buflen, "%s", path);
 
 	if ((flags & O_CREAT) != 0) {
 		errno = EINVAL;
-		return (-1);
+		return -1;
 	}
 
-	rawpart = getrawpartition();
-	if (rawpart < 0)
-		return (-1);	/* sysctl(3) in getrawpartition sets errno */
-
-	f = ofn(buf, flags, 0);
-	if (f != -1 || errno != ENOENT)
-		return (f);
-
-	snprintf(buf, buflen, "%s%c", path, 'a' + rawpart);
-	f = ofn(buf, flags, 0);
-	if (f != -1 || errno != ENOENT)
-		return (f);
-
-	if (strchr(path, '/') != NULL)
-		return (-1);
+	part = getrawpartition();
+	if (part < 0)
+

CVS commit: src/lib/libutil

2017-01-28 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Jan 29 05:13:55 UTC 2017

Modified Files:
src/lib/libutil: opendisk.3

Log Message:
new lookup order will be in 7.1 before 8.0


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libutil/opendisk.3

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

Modified files:

Index: src/lib/libutil/opendisk.3
diff -u src/lib/libutil/opendisk.3:1.13 src/lib/libutil/opendisk.3:1.14
--- src/lib/libutil/opendisk.3:1.13	Tue Jun  7 11:20:45 2016
+++ src/lib/libutil/opendisk.3	Sun Jan 29 05:13:55 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: opendisk.3,v 1.13 2016/06/07 11:20:45 wiz Exp $
+.\"	$NetBSD: opendisk.3,v 1.14 2017/01/29 05:13:55 snj Exp $
 .\"
 .\" Copyright (c) 1997, 2001 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -184,7 +184,7 @@ function first appeared in
 The lookup order of
 .Fn opendisk
 was changed in
-.Nx 8
+.Nx 7.1
 to first look in
 .Pa /dev
 in order to avoid opening random files in the current working directory.



CVS commit: src/external/gpl2/groff/tmac

2017-01-28 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Jan 29 05:12:17 UTC 2017

Modified Files:
src/external/gpl2/groff/tmac: mdoc.local

Log Message:
add 7.1


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/groff/tmac/mdoc.local

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

Modified files:

Index: src/external/gpl2/groff/tmac/mdoc.local
diff -u src/external/gpl2/groff/tmac/mdoc.local:1.1 src/external/gpl2/groff/tmac/mdoc.local:1.2
--- src/external/gpl2/groff/tmac/mdoc.local:1.1	Wed Jan 13 19:02:01 2016
+++ src/external/gpl2/groff/tmac/mdoc.local	Sun Jan 29 05:12:17 2017
@@ -1,4 +1,4 @@
-.\" $NetBSD: mdoc.local,v 1.1 2016/01/13 19:02:01 christos Exp $
+.\" $NetBSD: mdoc.local,v 1.2 2017/01/29 05:12:17 snj Exp $
 .\"
 .\" Copyright (c) 2003, 2004 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -61,6 +61,7 @@
 .ds doc-operating-system-NetBSD-6.06.0
 .ds doc-operating-system-NetBSD-6.16.1
 .ds doc-operating-system-NetBSD-7.07.0
+.ds doc-operating-system-NetBSD-7.17.1
 .ds doc-operating-system-NetBSD-8.08.0
 .ds doc-operating-system-FreeBSD-4.11  4.11
 .ds doc-operating-system-FreeBSD-5.4   5.4



CVS commit: src/usr.sbin/npf/npftest/libnpftest

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 29 04:12:52 UTC 2017

Modified Files:
src/usr.sbin/npf/npftest/libnpftest: npf_rule_test.c

Log Message:
fix function argument.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 \
src/usr.sbin/npf/npftest/libnpftest/npf_rule_test.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/npf/npftest/libnpftest/npf_rule_test.c
diff -u src/usr.sbin/npf/npftest/libnpftest/npf_rule_test.c:1.13 src/usr.sbin/npf/npftest/libnpftest/npf_rule_test.c:1.14
--- src/usr.sbin/npf/npftest/libnpftest/npf_rule_test.c:1.13	Mon Dec 26 18:05:05 2016
+++ src/usr.sbin/npf/npftest/libnpftest/npf_rule_test.c	Sat Jan 28 23:12:52 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_rule_test.c,v 1.13 2016/12/26 23:05:05 christos Exp $	*/
+/*	$NetBSD: npf_rule_test.c,v 1.14 2017/01/29 04:12:52 christos Exp $	*/
 
 /*
  * NPF ruleset test.
@@ -80,7 +80,8 @@ npf_rule_raw_test(bool verbose, struct m
 	npf_cache_t npc = { .npc_info = 0, .npc_ctx = npf };
 	nbuf_t nbuf;
 	npf_rule_t *rl;
-	int retfl, error;
+	npf_match_info_t mi;
+	int error;
 
 	nbuf_init(npf, &nbuf, m, ifp);
 	npc.npc_nbuf = &nbuf;
@@ -90,7 +91,7 @@ npf_rule_raw_test(bool verbose, struct m
 	rl = npf_ruleset_inspect(&npc, npf_config_ruleset(npf),
 	di, NPF_LAYER_3);
 	if (rl) {
-		error = npf_rule_conclude(rl, &retfl);
+		error = npf_rule_conclude(rl, &mi);
 	} else {
 		error = ENOENT;
 	}



CVS commit: src/common/lib/libprop

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 29 02:29:06 UTC 2017

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

Log Message:
call the proper size functions


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/common/lib/libprop/prop_kern.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_kern.c
diff -u src/common/lib/libprop/prop_kern.c:1.22 src/common/lib/libprop/prop_kern.c:1.23
--- src/common/lib/libprop/prop_kern.c:1.22	Sat Jan 28 21:07:57 2017
+++ src/common/lib/libprop/prop_kern.c	Sat Jan 28 21:29:06 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: prop_kern.c,v 1.22 2017/01/29 02:07:57 christos Exp $	*/
+/*	$NetBSD: prop_kern.c,v 1.23 2017/01/29 02:29:06 christos Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2009 The NetBSD Foundation, Inc.
@@ -510,7 +510,7 @@ int
 prop_array_copyin_ioctl(const struct plistref *pref, const u_long cmd,
 prop_array_t *arrayp)
 {
-	return prop_array_copyin_ioctl(pref, cmd, arrayp,
+	return prop_array_copyin_ioctl_size(pref, cmd, arrayp,
 	prop_object_copyin_limit);
 }
 
@@ -530,7 +530,7 @@ int
 prop_dictionary_copyin_ioctl(const struct plistref *pref, const u_long cmd,
 prop_dictionary_t *dictp)
 {
-return prop_dictionary_copyin_ioctl(pref, cmd, dictp,
+return prop_dictionary_copyin_ioctl_size(pref, cmd, dictp,
 	prop_object_copyin_limit);
 }
 



CVS commit: src/common/lib/libprop

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 29 02:07:57 UTC 2017

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

Log Message:
missing brace


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/common/lib/libprop/prop_kern.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_kern.c
diff -u src/common/lib/libprop/prop_kern.c:1.21 src/common/lib/libprop/prop_kern.c:1.22
--- src/common/lib/libprop/prop_kern.c:1.21	Sat Jan 28 19:16:42 2017
+++ src/common/lib/libprop/prop_kern.c	Sat Jan 28 21:07:57 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: prop_kern.c,v 1.21 2017/01/29 00:16:42 christos Exp $	*/
+/*	$NetBSD: prop_kern.c,v 1.22 2017/01/29 02:07:57 christos Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2009 The NetBSD Foundation, Inc.
@@ -492,7 +492,7 @@ prop_dictionary_copyin(const struct plis
 {
 	return prop_dictionary_copyin_size(pref, dictp,
 	prop_object_copyin_limit);
-
+}
 
 /*
  * prop_array_copyin_ioctl --



CVS commit: src/common/include/prop

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 29 02:07:44 UTC 2017

Modified Files:
src/common/include/prop: prop_array.h

Log Message:
fix args


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/common/include/prop/prop_array.h

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

Modified files:

Index: src/common/include/prop/prop_array.h
diff -u src/common/include/prop/prop_array.h:1.15 src/common/include/prop/prop_array.h:1.16
--- src/common/include/prop/prop_array.h:1.15	Sat Jan 28 19:16:19 2017
+++ src/common/include/prop/prop_array.h	Sat Jan 28 21:07:44 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: prop_array.h,v 1.15 2017/01/29 00:16:19 christos Exp $*/
+/* $NetBSD: prop_array.h,v 1.16 2017/01/29 02:07:44 christos Exp $*/
 
 /*-
  * Copyright (c) 2006, 2009 The NetBSD Foundation, Inc.
@@ -79,7 +79,8 @@ int		prop_array_recv_syscall(const struc
 	prop_array_t *);
 #elif defined(_KERNEL)
 int		prop_array_copyin(const struct plistref *, prop_array_t *);
-int		prop_array_copyin_size(const struct plistref *, prop_array_t *);
+int		prop_array_copyin_size(const struct plistref *, prop_array_t *,
+   size_t);
 int		prop_array_copyout(struct plistref *, prop_array_t);
 int		prop_array_copyin_ioctl(const struct plistref *, const u_long,
 	prop_array_t *);



CVS commit: src/crypto/external/bsd/heimdal/include

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 29 01:46:17 UTC 2017

Modified Files:
src/crypto/external/bsd/heimdal/include: config.h

Log Message:
override arc4* for tools build.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/crypto/external/bsd/heimdal/include/config.h

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

Modified files:

Index: src/crypto/external/bsd/heimdal/include/config.h
diff -u src/crypto/external/bsd/heimdal/include/config.h:1.7 src/crypto/external/bsd/heimdal/include/config.h:1.8
--- src/crypto/external/bsd/heimdal/include/config.h:1.7	Sat Jan 28 16:31:51 2017
+++ src/crypto/external/bsd/heimdal/include/config.h	Sat Jan 28 20:46:16 2017
@@ -3,12 +3,14 @@
 
 #if HAVE_NBTOOL_CONFIG_H
 #include "nbtool_config.h"
-#endif
+#define arc4random random
+#define arc4random_stir() srandom(time(NULL))
 #undef PACKAGE_NAME
 #undef PACKAGE_STRING
 #undef PACKAGE_TARNAME
 #undef PACKAGE_VERSION
 #undef PACKAGE_BUGREPORT
+#endif
 
 #ifndef RCSID
 #define RCSID(msg) \



CVS commit: src/crypto/external/bsd/heimdal/dist/lib/asn1

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 29 01:46:37 UTC 2017

Modified Files:
src/crypto/external/bsd/heimdal/dist/lib/asn1: gen.c

Log Message:
handle our basename.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/crypto/external/bsd/heimdal/dist/lib/asn1/gen.c

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

Modified files:

Index: src/crypto/external/bsd/heimdal/dist/lib/asn1/gen.c
diff -u src/crypto/external/bsd/heimdal/dist/lib/asn1/gen.c:1.4 src/crypto/external/bsd/heimdal/dist/lib/asn1/gen.c:1.5
--- src/crypto/external/bsd/heimdal/dist/lib/asn1/gen.c:1.4	Sat Jan 28 16:31:45 2017
+++ src/crypto/external/bsd/heimdal/dist/lib/asn1/gen.c	Sat Jan 28 20:46:37 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: gen.c,v 1.4 2017/01/28 21:31:45 christos Exp $	*/
+/*	$NetBSD: gen.c,v 1.5 2017/01/29 01:46:37 christos Exp $	*/
 
 /*
  * Copyright (c) 1997 - 2005 Kungliga Tekniska Högskolan
@@ -38,7 +38,7 @@
 #include "gen_locl.h"
 #include 
 
-__RCSID("$NetBSD: gen.c,v 1.4 2017/01/28 21:31:45 christos Exp $");
+__RCSID("$NetBSD: gen.c,v 1.5 2017/01/29 01:46:37 christos Exp $");
 
 FILE *privheaderfile, *headerfile, *codefile, *logfile, *templatefile;
 
@@ -153,10 +153,12 @@ init_generate (const char *filename, con
 /* template file */
 if (asprintf(&template, "%s-template.x", headerbase) < 0 || template == NULL)
 	errx(1, "malloc");
+char *copy = estrdup(filename);
+char *bn = basename(copy);
 fprintf (headerfile,
 	 "/* Generated from %s */\n"
 	 "/* Do not edit */\n\n",
-	 basename(filename));
+	 bn);
 fprintf (headerfile,
 	 "#ifndef __%s_h__\n"
 	 "#define __%s_h__\n\n", headerbase, headerbase);
@@ -273,8 +275,9 @@ init_generate (const char *filename, con
 	 "#include \n"
 	 "#include \n"
 	 "#include \n",
-	 basename(filename),
+	 bn,
 	 type_file_string);
+free(copy);
 
 fprintf (templatefile,
 	 "#include <%s>\n"
@@ -364,6 +367,8 @@ generate_header_of_codefile(const char *
 fprintf(logfile, "%s ", filename);
 free(filename);
 filename = NULL;
+char *copy = estrdup(orig_filename);
+char *bn = basename(copy);
 fprintf (codefile,
 	 "/* Generated from %s */\n"
 	 "/* Do not edit */\n\n"
@@ -375,8 +380,9 @@ generate_header_of_codefile(const char *
 	 "#include \n"
 	 "#include \n"
 	 "#include \n",
-	 basename(orig_filename),
+	 bn,
 	 type_file_string);
+free(copy);
 
 fprintf (codefile,
 	 "#include \"%s\"\n"



CVS commit: src/common/lib/libprop

2017-01-28 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Jan 29 01:38:02 UTC 2017

Modified Files:
src/common/lib/libprop: prop_copyin_ioctl.9

Log Message:
Update for the new *_size() functions recently added.  Mention the
implicit size limit (128KB) for the functions which do not take an
explicit limit argument.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/common/lib/libprop/prop_copyin_ioctl.9

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_copyin_ioctl.9
diff -u src/common/lib/libprop/prop_copyin_ioctl.9:1.11 src/common/lib/libprop/prop_copyin_ioctl.9:1.12
--- src/common/lib/libprop/prop_copyin_ioctl.9:1.11	Sun Jan 15 22:14:22 2017
+++ src/common/lib/libprop/prop_copyin_ioctl.9	Sun Jan 29 01:38:02 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: prop_copyin_ioctl.9,v 1.11 2017/01/15 22:14:22 wiz Exp $
+.\"	$NetBSD: prop_copyin_ioctl.9,v 1.12 2017/01/29 01:38:02 pgoyette Exp $
 .\"
 .\" Copyright (c) 2006, 2009 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 January 17, 2011
+.Dd January 29, 2017
 .Dt PROP_COPYIN_IOCTL 9
 .Os
 .Sh NAME
@@ -46,9 +46,15 @@
 .Fn prop_array_copyin_ioctl "const struct plistref *pref" \
 "const u_long cmd" "prop_array_t *arrayp"
 .Ft int
+.Fn prop_array_copyin_ioctl_size "const struct plistref *pref" \
+"const u_long cmd" "prop_array_t *arrayp" "size_t lim"
+.Ft int
 .Fn prop_array_copyin "const struct plistref *pref" \
 "prop_array_t *arrayp"
 .Ft int
+.Fn prop_array_copyin_size "const struct plistref *pref" \
+"prop_array_t *arrayp" "size_t lim"
+.Ft int
 .Fn prop_array_copyout_ioctl "struct plistref *pref" \
 "const u_long cmd" "prop_array_t array"
 .Ft int
@@ -58,9 +64,15 @@
 .Fn prop_dictionary_copyin_ioctl "const struct plistref *pref" \
 "const u_long cmd" "prop_dictionary_t *dictp"
 .Ft int
+.Fn prop_dictionary_copyin_ioctl_size "const struct plistref *pref" \
+"const u_long cmd" "prop_dictionary_t *dictp" "size_t lim"
+.Ft int
 .Fn prop_dictionary_copyin "const struct plistref *pref" \
 "prop_dictionary_t *dictp"
 .Ft int
+.Fn prop_dictionary_copyin_size "const struct plistref *pref" \
+"prop_dictionary_t *dictp" "size_t lim"
+.Ft int
 .Fn prop_dictionary_copyout_ioctl "struct plistref *pref" \
 "const u_long cmd" "prop_dictionary_t dict"
 .Ft int
@@ -68,9 +80,12 @@
 "prop_dictionary_t dict"
 .Sh DESCRIPTION
 The
+.Nm prop_array_ioctl ,
 .Nm prop_array_copyin_ioctl ,
+.Nm prop_array_copyin_ioctl_size ,
 .Nm prop_array_copyout_ioctl ,
 .Nm prop_dictionary_copyin_ioctl ,
+.Nm prop_dictionary_copyin_ioctl_size ,
 and
 .Nm prop_dictionary_copyout_ioctl
 functions implement the kernel side of a protocol for copying property lists
@@ -78,8 +93,10 @@ to and from the kernel using
 .Xr ioctl 2 .
 The functions
 .Nm prop_array_copyin ,
+.Nm prop_array_copyin_size ,
 .Nm prop_array_copyout ,
 .Nm prop_dictionary_copyin ,
+.Nm prop_dictionary_copyin_size ,
 and
 .Nm prop_dictionary_copyout
 implement the kernel side of a protocol for copying property lists to the
@@ -90,6 +107,25 @@ pointer to a
 .Vt struct plistref .
 This structure encapsulates the reference to the property list in externalized
 form.
+.Pp
+The functions
+.Nm prop_array_copyin_ioctl_size ,
+.Nm prop_dictionary_copyin_ioctl_size ,
+.Nm prop_array_copyin_size ,
+and
+.Nm prop_dictionary_copyin_size ,
+take an explicit limit argument
+.Ar lim
+while
+.Nm prop_array_copyin_ioctl ,
+.Nm prop_dictionary_copyin_ioctl ,
+.Nm prop_array_copyin ,
+and
+.Nm prop_dictionary_copyin ,
+have an implicit size limit of 128KB.
+Attempts to transfer objects larger than the limit result in an
+.Er E2BIG
+return value.
 .Sh RETURN VALUES
 If successful, functions return zero.
 Otherwise, an error number will be returned to indicate the error.



CVS commit: src/usr.sbin/npf/npfctl

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 29 00:18:15 UTC 2017

Modified Files:
src/usr.sbin/npf/npfctl: npf_show.c

Log Message:
Always print the rule id associated with a rule.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/npf/npfctl/npf_show.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/npf/npfctl/npf_show.c
diff -u src/usr.sbin/npf/npfctl/npf_show.c:1.22 src/usr.sbin/npf/npfctl/npf_show.c:1.23
--- src/usr.sbin/npf/npfctl/npf_show.c:1.22	Thu Dec 29 15:48:50 2016
+++ src/usr.sbin/npf/npfctl/npf_show.c	Sat Jan 28 19:18:15 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_show.c,v 1.22 2016/12/29 20:48:50 rmind Exp $	*/
+/*	$NetBSD: npf_show.c,v 1.23 2017/01/29 00:18:15 christos Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: npf_show.c,v 1.22 2016/12/29 20:48:50 rmind Exp $");
+__RCSID("$NetBSD: npf_show.c,v 1.23 2017/01/29 00:18:15 christos Exp $");
 
 #include 
 #define	__FAVOR_BSD
@@ -338,6 +338,13 @@ scan_marks(npf_conf_info_t *ctx, const s
 }
 
 static void
+npfctl_print_id(npf_conf_info_t *ctx, nl_rule_t *rl)
+{
+	uint64_t id = id = npf_rule_getid(rl);
+	fprintf(ctx->fp, "# id=\"%" PRIu64 "\" ", id);
+}
+
+static void
 npfctl_print_filter(npf_conf_info_t *ctx, nl_rule_t *rl)
 {
 	const void *marks;
@@ -399,8 +406,7 @@ npfctl_print_rule(npf_conf_info_t *ctx, 
 
 	if ((attr & NPF_DYNAMIC_GROUP) == NPF_RULE_GROUP) {
 		/* Group; done. */
-		fputs("\n", ctx->fp);
-		return;
+		goto out;
 	}
 
 	/* Print filter criteria. */
@@ -411,12 +417,8 @@ npfctl_print_rule(npf_conf_info_t *ctx, 
 		fprintf(ctx->fp, "apply \"%s\" ", rproc);
 	}
 
-	/* If dynamic rule - print its ID. */
-	if ((attr & NPF_DYNAMIC_GROUP) == NPF_RULE_DYNAMIC) {
-		uint64_t id = npf_rule_getid(rl);
-		fprintf(ctx->fp, "# id = \"%" PRIx64 "\" ", id);
-	}
-
+out:
+	npfctl_print_id(ctx, rl);
 	fputs("\n", ctx->fp);
 }
 
@@ -465,6 +467,7 @@ npfctl_print_nat(npf_conf_info_t *ctx, n
 	ifname, (flags & NPF_NAT_STATIC) ? "static" : "dynamic",
 	seg1, arrow, seg2);
 	npfctl_print_filter(ctx, rl);
+	npfctl_print_id(ctx, rl);
 	fputs("\n", ctx->fp);
 	free(seg);
 }



CVS commit: src/common/include/prop

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 29 00:16:19 UTC 2017

Modified Files:
src/common/include/prop: prop_array.h prop_dictionary.h

Log Message:
add sized versions of the copyin ioctls.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/common/include/prop/prop_array.h
cvs rdiff -u -r1.15 -r1.16 src/common/include/prop/prop_dictionary.h

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

Modified files:

Index: src/common/include/prop/prop_array.h
diff -u src/common/include/prop/prop_array.h:1.14 src/common/include/prop/prop_array.h:1.15
--- src/common/include/prop/prop_array.h:1.14	Tue May 31 05:29:25 2016
+++ src/common/include/prop/prop_array.h	Sat Jan 28 19:16:19 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: prop_array.h,v 1.14 2016/05/31 09:29:25 pgoyette Exp $*/
+/* $NetBSD: prop_array.h,v 1.15 2017/01/29 00:16:19 christos Exp $*/
 
 /*-
  * Copyright (c) 2006, 2009 The NetBSD Foundation, Inc.
@@ -79,9 +79,13 @@ int		prop_array_recv_syscall(const struc
 	prop_array_t *);
 #elif defined(_KERNEL)
 int		prop_array_copyin(const struct plistref *, prop_array_t *);
+int		prop_array_copyin_size(const struct plistref *, prop_array_t *);
 int		prop_array_copyout(struct plistref *, prop_array_t);
 int		prop_array_copyin_ioctl(const struct plistref *, const u_long,
 	prop_array_t *);
+int		prop_array_copyin_ioctl_size(const struct plistref *,
+	 const u_long, prop_array_t *,
+	 size_t);
 int		prop_array_copyout_ioctl(struct plistref *, const u_long,
 	 prop_array_t);
 #endif

Index: src/common/include/prop/prop_dictionary.h
diff -u src/common/include/prop/prop_dictionary.h:1.15 src/common/include/prop/prop_dictionary.h:1.16
--- src/common/include/prop/prop_dictionary.h:1.15	Fri Jan 22 18:03:46 2016
+++ src/common/include/prop/prop_dictionary.h	Sat Jan 28 19:16:19 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: prop_dictionary.h,v 1.15 2016/01/22 23:03:46 dholland Exp $	*/
+/*	$NetBSD: prop_dictionary.h,v 1.16 2017/01/29 00:16:19 christos Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2009 The NetBSD Foundation, Inc.
@@ -103,11 +103,16 @@ int		prop_dictionary_recv_syscall(const 
 #elif defined(_KERNEL)
 int		prop_dictionary_copyin(const struct plistref *,
    prop_dictionary_t *);
+int		prop_dictionary_copyin_size(const struct plistref *,
+	prop_dictionary_t *, size_t);
 int		prop_dictionary_copyout(struct plistref *,
    prop_dictionary_t);
 int		prop_dictionary_copyin_ioctl(const struct plistref *,
 	 const u_long,
 	 prop_dictionary_t *);
+int		prop_dictionary_copyin_ioctl_size(const struct plistref *,
+		  const u_long,
+		  prop_dictionary_t *, size_t);
 int		prop_dictionary_copyout_ioctl(struct plistref *,
 	  const u_long,
 	  prop_dictionary_t);



CVS commit: src/sys/net/npf

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 29 00:15:54 UTC 2017

Modified Files:
src/sys/net/npf: if_npflog.c npf.h npf_conn.c npf_conn.h npf_ctl.c
npf_ext_log.c npf_ext_normalize.c npf_ext_rndblock.c npf_handler.c
npf_impl.h npf_rproc.c npf_ruleset.c
Added Files:
src/sys/net/npf: if_npflog.h

Log Message:
- Increase copyin buffer size to 4M
- Change log output format to be like the OpenBSD's pf including in
  the header the matching rule etc, and fill in the matching info.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/net/npf/if_npflog.c \
src/sys/net/npf/npf_ext_normalize.c
cvs rdiff -u -r0 -r1.1 src/sys/net/npf/if_npflog.h
cvs rdiff -u -r1.53 -r1.54 src/sys/net/npf/npf.h
cvs rdiff -u -r1.22 -r1.23 src/sys/net/npf/npf_conn.c
cvs rdiff -u -r1.11 -r1.12 src/sys/net/npf/npf_conn.h
cvs rdiff -u -r1.46 -r1.47 src/sys/net/npf/npf_ctl.c
cvs rdiff -u -r1.10 -r1.11 src/sys/net/npf/npf_ext_log.c
cvs rdiff -u -r1.6 -r1.7 src/sys/net/npf/npf_ext_rndblock.c
cvs rdiff -u -r1.35 -r1.36 src/sys/net/npf/npf_handler.c
cvs rdiff -u -r1.67 -r1.68 src/sys/net/npf/npf_impl.h
cvs rdiff -u -r1.15 -r1.16 src/sys/net/npf/npf_rproc.c
cvs rdiff -u -r1.44 -r1.45 src/sys/net/npf/npf_ruleset.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/net/npf/if_npflog.c
diff -u src/sys/net/npf/if_npflog.c:1.4 src/sys/net/npf/if_npflog.c:1.5
--- src/sys/net/npf/if_npflog.c:1.4	Mon Dec 26 18:05:06 2016
+++ src/sys/net/npf/if_npflog.c	Sat Jan 28 19:15:54 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_npflog.c,v 1.4 2016/12/26 23:05:06 christos Exp $	*/
+/*	$NetBSD: if_npflog.c,v 1.5 2017/01/29 00:15:54 christos Exp $	*/
 
 /*-
  * Copyright (c) 2010-2012 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #ifdef _KERNEL
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_npflog.c,v 1.4 2016/12/26 23:05:06 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_npflog.c,v 1.5 2017/01/29 00:15:54 christos Exp $");
 
 #include 
 #include 
@@ -53,6 +53,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_npflog.c,
 #endif
 
 #include "npf_impl.h"
+#include "if_npflog.h"
 
 MODULE(MODULE_CLASS_DRIVER, if_npflog, NULL);
 
@@ -128,7 +129,7 @@ npflog_clone_create(struct if_clone *ifc
 	KERNEL_LOCK(1, NULL);
 	if_attach(ifp);
 	if_alloc_sadl(ifp);
-	bpf_attach(ifp, DLT_NULL, 0);
+	bpf_attach(ifp, DLT_NPFLOG, NPFLOG_HDRLEN);
 	LIST_INSERT_HEAD(&npflog_if_list, sc, sc_entry);
 	KERNEL_UNLOCK_ONE(NULL);
 
Index: src/sys/net/npf/npf_ext_normalize.c
diff -u src/sys/net/npf/npf_ext_normalize.c:1.4 src/sys/net/npf/npf_ext_normalize.c:1.5
--- src/sys/net/npf/npf_ext_normalize.c:1.4	Mon Dec 26 18:05:06 2016
+++ src/sys/net/npf/npf_ext_normalize.c	Sat Jan 28 19:15:54 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_ext_normalize.c,v 1.4 2016/12/26 23:05:06 christos Exp $	*/
+/*	$NetBSD: npf_ext_normalize.c,v 1.5 2017/01/29 00:15:54 christos Exp $	*/
 
 /*-
  * Copyright (c) 2009-2012 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
 
 #ifdef _KERNEL
 #include 
-__KERNEL_RCSID(0, "$NetBSD: npf_ext_normalize.c,v 1.4 2016/12/26 23:05:06 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_ext_normalize.c,v 1.5 2017/01/29 00:15:54 christos Exp $");
 
 #include 
 #include 
@@ -143,7 +143,8 @@ npf_normalize_ip4(npf_cache_t *npc, npf_
  * npf_normalize: the main routine to normalize IPv4 and/or TCP headers.
  */
 static bool
-npf_normalize(npf_cache_t *npc, void *params, int *decision)
+npf_normalize(npf_cache_t *npc, void *params, const npf_match_info_t *mi,
+int *decision)
 {
 	npf_normalize_t *np = params;
 	struct tcphdr *th = npc->npc_l4.tcp;

Index: src/sys/net/npf/npf.h
diff -u src/sys/net/npf/npf.h:1.53 src/sys/net/npf/npf.h:1.54
--- src/sys/net/npf/npf.h:1.53	Mon Dec 26 18:39:18 2016
+++ src/sys/net/npf/npf.h	Sat Jan 28 19:15:54 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf.h,v 1.53 2016/12/26 23:39:18 rmind Exp $	*/
+/*	$NetBSD: npf.h,v 1.54 2017/01/29 00:15:54 christos Exp $	*/
 
 /*-
  * Copyright (c) 2009-2014 The NetBSD Foundation, Inc.
@@ -196,11 +196,18 @@ struct npf_rproc;
 typedef struct npf_rproc	npf_rproc_t;
 
 typedef struct {
+	uint64_t	mi_rid;
+	u_int		mi_retfl;
+	u_int		mi_di;
+} npf_match_info_t;
+
+typedef struct {
 	unsigned int	version;
 	void *		ctx;
 	int		(*ctor)(npf_rproc_t *, prop_dictionary_t);
 	void		(*dtor)(npf_rproc_t *, void *);
-	bool		(*proc)(npf_cache_t *, void *, int *);
+	bool		(*proc)(npf_cache_t *, void *, const npf_match_info_t *,
+int *);
 } npf_ext_ops_t;
 
 void *		npf_ext_register(npf_t *, const char *, const npf_ext_ops_t *);

Index: src/sys/net/npf/npf_conn.c
diff -u src/sys/net/npf/npf_conn.c:1.22 src/sys/net/npf/npf_conn.c:1.23
--- src/sys/net/npf/npf_conn.c:1.22	Mon Dec 26 18:05:06 2016
+++ src/sys/net/npf/npf_conn.c	Sat Jan 28 19:15:54 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_conn.c,v 1.22 2016/12/26 23:05:06 christos Exp $	*/
+/*	$NetBSD: npf_conn.c,v 1.23 2017/01/29 00:15:54 christos Exp $	

CVS commit: src/common/lib/libprop

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 29 00:16:42 UTC 2017

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

Log Message:
add sized versions of the copyin ioctls


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/common/lib/libprop/prop_kern.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_kern.c
diff -u src/common/lib/libprop/prop_kern.c:1.20 src/common/lib/libprop/prop_kern.c:1.21
--- src/common/lib/libprop/prop_kern.c:1.20	Sun Jan 15 13:15:45 2017
+++ src/common/lib/libprop/prop_kern.c	Sat Jan 28 19:16:42 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: prop_kern.c,v 1.20 2017/01/15 18:15:45 christos Exp $	*/
+/*	$NetBSD: prop_kern.c,v 1.21 2017/01/29 00:16:42 christos Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2009 The NetBSD Foundation, Inc.
@@ -401,13 +401,13 @@ prop_kern_init(void)
 
 static int
 _prop_object_copyin(const struct plistref *pref, const prop_type_t type,
-			  prop_object_t *objp)
+			  prop_object_t *objp, size_t lim)
 {
 	prop_object_t obj = NULL;
 	char *buf;
 	int error;
 
-	if (pref->pref_len >= prop_object_copyin_limit)
+	if (pref->pref_len >= lim)
 		return E2BIG;
 
 	/*
@@ -449,12 +449,12 @@ _prop_object_copyin(const struct plistre
 
 static int
 _prop_object_copyin_ioctl(const struct plistref *pref, const prop_type_t type,
-			  const u_long cmd, prop_object_t *objp)
+			  const u_long cmd, prop_object_t *objp, size_t lim)
 {
 	if ((cmd & IOC_IN) == 0)
 		return (EFAULT);
 
-	return _prop_object_copyin(pref, type, objp);
+	return _prop_object_copyin(pref, type, objp, lim);
 }
 
 /*
@@ -462,10 +462,17 @@ _prop_object_copyin_ioctl(const struct p
  *	Copy in an array passed as a syscall arg.
  */
 int
+prop_array_copyin_size(const struct plistref *pref, prop_array_t *arrayp,
+	size_t lim)
+{
+	return _prop_object_copyin(pref, PROP_TYPE_ARRAY,
+	(prop_object_t *)arrayp, lim);
+}
+
+int
 prop_array_copyin(const struct plistref *pref, prop_array_t *arrayp)
 {
-	return (_prop_object_copyin(pref, PROP_TYPE_ARRAY,
-	  (prop_object_t *)arrayp));
+	return prop_array_copyin_size(pref, arrayp, prop_object_copyin_limit);
 }
 
 /*
@@ -473,23 +480,38 @@ prop_array_copyin(const struct plistref 
  *	Copy in a dictionary passed as a syscall arg.
  */
 int
-prop_dictionary_copyin(const struct plistref *pref, prop_dictionary_t *dictp)
+prop_dictionary_copyin_size(const struct plistref *pref,
+prop_dictionary_t *dictp, size_t lim)
 {
-	return (_prop_object_copyin(pref, PROP_TYPE_DICTIONARY,
-	  (prop_object_t *)dictp));
+	return _prop_object_copyin(pref, PROP_TYPE_DICTIONARY,
+	(prop_object_t *)dictp, lim);
 }
 
+int
+prop_dictionary_copyin(const struct plistref *pref, prop_dictionary_t *dictp)
+{
+	return prop_dictionary_copyin_size(pref, dictp,
+	prop_object_copyin_limit);
+
 
 /*
  * prop_array_copyin_ioctl --
  *	Copy in an array send with an ioctl.
  */
 int
+prop_array_copyin_ioctl_size(const struct plistref *pref, const u_long cmd,
+prop_array_t *arrayp, size_t lim)
+{
+	return _prop_object_copyin_ioctl(pref, PROP_TYPE_ARRAY,
+	cmd, (prop_object_t *)arrayp, lim);
+}
+
+int
 prop_array_copyin_ioctl(const struct plistref *pref, const u_long cmd,
-			prop_array_t *arrayp)
+prop_array_t *arrayp)
 {
-	return (_prop_object_copyin_ioctl(pref, PROP_TYPE_ARRAY,
-	  cmd, (prop_object_t *)arrayp));
+	return prop_array_copyin_ioctl(pref, cmd, arrayp,
+	prop_object_copyin_limit);
 }
 
 /*
@@ -497,11 +519,19 @@ prop_array_copyin_ioctl(const struct pli
  *	Copy in a dictionary sent with an ioctl.
  */
 int
+prop_dictionary_copyin_ioctl_size(const struct plistref *pref, const u_long cmd,
+prop_dictionary_t *dictp, size_t lim)
+{
+	return _prop_object_copyin_ioctl(pref, PROP_TYPE_DICTIONARY,
+	cmd, (prop_object_t *)dictp, lim);
+}
+
+int
 prop_dictionary_copyin_ioctl(const struct plistref *pref, const u_long cmd,
-			 prop_dictionary_t *dictp)
+prop_dictionary_t *dictp)
 {
-	return (_prop_object_copyin_ioctl(pref, PROP_TYPE_DICTIONARY,
-	  cmd, (prop_object_t *)dictp));
+return prop_dictionary_copyin_ioctl(pref, cmd, dictp,
+	prop_object_copyin_limit);
 }
 
 static int



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

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 29 00:01:48 UTC 2017

Modified Files:
src/external/gpl2/xcvs/bin/xcvs: Makefile

Log Message:
add sqlite3


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

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

Modified files:

Index: src/external/gpl2/xcvs/bin/xcvs/Makefile
diff -u src/external/gpl2/xcvs/bin/xcvs/Makefile:1.4 src/external/gpl2/xcvs/bin/xcvs/Makefile:1.5
--- src/external/gpl2/xcvs/bin/xcvs/Makefile:1.4	Thu Mar  8 19:14:16 2012
+++ src/external/gpl2/xcvs/bin/xcvs/Makefile	Sat Jan 28 19:01:48 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2012/03/09 00:14:16 christos Exp $
+#	$NetBSD: Makefile,v 1.5 2017/01/29 00:01:48 christos Exp $
 
 .include "${.CURDIR}/../../Makefile.inc"
 PROG=	xcvs
@@ -47,8 +47,8 @@ LDADD+= -lasn1
 # libcrypto is required by libgssapi, libkrb5, and libhx509
 # libwind is required by libhx509
 CPPFLAGS+= -DENCRYPTION
-DPADD+= ${LIBCOM_ERR} ${LIBROKEN} ${LIBWIND} ${LIBCRYPTO}
-LDADD+= -lcom_err -lroken -lwind -lcrypto
+DPADD+= ${LIBCOM_ERR} ${LIBROKEN} ${LIBWIND} ${LIBCRYPTO} ${LIBSQLITE3}
+LDADD+= -lcom_err -lroken -lwind -lcrypto -lsqlite3
 
 
 # libutil is required by libroken



CVS commit: src/external/bsd/dhcp

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 28 23:59:15 UTC 2017

Modified Files:
src/external/bsd/dhcp: Makefile.inc

Log Message:
add sqlite3


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/external/bsd/dhcp/Makefile.inc

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

Modified files:

Index: src/external/bsd/dhcp/Makefile.inc
diff -u src/external/bsd/dhcp/Makefile.inc:1.16 src/external/bsd/dhcp/Makefile.inc:1.17
--- src/external/bsd/dhcp/Makefile.inc:1.16	Sun Jan 10 15:10:44 2016
+++ src/external/bsd/dhcp/Makefile.inc	Sat Jan 28 18:59:15 2017
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.16 2016/01/10 20:10:44 christos Exp $
+# $NetBSD: Makefile.inc,v 1.17 2017/01/28 23:59:15 christos Exp $
 
 WARNS?=	1	# XXX -Wshadow -Wcast-qual -Wsign-compare
 
@@ -38,9 +38,9 @@ LDADD+=-lpthread
 .if (${MKCRYPTO} != "no")
 .if (${MKKERBEROS} != "no")
 LDADD+= -lgssapi -lkrb5 -lhx509 -lheimntlm -lheimbase \
-	-lcom_err  -lroken -lasn1 -lwind
+	-lcom_err  -lroken -lasn1 -lwind -lsqlite3
 DPADD+= ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBHEIMNTLM} ${LIBHEIMBASE} \
-	${LIBCOM_ERR} ${LIBROKEN} ${LIBASN1} ${LIBWIND}
+	${LIBCOM_ERR} ${LIBROKEN} ${LIBASN1} ${LIBWIND} ${LIBSQLITE3}
 .endif
 .if defined(PROG) && ${PROG} == "dhclient"
 LDADD+=-Wl,-Bdynamic



CVS commit: src/usr.sbin/bta2dpd/bta2dpd

2017-01-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Jan 28 23:52:45 UTC 2017

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

Log Message:
Sort SYNOPSIS, descriptions, SEE ALSO.
Use more macros.
Fix sections.
New sentence, new line.
Various other improvements.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.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/bta2dpd/bta2dpd/bta2dpd.8
diff -u src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.8:1.1 src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.8:1.2
--- src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.8:1.1	Sat Jan 28 16:55:54 2017
+++ src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.8	Sat Jan 28 23:52:45 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: bta2dpd.8,v 1.1 2017/01/28 16:55:54 nat Exp $
+.\"	$NetBSD: bta2dpd.8,v 1.2 2017/01/28 23:52:45 wiz Exp $
 .\"
 .\" Copyright (c) 2015 - 2016  Nathanial Sloss 
 .\" All rights reserved.
@@ -37,45 +37,44 @@
 .Nd Bluetooth Advanced Audio Distribution Profile daemon
 .Sh SYNOPSIS
 .Nm
-.Op Fl d Ar device
-.Op Fl m Ar mode
+.Op Fl v
+.Op Fl A Ar bitpool_allocation
 .Op Fl B Ar bitpool
-.Op Fl V Ar volume
-.Op Fl M Ar mtu
-.Op Fl f Ar channel_mode
-.Op Fl r Ar rate
 .Op Fl b Ar blocks
+.Op Fl d Ar device
 .Op Fl e Ar encoding_bands
-.Op Fl A Ar bitpool_allocation
-.Op Fl v
+.Op Fl f Ar channel_mode
+.Op Fl M Ar mtu
+.Op Fl m Ar mode
+.Op Fl r Ar rate
+.Op Fl V Ar volume
 .Fl a Ar address
-.Ar files...
+.Ar files ...
 .Nm
 .Fl K
-.Op Fl I
+.Op Fl Iv
+.Op Fl A Ar bitpool_allocation
+.Op Fl B Ar bitpool
+.Op Fl b Ar blocks
 .Op Fl d Ar device
+.Op Fl e Ar encoding_bands
+.Op Fl f Ar channel_mode
 .Op Fl m Ar mode
 .Op Fl p Ar psm
-.Op Fl B Ar bitpool
-.Op Fl f Ar channel_mode
 .Op Fl r Ar rate
-.Op Fl b Ar blocks
-.Op Fl e Ar encoding_bands
-.Op Fl A Ar bitpool_allocation
-.Op Fl v
 .Op a Ar address
 .Ar file
 .Nm
 .Fl t
+.Op Fl A Ar bitpool_allocation
 .Op Fl B Ar bitpool
-.Op Fl V Ar volume
-.Op Fl M Ar mtu
-.Op Fl f Ar channel_mode
-.Op Fl r Ar rate
 .Op Fl b Ar blocks
 .Op Fl e Ar encoding_bands
-.Op Fl A Ar bitpool_allocation
-.Ar files...
+.Op Fl f Ar channel_mode
+.Op Fl M Ar mtu
+.Op Fl r Ar rate
+.Op Fl V Ar volume
+.Ar files ...
 .Nm
 .Fl t
 .Fl K
@@ -84,12 +83,9 @@
 The
 .Nm
 daemon is used to transmit/receive audio to/from Bluetooth devices such as
-speakers or headphones, using the Advanced Audio Distribution Profile 
-(A2DP)
+speakers or headphones, using the Advanced Audio Distribution Profile
+(A2DP).
 .Bl -tag -indent width
-.It Fl d Ar device
-Local device address.
-May be given as BDADDR or device name.
 .It Fl a Ar address
 Remote device address.
 The
@@ -100,83 +96,91 @@ If a name was specified,
 .Nm
 attempts to resolve the name via
 .Xr bt_gethostbyname 3 .
-.It Ar files...
-Files to stream. These can be wav files or CD-Audio Red Book data or output from
-.Xr pad 4
-device.
-If not specified the default is stdin or stdout if -K applied and
-.Nm
-is used as an audio sink.
+.It Fl B Ar bitpool
+Allows setting the maximum bitpool value for your device.
+This may have to be lowered if audio is distorted.
 .Pp
-When writing to a file or stdout it is raw 16-bit little endian (pulse coded
-modulation) pcm data.
-So a utility must be used to convert the file to add a header or use the
-audioplay command as stated in EXAMPLES.
+Use
+.Nm
+with only the
+.Fl v
+option and the maximum bitpool for your device will be printed to stdout.
+.It Fl d Ar device
+Local device address.
+May be given as BDADDR or device name.
+.It Fl I
+Initiate a Discover command.
+ Useful when used as an audio sink as some devices need this to pair.
+.It Fl K
+Allows registering as an audio sink receiving an incoming connection.
 .It Fl M Ar mtu
 Allows setting the Maximum Transmission Unit (MTU) for the streaming
 connections.
 .Pp
 For most devices this would be 672 but if audio is broken or has gaps lowering
 this value may help.
-.It Fl I 
-Initiate a Discover command.  Useful when used as an audio sink as some
-devices need this to pair.
-.It Fl K 
-Allows registering as an audio sink receiving an incoming connection.
 .It Fl m Ar mode
 Set L2CAP connection link mode.
 Supported modes are:
 .Pp
-.Bl -tag -compact
+.Bl -tag -compact -width encrypt
 .It auth
-require devices to be paired.
+Require devices to be paired.
 .It encrypt
-auth, plus enable encryption.
+Auth, plus enable encryption.
 .It secure
-encryption, plus change of link key.
+Encryption, plus change of link key.
 .El
 .It Fl p Ar psm
 Allows changing the l2cap psm for an audio sink the default is 25.
 Most all devices will use 25.
 .It Fl t
-Test mode can be used with -K to decode and receive encoded music from
-stdout/stdin to file.
+Test mode can be used with
+.Fl K
+to decode and receive encoded music from stdout/stdin to file.
 .It Fl V Ar volume
 Allows shifting the volume of the music by 1 or 2 bits prior to encoding for
 increased volume.
 

CVS commit: src/usr.bin/telnet

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 28 23:45:53 UTC 2017

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

Log Message:
add sqlite3


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

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

Modified files:

Index: src/usr.bin/telnet/Makefile
diff -u src/usr.bin/telnet/Makefile:1.50 src/usr.bin/telnet/Makefile:1.51
--- src/usr.bin/telnet/Makefile:1.50	Fri Aug 10 08:10:27 2012
+++ src/usr.bin/telnet/Makefile	Sat Jan 28 18:45:53 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.50 2012/08/10 12:10:27 joerg Exp $
+#	$NetBSD: Makefile,v 1.51 2017/01/28 23:45:53 christos Exp $
 #
 # Copyright (c) 1990 The Regents of the University of California.
 # All rights reserved.
@@ -65,8 +65,8 @@ LIBTELNETDIR!=	cd ${.CURDIR}/../../lib/l
 
 .if (${USE_KERBEROS} != "no")
 CPPFLAGS+=-DKRB5 -DFORWARD
-LDADD+= -lkrb5 -lasn1 -lcom_err -lroken
-DPADD+=	${LIBKRB5} ${LIBASN1} ${LIBCOM_ERR} ${LIBROKEN}
+LDADD+= -lkrb5 -lasn1 -lcom_err -lroken -lsqlite3
+DPADD+=	${LIBKRB5} ${LIBASN1} ${LIBCOM_ERR} ${LIBROKEN} ${LIBSQLITE3}
 .endif
 
 .if (${MKCRYPTO} != "no")



CVS commit: src/usr.bin/passwd

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 28 23:44:51 UTC 2017

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

Log Message:
add sqlite3


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/usr.bin/passwd/Makefile

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

Modified files:

Index: src/usr.bin/passwd/Makefile
diff -u src/usr.bin/passwd/Makefile:1.44 src/usr.bin/passwd/Makefile:1.45
--- src/usr.bin/passwd/Makefile:1.44	Wed Feb 13 18:19:14 2013
+++ src/usr.bin/passwd/Makefile	Sat Jan 28 18:44:51 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.44 2013/02/13 23:19:14 christos Exp $
+#	$NetBSD: Makefile,v 1.45 2017/01/28 23:44:51 christos Exp $
 #	from: @(#)Makefile8.3 (Berkeley) 4/2/94
 
 .include 
@@ -30,7 +30,9 @@ CPPFLAGS+= -DKERBEROS5
 SRCS+=	krb5_passwd.c
 
 DPADD+=	${LIBKRB5} ${LIBCRYPTO} ${LIBASN1} ${LIBCOM_ERR} ${LIBROKEN} ${LIBCRYPT}
+DPADD+=	${LIBSQLITE3}
 LDADD+=	-lkrb5 -lcrypto -lasn1 -lcom_err -lroken -lcrypt
+LDADD+=	-lsqlite3
 .ifdef OVERRIDE_HEIMDAL_KPASSWD
 LINKS+=	${BINDIR}/passwd ${BINDIR}/kpasswd
 MAN+=	kpasswd.1



CVS commit: src/usr.sbin/racoon

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 28 23:42:36 UTC 2017

Modified Files:
src/usr.sbin/racoon: Makefile

Log Message:
add sqlite3


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/usr.sbin/racoon/Makefile

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

Modified files:

Index: src/usr.sbin/racoon/Makefile
diff -u src/usr.sbin/racoon/Makefile:1.27 src/usr.sbin/racoon/Makefile:1.28
--- src/usr.sbin/racoon/Makefile:1.27	Fri Nov  8 19:33:48 2013
+++ src/usr.sbin/racoon/Makefile	Sat Jan 28 18:42:36 2017
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.27 2013/11/09 00:33:48 christos Exp $
+# $NetBSD: Makefile,v 1.28 2017/01/28 23:42:36 christos Exp $
 
 WARNS?=	0	# XXX third-party program, many issues
 NOCLANGERROR=	# defined
@@ -47,9 +47,9 @@ DPADD+=	${LIBPAM} ${PAM_STATIC_DPADD}
 .if (${USE_KERBEROS} != "no")
 CPPFLAGS+=-DHAVE_GSSAPI
 LDADD+= -lgssapi -lkrb5 -lhx509 -lheimntlm -lcom_err \
-	-lroken -lasn1
+	-lroken -lasn1 -lsqlite3
 DPADD+= ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBHEIMNTLM} ${LIBCOM_ERR} \
-	${LIBROKEN} ${LIBASN1}
+	${LIBROKEN} ${LIBASN1} ${LIBSQLITE3}
 .endif
 CPPFLAGS+=-DHAVE_OPENSSL_IDEA_H
 .if (${MKCRYPTO_RC5} != "no")



CVS commit: src/libexec/telnetd

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 28 23:40:51 UTC 2017

Modified Files:
src/libexec/telnetd: Makefile

Log Message:
kerberos needs sqlite3


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/libexec/telnetd/Makefile

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

Modified files:

Index: src/libexec/telnetd/Makefile
diff -u src/libexec/telnetd/Makefile:1.49 src/libexec/telnetd/Makefile:1.50
--- src/libexec/telnetd/Makefile:1.49	Mon Jan  9 11:36:48 2012
+++ src/libexec/telnetd/Makefile	Sat Jan 28 18:40:51 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.49 2012/01/09 16:36:48 christos Exp $
+#	$NetBSD: Makefile,v 1.50 2017/01/28 23:40:51 christos Exp $
 #	from: @(#)Makefile	8.2 (Berkeley) 12/15/93
 
 WARNS?=	4		# XXX: const issues in sys_term.c
@@ -22,8 +22,8 @@ LIBTELNETDIR!=	cd ${.CURDIR}/../../lib/l
 
 .if (${USE_KERBEROS} != "no")
 CPPFLAGS+=-DKRB5 -DAUTHENTICATION -DENCRYPTION
-LDADD+= -lkrb5 -lasn1 -lcom_err -lroken
-DPADD+=	${LIBKRB5} ${LIBASN1} ${LIBCOM_ERR} ${LIBROKEN}
+LDADD+= -lkrb5 -lasn1 -lcom_err -lroken -lsqlite3
+DPADD+=	${LIBKRB5} ${LIBASN1} ${LIBCOM_ERR} ${LIBROKEN} ${LIBSQLITE3}
 .endif
 
 .if (${MKCRYPTO} != "no")



CVS commit: src/crypto/external/bsd/openssh/bin

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 28 23:38:48 UTC 2017

Modified Files:
src/crypto/external/bsd/openssh/bin/ssh: Makefile
src/crypto/external/bsd/openssh/bin/sshd: Makefile

Log Message:
krb5 needs sqlite3 now


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/crypto/external/bsd/openssh/bin/ssh/Makefile
cvs rdiff -u -r1.14 -r1.15 src/crypto/external/bsd/openssh/bin/sshd/Makefile

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

Modified files:

Index: src/crypto/external/bsd/openssh/bin/ssh/Makefile
diff -u src/crypto/external/bsd/openssh/bin/ssh/Makefile:1.10 src/crypto/external/bsd/openssh/bin/ssh/Makefile:1.11
--- src/crypto/external/bsd/openssh/bin/ssh/Makefile:1.10	Tue Aug  2 09:45:12 2016
+++ src/crypto/external/bsd/openssh/bin/ssh/Makefile	Sat Jan 28 18:38:48 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2016/08/02 13:45:12 christos Exp $
+#	$NetBSD: Makefile,v 1.11 2017/01/28 23:38:48 christos Exp $
 
 .include 
 
@@ -29,8 +29,8 @@ DPADD+=	${LIBKRB5} ${LIBHX509} ${LIBHEIM
 LDADD+=	-lkafs -lasn1 -lcrypt
 DPADD+=	${LIBKAFS} ${LIBASN1} ${LIBCRYPT}
 
-LDADD+=	-lcom_err -lroken -lutil
-DPADD+=	${LIBCOM_ERR} ${LIBROKEN} ${LIBUTIL}
+LDADD+=	-lcom_err -lroken -lsqlite3 -lutil
+DPADD+=	${LIBCOM_ERR} ${LIBROKEN} ${LIBSQLITE3} ${LIBUTIL}
 .endif
 
 .include 

Index: src/crypto/external/bsd/openssh/bin/sshd/Makefile
diff -u src/crypto/external/bsd/openssh/bin/sshd/Makefile:1.14 src/crypto/external/bsd/openssh/bin/sshd/Makefile:1.15
--- src/crypto/external/bsd/openssh/bin/sshd/Makefile:1.14	Sat Dec 24 19:07:46 2016
+++ src/crypto/external/bsd/openssh/bin/sshd/Makefile	Sat Jan 28 18:38:48 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.14 2016/12/25 00:07:46 christos Exp $
+#	$NetBSD: Makefile,v 1.15 2017/01/28 23:38:48 christos Exp $
 
 .include 
 
@@ -51,8 +51,8 @@ SRCS+=	auth2-krb5.c
 LDADD+=	-lkrb5 -lasn1
 DPADD+=	${LIBKRB5} ${LIBASN1}
 
-LDADD+=	-lcom_err -lroken
-DPADD+=	${LIBCOM_ERR} ${LIBROKEN}
+LDADD+=	-lcom_err -lroken -lsqlite3
+DPADD+=	${LIBCOM_ERR} ${LIBROKEN} ${LIBSQLITE3}
 .endif
 
 .if (${USE_LDAP} != "no")



CVS commit: src/external/bsd/bind

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 28 23:34:14 UTC 2017

Modified Files:
src/external/bsd/bind: Makefile.inc

Log Message:
kerberos now has sqlite3 support.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/external/bsd/bind/Makefile.inc

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

Modified files:

Index: src/external/bsd/bind/Makefile.inc
diff -u src/external/bsd/bind/Makefile.inc:1.24 src/external/bsd/bind/Makefile.inc:1.25
--- src/external/bsd/bind/Makefile.inc:1.24	Tue Nov  1 17:56:11 2016
+++ src/external/bsd/bind/Makefile.inc	Sat Jan 28 18:34:14 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.24 2016/11/01 21:56:11 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.25 2017/01/28 23:34:14 christos Exp $
 
 .if !defined(BIND9_MAKEFILE_INC)
 BIND9_MAKEFILE_INC=yes
@@ -98,9 +98,9 @@ CPPFLAGS+=-DGSSAPI
 .if ${MKKERBEROS} != "no"
 .if !defined (LIB) || empty(LIB)
 LDADD+= -lgssapi -lheimntlm -lkrb5 -lhx509 -lheimbase \
-	-lcom_err  -lroken -lasn1 -lwind
+	-lcom_err  -lroken -lasn1 -lwind -lsqlite3
 DPADD+= ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBHEIMNTLM} ${LIBHEIMBASE} \
-	${LIBCOM_ERR} ${LIBROKEN} ${LIBASN1} ${LIBWIND}
+	${LIBCOM_ERR} ${LIBROKEN} ${LIBASN1} ${LIBWIND} ${LIBSQLITE3}
 .else
 .for L in gssapi krb5 hx509 heimntlm heimbase com_err roken asn1 wind
 LIBDPLIBS+=	$L ${NETBSDSRCDIR}/crypto/external/bsd/heimdal/lib/lib$L



CVS commit: src/usr.sbin/bta2dpd/bta2dpd

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 28 23:19:20 UTC 2017

Modified Files:
src/usr.sbin/bta2dpd/bta2dpd: Makefile

Log Message:
Fix the build (objdirs)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/bta2dpd/bta2dpd/Makefile

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

Modified files:

Index: src/usr.sbin/bta2dpd/bta2dpd/Makefile
diff -u src/usr.sbin/bta2dpd/bta2dpd/Makefile:1.1 src/usr.sbin/bta2dpd/bta2dpd/Makefile:1.2
--- src/usr.sbin/bta2dpd/bta2dpd/Makefile:1.1	Sat Jan 28 11:55:54 2017
+++ src/usr.sbin/bta2dpd/bta2dpd/Makefile	Sat Jan 28 18:19:20 2017
@@ -1,4 +1,6 @@
-# $NetBSD: Makefile,v 1.1 2017/01/28 16:55:54 nat Exp $
+# $NetBSD: Makefile,v 1.2 2017/01/28 23:19:20 christos Exp $
+
+.include 
 
 WARNS?=		6
 
@@ -12,10 +14,16 @@ LDADD+=		-lbluetooth -levent
 CLEANFILES+=	sbc_crc.h sbc_coeffs.h
 
 sbc_encode.c:	sbc_coeffs.h sbc_crc.h
-sbc_coeffs.h:
-	../cosdata-gen/cosdata > sbc_coeffs.h
-sbc_crc.h:
-	../sbc_crc-gen/sbc_crc > sbc_crc.h
+
+COSDATA_GENOBJDIR!=  cd ${.CURDIR}/../cosdata-gen && ${PRINTOBJDIR}
+SBC_CRC_GENOBJDIR!=  cd ${.CURDIR}/../sbc_crc-gen && ${PRINTOBJDIR}
+
+
+sbc_coeffs.h: ${COSDATA_GENOBJDIR}/cosdata
+	${.ALLSRC} > ${.TARGET}
+
+sbc_crc.h: ${SBC_CRC_GENOBJDIR}/sbc_crc
+	${.ALLSRC} > ${.TARGET}
 
 .if exists(${.CURDIR}/../../Makefile.inc)
 .include "${.CURDIR}/../../Makefile.inc"



CVS commit: src/sys/net/agr

2017-01-28 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Sat Jan 28 22:56:09 UTC 2017

Modified Files:
src/sys/net/agr: if_agr.c if_agrmonitor.c if_agrtimer.c
if_agrvar_impl.h

Log Message:
Switch agr(4) to use a workqueue. This is necessary because during
a callout, it allocates memory with M_WAITOK, which triggers a
DEBUG assert.

XXX we should drain the workqueue.

ok riastradh


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/net/agr/if_agr.c
cvs rdiff -u -r1.4 -r1.5 src/sys/net/agr/if_agrmonitor.c
cvs rdiff -u -r1.6 -r1.7 src/sys/net/agr/if_agrtimer.c
cvs rdiff -u -r1.10 -r1.11 src/sys/net/agr/if_agrvar_impl.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/net/agr/if_agr.c
diff -u src/sys/net/agr/if_agr.c:1.40 src/sys/net/agr/if_agr.c:1.41
--- src/sys/net/agr/if_agr.c:1.40	Thu Dec 15 09:28:06 2016
+++ src/sys/net/agr/if_agr.c	Sat Jan 28 22:56:09 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_agr.c,v 1.40 2016/12/15 09:28:06 ozaki-r Exp $	*/
+/*	$NetBSD: if_agr.c,v 1.41 2017/01/28 22:56:09 maya Exp $	*/
 
 /*-
  * Copyright (c)2005 YAMAMOTO Takashi,
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_agr.c,v 1.40 2016/12/15 09:28:06 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_agr.c,v 1.41 2017/01/28 22:56:09 maya Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -343,14 +343,19 @@ agr_clone_create(struct if_clone *ifc, i
 {
 	struct agr_softc *sc;
 	struct ifnet *ifp;
+	int error;
 
 	sc = agr_alloc_softc();
+	error = agrtimer_init(sc);
+	if (error) {
+		agr_free_softc(sc);
+		return error;
+	}
 	TAILQ_INIT(&sc->sc_ports);
 	mutex_init(&sc->sc_lock, MUTEX_DEFAULT, IPL_NET);
 	mutex_init(&sc->sc_entry_mtx, MUTEX_DEFAULT, IPL_NONE);
 	cv_init(&sc->sc_insc_cv, "agrsoftc");
 	cv_init(&sc->sc_ports_cv, "agrports");
-	agrtimer_init(sc);
 	ifp = &sc->sc_if;
 	snprintf(ifp->if_xname, sizeof(ifp->if_xname), "%s%d",
 	ifc->ifc_name, unit);

Index: src/sys/net/agr/if_agrmonitor.c
diff -u src/sys/net/agr/if_agrmonitor.c:1.4 src/sys/net/agr/if_agrmonitor.c:1.5
--- src/sys/net/agr/if_agrmonitor.c:1.4	Mon Mar 24 09:14:52 2008
+++ src/sys/net/agr/if_agrmonitor.c	Sat Jan 28 22:56:09 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_agrmonitor.c,v 1.4 2008/03/24 09:14:52 yamt Exp $	*/
+/*	$NetBSD: if_agrmonitor.c,v 1.5 2017/01/28 22:56:09 maya Exp $	*/
 
 /*-
  * Copyright (c)2005 YAMAMOTO Takashi,
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_agrmonitor.c,v 1.4 2008/03/24 09:14:52 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_agrmonitor.c,v 1.5 2017/01/28 22:56:09 maya Exp $");
 
 #include 
 #include 
@@ -46,12 +46,6 @@ agrport_monitor(struct agr_port *port)
 	u_int media;
 	u_int status;
 
-	/*
-	 * XXX XXX
-	 * assuming that it's safe to use SIOCGIFMEDIA from callout handler.
-	 * maybe it's better to have a worker thread.
-	 */
-
 	media = IFM_ETHER | IFM_NONE;
 	status = IFM_AVALID;
 	if ((~port->port_ifp->if_flags & (IFF_RUNNING | IFF_UP))

Index: src/sys/net/agr/if_agrtimer.c
diff -u src/sys/net/agr/if_agrtimer.c:1.6 src/sys/net/agr/if_agrtimer.c:1.7
--- src/sys/net/agr/if_agrtimer.c:1.6	Mon Feb  8 17:59:06 2010
+++ src/sys/net/agr/if_agrtimer.c	Sat Jan 28 22:56:09 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_agrtimer.c,v 1.6 2010/02/08 17:59:06 dyoung Exp $	*/
+/*	$NetBSD: if_agrtimer.c,v 1.7 2017/01/28 22:56:09 maya Exp $	*/
 
 /*-
  * Copyright (c)2005 YAMAMOTO Takashi,
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_agrtimer.c,v 1.6 2010/02/08 17:59:06 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_agrtimer.c,v 1.7 2017/01/28 22:56:09 maya Exp $");
 
 #include 
 #include 
@@ -40,14 +40,22 @@ __KERNEL_RCSID(0, "$NetBSD: if_agrtimer.
 #include 
 
 static void agrtimer_tick(void *);
+static void agrtimer_work(struct work *, void *);
 static int agrtimer_port_tick(struct agr_port *, void *);
 
-void
+int
 agrtimer_init(struct agr_softc *sc)
 {
+	int error;
+
+	error = workqueue_create(&sc->sc_wq, "agrmon",
+	agrtimer_work, sc, PRI_SOFTNET, IPL_SOFTNET, 0);
+	if (error)
+		return error;
 
 	callout_init(&sc->sc_callout, 0);
 	callout_setfunc(&sc->sc_callout, agrtimer_tick, sc);
+	return 0;
 }
 
 void
@@ -55,6 +63,7 @@ agrtimer_destroy(struct agr_softc *sc)
 {
 
 	callout_destroy(&sc->sc_callout);
+	workqueue_destroy(sc->sc_wq);
 }
 
 void
@@ -75,6 +84,14 @@ static void
 agrtimer_tick(void *arg)
 {
 	struct agr_softc *sc = arg;
+
+	workqueue_enqueue(sc->sc_wq, &sc->sc_wk, NULL);
+}
+
+static void
+agrtimer_work(struct work *wk, void *arg)
+{
+	struct agr_softc *sc = arg;
 	const struct agr_iftype_ops *iftop = sc->sc_iftop;
 
 	KASSERT(iftop);

Index: src/sys/net/agr/if_agrvar_impl.h
diff -u src/sys/net/agr/if_agrvar_impl.h:1.10 src/sys/net/agr/if_agrvar_impl.h:1.11
--- src/sys/net/agr/if_agrvar_impl.h:1.10	Wed May 26 23:46:44 2010
+++ src/sys/net/agr/if_agrvar_impl.h	Sat Jan 28 22:56:09 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_agrvar_

CVS commit: src/crypto/external/bsd/heimdal/lib/libkrb5

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 28 22:25:44 UTC 2017

Modified Files:
src/crypto/external/bsd/heimdal/lib/libkrb5: Makefile

Log Message:
Use ${TOOL_SED} and resolve paths properly.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/crypto/external/bsd/heimdal/lib/libkrb5/Makefile

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

Modified files:

Index: src/crypto/external/bsd/heimdal/lib/libkrb5/Makefile
diff -u src/crypto/external/bsd/heimdal/lib/libkrb5/Makefile:1.9 src/crypto/external/bsd/heimdal/lib/libkrb5/Makefile:1.10
--- src/crypto/external/bsd/heimdal/lib/libkrb5/Makefile:1.9	Sat Jan 28 16:31:52 2017
+++ src/crypto/external/bsd/heimdal/lib/libkrb5/Makefile	Sat Jan 28 17:25:44 2017
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2017/01/28 21:31:52 christos Exp $
+# $NetBSD: Makefile,v 1.10 2017/01/28 22:25:44 christos Exp $
 
 USE_FORT?= yes	# network protocol library
 
@@ -540,10 +540,11 @@ INFOFLAGS=  -I. -I${HEIMDIST}/doc
 heimdal.texi: vars.texi
 
 vars.texi: vars.tin
-	< ${HEIMDIST}/doc/vars.tin > $@			\
-	sed -e 's,[@]dbdir[@],/var/heimdal,g'		\
-	-e 's,[@]dbtype[@],db1,g'
-	-e 's,[@]PACKAGE_VERSION[@],7.1.0,g'
+	@${TOOL_SED} -e 's,[@]dbdir[@],/var/heimdal,g'	\
+	-e 's,[@]dbtype[@],db1,g'			\
+	-e 's,[@]PACKAGE_VERSION[@],7.1.0,g'	\
+	< ${.ALLSRC} > ${.TARGET}
+
 
 CLEANFILES+=	vars.texi
 



CVS commit: src/sys/compat/linux32/common

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 28 21:54:57 UTC 2017

Modified Files:
src/sys/compat/linux32/common: linux32_dirent.c

Log Message:
avoid the shadow


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/compat/linux32/common/linux32_dirent.c

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

Modified files:

Index: src/sys/compat/linux32/common/linux32_dirent.c
diff -u src/sys/compat/linux32/common/linux32_dirent.c:1.16 src/sys/compat/linux32/common/linux32_dirent.c:1.17
--- src/sys/compat/linux32/common/linux32_dirent.c:1.16	Sat Jan 28 10:09:55 2017
+++ src/sys/compat/linux32/common/linux32_dirent.c	Sat Jan 28 16:54:57 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux32_dirent.c,v 1.16 2017/01/28 15:09:55 christos Exp $ */
+/*	$NetBSD: linux32_dirent.c,v 1.17 2017/01/28 21:54:57 christos Exp $ */
 
 /*-
  * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: linux32_dirent.c,v 1.16 2017/01/28 15:09:55 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_dirent.c,v 1.17 2017/01/28 21:54:57 christos Exp $");
 
 #include 
 #include 
@@ -215,9 +215,9 @@ again:
 			idb.d_off = (linux32_off_t)off;
 			idb.d_reclen = (u_short)linux32_reclen;
 		}
-		size_t l = MIN(sizeof(idb.d_name) - 1, bdp->d_namlen + 1);
-		memcpy(idb.d_name, bdp->d_name, l);
-		idb.d_name[l + 1] = bdp->d_type;
+		size_t dirl = MIN(sizeof(idb.d_name) - 1, bdp->d_namlen + 1);
+		memcpy(idb.d_name, bdp->d_name, dirl);
+		idb.d_name[dirl + 1] = bdp->d_type;
 		if ((error = copyout((void *)&idb, outp, linux32_reclen)))
 			goto out;
 		/* advance past this real entry */



CVS commit: src/doc

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 28 21:47:24 UTC 2017

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
new Heimdal


To generate a diff of this commit:
cvs rdiff -u -r1.1403 -r1.1404 src/doc/3RDPARTY
cvs rdiff -u -r1.2240 -r1.2241 src/doc/CHANGES

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1403 src/doc/3RDPARTY:1.1404
--- src/doc/3RDPARTY:1.1403	Fri Jan 27 18:00:46 2017
+++ src/doc/3RDPARTY	Sat Jan 28 16:47:24 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1403 2017/01/27 23:00:46 spz Exp $
+#	$NetBSD: 3RDPARTY,v 1.1404 2017/01/28 21:47:24 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -564,8 +564,8 @@ distribution for import.
 Update MDATE in src/external/gpl2/groff/Makefile.inc.
 
 Package:	heimdal
-Version:	1.5.3
-Current Vers:	1.5.3
+Version:	7.1.0 (HEAD-2017-01-28)
+Current Vers:	7.1.0
 Maintainer:	Heimdal 
 Archive Site:	ftp://ftp.h5l.org/pub/heimdal/src/
 Home Page:	http://www.h5l.org/

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2240 src/doc/CHANGES:1.2241
--- src/doc/CHANGES:1.2240	Sat Jan 28 12:14:21 2017
+++ src/doc/CHANGES	Sat Jan 28 16:47:24 2017
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2240 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2241 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -456,3 +456,4 @@ Changes from NetBSD 7.0 to NetBSD 8.0:
 	tcpdump(8): Import 4.8.1. [christos 20170124]
 	acpi(4): Updated ACPICA to 20170119. [christos 20170125]
 	bta2dpd(8): Add new bluetooth A2DP daemon. [nat 20170129]
+	kerberos(8): Update to latest Heimdal-HEAD [christos 20170128]



CVS commit: src/distrib/sets/lists

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 28 21:42:41 UTC 2017

Modified Files:
src/distrib/sets/lists/base: shl.mi
src/distrib/sets/lists/debug: shl.mi

Log Message:
bump heimdal libraries


To generate a diff of this commit:
cvs rdiff -u -r1.797 -r1.798 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.156 -r1.157 src/distrib/sets/lists/debug/shl.mi

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

Modified files:

Index: src/distrib/sets/lists/base/shl.mi
diff -u src/distrib/sets/lists/base/shl.mi:1.797 src/distrib/sets/lists/base/shl.mi:1.798
--- src/distrib/sets/lists/base/shl.mi:1.797	Tue Jan 24 17:30:53 2017
+++ src/distrib/sets/lists/base/shl.mi	Sat Jan 28 16:42:41 2017
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.797 2017/01/24 22:30:53 christos Exp $
+# $NetBSD: shl.mi,v 1.798 2017/01/28 21:42:41 christos Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -179,8 +179,8 @@
 ./usr/lib/libasan.so.1base-sys-shlib		compatfile,gcc=53
 ./usr/lib/libasan.so.1.0			base-sys-shlib		compatfile,gcc=53
 ./usr/lib/libasn1.sobase-krb5-shlib		compatfile,kerberos
-./usr/lib/libasn1.so.9base-krb5-shlib		compatfile,kerberos
-./usr/lib/libasn1.so.9.0			base-krb5-shlib		compatfile,kerberos
+./usr/lib/libasn1.so.10base-krb5-shlib		compatfile,kerberos
+./usr/lib/libasn1.so.10.0			base-krb5-shlib		compatfile,kerberos
 ./usr/lib/libatf-c++.sobase-atf-shlib		compatfile,atf
 ./usr/lib/libatf-c++.so.1			base-atf-shlib		compatfile,atf
 ./usr/lib/libatf-c++.so.1.0			base-atf-shlib		compatfile,atf
@@ -217,8 +217,8 @@
 ./usr/lib/libc.so.12.205			base-sys-shlib		compatfile
 ./usr/lib/libcdk.sobase-obsolete		compatfile,obsolete
 ./usr/lib/libcom_err.sobase-krb5-shlib		compatfile,kerberos
-./usr/lib/libcom_err.so.7			base-krb5-shlib		compatfile,kerberos
-./usr/lib/libcom_err.so.7.0			base-krb5-shlib		compatfile,kerberos
+./usr/lib/libcom_err.so.8			base-krb5-shlib		compatfile,kerberos
+./usr/lib/libcom_err.so.8.0			base-krb5-shlib		compatfile,kerberos
 ./usr/lib/libcrypt.sobase-sys-shlib		compatfile
 ./usr/lib/libcrypt.so.1base-sys-shlib		compatfile
 ./usr/lib/libcrypt.so.1.0			base-sys-shlib		compatfile
@@ -299,20 +299,20 @@
 ./usr/lib/libgomp.so.1.2			base-sys-shlib		gcc=53,machine_arch=mips64eb
 ./usr/lib/libgomp.so.1.2			base-sys-shlib		gcc=53,machine_arch=mips64el
 ./usr/lib/libgssapi.sobase-krb5-shlib		compatfile,kerberos
-./usr/lib/libgssapi.so.10			base-krb5-shlib		compatfile,kerberos
-./usr/lib/libgssapi.so.10.0			base-krb5-shlib		compatfile,kerberos
+./usr/lib/libgssapi.so.11			base-krb5-shlib		compatfile,kerberos
+./usr/lib/libgssapi.so.11.0			base-krb5-shlib		compatfile,kerberos
 ./usr/lib/libhdb.sobase-krb5-shlib		compatfile,kerberos
-./usr/lib/libhdb.so.14base-krb5-shlib		compatfile,kerberos
-./usr/lib/libhdb.so.14.0			base-krb5-shlib		compatfile,kerberos
+./usr/lib/libhdb.so.15base-krb5-shlib		compatfile,kerberos
+./usr/lib/libhdb.so.15.0			base-krb5-shlib		compatfile,kerberos
 ./usr/lib/libheimbase.so			base-krb5-shlib		compatfile,kerberos
-./usr/lib/libheimbase.so.1			base-krb5-shlib		compatfile,kerberos
-./usr/lib/libheimbase.so.1.0			base-krb5-shlib		compatfile,kerberos
+./usr/lib/libheimbase.so.2			base-krb5-shlib		compatfile,kerberos
+./usr/lib/libheimbase.so.2.0			base-krb5-shlib		compatfile,kerberos
 ./usr/lib/libheimntlm.so			base-krb5-shlib		compatfile,kerberos
-./usr/lib/libheimntlm.so.4			base-krb5-shlib		compatfile,kerberos
-./usr/lib/libheimntlm.so.4.0			base-krb5-shlib		compatfile,kerberos
+./usr/lib/libheimntlm.so.5			base-krb5-shlib		compatfile,kerberos
+./usr/lib/libheimntlm.so.5.0			base-krb5-shlib		compatfile,kerberos
 ./usr/lib/libhx509.sobase-krb5-shlib		compatfile,kerberos
-./usr/lib/libhx509.so.5base-krb5-shlib		compatfile,kerberos
-./usr/lib/libhx509.so.5.0			base-krb5-shlib		compatfile,kerberos
+./usr/lib/libhx509.so.6base-krb5-shlib		compatfile,kerberos
+./usr/lib/libhx509.so.6.0			base-krb5-shlib		compatfile,kerberos
 ./usr/lib/libintl.sobase-sys-shlib		compatfile
 ./usr/lib/libintl.so.1base-sys-shlib		compatfile
 ./usr/lib/libintl.so.1.1			base-sys-shlib		compatfile
@@ -339,22 +339,22 @@
 ./usr/lib/libisns.so.0.0			base-isns-shlib		compatfile
 ./usr/lib/libkadm.sobase-obsolete		obsolete
 ./usr/lib/libkadm5clnt.so			base-krb5-shlib		compatfile,kerberos
-./usr/lib/libkadm5clnt.so.13			base-krb5-shlib		compatfile,kerberos
-./usr/lib/libkadm5clnt.so.13.0			base-krb5-shlib		compatfile,kerberos
+./usr/lib/libkadm5clnt.so.14			base-krb5-shlib		compatfile,kerberos
+./usr/lib/libkadm5clnt.so.14.0			base-krb5-shlib		compatfile,kerberos
 ./usr/lib/libkadm5srv.so			base-krb5-shlib		compatfile,kerberos
-./usr/lib/libkadm5srv.so.14			base-krb5-shlib		compatfile,kerberos
-./usr/lib/libkadm5srv.so.14.0			base-krb5-shlib		compatfile,kerberos
+./usr/lib/libkadm5s

CVS commit: src/crypto/external/bsd/heimdal

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 28 21:31:53 UTC 2017

Modified Files:
src/crypto/external/bsd/heimdal: Makefile.rules.inc heimdal2netbsd
src/crypto/external/bsd/heimdal/bin: Makefile.inc
src/crypto/external/bsd/heimdal/bin/kcc: Makefile
src/crypto/external/bsd/heimdal/dist: NEWS configure.ac
src/crypto/external/bsd/heimdal/dist/admin: add.c change.c copy.c
destroy.c get.c ktutil.1 ktutil.c ktutil_locl.h list.c purge.c
remove.c rename.c
src/crypto/external/bsd/heimdal/dist/cf: roken-frag.m4
version-script.m4
src/crypto/external/bsd/heimdal/dist/doc: ack.texi apps.texi
copyright.texi heimdal.hhp heimdal.texi hx509.hhp hx509.texi
install.texi intro.texi kerberos4.texi migration.texi misc.texi
programming.texi setup.texi whatis.texi win2k.texi
src/crypto/external/bsd/heimdal/dist/include: bits.c crypto-headers.h
heim_threads.h krb5-types.cross
src/crypto/external/bsd/heimdal/dist/kadmin: add-random-users.c
add_enctype.c ank.c check.c cpw.c del.c del_enctype.c dump.c ext.c
get.c init.c kadm_conn.c kadmin.1 kadmin.c kadmin_locl.h kadmind.8
kadmind.c load.c mod.c pw_quality.c random_password.c rename.c
rpc.c server.c stash.c test_util.c util.c
src/crypto/external/bsd/heimdal/dist/kcm: acl.c acquire.c cache.c
client.c config.c connect.c events.c glue.c headers.h kcm.8
kcm_locl.h log.c main.c protocol.c renew.c sessions.c
src/crypto/external/bsd/heimdal/dist/kdc: announce.c config.c connect.c
default_config.c digest-service.c digest.c fast.c headers.h hprop.8
hprop.c hprop.h hpropd.8 hpropd.c kdc-replay.c kdc-tester.c kdc.8
kdc.h kdc_locl.h kerberos5.c krb5tgs.c kstash.8 kstash.c kx509.c
log.c main.c misc.c mit_dump.c pkinit-ec.c pkinit.c process.c rx.h
set_dbinfo.c string2key.8 string2key.c windc.c windc_plugin.h
src/crypto/external/bsd/heimdal/dist/kpasswd: kpasswd-generator.c
kpasswd.1 kpasswd.c kpasswd_locl.h kpasswdd.8 kpasswdd.c
src/crypto/external/bsd/heimdal/dist/kuser: copy_cred_cache.1
copy_cred_cache.c generate-requests.c heimtools.c kcpytkt.c
kdecode_ticket.c kdeltkt.c kdestroy.1 kdestroy.c kdigest.8
kdigest.c kgetcred.1 kgetcred.c kimpersonate.8 kimpersonate.c
kinit.1 kinit.c klist.1 klist.c kswitch.1 kswitch.c kuser_locl.h
kverify.c kvno.c
src/crypto/external/bsd/heimdal/dist/lib/asn1: asn1-common.h
asn1-template.h asn1_gen.c asn1_print.c asn1_queue.h asn1parse.y
check-ber.c check-common.c check-common.h check-der.c check-gen.c
check-template.c check-timegm.c der.c der.h der_cmp.c der_copy.c
der_format.c der_free.c der_get.c der_length.c der_locl.h der_put.c
extra.c fuzzer.c gen.c gen_copy.c gen_decode.c gen_encode.c
gen_free.c gen_glue.c gen_length.c gen_locl.h gen_seq.c
gen_template.c hash.c hash.h heim_asn1.h lex.h lex.l main.c
roken_rename.h symbol.c symbol.h template.c timegm.c
src/crypto/external/bsd/heimdal/dist/lib/base: array.c baselocl.h
bool.c bsearch.c data.c db.c dict.c dll.c error.c heimbase.c
heimbase.h heimbasepriv.h heimqueue.h json.c null.c number.c
roken_rename.h string.c test_base.c
src/crypto/external/bsd/heimdal/dist/lib/com_err: com_err.3 com_err.c
com_err.h com_right.h compile_et.c compile_et.h error.c lex.h lex.l
parse.y roken_rename.h
src/crypto/external/bsd/heimdal/dist/lib/gssapi: gss_acquire_cred.3
gssapi.3 gssapi.h gssapi_mech.h gsstool.c test_acquire_cred.c
test_add_store_cred.c test_common.c test_common.h test_context.c
test_cred.c test_kcred.c test_names.c test_ntlm.c test_oid.c
src/crypto/external/bsd/heimdal/dist/lib/gssapi/gssapi: gssapi.h
gssapi_krb5.h gssapi_netlogon.h gssapi_ntlm.h gssapi_oid.h
gssapi_spnego.h
src/crypto/external/bsd/heimdal/dist/lib/gssapi/krb5: 8003.c
accept_sec_context.c acquire_cred.c add_cred.c
address_to_krb5addr.c aeap.c arcfour.c authorize_localname.c
canonicalize_name.c ccache_name.c cfx.c cfx.h compare_name.c
compat.c context_time.c copy_ccache.c creds.c decapsulate.c
delete_sec_context.c display_name.c display_status.c
duplicate_name.c encapsulate.c export_name.c export_sec_context.c
external.c get_mic.c gsskrb5_locl.h import_name.c
import_sec_context.c indicate_mechs.c init.c init_sec_context.c
inquire_context.c inquire_cred.c inquire_cred_by_mech.c
inquire_cred_by_oid.c inquire_mechs_for_name.c
inquire_names_for_mech.c inqui

CVS import: src/crypto/external/bsd/heimdal/dist

2017-01-28 Thread Christos Zoulas
  Chas Williams   Ken Dreyer  Santosh Kumar Pradhan
Chaskiel Grundman   Kiran S J   Sean Davis
Dana Koch   Kumar ThangaveluSergio Gelato
Daniel Schepler Landon Fuller   Simon Wilkinson
David MulderLinus Nordberg  Stef Walter
Douglas Bagnall Love Hörnquist Åstrand  Stefan Metzmacher
Ed MasteLuke Howard Steffen Jaeckel
Eray Aslan  Magnus Ahltorp  Timothy Pearson
Florian BestMarc Balmer Tollef Fog Heen
Fredrik Pettai  Marcin Cieślak  Tony Acero
Greg Hudson Marco Molteni   Uri Simchoni
Gustavo ZacariasMatthieu Hautreux   Viktor Dukhovni
Günther DeschnerMichael Meffie  Volker Lendecke
Harald BarthMoritz Lenz


Status:

Vendor Tag: HEIMDAL
Release Tags:   head-20170128

U src/crypto/external/bsd/heimdal/dist/ChangeLog.1998
U src/crypto/external/bsd/heimdal/dist/ChangeLog
U src/crypto/external/bsd/heimdal/dist/Makefile.am.common
U src/crypto/external/bsd/heimdal/dist/ChangeLog.1999
U src/crypto/external/bsd/heimdal/dist/ChangeLog.2000
U src/crypto/external/bsd/heimdal/dist/ChangeLog.2001
U src/crypto/external/bsd/heimdal/dist/ChangeLog.2002
U src/crypto/external/bsd/heimdal/dist/ChangeLog.2003
U src/crypto/external/bsd/heimdal/dist/ChangeLog.2004
U src/crypto/external/bsd/heimdal/dist/ChangeLog.2005
U src/crypto/external/bsd/heimdal/dist/ChangeLog.2006
U src/crypto/external/bsd/heimdal/dist/ChangeLog.2007
U src/crypto/external/bsd/heimdal/dist/LICENSE
U src/crypto/external/bsd/heimdal/dist/Makefile.am
U src/crypto/external/bsd/heimdal/dist/NTMakefile
U src/crypto/external/bsd/heimdal/dist/NEWS
N src/crypto/external/bsd/heimdal/dist/README.fast
U src/crypto/external/bsd/heimdal/dist/README
U src/crypto/external/bsd/heimdal/dist/acinclude.m4
U src/crypto/external/bsd/heimdal/dist/TODO
N src/crypto/external/bsd/heimdal/dist/appveyor.yml
U src/crypto/external/bsd/heimdal/dist/autogen.sh
U src/crypto/external/bsd/heimdal/dist/configure.ac
U src/crypto/external/bsd/heimdal/dist/krb5.conf
U src/crypto/external/bsd/heimdal/dist/admin/ktutil-commands.in
U src/crypto/external/bsd/heimdal/dist/admin/ChangeLog
U src/crypto/external/bsd/heimdal/dist/admin/Makefile.am
U src/crypto/external/bsd/heimdal/dist/admin/NTMakefile
U src/crypto/external/bsd/heimdal/dist/admin/add.c
U src/crypto/external/bsd/heimdal/dist/admin/change.c
U src/crypto/external/bsd/heimdal/dist/admin/copy.c
U src/crypto/external/bsd/heimdal/dist/admin/destroy.c
U src/crypto/external/bsd/heimdal/dist/admin/get.c
N src/crypto/external/bsd/heimdal/dist/admin/ktutil.1
U src/crypto/external/bsd/heimdal/dist/admin/list.c
U src/crypto/external/bsd/heimdal/dist/admin/ktutil-version.rc
U src/crypto/external/bsd/heimdal/dist/admin/ktutil.c
U src/crypto/external/bsd/heimdal/dist/admin/ktutil_locl.h
U src/crypto/external/bsd/heimdal/dist/admin/purge.c
U src/crypto/external/bsd/heimdal/dist/admin/remove.c
U src/crypto/external/bsd/heimdal/dist/admin/rename.c
U src/crypto/external/bsd/heimdal/dist/cf/Makefile.am.common
U src/crypto/external/bsd/heimdal/dist/cf/ChangeLog
U src/crypto/external/bsd/heimdal/dist/cf/auth-modules.m4
U src/crypto/external/bsd/heimdal/dist/cf/aix.m4
U src/crypto/external/bsd/heimdal/dist/cf/check-getpwnam_r-posix.m4
U src/crypto/external/bsd/heimdal/dist/cf/broken-getaddrinfo.m4
U src/crypto/external/bsd/heimdal/dist/cf/broken-glob.m4
U src/crypto/external/bsd/heimdal/dist/cf/broken-realloc.m4
U src/crypto/external/bsd/heimdal/dist/cf/broken-snprintf.m4
U src/crypto/external/bsd/heimdal/dist/cf/broken.m4
U src/crypto/external/bsd/heimdal/dist/cf/broken2.m4
U src/crypto/external/bsd/heimdal/dist/cf/c-attribute.m4
U src/crypto/external/bsd/heimdal/dist/cf/c-function.m4
U src/crypto/external/bsd/heimdal/dist/cf/capabilities.m4
U src/crypto/external/bsd/heimdal/dist/cf/check-compile-et.m4
U src/crypto/external/bsd/heimdal/dist/cf/check-man.m4
U src/crypto/external/bsd/heimdal/dist/cf/destdirs.m4
U src/crypto/external/bsd/heimdal/dist/cf/db.m4
U src/crypto/external/bsd/heimdal/dist/cf/check-netinet-ip-and-tcp.m4
U src/crypto/external/bsd/heimdal/dist/cf/pkg.m4
U src/crypto/external/bsd/heimdal/dist/cf/check-type-extra.m4
U src/crypto/external/bsd/heimdal/dist/cf/check-var.m4
U src/crypto/external/bsd/heimdal/dist/cf/crypto.m4
U src/crypto/external/bsd/heimdal/dist/cf/have-pragma-weak.m4
U src/crypto/external/bsd/heimdal/dist/cf/dispatch.m4
U src/crypto/external/bsd/heimdal/dist/cf/dlopen.m4
U src/crypto/external/bsd/heimdal/dist/cf/find-func-no-libs2.m4
U src/crypto/external/bsd/heimdal/dist/cf/find-func-no-libs.m4
U src/crypto/external/bsd/heimdal/dist/cf/find-func.m4
U src/crypto/external/bsd/heimdal/dist/cf/irix.m4
U src/crypto/external/bsd/heimdal/dist/cf/find-if-not-broken.m4
U src/crypto/external/bsd/heimdal/dist/cf/framework-se

CVS commit: src/sys/netbt

2017-01-28 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Jan 28 19:19:41 UTC 2017

Modified Files:
src/sys/netbt: hci.h

Log Message:
avoid -Werror=sign-conversion


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/netbt/hci.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/netbt/hci.h
diff -u src/sys/netbt/hci.h:1.42 src/sys/netbt/hci.h:1.43
--- src/sys/netbt/hci.h:1.42	Sat Jan 28 19:07:16 2017
+++ src/sys/netbt/hci.h	Sat Jan 28 19:19:41 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: hci.h,v 1.42 2017/01/28 19:07:16 christos Exp $	*/
+/*	$NetBSD: hci.h,v 1.43 2017/01/28 19:19:41 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 2005 Iain Hibbert.
@@ -54,7 +54,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $Id: hci.h,v 1.42 2017/01/28 19:07:16 christos Exp $
+ * $Id: hci.h,v 1.43 2017/01/28 19:19:41 jakllsch Exp $
  * $FreeBSD: src/sys/netgraph/bluetooth/include/ng_hci.h,v 1.6 2005/01/07 01:45:43 imp Exp $
  */
 
@@ -2281,7 +2281,7 @@ hci_filter_set(uint8_t bit, struct hci_f
 	uint8_t off = (uint8_t)((bit - 1) >> 5);
 	uint8_t sh = (uint8_t)((bit - 1) & 0x1f);
 
-	filter->mask[off] |= 1 << sh;
+	filter->mask[off] |= 1U << sh;
 }
 
 static __inline void
@@ -2290,7 +2290,7 @@ hci_filter_clr(uint8_t bit, struct hci_f
 	uint8_t off = (uint8_t)((bit - 1) >> 5);
 	uint8_t sh = (uint8_t)((bit - 1) & 0x1f);
 
-	filter->mask[off] &= ~(1 << sh);
+	filter->mask[off] &= ~(1U << sh);
 }
 
 static __inline int
@@ -2299,7 +2299,7 @@ hci_filter_test(uint8_t bit, const struc
 	uint8_t off = (uint8_t)((bit - 1) >> 5);
 	uint8_t sh = (uint8_t)((bit - 1) & 0x1f);
 
-	return filter->mask[off] & (1 << sh);
+	return (filter->mask[off] >> sh) & 1U;
 }
 
 /*



CVS commit: src/sys/netbt

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 28 19:07:16 UTC 2017

Modified Files:
src/sys/netbt: hci.h

Log Message:
factor out common subexpressions.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/netbt/hci.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/netbt/hci.h
diff -u src/sys/netbt/hci.h:1.41 src/sys/netbt/hci.h:1.42
--- src/sys/netbt/hci.h:1.41	Sat Nov 28 04:04:34 2015
+++ src/sys/netbt/hci.h	Sat Jan 28 14:07:16 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: hci.h,v 1.41 2015/11/28 09:04:34 plunky Exp $	*/
+/*	$NetBSD: hci.h,v 1.42 2017/01/28 19:07:16 christos Exp $	*/
 
 /*-
  * Copyright (c) 2005 Iain Hibbert.
@@ -54,7 +54,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $Id: hci.h,v 1.41 2015/11/28 09:04:34 plunky Exp $
+ * $Id: hci.h,v 1.42 2017/01/28 19:07:16 christos Exp $
  * $FreeBSD: src/sys/netgraph/bluetooth/include/ng_hci.h,v 1.6 2005/01/07 01:45:43 imp Exp $
  */
 
@@ -2278,28 +2278,28 @@ struct hci_filter {
 static __inline void
 hci_filter_set(uint8_t bit, struct hci_filter *filter)
 {
-	uint8_t off = bit - 1;
+	uint8_t off = (uint8_t)((bit - 1) >> 5);
+	uint8_t sh = (uint8_t)((bit - 1) & 0x1f);
 
-	off >>= 5;
-	filter->mask[off] |= (1 << ((bit - 1) & 0x1f));
+	filter->mask[off] |= 1 << sh;
 }
 
 static __inline void
 hci_filter_clr(uint8_t bit, struct hci_filter *filter)
 {
-	uint8_t off = bit - 1;
+	uint8_t off = (uint8_t)((bit - 1) >> 5);
+	uint8_t sh = (uint8_t)((bit - 1) & 0x1f);
 
-	off >>= 5;
-	filter->mask[off] &= ~(1 << ((bit - 1) & 0x1f));
+	filter->mask[off] &= ~(1 << sh);
 }
 
 static __inline int
 hci_filter_test(uint8_t bit, const struct hci_filter *filter)
 {
-	uint8_t off = bit - 1;
+	uint8_t off = (uint8_t)((bit - 1) >> 5);
+	uint8_t sh = (uint8_t)((bit - 1) & 0x1f);
 
-	off >>= 5;
-	return (filter->mask[off] & (1 << ((bit - 1) & 0x1f)));
+	return filter->mask[off] & (1 << sh);
 }
 
 /*



CVS commit: src/doc

2017-01-28 Thread Nathanial Sloss
Module Name:src
Committed By:   nat
Date:   Sat Jan 28 17:14:21 UTC 2017

Modified Files:
src/doc: CHANGES

Log Message:
Add bta2dpd(8) - bluetooth advanced audio daemon.


To generate a diff of this commit:
cvs rdiff -u -r1.2239 -r1.2240 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.2239 src/doc/CHANGES:1.2240
--- src/doc/CHANGES:1.2239	Wed Jan 25 13:43:58 2017
+++ src/doc/CHANGES	Sat Jan 28 17:14:21 2017
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2239 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2240 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -455,3 +455,4 @@ Changes from NetBSD 7.0 to NetBSD 8.0:
 	libpcap: Import 1.8.1. [christos 20170124]
 	tcpdump(8): Import 4.8.1. [christos 20170124]
 	acpi(4): Updated ACPICA to 20170119. [christos 20170125]
+	bta2dpd(8): Add new bluetooth A2DP daemon. [nat 20170129]



CVS commit: src

2017-01-28 Thread Nathanial Sloss
Module Name:src
Committed By:   nat
Date:   Sat Jan 28 16:55:54 UTC 2017

Modified Files:
src/distrib/sets/lists/base: mi
src/distrib/sets/lists/debug: mi
src/distrib/sets/lists/man: mi
src/usr.sbin: Makefile
Added Files:
src/usr.sbin/bta2dpd: Makefile
src/usr.sbin/bta2dpd/bta2dpd: Makefile avdtp.c avdtp_signal.h bta2dpd.8
bta2dpd.c sbc_encode.c sbc_encode.h
src/usr.sbin/bta2dpd/cosdata-gen: Makefile cosdata.c
src/usr.sbin/bta2dpd/sbc_crc-gen: Makefile sbc_crc.c

Log Message:
bta2dpd - Bluetooth Advand Audio Distribution (A2DP) Profile Daemon.

bta2dpd allows you to stream audio to and from bluetooth devices.
It features high quality stereo audio and is intended for use with pad(4)
device.

As discussed on current-users@ and tech-userlevel@


To generate a diff of this commit:
cvs rdiff -u -r1.1150 -r1.1151 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.193 -r1.194 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.1546 -r1.1547 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.273 -r1.274 src/usr.sbin/Makefile
cvs rdiff -u -r0 -r1.1 src/usr.sbin/bta2dpd/Makefile
cvs rdiff -u -r0 -r1.1 src/usr.sbin/bta2dpd/bta2dpd/Makefile \
src/usr.sbin/bta2dpd/bta2dpd/avdtp.c \
src/usr.sbin/bta2dpd/bta2dpd/avdtp_signal.h \
src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.8 \
src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c \
src/usr.sbin/bta2dpd/bta2dpd/sbc_encode.c \
src/usr.sbin/bta2dpd/bta2dpd/sbc_encode.h
cvs rdiff -u -r0 -r1.1 src/usr.sbin/bta2dpd/cosdata-gen/Makefile \
src/usr.sbin/bta2dpd/cosdata-gen/cosdata.c
cvs rdiff -u -r0 -r1.1 src/usr.sbin/bta2dpd/sbc_crc-gen/Makefile \
src/usr.sbin/bta2dpd/sbc_crc-gen/sbc_crc.c

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

Modified files:

Index: src/distrib/sets/lists/base/mi
diff -u src/distrib/sets/lists/base/mi:1.1150 src/distrib/sets/lists/base/mi:1.1151
--- src/distrib/sets/lists/base/mi:1.1150	Fri Jan 13 11:21:47 2017
+++ src/distrib/sets/lists/base/mi	Sat Jan 28 16:55:54 2017
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1150 2017/01/13 11:21:47 nonaka Exp $
+# $NetBSD: mi,v 1.1151 2017/01/28 16:55:54 nat Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -1591,6 +1591,7 @@
 ./usr/sbin/bootpgwbase-bootserver-bin
 ./usr/sbin/bootptestbase-bootserver-bin
 ./usr/sbin/bpm	base-obsolete		obsolete
+./usr/sbin/bta2dpdbase-sysutil-bin
 ./usr/sbin/btattachbase-sysutil-bin
 ./usr/sbin/btconfigbase-sysutil-bin
 ./usr/sbin/btcontrolbase-obsolete		obsolete

Index: src/distrib/sets/lists/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.193 src/distrib/sets/lists/debug/mi:1.194
--- src/distrib/sets/lists/debug/mi:1.193	Fri Jan 27 10:45:11 2017
+++ src/distrib/sets/lists/debug/mi	Sat Jan 28 16:55:54 2017
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.193 2017/01/27 10:45:11 hannken Exp $
+# $NetBSD: mi,v 1.194 2017/01/28 16:55:54 nat Exp $
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/lib	comp-sys-usr		compatdir
 ./usr/lib/i18n/libBIG5_g.a			comp-c-debuglib		debuglib,compatfile
@@ -1009,6 +1009,7 @@
 ./usr/libdata/debug/usr/sbin/bootpef.debug	comp-bootserver-debug	debug
 ./usr/libdata/debug/usr/sbin/bootpgw.debug	comp-bootserver-debug	debug
 ./usr/libdata/debug/usr/sbin/bootptest.debug	comp-bootserver-debug	debug
+./usr/libdata/debug/usr/sbin/bta2dpd.debug	comp-sysutil-debug	debug
 ./usr/libdata/debug/usr/sbin/btattach.debug	comp-sysutil-debug	debug
 ./usr/libdata/debug/usr/sbin/btconfig.debug	comp-sysutil-debug	debug
 ./usr/libdata/debug/usr/sbin/btcontrol.debug	comp-obsolete		obsolete

Index: src/distrib/sets/lists/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1546 src/distrib/sets/lists/man/mi:1.1547
--- src/distrib/sets/lists/man/mi:1.1546	Sat Jan 21 20:21:57 2017
+++ src/distrib/sets/lists/man/mi	Sat Jan 28 16:55:54 2017
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1546 2017/01/21 20:21:57 jdolecek Exp $
+# $NetBSD: mi,v 1.1547 2017/01/28 16:55:54 nat Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -2366,6 +2366,7 @@
 ./usr/share/man/cat8/bounce.0			man-postfix-catman	postfix,.cat
 ./usr/share/man/cat8/bozohttpd.0		man-netutil-catman	.cat
 ./usr/share/man/cat8/brconfig.0			man-netutil-catman	.cat
+./usr/share/man/cat8/bta2dpd.0			man-sysutil-catman	.cat
 ./usr/share/man/cat8/btattach.0			man-sysutil-catman	.cat
 ./usr/share/man/cat8/btconfig.0			man-sysutil-catman	.cat
 ./usr/share/man/cat8/btcontrol.0		man-obsolete		obsolete
@@ -5339,6 +5340,7 @@
 ./usr/share/man/html8/bounce.html		man-postfix-htmlman	postfix,html
 ./usr/share/man/html8/bozohttpd.html		man-netutil-htmlman	html
 ./usr/share/man/html8/brconfig.html		man-netutil-htmlman	html
+./usr/share/man/html8/bta2dpd.html		man-sysutil-htmlman	html
 ./usr/share/man/html8/btattach.html		man-sysutil-htmlman	html
 ./usr/share/man/html

CVS commit: src/sys/kern

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 28 16:43:59 UTC 2017

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

Log Message:
We need to define COMPAT_NETBSD32 before we include other files;
otherwise things like ucontext32_t will be missing.


To generate a diff of this commit:
cvs rdiff -u -r1.204 -r1.205 src/sys/kern/kern_proc.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/kern_proc.c
diff -u src/sys/kern/kern_proc.c:1.204 src/sys/kern/kern_proc.c:1.205
--- src/sys/kern/kern_proc.c:1.204	Thu Jan 26 22:53:01 2017
+++ src/sys/kern/kern_proc.c	Sat Jan 28 11:43:59 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_proc.c,v 1.204 2017/01/27 03:53:01 christos Exp $	*/
+/*	$NetBSD: kern_proc.c,v 1.205 2017/01/28 16:43:59 christos Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_proc.c,v 1.204 2017/01/27 03:53:01 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_proc.c,v 1.205 2017/01/28 16:43:59 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_kstack.h"
@@ -71,6 +71,11 @@ __KERNEL_RCSID(0, "$NetBSD: kern_proc.c,
 #include "opt_compat_netbsd32.h"
 #endif
 
+#if defined(__HAVE_COMPAT_NETBSD32) && !defined(COMPAT_NETBSD32) \
+&& !defined(_RUMPKERNEL)
+#define COMPAT_NETBSD32
+#endif
+
 #include 
 #include 
 #include 
@@ -104,11 +109,6 @@ __KERNEL_RCSID(0, "$NetBSD: kern_proc.c,
 #include 
 #include 
 
-#if defined(__HAVE_COMPAT_NETBSD32) && !defined(COMPAT_NETBSD32) \
-&& !defined(_RUMPKERNEL)
-#define COMPAT_NETBSD32
-#endif
-
 #ifdef COMPAT_NETBSD32
 #include 
 #endif



CVS commit: src/doc/roadmaps/people

2017-01-28 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sat Jan 28 15:40:16 UTC 2017

Added Files:
src/doc/roadmaps/people: kamil

Log Message:
Add personal TODO and research goals

Things I want to finish for 8:

- as much as possible from the LLDB, Swift, .NET and VirtualBox projects
- more c11 in libc

Things I want to research for 9:

- turn system utilities into C libraries + add bindings for Lua
- rebase Haiku stack on NetBSD + add Kit(s) accessing libsystem utilities


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/doc/roadmaps/people/kamil

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

Added files:

Index: src/doc/roadmaps/people/kamil
diff -u /dev/null src/doc/roadmaps/people/kamil:1.1
--- /dev/null	Sat Jan 28 15:40:16 2017
+++ src/doc/roadmaps/people/kamil	Sat Jan 28 15:40:16 2017
@@ -0,0 +1,9 @@
+Things I want to finish for 8:
+
+- as much as possible from the LLDB, Swift, .NET and VirtualBox projects
+- more c11 in libc
+
+Things I want to research for 9:
+
+- turn system utilities into C libraries + add bindings for Lua
+- rebase Haiku stack on NetBSD + add Kit(s) for system utilities



CVS commit: src/sys/compat/linux32/common

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 28 15:09:55 UTC 2017

Modified Files:
src/sys/compat/linux32/common: linux32_dirent.c

Log Message:
we have space for one more.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/compat/linux32/common/linux32_dirent.c

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

Modified files:

Index: src/sys/compat/linux32/common/linux32_dirent.c
diff -u src/sys/compat/linux32/common/linux32_dirent.c:1.15 src/sys/compat/linux32/common/linux32_dirent.c:1.16
--- src/sys/compat/linux32/common/linux32_dirent.c:1.15	Sat Jan 28 10:08:06 2017
+++ src/sys/compat/linux32/common/linux32_dirent.c	Sat Jan 28 10:09:55 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux32_dirent.c,v 1.15 2017/01/28 15:08:06 christos Exp $ */
+/*	$NetBSD: linux32_dirent.c,v 1.16 2017/01/28 15:09:55 christos Exp $ */
 
 /*-
  * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: linux32_dirent.c,v 1.15 2017/01/28 15:08:06 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_dirent.c,v 1.16 2017/01/28 15:09:55 christos Exp $");
 
 #include 
 #include 
@@ -215,7 +215,7 @@ again:
 			idb.d_off = (linux32_off_t)off;
 			idb.d_reclen = (u_short)linux32_reclen;
 		}
-		size_t l = MIN(sizeof(idb.d_name) - 2, bdp->d_namlen + 1);
+		size_t l = MIN(sizeof(idb.d_name) - 1, bdp->d_namlen + 1);
 		memcpy(idb.d_name, bdp->d_name, l);
 		idb.d_name[l + 1] = bdp->d_type;
 		if ((error = copyout((void *)&idb, outp, linux32_reclen)))



CVS commit: src/sys/compat/linux32/common

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 28 15:08:06 UTC 2017

Modified Files:
src/sys/compat/linux32/common: linux32_dirent.c

Log Message:
fix size computation


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/compat/linux32/common/linux32_dirent.c

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

Modified files:

Index: src/sys/compat/linux32/common/linux32_dirent.c
diff -u src/sys/compat/linux32/common/linux32_dirent.c:1.14 src/sys/compat/linux32/common/linux32_dirent.c:1.15
--- src/sys/compat/linux32/common/linux32_dirent.c:1.14	Fri Jan 13 16:02:05 2017
+++ src/sys/compat/linux32/common/linux32_dirent.c	Sat Jan 28 10:08:06 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux32_dirent.c,v 1.14 2017/01/13 21:02:05 christos Exp $ */
+/*	$NetBSD: linux32_dirent.c,v 1.15 2017/01/28 15:08:06 christos Exp $ */
 
 /*-
  * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: linux32_dirent.c,v 1.14 2017/01/13 21:02:05 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_dirent.c,v 1.15 2017/01/28 15:08:06 christos Exp $");
 
 #include 
 #include 
@@ -215,9 +215,9 @@ again:
 			idb.d_off = (linux32_off_t)off;
 			idb.d_reclen = (u_short)linux32_reclen;
 		}
-		memcpy(idb.d_name, bdp->d_name, MIN(sizeof(idb.d_name), 
-		bdp->d_namlen));
-		idb.d_name[strlen(idb.d_name) + 1] = bdp->d_type;
+		size_t l = MIN(sizeof(idb.d_name) - 2, bdp->d_namlen + 1);
+		memcpy(idb.d_name, bdp->d_name, l);
+		idb.d_name[l + 1] = bdp->d_type;
 		if ((error = copyout((void *)&idb, outp, linux32_reclen)))
 			goto out;
 		/* advance past this real entry */



CVS commit: src/sys/compat/linux/common

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 28 15:01:01 UTC 2017

Modified Files:
src/sys/compat/linux/common: linux_file64.c linux_misc.c

Log Message:
copy the terminating NUL (njoly)


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/compat/linux/common/linux_file64.c
cvs rdiff -u -r1.236 -r1.237 src/sys/compat/linux/common/linux_misc.c

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

Modified files:

Index: src/sys/compat/linux/common/linux_file64.c
diff -u src/sys/compat/linux/common/linux_file64.c:1.57 src/sys/compat/linux/common/linux_file64.c:1.58
--- src/sys/compat/linux/common/linux_file64.c:1.57	Fri Jan 13 17:46:43 2017
+++ src/sys/compat/linux/common/linux_file64.c	Sat Jan 28 10:01:01 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_file64.c,v 1.57 2017/01/13 22:46:43 christos Exp $	*/
+/*	$NetBSD: linux_file64.c,v 1.58 2017/01/28 15:01:01 christos Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 2000, 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.57 2017/01/13 22:46:43 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.58 2017/01/28 15:01:01 christos Exp $");
 
 #include 
 #include 
@@ -355,7 +355,7 @@ again:
 		idb.d_off = off;
 		idb.d_reclen = (u_short)linux_reclen;
 		memcpy(idb.d_name, bdp->d_name, MIN(sizeof(idb.d_name),
-		   bdp->d_namlen));
+		   bdp->d_namlen + 1));
 		if ((error = copyout((void *)&idb, outp, linux_reclen)))
 			goto out;
 		/* advance past this real entry */

Index: src/sys/compat/linux/common/linux_misc.c
diff -u src/sys/compat/linux/common/linux_misc.c:1.236 src/sys/compat/linux/common/linux_misc.c:1.237
--- src/sys/compat/linux/common/linux_misc.c:1.236	Fri Jan 13 17:45:15 2017
+++ src/sys/compat/linux/common/linux_misc.c	Sat Jan 28 10:01:01 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_misc.c,v 1.236 2017/01/13 22:45:15 christos Exp $	*/
+/*	$NetBSD: linux_misc.c,v 1.237 2017/01/28 15:01:01 christos Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.236 2017/01/13 22:45:15 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.237 2017/01/28 15:01:01 christos Exp $");
 
 #include 
 #include 
@@ -788,7 +788,7 @@ again:
 			*((char *)&idb + idb.d_reclen - 1) = bdp->d_type;
 		}
 		memcpy(idb.d_name, bdp->d_name,
-		MIN(sizeof(idb.d_name), bdp->d_namlen));
+		MIN(sizeof(idb.d_name), bdp->d_namlen + 1));
 		if ((error = copyout((void *)&idb, outp, linux_reclen)))
 			goto out;
 		/* advance past this real entry */



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

2017-01-28 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Jan 28 13:21:11 UTC 2017

Modified Files:
src/sys/arch/arm/arm: cpufunc.c

Log Message:
Drop inadvertent redundant CPU_CONTROL_MMU_ENABLE ((1 < 22)) for PJ4Bv7.

This was intended to be CPU_CONTROL_UNAL_ENABLE, which is already handled.

Should fix PR kern/51921.


To generate a diff of this commit:
cvs rdiff -u -r1.162 -r1.163 src/sys/arch/arm/arm/cpufunc.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/arm/cpufunc.c
diff -u src/sys/arch/arm/arm/cpufunc.c:1.162 src/sys/arch/arm/arm/cpufunc.c:1.163
--- src/sys/arch/arm/arm/cpufunc.c:1.162	Tue Oct 18 13:58:52 2016
+++ src/sys/arch/arm/arm/cpufunc.c	Sat Jan 28 13:21:11 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpufunc.c,v 1.162 2016/10/18 13:58:52 kiyohara Exp $	*/
+/*	$NetBSD: cpufunc.c,v 1.163 2017/01/28 13:21:11 jakllsch Exp $	*/
 
 /*
  * arm7tdmi support code Copyright (c) 2001 John Fremlin
@@ -49,7 +49,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.162 2016/10/18 13:58:52 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.163 2017/01/28 13:21:11 jakllsch Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_cpuoptions.h"
@@ -3076,7 +3076,7 @@ pj4bv7_setup(char *args)
 	cpuctrl |= CPU_CONTROL_IC_ENABLE;
 	cpuctrl |= (0xf << 3);
 	cpuctrl |= CPU_CONTROL_BPRD_ENABLE;
-	cpuctrl |= (0x5 << 16) | (1 < 22);
+	cpuctrl |= (0x5 << 16);
 	cpuctrl |= CPU_CONTROL_XP_ENABLE;
 
 #ifndef ARM_HAS_VBAR



CVS commit: [nick-nhusb] src/sys/dev/usb

2017-01-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan 28 12:12:20 UTC 2017

Modified Files:
src/sys/dev/usb [nick-nhusb]: TODO.usbmp if_zyd.c if_zydreg.h

Log Message:
Remove tsleep/wakeup from if_zyd


To generate a diff of this commit:
cvs rdiff -u -r1.8.4.10 -r1.8.4.11 src/sys/dev/usb/TODO.usbmp
cvs rdiff -u -r1.36.14.12 -r1.36.14.13 src/sys/dev/usb/if_zyd.c
cvs rdiff -u -r1.7.16.4 -r1.7.16.5 src/sys/dev/usb/if_zydreg.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/TODO.usbmp
diff -u src/sys/dev/usb/TODO.usbmp:1.8.4.10 src/sys/dev/usb/TODO.usbmp:1.8.4.11
--- src/sys/dev/usb/TODO.usbmp:1.8.4.10	Sat Jan 28 12:04:17 2017
+++ src/sys/dev/usb/TODO.usbmp	Sat Jan 28 12:12:19 2017
@@ -1,4 +1,4 @@
-$NetBSD: TODO.usbmp,v 1.8.4.10 2017/01/28 12:04:17 skrll Exp $
+$NetBSD: TODO.usbmp,v 1.8.4.11 2017/01/28 12:12:19 skrll Exp $
 
 
 the majority of the USB MP device interface is documented in usbdivar.h.
@@ -97,7 +97,6 @@ splusb drivers:
 
 wakeup/tsleep drivers:
   - if_run.c
-  - if_zyd.c
   - ucycom.c
   - udsir.c
   - uirda.c

Index: src/sys/dev/usb/if_zyd.c
diff -u src/sys/dev/usb/if_zyd.c:1.36.14.12 src/sys/dev/usb/if_zyd.c:1.36.14.13
--- src/sys/dev/usb/if_zyd.c:1.36.14.12	Mon Dec  5 10:55:18 2016
+++ src/sys/dev/usb/if_zyd.c	Sat Jan 28 12:12:19 2017
@@ -1,5 +1,5 @@
 /*	$OpenBSD: if_zyd.c,v 1.52 2007/02/11 00:08:04 jsg Exp $	*/
-/*	$NetBSD: if_zyd.c,v 1.36.14.12 2016/12/05 10:55:18 skrll Exp $	*/
+/*	$NetBSD: if_zyd.c,v 1.36.14.13 2017/01/28 12:12:19 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2006 by Damien Bergamini 
@@ -23,7 +23,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_zyd.c,v 1.36.14.12 2016/12/05 10:55:18 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_zyd.c,v 1.36.14.13 2017/01/28 12:12:19 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -343,6 +343,8 @@ zyd_attach(device_t parent, device_t sel
 	IFQ_SET_READY(&ifp->if_snd);
 	memcpy(ifp->if_xname, device_xname(sc->sc_dev), IFNAMSIZ);
 
+	mutex_init(&sc->sc_lock, MUTEX_DEFAULT, IPL_SOFTUSB);
+	cv_init(&sc->sc_cmdcv, "zydcmd");
 	SIMPLEQ_INIT(&sc->sc_rqh);
 
 	/* defer configrations after file system is ready to load firmware */
@@ -466,12 +468,11 @@ zyd_detach(device_t self, int flags)
 	struct zyd_softc *sc = device_private(self);
 	struct ieee80211com *ic = &sc->sc_ic;
 	struct ifnet *ifp = &sc->sc_if;
-	int s;
 
 	if (!sc->attached)
 		return 0;
 
-	s = splusb();
+	mutex_enter(&sc->sc_lock);
 
 	zyd_stop(ifp, 1);
 	usb_rem_task(sc->sc_udev, &sc->sc_task);
@@ -487,7 +488,10 @@ zyd_detach(device_t self, int flags)
 	ieee80211_ifdetach(ic);
 	if_detach(ifp);
 
-	splx(s);
+	mutex_exit(&sc->sc_lock);
+
+	mutex_destroy(&sc->sc_lock);
+	cv_destroy(&sc->sc_cmdcv);
 
 	usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev, sc->sc_dev);
 
@@ -792,7 +796,6 @@ zyd_cmd(struct zyd_softc *sc, uint16_t c
 	uint16_t xferflags;
 	int error;
 	usbd_status uerror;
-	int s = 0;
 
 	error = usbd_create_xfer(sc->zyd_ep[ZYD_ENDPT_IOUT],
 	sizeof(uint16_t) + ilen, USBD_FORCE_SHORT_XFER, 0, &xfer);
@@ -806,19 +809,18 @@ zyd_cmd(struct zyd_softc *sc, uint16_t c
 	if (!(flags & ZYD_CMD_FLAG_READ))
 		xferflags |= USBD_SYNCHRONOUS;
 	else {
-		s = splusb();
 		rq.idata = idata;
 		rq.odata = odata;
 		rq.len = olen / sizeof(struct zyd_pair);
+		mutex_enter(&sc->sc_lock);
 		SIMPLEQ_INSERT_TAIL(&sc->sc_rqh, &rq, rq);
+		mutex_exit(&sc->sc_lock);
 	}
 
 	usbd_setup_xfer(xfer, 0, &cmd, sizeof(uint16_t) + ilen, xferflags,
 	ZYD_INTR_TIMEOUT, NULL);
 	uerror = usbd_transfer(xfer);
 	if (uerror != USBD_IN_PROGRESS && uerror != 0) {
-		if (flags & ZYD_CMD_FLAG_READ)
-			splx(s);
 		printf("%s: could not send command (error=%s)\n",
 		device_xname(sc->sc_dev), usbd_errstr(uerror));
 		(void)usbd_destroy_xfer(xfer);
@@ -829,11 +831,12 @@ zyd_cmd(struct zyd_softc *sc, uint16_t c
 		return 0;	/* write: don't wait for reply */
 	}
 	/* wait at most one second for command reply */
-	error = tsleep(odata, PCATCH, "zydcmd", hz);
+	mutex_enter(&sc->sc_lock);
+	error = cv_timedwait_sig(&sc->sc_cmdcv, &sc->sc_lock, hz);
 	if (error == EWOULDBLOCK)
 		printf("%s: zyd_read sleep timeout\n", device_xname(sc->sc_dev));
 	SIMPLEQ_REMOVE(&sc->sc_rqh, &rq, rq, rq);
-	splx(s);
+	mutex_exit(&sc->sc_lock);
 
 	(void)usbd_destroy_xfer(xfer);
 	return error;
@@ -1872,6 +1875,7 @@ zyd_intr(struct usbd_xfer *xfer, void * 
 		datalen -= sizeof(cmd->code);
 		datalen -= 2;	/* XXX: padding? */
 
+		mutex_enter(&sc->sc_lock);
 		SIMPLEQ_FOREACH(rqp, &sc->sc_rqh, rq) {
 			int i;
 
@@ -1888,10 +1892,11 @@ zyd_intr(struct usbd_xfer *xfer, void * 
 			/* copy answer into caller-supplied buffer */
 			memcpy(rqp->odata, cmd->data,
 			sizeof(struct zyd_pair) * rqp->len);
-			wakeup(rqp->odata);	/* wakeup caller */
-
+			cv_signal(&sc->sc_cmdcv);
+			mutex_exit(&sc->sc_lock);
 			return;
 		}
+		mutex_exit(&sc->sc_lock);
 		return;	/* unexpected IORD notif

CVS commit: [nick-nhusb] src/sys/dev/usb

2017-01-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan 28 12:04:17 UTC 2017

Modified Files:
src/sys/dev/usb [nick-nhusb]: TODO.usbmp if_urtwn.c if_urtwnvar.h

Log Message:
Remove tsleep(9) and wakeup(9) from urtwn(4)


To generate a diff of this commit:
cvs rdiff -u -r1.8.4.9 -r1.8.4.10 src/sys/dev/usb/TODO.usbmp
cvs rdiff -u -r1.34.4.15 -r1.34.4.16 src/sys/dev/usb/if_urtwn.c
cvs rdiff -u -r1.8.4.4 -r1.8.4.5 src/sys/dev/usb/if_urtwnvar.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/TODO.usbmp
diff -u src/sys/dev/usb/TODO.usbmp:1.8.4.9 src/sys/dev/usb/TODO.usbmp:1.8.4.10
--- src/sys/dev/usb/TODO.usbmp:1.8.4.9	Sat Jan 28 10:15:01 2017
+++ src/sys/dev/usb/TODO.usbmp	Sat Jan 28 12:04:17 2017
@@ -1,4 +1,4 @@
-$NetBSD: TODO.usbmp,v 1.8.4.9 2017/01/28 10:15:01 skrll Exp $
+$NetBSD: TODO.usbmp,v 1.8.4.10 2017/01/28 12:04:17 skrll Exp $
 
 
 the majority of the USB MP device interface is documented in usbdivar.h.
@@ -97,7 +97,6 @@ splusb drivers:
 
 wakeup/tsleep drivers:
   - if_run.c
-  - if_urtwn.c
   - if_zyd.c
   - ucycom.c
   - udsir.c

Index: src/sys/dev/usb/if_urtwn.c
diff -u src/sys/dev/usb/if_urtwn.c:1.34.4.15 src/sys/dev/usb/if_urtwn.c:1.34.4.16
--- src/sys/dev/usb/if_urtwn.c:1.34.4.15	Mon Dec  5 10:55:18 2016
+++ src/sys/dev/usb/if_urtwn.c	Sat Jan 28 12:04:17 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_urtwn.c,v 1.34.4.15 2016/12/05 10:55:18 skrll Exp $	*/
+/*	$NetBSD: if_urtwn.c,v 1.34.4.16 2017/01/28 12:04:17 skrll Exp $	*/
 /*	$OpenBSD: if_urtwn.c,v 1.42 2015/02/10 23:25:46 mpi Exp $	*/
 
 /*-
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.34.4.15 2016/12/05 10:55:18 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.34.4.16 2017/01/28 12:04:17 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -372,6 +372,7 @@ urtwn_attach(device_t parent, device_t s
 
 	(void) usbd_do_request(sc->sc_udev, &req, 0);
 
+	cv_init(&sc->sc_task_cv, "urtwntsk");
 	mutex_init(&sc->sc_task_mtx, MUTEX_DEFAULT, IPL_NET);
 	mutex_init(&sc->sc_tx_mtx, MUTEX_DEFAULT, IPL_NONE);
 	mutex_init(&sc->sc_rx_mtx, MUTEX_DEFAULT, IPL_NONE);
@@ -559,6 +560,7 @@ urtwn_detach(device_t self, int flags)
 	callout_destroy(&sc->sc_scan_to);
 	callout_destroy(&sc->sc_calib_to);
 
+	cv_destroy(&sc->sc_task_cv);
 	mutex_destroy(&sc->sc_write_mtx);
 	mutex_destroy(&sc->sc_fwcmd_mtx);
 	mutex_destroy(&sc->sc_tx_mtx);
@@ -823,8 +825,8 @@ urtwn_task(void *arg)
 		ring->queued--;
 		ring->next = (ring->next + 1) % URTWN_HOST_CMD_RING_COUNT;
 	}
+	cv_broadcast(&sc->sc_task_cv);
 	mutex_spin_exit(&sc->sc_task_mtx);
-	wakeup(&sc->cmdq);
 	splx(s);
 }
 
@@ -863,8 +865,10 @@ urtwn_wait_async(struct urtwn_softc *sc)
 	DPRINTFN(DBG_FN, ("%s: %s\n", device_xname(sc->sc_dev), __func__));
 
 	/* Wait for all queued asynchronous commands to complete. */
+	mutex_spin_enter(&sc->sc_task_mtx);
 	while (sc->cmdq.queued > 0)
-		tsleep(&sc->cmdq, 0, "endtask", 0);
+		cv_wait(&sc->sc_task_cv, &sc->sc_task_mtx);
+	mutex_spin_exit(&sc->sc_task_mtx);
 }
 
 static int

Index: src/sys/dev/usb/if_urtwnvar.h
diff -u src/sys/dev/usb/if_urtwnvar.h:1.8.4.4 src/sys/dev/usb/if_urtwnvar.h:1.8.4.5
--- src/sys/dev/usb/if_urtwnvar.h:1.8.4.4	Mon Dec  5 10:55:18 2016
+++ src/sys/dev/usb/if_urtwnvar.h	Sat Jan 28 12:04:17 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_urtwnvar.h,v 1.8.4.4 2016/12/05 10:55:18 skrll Exp $	*/
+/*	$NetBSD: if_urtwnvar.h,v 1.8.4.5 2017/01/28 12:04:17 skrll Exp $	*/
 /*	$OpenBSD: if_urtwnreg.h,v 1.3 2010/11/16 18:02:59 damien Exp $	*/
 
 /*-
@@ -128,6 +128,7 @@ struct urtwn_softc {
 	callout_t			sc_scan_to;
 	callout_t			sc_calib_to;
 
+	kcondvar_t			sc_task_cv;
 	kmutex_t			sc_task_mtx;
 	kmutex_t			sc_fwcmd_mtx;
 	kmutex_t			sc_tx_mtx;



CVS commit: [nick-nhusb] src/sys/dev/usb

2017-01-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan 28 10:15:01 UTC 2017

Modified Files:
src/sys/dev/usb [nick-nhusb]: TODO.usbmp uyurex.c

Log Message:
Remove tsleep from uyurex(4)


To generate a diff of this commit:
cvs rdiff -u -r1.8.4.8 -r1.8.4.9 src/sys/dev/usb/TODO.usbmp
cvs rdiff -u -r1.9.14.8 -r1.9.14.9 src/sys/dev/usb/uyurex.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/TODO.usbmp
diff -u src/sys/dev/usb/TODO.usbmp:1.8.4.8 src/sys/dev/usb/TODO.usbmp:1.8.4.9
--- src/sys/dev/usb/TODO.usbmp:1.8.4.8	Sat Jan 28 10:10:15 2017
+++ src/sys/dev/usb/TODO.usbmp	Sat Jan 28 10:15:01 2017
@@ -1,4 +1,4 @@
-$NetBSD: TODO.usbmp,v 1.8.4.8 2017/01/28 10:10:15 skrll Exp $
+$NetBSD: TODO.usbmp,v 1.8.4.9 2017/01/28 10:15:01 skrll Exp $
 
 
 the majority of the USB MP device interface is documented in usbdivar.h.
@@ -104,7 +104,6 @@ wakeup/tsleep drivers:
   - uirda.c
   - umass_isdata.c
   - ustir.c
-  - uyurex.c
 
 missing D_MPSAFE drivers:
   - ucycom

Index: src/sys/dev/usb/uyurex.c
diff -u src/sys/dev/usb/uyurex.c:1.9.14.8 src/sys/dev/usb/uyurex.c:1.9.14.9
--- src/sys/dev/usb/uyurex.c:1.9.14.8	Mon Dec  5 10:55:20 2016
+++ src/sys/dev/usb/uyurex.c	Sat Jan 28 10:15:01 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: uyurex.c,v 1.9.14.8 2016/12/05 10:55:20 skrll Exp $ */
+/*	$NetBSD: uyurex.c,v 1.9.14.9 2017/01/28 10:15:01 skrll Exp $ */
 /*	$OpenBSD: uyurex.c,v 1.3 2010/03/04 03:47:22 deraadt Exp $ */
 
 /*
@@ -22,7 +22,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uyurex.c,v 1.9.14.8 2016/12/05 10:55:20 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uyurex.c,v 1.9.14.9 2017/01/28 10:15:01 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -359,7 +359,7 @@ uyurex_read_value_request(struct uyurex_
 		return;
 
 	/* wait till sensor data are updated, 500ms will be enough */
-	tsleep(&sc->sc_sme, 0, "uyurex", (500*hz+999)/1000 + 1);
+	kpause("uyurexrd", false, (500*hz+999)/1000 + 1, NULL);
 }
 
 void
@@ -382,5 +382,5 @@ uyurex_write_value_request(struct uyurex
 		return;
 
 	/* wait till sensor data are updated, 250ms will be enough */
-	tsleep(&sc->sc_sme, 0, "uyurex", (250*hz+999)/1000 + 1);
+	kpause("uyurexwr", false, (250*hz+999)/1000 + 1, NULL);
 }



CVS commit: [nick-nhusb] src/sys/dev/usb

2017-01-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan 28 10:10:15 UTC 2017

Modified Files:
src/sys/dev/usb [nick-nhusb]: TODO.usbmp uthum.c

Log Message:
Remove tsleep from uthum(4)


To generate a diff of this commit:
cvs rdiff -u -r1.8.4.7 -r1.8.4.8 src/sys/dev/usb/TODO.usbmp
cvs rdiff -u -r1.10.14.8 -r1.10.14.9 src/sys/dev/usb/uthum.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/TODO.usbmp
diff -u src/sys/dev/usb/TODO.usbmp:1.8.4.7 src/sys/dev/usb/TODO.usbmp:1.8.4.8
--- src/sys/dev/usb/TODO.usbmp:1.8.4.7	Sat Jan 28 10:05:09 2017
+++ src/sys/dev/usb/TODO.usbmp	Sat Jan 28 10:10:15 2017
@@ -1,4 +1,4 @@
-$NetBSD: TODO.usbmp,v 1.8.4.7 2017/01/28 10:05:09 skrll Exp $
+$NetBSD: TODO.usbmp,v 1.8.4.8 2017/01/28 10:10:15 skrll Exp $
 
 
 the majority of the USB MP device interface is documented in usbdivar.h.
@@ -104,7 +104,6 @@ wakeup/tsleep drivers:
   - uirda.c
   - umass_isdata.c
   - ustir.c
-  - uthum.c
   - uyurex.c
 
 missing D_MPSAFE drivers:

Index: src/sys/dev/usb/uthum.c
diff -u src/sys/dev/usb/uthum.c:1.10.14.8 src/sys/dev/usb/uthum.c:1.10.14.9
--- src/sys/dev/usb/uthum.c:1.10.14.8	Mon Dec  5 10:55:20 2016
+++ src/sys/dev/usb/uthum.c	Sat Jan 28 10:10:15 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: uthum.c,v 1.10.14.8 2016/12/05 10:55:20 skrll Exp $   */
+/*	$NetBSD: uthum.c,v 1.10.14.9 2017/01/28 10:10:15 skrll Exp $   */
 /*	$OpenBSD: uthum.c,v 1.6 2010/01/03 18:43:02 deraadt Exp $   */
 
 /*
@@ -22,7 +22,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uthum.c,v 1.10.14.8 2016/12/05 10:55:20 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uthum.c,v 1.10.14.9 2017/01/28 10:10:15 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -294,7 +294,7 @@ uthum_read_data(struct uthum_softc *sc, 
 
 	/* wait if required */
 	if (need_delay > 1)
-		tsleep(&sc->sc_sme, 0, "uthum", (need_delay*hz+999)/1000 + 1);
+		kpause("uthum", false, (need_delay*hz+999)/1000 + 1, NULL);
 
 	/* get answer */
 	if (uhidev_get_report(&sc->sc_hdev, UHID_FEATURE_REPORT,



CVS commit: [nick-nhusb] src/sys/dev/usb

2017-01-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan 28 10:05:09 UTC 2017

Modified Files:
src/sys/dev/usb [nick-nhusb]: TODO.usbmp ulpt.c

Log Message:
Remove tsleep from ulpt(4)


To generate a diff of this commit:
cvs rdiff -u -r1.8.4.6 -r1.8.4.7 src/sys/dev/usb/TODO.usbmp
cvs rdiff -u -r1.95.4.11 -r1.95.4.12 src/sys/dev/usb/ulpt.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/TODO.usbmp
diff -u src/sys/dev/usb/TODO.usbmp:1.8.4.6 src/sys/dev/usb/TODO.usbmp:1.8.4.7
--- src/sys/dev/usb/TODO.usbmp:1.8.4.6	Sat Jan 28 09:43:28 2017
+++ src/sys/dev/usb/TODO.usbmp	Sat Jan 28 10:05:09 2017
@@ -1,4 +1,4 @@
-$NetBSD: TODO.usbmp,v 1.8.4.6 2017/01/28 09:43:28 skrll Exp $
+$NetBSD: TODO.usbmp,v 1.8.4.7 2017/01/28 10:05:09 skrll Exp $
 
 
 the majority of the USB MP device interface is documented in usbdivar.h.
@@ -103,7 +103,6 @@ wakeup/tsleep drivers:
   - udsir.c
   - uirda.c
   - umass_isdata.c
-  - ulpt.c
   - ustir.c
   - uthum.c
   - uyurex.c

Index: src/sys/dev/usb/ulpt.c
diff -u src/sys/dev/usb/ulpt.c:1.95.4.11 src/sys/dev/usb/ulpt.c:1.95.4.12
--- src/sys/dev/usb/ulpt.c:1.95.4.11	Mon Dec  5 10:55:18 2016
+++ src/sys/dev/usb/ulpt.c	Sat Jan 28 10:05:09 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ulpt.c,v 1.95.4.11 2016/12/05 10:55:18 skrll Exp $	*/
+/*	$NetBSD: ulpt.c,v 1.95.4.12 2017/01/28 10:05:09 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ulpt.c,v 1.95.4.11 2016/12/05 10:55:18 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ulpt.c,v 1.95.4.12 2017/01/28 10:05:09 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -465,7 +465,7 @@ ulptopen(dev_t dev, int flag, int mode, 
 		}
 
 		/* wait 1/4 second, give up if we get a signal */
-		error = tsleep((void *)sc, LPTPRI | PCATCH, "ulptop", STEP);
+		error = kpause("ulptop", true, STEP, NULL);
 		if (error != EWOULDBLOCK) {
 			sc->sc_state = 0;
 			goto done;
@@ -704,7 +704,7 @@ ulpt_do_read(struct ulpt_softc *sc, stru
 		}
 
 		/*
-		 * XXX Even with the short timeout, this will tsleep,
+		 * XXX Even with the short timeout, this will sleep,
 		 * but it should be adequately prompt in practice.
 		 */
 		n = nreq;
@@ -748,7 +748,7 @@ ulpt_do_read(struct ulpt_softc *sc, stru
 
 		case USBD_INTERRUPTED:
 			/*
-			 * The tsleep in usbd_bulk_transfer was
+			 * The sleep in usbd_bulk_transfer was
 			 * interrupted.  Reflect it to the caller so
 			 * that reading can be interrupted.
 			 */



CVS commit: [nick-nhusb] src/sys/dev/usb

2017-01-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan 28 09:43:28 UTC 2017

Modified Files:
src/sys/dev/usb [nick-nhusb]: TODO.usbmp uvscom.c

Log Message:
Remove tsleep from uvscom(4)


To generate a diff of this commit:
cvs rdiff -u -r1.8.4.5 -r1.8.4.6 src/sys/dev/usb/TODO.usbmp
cvs rdiff -u -r1.28.16.9 -r1.28.16.10 src/sys/dev/usb/uvscom.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/TODO.usbmp
diff -u src/sys/dev/usb/TODO.usbmp:1.8.4.5 src/sys/dev/usb/TODO.usbmp:1.8.4.6
--- src/sys/dev/usb/TODO.usbmp:1.8.4.5	Wed Dec 14 22:09:21 2016
+++ src/sys/dev/usb/TODO.usbmp	Sat Jan 28 09:43:28 2017
@@ -1,4 +1,4 @@
-$NetBSD: TODO.usbmp,v 1.8.4.5 2016/12/14 22:09:21 skrll Exp $
+$NetBSD: TODO.usbmp,v 1.8.4.6 2017/01/28 09:43:28 skrll Exp $
 
 
 the majority of the USB MP device interface is documented in usbdivar.h.
@@ -106,7 +106,6 @@ wakeup/tsleep drivers:
   - ulpt.c
   - ustir.c
   - uthum.c
-  - uvscom.c
   - uyurex.c
 
 missing D_MPSAFE drivers:

Index: src/sys/dev/usb/uvscom.c
diff -u src/sys/dev/usb/uvscom.c:1.28.16.9 src/sys/dev/usb/uvscom.c:1.28.16.10
--- src/sys/dev/usb/uvscom.c:1.28.16.9	Mon Dec  5 10:55:20 2016
+++ src/sys/dev/usb/uvscom.c	Sat Jan 28 09:43:28 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvscom.c,v 1.28.16.9 2016/12/05 10:55:20 skrll Exp $	*/
+/*	$NetBSD: uvscom.c,v 1.28.16.10 2017/01/28 09:43:28 skrll Exp $	*/
 /*-
  * Copyright (c) 2001-2002, Shunsuke Akiyama .
  * All rights reserved.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvscom.c,v 1.28.16.9 2016/12/05 10:55:20 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvscom.c,v 1.28.16.10 2017/01/28 09:43:28 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -759,7 +759,7 @@ uvscom_open(void *addr, int portno)
 		/* unit is not ready */
 
 		for (i = UVSCOM_UNIT_WAIT; i > 0; --i) {
-			tsleep(&err, TTIPRI, "uvsop", hz);	/* XXX */
+			kpause("uvsopen", false, hz, NULL);
 			if (ISSET(sc->sc_usr, UVSCOM_USTAT_MASK))
 break;
 		}