CVS commit: src/sys/netipsec

2017-05-21 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon May 22 04:40:23 UTC 2017

Modified Files:
src/sys/netipsec: key.c

Log Message:
KNF

And avoid calling a function, assigning a result to a variable, and
comparing it all together in one condition expression.


To generate a diff of this commit:
cvs rdiff -u -r1.136 -r1.137 src/sys/netipsec/key.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/netipsec/key.c
diff -u src/sys/netipsec/key.c:1.136 src/sys/netipsec/key.c:1.137
--- src/sys/netipsec/key.c:1.136	Mon May 22 04:23:55 2017
+++ src/sys/netipsec/key.c	Mon May 22 04:40:23 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: key.c,v 1.136 2017/05/22 04:23:55 ozaki-r Exp $	*/
+/*	$NetBSD: key.c,v 1.137 2017/05/22 04:40:23 ozaki-r Exp $	*/
 /*	$FreeBSD: src/sys/netipsec/key.c,v 1.3.2.3 2004/02/14 22:23:23 bms Exp $	*/
 /*	$KAME: key.c,v 1.191 2001/06/27 10:46:49 sakane Exp $	*/
 
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.136 2017/05/22 04:23:55 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.137 2017/05/22 04:40:23 ozaki-r Exp $");
 
 /*
  * This code is referd to RFC 2367
@@ -981,7 +981,7 @@ key_do_allocsa_policy(struct secashead *
 		/* What the best method is to compare ? */
 		if (key_prefered_oldsa) {
 			if (candidate->lft_c->sadb_lifetime_addtime >
-	sav->lft_c->sadb_lifetime_addtime) {
+			sav->lft_c->sadb_lifetime_addtime) {
 candidate = sav;
 			}
 			continue;
@@ -990,7 +990,7 @@ key_do_allocsa_policy(struct secashead *
 
 		/* prefered new sa rather than old sa */
 		if (candidate->lft_c->sadb_lifetime_addtime <
-sav->lft_c->sadb_lifetime_addtime) {
+		sav->lft_c->sadb_lifetime_addtime) {
 			d = candidate;
 			candidate = sav;
 		} else
@@ -1021,18 +1021,18 @@ key_do_allocsa_policy(struct secashead *
 
 			/* set sadb_address for saidx's. */
 			m = key_setsadbaddr(SADB_EXT_ADDRESS_SRC,
->sah->saidx.src.sa,
-d->sah->saidx.src.sa.sa_len << 3,
-IPSEC_ULPROTO_ANY);
+			>sah->saidx.src.sa,
+			d->sah->saidx.src.sa.sa_len << 3,
+			IPSEC_ULPROTO_ANY);
 			if (!m)
 goto msgfail;
 			m_cat(result, m);
 
 			/* set sadb_address for saidx's. */
 			m = key_setsadbaddr(SADB_EXT_ADDRESS_DST,
->sah->saidx.src.sa,
-d->sah->saidx.src.sa.sa_len << 3,
-IPSEC_ULPROTO_ANY);
+			>sah->saidx.src.sa,
+			d->sah->saidx.src.sa.sa_len << 3,
+			IPSEC_ULPROTO_ANY);
 			if (!m)
 goto msgfail;
 			m_cat(result, m);
@@ -1045,7 +1045,7 @@ key_do_allocsa_policy(struct secashead *
 
 			if (result->m_len < sizeof(struct sadb_msg)) {
 result = m_pullup(result,
-		sizeof(struct sadb_msg));
+sizeof(struct sadb_msg));
 if (result == NULL)
 	goto msgfail;
 			}
@@ -1054,10 +1054,9 @@ key_do_allocsa_policy(struct secashead *
 			for (m = result; m; m = m->m_next)
 result->m_pkthdr.len += m->m_len;
 			mtod(result, struct sadb_msg *)->sadb_msg_len =
-PFKEY_UNIT64(result->m_pkthdr.len);
+			PFKEY_UNIT64(result->m_pkthdr.len);
 
-			key_sendup_mbuf(NULL, result,
-	KEY_SENDUP_REGISTERED);
+			key_sendup_mbuf(NULL, result, KEY_SENDUP_REGISTERED);
 			result = 0;
 		 msgfail:
 			if (result)
@@ -1467,7 +1466,8 @@ key_msg2sp(const struct sadb_x_policy *x
 		return NULL;
 	}
 
-	if ((newsp = KEY_NEWSP()) == NULL) {
+	newsp = KEY_NEWSP();
+	if (newsp == NULL) {
 		*error = ENOBUFS;
 		return NULL;
 	}
@@ -1574,8 +1574,8 @@ key_msg2sp(const struct sadb_x_policy *x
 
 			/* allocate new reqid id if reqid is zero. */
 			if (xisr_reqid == 0) {
-u_int16_t reqid;
-if ((reqid = key_newreqid()) == 0) {
+u_int16_t reqid = key_newreqid();
+if (reqid == 0) {
 	*error = ENOBUFS;
 	goto free_exit;
 }
@@ -1601,8 +1601,7 @@ key_msg2sp(const struct sadb_x_policy *x
 			paddr = (const struct sockaddr *)(xisr + 1);
 
 			/* validity check */
-			if (paddr->sa_len
-			> sizeof((*p_isr)->saidx.src)) {
+			if (paddr->sa_len > sizeof((*p_isr)->saidx.src)) {
 IPSECLOG(LOG_DEBUG, "invalid request "
 "address length.\n");
 *error = EINVAL;
@@ -1611,11 +1610,10 @@ key_msg2sp(const struct sadb_x_policy *x
 			memcpy(&(*p_isr)->saidx.src, paddr, paddr->sa_len);
 
 			paddr = (const struct sockaddr *)((const char *)paddr
-		+ paddr->sa_len);
+			+ paddr->sa_len);
 
 			/* validity check */
-			if (paddr->sa_len
-			> sizeof((*p_isr)->saidx.dst)) {
+			if (paddr->sa_len > sizeof((*p_isr)->saidx.dst)) {
 IPSECLOG(LOG_DEBUG, "invalid request "
 "address length.\n");
 *error = EINVAL;
@@ -1638,8 +1636,8 @@ key_msg2sp(const struct sadb_x_policy *x
 			goto free_exit;
 		}
 
-		xisr = (const struct sadb_x_ipsecrequest *)((const char *)xisr
- + xisr->sadb_x_ipsecrequest_len);
+		xisr = (const struct sadb_x_ipsecrequest *)((const char *)xisr +
+		xisr->sadb_x_ipsecrequest_len);
 	}
 }
 
@@ -1656,8 +1654,8 @@ key_newreqid(void)
 {
 	

CVS commit: src/sys/netipsec

2017-05-21 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon May 22 04:23:55 UTC 2017

Modified Files:
src/sys/netipsec: key.c

Log Message:
Replace remaining DPRINTF with IPSECLOG


To generate a diff of this commit:
cvs rdiff -u -r1.135 -r1.136 src/sys/netipsec/key.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/netipsec/key.c
diff -u src/sys/netipsec/key.c:1.135 src/sys/netipsec/key.c:1.136
--- src/sys/netipsec/key.c:1.135	Fri May 19 06:32:31 2017
+++ src/sys/netipsec/key.c	Mon May 22 04:23:55 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: key.c,v 1.135 2017/05/19 06:32:31 ozaki-r Exp $	*/
+/*	$NetBSD: key.c,v 1.136 2017/05/22 04:23:55 ozaki-r Exp $	*/
 /*	$FreeBSD: src/sys/netipsec/key.c,v 1.3.2.3 2004/02/14 22:23:23 bms Exp $	*/
 /*	$KAME: key.c,v 1.191 2001/06/27 10:46:49 sakane Exp $	*/
 
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.135 2017/05/19 06:32:31 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.136 2017/05/22 04:23:55 ozaki-r Exp $");
 
 /*
  * This code is referd to RFC 2367
@@ -5993,8 +5993,7 @@ key_getsizes_ah(const struct auth_hash *
 		case SADB_X_AALG_SHA:	*ksmin = *ksmax = 20; break;
 		case SADB_X_AALG_NULL:	*ksmin = 0; *ksmax = 256; break;
 		default:
-			DPRINTF(("key_getsizes_ah: unknown AH algorithm %u\n",
-alg));
+			IPSECLOG(LOG_DEBUG, "unknown AH algorithm %u\n", alg);
 			break;
 		}
 	}



CVS commit: src/external/bsd/libarchive

2017-05-21 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sun May 21 22:32:56 UTC 2017

Modified Files:
src/external/bsd/libarchive/include: config_netbsd.h
src/external/bsd/libarchive/lib/libarchive: Makefile

Log Message:
Simplify linking libarchive with libcrypto


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/libarchive/include/config_netbsd.h
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/libarchive/lib/libarchive/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/bsd/libarchive/include/config_netbsd.h
diff -u src/external/bsd/libarchive/include/config_netbsd.h:1.8 src/external/bsd/libarchive/include/config_netbsd.h:1.9
--- src/external/bsd/libarchive/include/config_netbsd.h:1.8	Sat Apr 22 15:12:59 2017
+++ src/external/bsd/libarchive/include/config_netbsd.h	Sun May 21 22:32:55 2017
@@ -606,7 +606,7 @@
 /* #undef HAVE_LIBCHARSET */
 
 /* Define to 1 if you have the `crypto' library (-lcrypto). */
-/* #undef1 HAVE_LIBCRYPTO */
+#define HAVE_LIBCRYPTO 1
 
 /* Define to 1 if you have the `eay32' library (-leay32). */
 /* #undef HAVE_LIBEAY32 */

Index: src/external/bsd/libarchive/lib/libarchive/Makefile
diff -u src/external/bsd/libarchive/lib/libarchive/Makefile:1.6 src/external/bsd/libarchive/lib/libarchive/Makefile:1.7
--- src/external/bsd/libarchive/lib/libarchive/Makefile:1.6	Sun May 21 15:28:39 2017
+++ src/external/bsd/libarchive/lib/libarchive/Makefile	Sun May 21 22:32:56 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2017/05/21 15:28:39 riastradh Exp $
+#	$NetBSD: Makefile,v 1.7 2017/05/21 22:32:56 kamil Exp $
 
 .include 
 
@@ -6,10 +6,9 @@
 
 LIB=		archive
 
-LIBDPLIBS+=	crypto	${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libcrypto
-CPPFLAGS+=	-DHAVE_LIBCRYPTO
 
 LIBDPLIBS+=	bz2	${NETBSDSRCDIR}/lib/libbz2 \
+		crypto	${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libcrypto \
 		expat	${NETBSDSRCDIR}/external/mit/expat/lib/libexpat \
 		lzma	${NETBSDSRCDIR}/external/public-domain/xz/lib \
 		z	${NETBSDSRCDIR}/lib/libz



CVS commit: src

2017-05-21 Thread Abhinav Upadhyay
Module Name:src
Committed By:   abhinav
Date:   Sun May 21 19:07:29 UTC 2017

Modified Files:
src/distrib/sets/lists/comp: mi
src/share/man/man9: Makefile

Log Message:
Add MLINKS for the functions described in bufq(9)


To generate a diff of this commit:
cvs rdiff -u -r1.2135 -r1.2136 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.413 -r1.414 src/share/man/man9/Makefile

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.2135 src/distrib/sets/lists/comp/mi:1.2136
--- src/distrib/sets/lists/comp/mi:1.2135	Sun May 21 15:28:37 2017
+++ src/distrib/sets/lists/comp/mi	Sun May 21 19:07:29 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2135 2017/05/21 15:28:37 riastradh Exp $
+#	$NetBSD: mi,v 1.2136 2017/05/21 19:07:29 abhinav Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.compcomp-sys-root
@@ -10180,6 +10180,19 @@
 ./usr/share/man/cat9/buffercache.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/bufferio.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/bufq.0			comp-sys-catman		.cat
+./usr/share/man/cat9/bufq_alloc.0			comp-sys-catman		.cat
+./usr/share/man/cat9/bufq_cancel.0			comp-sys-catman		.cat
+./usr/share/man/cat9/bufq_drain.0			comp-sys-catman		.cat
+./usr/share/man/cat9/bufq_free.0			comp-sys-catman		.cat
+./usr/share/man/cat9/bufq_get.0			comp-sys-catman		.cat
+./usr/share/man/cat9/bufq_getstrategyname.0			comp-sys-catman		.cat
+./usr/share/man/cat9/bufq_init.0			comp-sys-catman		.cat
+./usr/share/man/cat9/bufq_move.0			comp-sys-catman		.cat
+./usr/share/man/cat9/bufq_peek.0			comp-sys-catman		.cat
+./usr/share/man/cat9/bufq_put.0			comp-sys-catman		.cat
+./usr/share/man/cat9/bufq_register.0			comp-sys-catman		.cat
+./usr/share/man/cat9/bufq_state.0			comp-sys-catman		.cat
+./usr/share/man/cat9/bufq_unregister.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/bus_dma.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/bus_dmamap_create.0	comp-sys-catman		.cat
 ./usr/share/man/cat9/bus_dmamap_destroy.0	comp-sys-catman		.cat
@@ -17653,6 +17666,19 @@
 ./usr/share/man/html9/buffercache.html		comp-sys-htmlman	html
 ./usr/share/man/html9/bufferio.html		comp-sys-htmlman	html
 ./usr/share/man/html9/bufq.html			comp-sys-htmlman	html
+./usr/share/man/html9/bufq_alloc.html			comp-sys-htmlman	html
+./usr/share/man/html9/bufq_cancel.html			comp-sys-htmlman	html
+./usr/share/man/html9/bufq_drain.html			comp-sys-htmlman	html
+./usr/share/man/html9/bufq_free.html			comp-sys-htmlman	html
+./usr/share/man/html9/bufq_get.html			comp-sys-htmlman	html
+./usr/share/man/html9/bufq_getstrategyname.html			comp-sys-htmlman	html
+./usr/share/man/html9/bufq_init.html			comp-sys-htmlman	html
+./usr/share/man/html9/bufq_move.html			comp-sys-htmlman	html
+./usr/share/man/html9/bufq_peek.html			comp-sys-htmlman	html
+./usr/share/man/html9/bufq_put.html			comp-sys-htmlman	html
+./usr/share/man/html9/bufq_register.html			comp-sys-htmlman	html
+./usr/share/man/html9/bufq_state.html			comp-sys-htmlman	html
+./usr/share/man/html9/bufq_unregister.html			comp-sys-htmlman	html
 ./usr/share/man/html9/bus_dma.html		comp-sys-htmlman	html
 ./usr/share/man/html9/bus_dmamap_create.html	comp-sys-htmlman	html
 ./usr/share/man/html9/bus_dmamap_destroy.html	comp-sys-htmlman	html
@@ -25230,6 +25256,19 @@
 ./usr/share/man/man9/buffercache.9		comp-sys-man		.man
 ./usr/share/man/man9/bufferio.9			comp-sys-man		.man
 ./usr/share/man/man9/bufq.9			comp-sys-man		.man
+./usr/share/man/man9/bufq_alloc.9			comp-sys-man		.man
+./usr/share/man/man9/bufq_cancel.9			comp-sys-man		.man
+./usr/share/man/man9/bufq_drain.9			comp-sys-man		.man
+./usr/share/man/man9/bufq_free.9			comp-sys-man		.man
+./usr/share/man/man9/bufq_get.9			comp-sys-man		.man
+./usr/share/man/man9/bufq_getstrategyname.9			comp-sys-man		.man
+./usr/share/man/man9/bufq_init.9			comp-sys-man		.man
+./usr/share/man/man9/bufq_move.9			comp-sys-man		.man
+./usr/share/man/man9/bufq_peek.9			comp-sys-man		.man
+./usr/share/man/man9/bufq_put.9			comp-sys-man		.man
+./usr/share/man/man9/bufq_register.9			comp-sys-man		.man
+./usr/share/man/man9/bufq_state.9			comp-sys-man		.man
+./usr/share/man/man9/bufq_unregister.9			comp-sys-man		.man
 ./usr/share/man/man9/bus_dma.9			comp-sys-man		.man
 ./usr/share/man/man9/bus_dmamap_create.9	comp-sys-man		.man
 ./usr/share/man/man9/bus_dmamap_destroy.9	comp-sys-man		.man

Index: src/share/man/man9/Makefile
diff -u src/share/man/man9/Makefile:1.413 src/share/man/man9/Makefile:1.414
--- src/share/man/man9/Makefile:1.413	Fri May 19 03:33:31 2017
+++ src/share/man/man9/Makefile	Sun May 21 19:07:29 2017
@@ -1,4 +1,4 @@
-#   $NetBSD: Makefile,v 1.413 2017/05/19 03:33:31 pgoyette Exp $
+#   $NetBSD: Makefile,v 1.414 2017/05/21 19:07:29 abhinav Exp $
 
 #	Makefile for section 9 (kernel function and variable) manual pages.
 
@@ -151,6 

CVS commit: src/games/wargames

2017-05-21 Thread Leonardo Taccari
Module Name:src
Committed By:   leot
Date:   Sun May 21 16:47:27 UTC 2017

Modified Files:
src/games/wargames: wargames.sh

Log Message:
Permit Prof. Steven Falcon [sic] to play hals_end(6) (or, more
seriously: also permit games that contain underscores to be invoked
via wargames(6))


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/games/wargames/wargames.sh

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

Modified files:

Index: src/games/wargames/wargames.sh
diff -u src/games/wargames/wargames.sh:1.4 src/games/wargames/wargames.sh:1.5
--- src/games/wargames/wargames.sh:1.4	Wed Sep 19 04:54:06 2001
+++ src/games/wargames/wargames.sh	Sun May 21 16:47:26 2017
@@ -1,5 +1,5 @@
 #!/bin/sh -
-#	$NetBSD: wargames.sh,v 1.4 2001/09/19 04:54:06 lukem Exp $
+#	$NetBSD: wargames.sh,v 1.5 2017/05/21 16:47:26 leot Exp $
 #
 # Copyright (c) 1985, 1993
 #	The Regents of the University of California.  All rights reserved.
@@ -37,7 +37,7 @@
 echo -n "Would you like to play a game? "
 read x
 
-x=`echo $x | sed 's/[^a-z0-9]//g'`
+x=`echo $x | sed 's/[^a-z0-9_]//g'`
 
 if [ -f /usr/games/$x ] ; then
 	tput cl



CVS commit: src/doc

2017-05-21 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun May 21 15:36:37 UTC 2017

Modified Files:
src/doc: CHANGES

Log Message:
Note removal of MKCRYPTO_RC5 and MKCRYPTO.


To generate a diff of this commit:
cvs rdiff -u -r1.2283 -r1.2284 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.2283 src/doc/CHANGES:1.2284
--- src/doc/CHANGES:1.2283	Fri May 19 00:01:33 2017
+++ src/doc/CHANGES	Sun May 21 15:36:37 2017
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2283 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2284 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -514,3 +514,7 @@ Changes from NetBSD 7.0 to NetBSD 8.0:
 	dhcpcd: Import dhcpcd 7.0.0-rc1 [roy 20170510]
 	vioscsi(4): Stability fixes [jdolecek 20170515]
 	localcount(9): Add localcount ref-count primitives [pgoyette 20170519]
+	openssl: Remove MKCRYPTO_RC5 option now that the patents have expired.
+		[riastradh 20170521]
+	src: Remove MKCRYPTO option and always include cryptography.
+		[riastradh 20170521]



CVS commit: src

2017-05-21 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun May 21 15:30:20 UTC 2017

Modified Files:
src: BUILDING

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.127 -r1.128 src/BUILDING

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

Modified files:

Index: src/BUILDING
diff -u src/BUILDING:1.127 src/BUILDING:1.128
--- src/BUILDING:1.127	Sat Apr 22 07:48:33 2017
+++ src/BUILDING	Sun May 21 15:30:20 2017
@@ -246,14 +246,6 @@ CONFIGURATION
 
  Default: "no"
 
- MKCRYPTOCan be set to "yes" or "no".  Indicates whether cryptographic
- code will be included in a build; provided for the benefit of
- countries that do not allow strong cryptography.  Will not
- affect use of the standard low-security password encryption
- system, crypt(3).
-
- Default: "yes"
-
  MKDEBUG Can be set to "yes" or "no".  Indicates whether debug
  information should be generated for all userland binaries
  compiled.  The result is collected as an additional debug.tgz



CVS commit: src

2017-05-21 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun May 21 14:24:05 UTC 2017

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto: idea.inc mdc2.inc
src/share/man/man3: intro.3
src/share/mk: bsd.README bsd.prog.mk

Log Message:
Remove some vestiges of MKCRYPTO_IDEA/MKCRYPTO_MDC2.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/lib/libcrypto/idea.inc \
src/crypto/external/bsd/openssl/lib/libcrypto/mdc2.inc
cvs rdiff -u -r1.32 -r1.33 src/share/man/man3/intro.3
cvs rdiff -u -r1.360 -r1.361 src/share/mk/bsd.README
cvs rdiff -u -r1.305 -r1.306 src/share/mk/bsd.prog.mk

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/openssl/lib/libcrypto/idea.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/idea.inc:1.3 src/crypto/external/bsd/openssl/lib/libcrypto/idea.inc:1.4
--- src/crypto/external/bsd/openssl/lib/libcrypto/idea.inc:1.3	Thu Jul 12 18:44:49 2012
+++ src/crypto/external/bsd/openssl/lib/libcrypto/idea.inc	Sun May 21 14:24:05 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: idea.inc,v 1.3 2012/07/12 18:44:49 christos Exp $
+#	$NetBSD: idea.inc,v 1.4 2017/05/21 14:24:05 riastradh Exp $
 #
 #	@(#) Copyright (c) 1995 Simon J. Gerraty
 #
@@ -9,8 +9,6 @@
 
 
 IDEA_SRCS = i_cfb64.c i_ofb64.c i_ecb.c
-# IDEA is a patented algorithm; abort().
-# see ../libcrypto_idea
 SRCS+=${IDEA_SRCS} i_cbc.c i_skey.c
 
 .for cryptosrc in ${IDEA_SRCS}
Index: src/crypto/external/bsd/openssl/lib/libcrypto/mdc2.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/mdc2.inc:1.3 src/crypto/external/bsd/openssl/lib/libcrypto/mdc2.inc:1.4
--- src/crypto/external/bsd/openssl/lib/libcrypto/mdc2.inc:1.3	Thu Jul 12 18:44:49 2012
+++ src/crypto/external/bsd/openssl/lib/libcrypto/mdc2.inc	Sun May 21 14:24:05 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: mdc2.inc,v 1.3 2012/07/12 18:44:49 christos Exp $
+#	$NetBSD: mdc2.inc,v 1.4 2017/05/21 14:24:05 riastradh Exp $
 #
 #	@(#) Copyright (c) 1995 Simon J. Gerraty
 #
@@ -9,8 +9,6 @@
 
 
 MDC2_SRCS = mdc2_one.c
-# MDC2 is a patented algorithm; abort().
-# see ../libcrypto_mdc2
 SRCS+=	${MDC2_SRCS} mdc2dgst.c
 
 .for cryptosrc in ${MDC2_SRCS}

Index: src/share/man/man3/intro.3
diff -u src/share/man/man3/intro.3:1.32 src/share/man/man3/intro.3:1.33
--- src/share/man/man3/intro.3:1.32	Sun May 21 14:20:45 2017
+++ src/share/man/man3/intro.3	Sun May 21 14:24:05 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: intro.3,v 1.32 2017/05/21 14:20:45 riastradh Exp $
+.\"	$NetBSD: intro.3,v 1.33 2017/05/21 14:24:05 riastradh Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -125,10 +125,6 @@ See
 The OpenSSL cryptographic library.
 See
 .Xr crypto 3 .
-.It Em libcrypto_idea Pq Fl l Ns Ar crypto_idea
-The OpenSSL cryptographic library routines for the IDEA algorithm.
-This algorithm is separated from libcrypto since the IDEA algorithm is
-protected by patents and its use is restricted.
 .It Em libcurses Pq Fl l Ns Ar curses Fl l Ns Ar terminfo
 Terminal independent screen management routines
 for two dimensional non-bitmap display terminals.

Index: src/share/mk/bsd.README
diff -u src/share/mk/bsd.README:1.360 src/share/mk/bsd.README:1.361
--- src/share/mk/bsd.README:1.360	Sun May 21 14:20:45 2017
+++ src/share/mk/bsd.README	Sun May 21 14:24:05 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.README,v 1.360 2017/05/21 14:20:45 riastradh Exp $
+#	$NetBSD: bsd.README,v 1.361 2017/05/21 14:24:05 riastradh Exp $
 #	@(#)bsd.README	8.2 (Berkeley) 4/2/94
 
 This is the README file for the make "include" files for the NetBSD
@@ -1563,8 +1563,6 @@ DPADD		Additional dependencies for the p
 		LIBCRTI?=	${DESTDIR}/usr/lib/crti.o
 		LIBCRYPT?=	${DESTDIR}/usr/lib/libcrypt.a
 		LIBCRYPTO?=	${DESTDIR}/usr/lib/libcrypto.a
-		LIBCRYPTO_IDEA?=${DESTDIR}/usr/lib/libcrypto_idea.a
-		LIBCRYPTO_MDC2?=${DESTDIR}/usr/lib/libcrypto_mdc2.a
 		LIBCURSES?=	${DESTDIR}/usr/lib/libcurses.a
 		LIBC_PIC?=	${DESTDIR}/usr/lib/libc_pic.a
 		LIBDBM?=	${DESTDIR}/usr/lib/libdbm.a

Index: src/share/mk/bsd.prog.mk
diff -u src/share/mk/bsd.prog.mk:1.305 src/share/mk/bsd.prog.mk:1.306
--- src/share/mk/bsd.prog.mk:1.305	Sun May 21 14:20:45 2017
+++ src/share/mk/bsd.prog.mk	Sun May 21 14:24:05 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.prog.mk,v 1.305 2017/05/21 14:20:45 riastradh Exp $
+#	$NetBSD: bsd.prog.mk,v 1.306 2017/05/21 14:24:05 riastradh Exp $
 #	@(#)bsd.prog.mk	8.2 (Berkeley) 4/2/94
 
 .ifndef HOSTPROG
@@ -114,8 +114,6 @@ LIBCRTI=	${DESTDIR}/usr/lib/${MLIBDIR:D$
 	compat \
 	crypt \
 	crypto \
-	crypto_idea \
-	crypto_mdc2 \
 	curses \
 	cxx \
 	dbm \



CVS commit: src

2017-05-21 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun May 21 14:20:45 UTC 2017

Modified Files:
src/crypto/external/bsd/openssl/bin: Makefile
src/crypto/external/bsd/openssl/lib: Makefile
src/crypto/external/bsd/openssl/lib/libcrypto: rc5.inc
src/distrib/sets/lists/base: shl.mi
src/distrib/sets/lists/comp: mi shl.mi
src/distrib/sets/lists/debug: mi shl.mi
src/distrib/sets/lists/tests: mi
src/share/man/man3: intro.3
src/share/man/man5: mk.conf.5
src/share/mk: bsd.README bsd.own.mk bsd.prog.mk
src/tests/crypto/libcrypto: Makefile t_ciphers.sh
src/tests/crypto/libcrypto/rc5: Makefile
src/usr.sbin/racoon: Makefile
Removed Files:
src/crypto/external/bsd/openssl/lib/libcrypto: rc5_enc_dummy.c
rc5_skey_dummy.c
src/crypto/external/bsd/openssl/lib/libcrypto_rc5: Makefile
shlib_version

Log Message:
Remove MKCRYPTO_RC5.  Unconditionally include RC5 in libcrypto.so.

This option existed only because RC5 is covered by patents that, twenty
years ago, we had reason to suspect the patent holder, RSA, Inc., might
litigate.  The two US patents in question are 5,724,428 and 5,835,600.

According to the USPTO Patent Term Calculator web site at

(retrieved 2017-05-21), patents filed after 1995-06-07 expire twenty
years after the filing date.

number  filing date
5,724,428   1995-11-01
5,835,600   1997-04-21

Thus, these patents appear to be expired.

As proposed on tech-crypto and tech-security:

https://mail-index.netbsd.org/tech-crypto/2017/05/05/msg000718.html
https://mail-index.netbsd.org/tech-security/2017/05/05/msg000927.html


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/crypto/external/bsd/openssl/bin/Makefile
cvs rdiff -u -r1.2 -r1.3 src/crypto/external/bsd/openssl/lib/Makefile
cvs rdiff -u -r1.1 -r1.2 \
src/crypto/external/bsd/openssl/lib/libcrypto/rc5.inc
cvs rdiff -u -r1.2 -r0 \
src/crypto/external/bsd/openssl/lib/libcrypto/rc5_enc_dummy.c \
src/crypto/external/bsd/openssl/lib/libcrypto/rc5_skey_dummy.c
cvs rdiff -u -r1.3 -r0 \
src/crypto/external/bsd/openssl/lib/libcrypto_rc5/Makefile \
src/crypto/external/bsd/openssl/lib/libcrypto_rc5/shlib_version
cvs rdiff -u -r1.814 -r1.815 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.2133 -r1.2134 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.303 -r1.304 src/distrib/sets/lists/comp/shl.mi
cvs rdiff -u -r1.208 -r1.209 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.173 -r1.174 src/distrib/sets/lists/debug/shl.mi
cvs rdiff -u -r1.744 -r1.745 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.31 -r1.32 src/share/man/man3/intro.3
cvs rdiff -u -r1.74 -r1.75 src/share/man/man5/mk.conf.5
cvs rdiff -u -r1.359 -r1.360 src/share/mk/bsd.README
cvs rdiff -u -r1.1007 -r1.1008 src/share/mk/bsd.own.mk
cvs rdiff -u -r1.304 -r1.305 src/share/mk/bsd.prog.mk
cvs rdiff -u -r1.9 -r1.10 src/tests/crypto/libcrypto/Makefile
cvs rdiff -u -r1.4 -r1.5 src/tests/crypto/libcrypto/t_ciphers.sh
cvs rdiff -u -r1.3 -r1.4 src/tests/crypto/libcrypto/rc5/Makefile
cvs rdiff -u -r1.29 -r1.30 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/crypto/external/bsd/openssl/bin/Makefile
diff -u src/crypto/external/bsd/openssl/bin/Makefile:1.6 src/crypto/external/bsd/openssl/bin/Makefile:1.7
--- src/crypto/external/bsd/openssl/bin/Makefile:1.6	Fri Jul 13 19:32:51 2012
+++ src/crypto/external/bsd/openssl/bin/Makefile	Sun May 21 14:20:44 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2012/07/13 19:32:51 christos Exp $
+#	$NetBSD: Makefile,v 1.7 2017/05/21 14:20:44 riastradh Exp $
 
 WARNS?=	2	# XXX -Wcast-qual
 
@@ -10,7 +10,7 @@ BINDIR=/usr/bin
 USE_FORT?= yes	# cryptographic software
 
 # RCSid:
-#	$Id: Makefile,v 1.6 2012/07/13 19:32:51 christos Exp $
+#	$Id: Makefile,v 1.7 2017/05/21 14:20:44 riastradh Exp $
 #
 #	@(#) Copyright (c) 1995 Simon J. Gerraty
 #
@@ -40,16 +40,6 @@ SRCS+=	verify.c asn1pars.c req.c dgst.c 
 
 CPPFLAGS+= -DMONOLITH -DUSE_SSL -I${OPENSSLSRC}
 
-# with normal OpenSSL, OPENSSL_NO_RC5 changes ABI due to change in
-# struct/union.  we nuked it in our header files and it is now safe.
-.if ${MKCRYPTO_RC5} == "no"
-CPPFLAGS+= -DOPENSSL_NO_RC5
-.else
-LDADD+=	-lcrypto_rc5
-DPADD+=	${LIBCRYPTO_RC5}
-.endif
-
-# this must be _after_ the libcrypto_rc5/libcrypto_idea entries.
 LDADD+=	-lssl -lcrypto -lcrypt
 DPADD+=	${LIBSSL} ${LIBCRYPTO} ${LIBCRYPT}
 

Index: src/crypto/external/bsd/openssl/lib/Makefile
diff -u src/crypto/external/bsd/openssl/lib/Makefile:1.2 src/crypto/external/bsd/openssl/lib/Makefile:1.3
--- src/crypto/external/bsd/openssl/lib/Makefile:1.2	Wed Jul 11 18:50:23 2012
+++ src/crypto/external/bsd/openssl/lib/Makefile	Sun May 21 14:20:44 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: 

CVS commit: src/share/man/man4

2017-05-21 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun May 21 09:13:46 UTC 2017

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

Log Message:
Remove superfluous Pp.


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

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

Modified files:

Index: src/share/man/man4/ipsec.4
diff -u src/share/man/man4/ipsec.4:1.40 src/share/man/man4/ipsec.4:1.41
--- src/share/man/man4/ipsec.4:1.40	Mon Mar  6 17:19:21 2017
+++ src/share/man/man4/ipsec.4	Sun May 21 09:13:46 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ipsec.4,v 1.40 2017/03/06 17:19:21 snj Exp $
+.\"	$NetBSD: ipsec.4,v 1.41 2017/05/21 09:13:46 wiz Exp $
 .\"	$KAME: ipsec.4,v 1.17 2001/06/27 15:25:10 itojun Exp $
 .\"
 .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -46,7 +46,6 @@ and
 .Pc .
 .Nm
 consists of two sub-protocols:
-.Pp
 .Bl -hang
 .It Em Encapsulated Security Payload Pq ESP
 protects IP payloads from wire-tapping (interception) by encrypting them with
@@ -59,7 +58,6 @@ by attaching cryptographic checksums com
 .Pp
 .Nm
 has two operation modes:
-.Pp
 .Bl -hang
 .It Em Transport mode
 is for protecting peer-to-peer communication between end nodes.



CVS commit: src/share/man/man4

2017-05-21 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun May 21 09:12:19 UTC 2017

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

Log Message:
Fix xref.


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

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

Modified files:

Index: src/share/man/man4/com.4
diff -u src/share/man/man4/com.4:1.22 src/share/man/man4/com.4:1.23
--- src/share/man/man4/com.4:1.22	Mon Mar  6 09:06:01 2017
+++ src/share/man/man4/com.4	Sun May 21 09:12:19 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: com.4,v 1.22 2017/03/06 09:06:01 pgoyette Exp $
+.\"	$NetBSD: com.4,v 1.23 2017/05/21 09:12:19 wiz Exp $
 .\"
 .\" Copyright (c) 1990, 1991 The Regents of the University of California.
 .\" All rights reserved.
@@ -162,6 +162,7 @@ with the code listed.
 .Xr acpi 4 ,
 .Xr ast 4 ,
 .Xr cardbus 4 ,
+.Xr i386/pnpbios 4 ,
 .Xr isa 4 ,
 .Xr isapnp 4 ,
 .Xr mca 4 ,
@@ -170,7 +171,6 @@ with the code listed.
 .Xr options 4 ,
 .Xr pcmcia 4 ,
 .Xr pcmcom 4 ,
-.Xr pnpbios 4 ,
 .Xr puc 4 ,
 .Xr pxaip 4 ,
 .Xr rtfps 4 ,



CVS commit: src/sys/netinet

2017-05-21 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Sun May 21 08:36:22 UTC 2017

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

Log Message:
Add missing NULL check for pool_get call with PR_NOWAIT

This should fix a kernel panic reported by wiz@ on current-users ML:
  http://mail-index.netbsd.org/current-users/2017/05/03/msg031646.html


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/netinet/wqinput.c

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

Modified files:

Index: src/sys/netinet/wqinput.c
diff -u src/sys/netinet/wqinput.c:1.1 src/sys/netinet/wqinput.c:1.2
--- src/sys/netinet/wqinput.c:1.1	Thu Feb  2 02:52:10 2017
+++ src/sys/netinet/wqinput.c	Sun May 21 08:36:22 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: wqinput.c,v 1.1 2017/02/02 02:52:10 ozaki-r Exp $	*/
+/*	$NetBSD: wqinput.c,v 1.2 2017/05/21 08:36:22 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 2017 Internet Initiative Japan Inc.
@@ -249,6 +249,11 @@ wqinput_input(struct wqinput *wqi, struc
 	}
 
 	work = pool_get(>wqi_work_pool, PR_NOWAIT);
+	if (work == NULL) {
+		wwl->wwl_dropped++;
+		m_freem(m);
+		goto out;
+	}
 	work->ww_mbuf = m;
 	work->ww_off = off;
 	work->ww_proto = proto;



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

2017-05-21 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun May 21 07:06:51 UTC 2017

Modified Files:
src/sys/arch/arm/arm32: pmap.c

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.345 -r1.346 src/sys/arch/arm/arm32/pmap.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/arm32/pmap.c
diff -u src/sys/arch/arm/arm32/pmap.c:1.345 src/sys/arch/arm/arm32/pmap.c:1.346
--- src/sys/arch/arm/arm32/pmap.c:1.345	Mon Apr 17 14:52:52 2017
+++ src/sys/arch/arm/arm32/pmap.c	Sun May 21 07:06:51 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.345 2017/04/17 14:52:52 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.346 2017/05/21 07:06:51 skrll Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -217,7 +217,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.345 2017/04/17 14:52:52 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.346 2017/05/21 07:06:51 skrll Exp $");
 
 //#define PMAP_DEBUG
 #ifdef PMAP_DEBUG
@@ -1172,7 +1172,8 @@ pmap_remove_pv(struct vm_page_md *md, pa
 	KASSERT((md->pvh_attrs & PVF_DMOD) == 0 || (md->pvh_attrs & (PVF_DIRTY|PVF_NC)));
 #endif /* PMAP_CACHE_VIPT && !ARM_MMU_EXTENDED */
 
-	return(pv);/* return removed pv */
+	/* return removed pv */
+	return pv;
 }
 
 /*



CVS commit: src/sys/arch

2017-05-21 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun May 21 06:49:13 UTC 2017

Modified Files:
src/sys/arch/evbmips/ingenic: clock.c cpu.c intr.c machdep.c mainbus.c
src/sys/arch/mips/conf: files.ingenic
src/sys/arch/mips/ingenic: ingenic_regs.h ingenic_var.h
Added Files:
src/sys/arch/mips/ingenic: ingenic_coreregs.h
src/sys/arch/mips/mips: locore_ingenic.S

Log Message:
Provide and use some CP0 accessor functions instead of M[TF]C0 macros
for readability.

While here convert some other M[TF]C0 uses to already exising accessor
functions, e.g. mipsNN_cp0_ebase_read


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbmips/ingenic/clock.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbmips/ingenic/cpu.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbmips/ingenic/intr.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/evbmips/ingenic/machdep.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbmips/ingenic/mainbus.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/mips/conf/files.ingenic
cvs rdiff -u -r0 -r1.1 src/sys/arch/mips/ingenic/ingenic_coreregs.h
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/mips/ingenic/ingenic_regs.h
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mips/ingenic/ingenic_var.h
cvs rdiff -u -r0 -r1.1 src/sys/arch/mips/mips/locore_ingenic.S

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

Modified files:

Index: src/sys/arch/evbmips/ingenic/clock.c
diff -u src/sys/arch/evbmips/ingenic/clock.c:1.9 src/sys/arch/evbmips/ingenic/clock.c:1.10
--- src/sys/arch/evbmips/ingenic/clock.c:1.9	Fri May 19 07:40:58 2017
+++ src/sys/arch/evbmips/ingenic/clock.c	Sun May 21 06:49:12 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: clock.c,v 1.9 2017/05/19 07:40:58 skrll Exp $ */
+/*	$NetBSD: clock.c,v 1.10 2017/05/21 06:49:12 skrll Exp $ */
 
 /*-
  * Copyright (c) 2014 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.9 2017/05/19 07:40:58 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.10 2017/05/21 06:49:12 skrll Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -38,6 +38,7 @@ __KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.
 #include 
 #include 
 
+#include 
 #include 
 
 #include "opt_ingenic.h"
@@ -236,7 +237,7 @@ ingenic_clockintr(struct clockframe *cf)
 	 * XXX
 	 * needs to take the IPI lock and ping all online CPUs, not just core 1
 	 */
-	MTC0(1 << IPI_CLOCK, 20, 1);
+	mips_cp0_corembox_write(1, 1 << IPI_CLOCK);
 #endif
 	hardclock(cf);
 	splx(s);

Index: src/sys/arch/evbmips/ingenic/cpu.c
diff -u src/sys/arch/evbmips/ingenic/cpu.c:1.3 src/sys/arch/evbmips/ingenic/cpu.c:1.4
--- src/sys/arch/evbmips/ingenic/cpu.c:1.3	Fri May 19 07:40:58 2017
+++ src/sys/arch/evbmips/ingenic/cpu.c	Sun May 21 06:49:12 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.3 2017/05/19 07:40:58 skrll Exp $	*/
+/*	$NetBSD: cpu.c,v 1.4 2017/05/21 06:49:12 skrll Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.3 2017/05/19 07:40:58 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.4 2017/05/21 06:49:12 skrll Exp $");
 
 #include "opt_ingenic.h"
 #include "opt_multiprocessor.h"
@@ -47,8 +47,9 @@ __KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.3 
 #include 
 
 #include 
-#include 
+#include 
 #include 
+#include 
 
 static int	cpu_match(device_t, cfdata_t, void *);
 static void	cpu_attach(device_t, device_t, void *);
@@ -85,14 +86,16 @@ cpu_attach(device_t parent, device_t sel
 		ci = startup_cpu_info;
 		wbflush();
 		vec = (uint32_t)_wakeup;
-		reg = MFC0(12, 4);	/* reset entry reg */
+		reg = mips_cp0_corereim_read();
 		reg &= ~REIM_ENTRY_M;
 		reg |= vec;
-		MTC0(reg, 12, 4);
-		reg = MFC0(12, 2);	/* core control reg */
+		mips_cp0_corereim_write(reg);
+
+		reg = mips_cp0_corectrl_read();
 		reg |= CC_RPC1;		/* use our exception vector */
 		reg &= ~CC_SW_RST1;	/* get core 1 out of reset */
-		MTC0(reg, 12, 2);
+		mips_cp0_corectrl_write(reg);
+
 		while ((!kcpuset_isset(cpus_hatched, cpu_index(startup_cpu_info))) && (bail > 0)) {
 			delay(1000);
 			bail--;

Index: src/sys/arch/evbmips/ingenic/intr.c
diff -u src/sys/arch/evbmips/ingenic/intr.c:1.12 src/sys/arch/evbmips/ingenic/intr.c:1.13
--- src/sys/arch/evbmips/ingenic/intr.c:1.12	Sat Aug 27 05:52:43 2016
+++ src/sys/arch/evbmips/ingenic/intr.c	Sun May 21 06:49:12 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.12 2016/08/27 05:52:43 skrll Exp $ */
+/*	$NetBSD: intr.c,v 1.13 2017/05/21 06:49:12 skrll Exp $ */
 
 /*-
  * Copyright (c) 2014 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.12 2016/08/27 05:52:43 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.13 2017/05/21 06:49:12 skrll Exp $");
 
 #define __INTR_PRIVATE
 
@@ -44,7 +44,9 @@ __KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.1
 #include 
 #include 
 
+#include 
 #include 
+#include 
 
 #include "opt_ingenic.h"
 
@@ -126,14 +128,15 @@ evbmips_intr_init(void)
 	writereg(JZ_ICMR1, 0x);
 

CVS commit: src/sys/arch

2017-05-21 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun May 21 06:19:37 UTC 2017

Modified Files:
src/sys/arch/amd64/conf: XEN3_DOMU
src/sys/arch/i386/conf: XEN3_DOMU

Log Message:
Remove unnecessary SYSMON_* options.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/amd64/conf/XEN3_DOMU
cvs rdiff -u -r1.76 -r1.77 src/sys/arch/i386/conf/XEN3_DOMU

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/amd64/conf/XEN3_DOMU
diff -u src/sys/arch/amd64/conf/XEN3_DOMU:1.74 src/sys/arch/amd64/conf/XEN3_DOMU:1.75
--- src/sys/arch/amd64/conf/XEN3_DOMU:1.74	Thu May 11 15:42:15 2017
+++ src/sys/arch/amd64/conf/XEN3_DOMU	Sun May 21 06:19:37 2017
@@ -1,4 +1,4 @@
-# $NetBSD: XEN3_DOMU,v 1.74 2017/05/11 15:42:15 sborrill Exp $
+# $NetBSD: XEN3_DOMU,v 1.75 2017/05/21 06:19:37 pgoyette Exp $
 
 include 	"arch/amd64/conf/std.xen"
 
@@ -145,12 +145,6 @@ options 	IPFILTER_COMPAT # Compat for IP
 #options 	ALTQ_RIO	# RED with IN/OUT
 #options 	ALTQ_WFQ	# Weighted Fair Queueing
 
-# pseudo-device support for sysmon and its sub-components
-options 	SYSMON_POWER
-options 	SYSMON_ENVSYS
-options 	SYSMON_WDOG
-options 	SYSMON_TASKQ
-
 options 	NFS_BOOT_DHCP,NFS_BOOT_BOOTPARAM
 #options 	NFS_BOOT_BOOTSTATIC
 #options 	NFS_BOOTSTATIC_MYIP="\"169.254.1.2\""

Index: src/sys/arch/i386/conf/XEN3_DOMU
diff -u src/sys/arch/i386/conf/XEN3_DOMU:1.76 src/sys/arch/i386/conf/XEN3_DOMU:1.77
--- src/sys/arch/i386/conf/XEN3_DOMU:1.76	Sun Feb 26 12:41:50 2017
+++ src/sys/arch/i386/conf/XEN3_DOMU	Sun May 21 06:19:37 2017
@@ -1,4 +1,4 @@
-# $NetBSD: XEN3_DOMU,v 1.76 2017/02/26 12:41:50 rin Exp $
+# $NetBSD: XEN3_DOMU,v 1.77 2017/05/21 06:19:37 pgoyette Exp $
 
 include 	"arch/xen/conf/std.xen"
 
@@ -150,12 +150,6 @@ options 	IPFILTER_COMPAT # Compat for IP
 #options 	IPFILTER_DEFAULT_BLOCK	# block all packets by default
 #options 	TCP_DEBUG	# Record last TCP_NDEBUG packets with SO_DEBUG
 
-# pseudo-device support for sysmon and its sub-components
-options 	SYSMON_POWER
-options 	SYSMON_ENVSYS
-options 	SYSMON_WDOG
-options 	SYSMON_TASKQ
-
 #options 	ALTQ		# Manipulate network interfaces' output queues
 #options 	ALTQ_BLUE	# Stochastic Fair Blue
 #options 	ALTQ_CBQ	# Class-Based Queueing